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=' '
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'`
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"'
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)
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
##