diff --git a/bootstrap.sh b/bootstrap.sh index 0457eb6bb4..861ce6c918 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -25,6 +25,12 @@ echo " You need autoconf version 2.59 or newer installed" echo " to build FreeSWITCH from SVN." exit 1 fi + +if test `uname -s` = "OpenBSD" && test "$ac_version" = "2.62"; then +echo "Autoconf 2.62 is broken on OpenBSD, please try another version" +exit 1 +fi + IFS=_; set $ac_version; IFS=' ' ac_version=$1 IFS=.; set $ac_version; IFS=' ' @@ -37,6 +43,7 @@ else echo "bootstrap: autoconf version $ac_version (ok)" fi + # automake 1.7 or newer am_version=`${AUTOMAKE:-automake} --version 2>/dev/null|sed -e 's/^[^0-9]*//;s/[a-z]* *$//;s/[- ].*//g;q'` diff --git a/configure.in b/configure.in index 416d21cb93..44c5929de6 100644 --- a/configure.in +++ b/configure.in @@ -589,7 +589,7 @@ elif test "$ac_cv_sizeof_long" = "8"; then int64_value="long" long_value=long case "$host" in - *-solaris2*|*apple-darwin*) + *-solaris2*|*apple-darwin*|*-openbsd*) if test "$ac_cv_sizeof_long_long" = "8"; then int64_t_fmt='#define SWITCH_INT64_T_FMT "lld"' uint64_t_fmt='#define SWITCH_UINT64_T_FMT "llu"' @@ -696,7 +696,16 @@ AC_SUBST(uint64_t_fmt) AC_SUBST(ssize_t_fmt) AC_SUBST(size_t_fmt) -AC_PATH_PROGS(ZCAT, gunzip gzcat gzip zcat) +case $host in + *-openbsd*) + # OpenBSD's gunzip and friends don't like -d because its redundant, only gzip does + AC_PATH_PROGS(ZCAT, gzip) + ;; + *) + AC_PATH_PROGS(ZCAT, gunzip gzcat gzip zcat) + ;; +esac + AC_PATH_PROGS(TAR, gtar tar) AC_PATH_PROGS(WGET, wget) AC_PATH_PROGS(CURL, curl) @@ -951,6 +960,14 @@ AC_CONFIG_SUBDIRS([libs/spandsp]) AC_CONFIG_SUBDIRS([libs/broadvoice]) AC_CONFIG_SUBDIRS([libs/libg722_1]) +case $host in + *-openbsd*) + # libtool won't link static libs against shared ones on OpenBSD unless we tell it not to be stupid + AC_CONFIG_COMMANDS([hacklibtool], [cp libtool libtool.orig && sed -e "s/deplibs_check_method=.*/deplibs_check_method=pass_all/g" libtool.orig > libtool]) + ;; +esac + + AC_OUTPUT ## diff --git a/libs/sqlite/src/sqliteInt.h b/libs/sqlite/src/sqliteInt.h index f844ddf24e..6483912cc9 100644 --- a/libs/sqlite/src/sqliteInt.h +++ b/libs/sqlite/src/sqliteInt.h @@ -61,6 +61,9 @@ #include "hash.h" #include "parse.h" #include +#ifdef __OpenBSD__ +#include +#endif #include #include #include