]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix openbsd build (FSBUILD-256)
authorMichael Jerris <mike@jerris.com>
Mon, 22 Mar 2010 23:05:20 +0000 (23:05 +0000)
committerMichael Jerris <mike@jerris.com>
Mon, 22 Mar 2010 23:05:20 +0000 (23:05 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@17071 d0543943-73ff-0310-b7d9-9358b9ac24b2

bootstrap.sh
configure.in
libs/sqlite/src/sqliteInt.h

index 0457eb6bb4f13fff56f02746f3134a0394345a7e..861ce6c918541b99066d8aaa96a2bfa3dd6d8dbb 100755 (executable)
@@ -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'`
index 416d21cb93d20c2ce4ee66e5f7a2fd9726f7f2e7..44c5929de66779a58680656d31685e13b387333f 100644 (file)
@@ -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
 
 ##
index f844ddf24e1210100f38864f047fe85bf8b0688f..6483912cc9970882b42d869eb825659d17c07408 100644 (file)
@@ -61,6 +61,9 @@
 #include "hash.h"
 #include "parse.h"
 #include <stdio.h>
+#ifdef __OpenBSD__
+#include <stdint.h>
+#endif
 #include <stdlib.h>
 #include <string.h>
 #include <assert.h>