Revision
17071
Author
mikej
Date
2010-03-22 18:05:20 -0500 (Mon, 22 Mar 2010)

Log Message

fix openbsd build (FSBUILD-256)

Modified Paths

Diff

Modified: freeswitch/trunk/bootstrap.sh (17070 => 17071)


--- freeswitch/trunk/bootstrap.sh	2010-03-22 23:02:48 UTC (rev 17070)
+++ freeswitch/trunk/bootstrap.sh	2010-03-22 23:05:20 UTC (rev 17071)
@@ -25,6 +25,12 @@
 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 @@
 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'`

Modified: freeswitch/trunk/configure.in (17070 => 17071)


--- freeswitch/trunk/configure.in	2010-03-22 23:02:48 UTC (rev 17070)
+++ freeswitch/trunk/configure.in	2010-03-22 23:05:20 UTC (rev 17071)
@@ -589,7 +589,7 @@
     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(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/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
 
 ##

Modified: freeswitch/trunk/libs/sqlite/src/sqliteInt.h (17070 => 17071)


--- freeswitch/trunk/libs/sqlite/src/sqliteInt.h	2010-03-22 23:02:48 UTC (rev 17070)
+++ freeswitch/trunk/libs/sqlite/src/sqliteInt.h	2010-03-22 23:05:20 UTC (rev 17071)
@@ -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>