--- configure.orig 2016-02-12 13:51:25 UTC +++ configure @@ -6661,6 +6661,29 @@ tools are selected during the Xcode/Deve PR_MD_CSRCS=dgux.c ;; +*-bsdsunix*) + if test -z "$USE_NSPR_THREADS"; then + USE_PTHREADS=1 + fi + $as_echo "#define XP_UNIX 1" >>confdefs.h + + $as_echo "#define BSDSUNIX 1" >>confdefs.h + + $as_echo "#define HAVE_BSD_FLOCK 1" >>confdefs.h + + $as_echo "#define HAVE_SOCKLEN_T 1" >>confdefs.h + + CFLAGS="$CFLAGS $(DSO_CFLAGS) -ansi -Wall" + if test -z "$MOZILLA_CLIENT"; then + DLL_SUFFIX=so.1 + 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 @@ -6674,11 +6697,8 @@ tools are selected during the Xcode/Deve $as_echo "#define HAVE_SOCKLEN_T 1" >>confdefs.h 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 + if test -z "$MOZILLA_CLIENT"; then + DLL_SUFFIX=so.1 fi MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@' DSO_CFLAGS=-fPIC @@ -8283,7 +8303,7 @@ $as_echo_n "checking whether ${CC-cc} ac 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 ;; *) @@ -8321,6 +8341,15 @@ $as_echo "$ac_cv_have_dash_pthreads" >&6 _PTHREAD_LDFLAGS= fi ;; + *-bsdsunix*) + $as_echo "#define _REENTRANT 1" >>confdefs.h + + $as_echo "#define _THREAD_SAFE 1" >>confdefs.h + + if test "$ac_cv_have_dash_pthread" = "yes"; then + _PTHREAD_LDFLAGS="-pthread" + fi + ;; *-freebsd*) $as_echo "#define _REENTRANT 1" >>confdefs.h @@ -8328,8 +8357,6 @@ $as_echo "$ac_cv_have_dash_pthreads" >&6 if test "$ac_cv_have_dash_pthread" = "yes"; then _PTHREAD_LDFLAGS="-pthread" - else - _PTHREAD_LDFLAGS="-lc_r" fi ;; *-netbsd*) @@ -8411,6 +8438,12 @@ case "$target" in fi ;; +*-bsdsunix*) + if test -n "$USE_NSPR_THREADS"; then + $as_echo "#define _PR_LOCAL_THREADS_ONLY 1" >>confdefs.h + + fi + ;; *-freebsd*) if test -n "$USE_NSPR_THREADS"; then $as_echo "#define _PR_LOCAL_THREADS_ONLY 1" >>confdefs.h