--- configure.in.orig 2016-02-12 13:51:25 UTC +++ configure.in @@ -846,6 +846,10 @@ if test "$OS_ARCH" = "AIX"; then OS_RELEASE=`uname -v`.`uname -r` fi +if test "$OS_ARCH" = "BSDSUniX"; then + OS_RELEASE=`echo $OS_RELEASE | sed 's/-.*//'` +fi + if test "$OS_ARCH" = "FreeBSD"; then OS_RELEASE=`echo $OS_RELEASE | sed 's/-.*//'` fi @@ -1511,6 +1515,28 @@ tools are selected during the Xcode/Deve PR_MD_CSRCS=dgux.c ;; +*-bsdsunix*) + if test -z "$USE_NSPR_THREADS"; then + USE_PTHREADS=1 + fi + AC_DEFINE(XP_UNIX) + AC_DEFINE(BSDSUNIX) + AC_DEFINE(HAVE_BSD_FLOCK) + AC_DEFINE(HAVE_SOCKLEN_T) + CFLAGS="$CFLAGS $(DSO_CFLAGS) -ansi -Wall" + MOZ_OBJFORMAT=`test -x /usr/bin/objformat && /usr/bin/objformat || echo elf` + if test "$MOZ_OBJFORMAT" = "elf"; then + DLL_SUFFIX=so + else + DLL_SUFFIX=so.1.0 + fi + MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@' + DSO_CFLAGS=-fPIC + DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)' + MDCPUCFG_H=_bsdsunix.cfg + PR_MD_CSRCS=bsdsunix.c + ;; + *-freebsd*) if test -z "$USE_NSPR_THREADS"; then USE_PTHREADS=1 @@ -2715,7 +2741,7 @@ if test -n "$USE_PTHREADS"; then if test -z "`egrep -i '(unrecognize|unknown)' conftest.out | grep pthread`" && test -z "`egrep -i '(error|incorrect)' conftest.out`" ; then ac_cv_have_dash_pthread=yes case "$target_os" in - freebsd*) + bsdsunix*|freebsd*) # Freebsd doesn't use -pthread for compiles, it uses them for linking ;; *) @@ -2753,6 +2779,16 @@ if test -n "$USE_PTHREADS"; then _PTHREAD_LDFLAGS= fi ;; + *-bsdsunix*) + AC_DEFINE(_REENTRANT) + AC_DEFINE(_THREAD_SAFE) + dnl -pthread links in -lc_r, so don't specify it explicitly. + if test "$ac_cv_have_dash_pthread" = "yes"; then + _PTHREAD_LDFLAGS="-pthread" + else + _PTHREAD_LDFLAGS="-lc_r" + fi + ;; *-freebsd*) AC_DEFINE(_REENTRANT) AC_DEFINE(_THREAD_SAFE) @@ -2834,6 +2870,11 @@ case "$target" in AC_DEFINE(_PR_NEED_PTHREAD_INIT) fi ;; +*-bsdsunix*) + if test -n "$USE_NSPR_THREADS"; then + AC_DEFINE(_PR_LOCAL_THREADS_ONLY) + fi + ;; *-freebsd*) if test -n "$USE_NSPR_THREADS"; then AC_DEFINE(_PR_LOCAL_THREADS_ONLY)