--- apr-1.7.0/configure.orig 2019-04-02 03:56:23.000000000 +1000 +++ apr-1.7.0/configure 2021-12-26 23:08:05.278238000 +1000 @@ -6731,6 +6731,48 @@ fi ;; + *-bsdsunix*) + + if test -z "$apr_lock_method"; then + test "x$silent" != "xyes" && echo " setting apr_lock_method to \"USE_FLOCK_SERIALIZE\"" + apr_lock_method="USE_FLOCK_SERIALIZE" + fi + + os_version="100006" + # 100000 is when libc_r switched to libpthread (aka libkse). + if test $os_version -ge "100000"; then + apr_cv_pthreads_cflags="none" + apr_cv_pthreads_lib="-lpthread" + else + + if test "x$CPPFLAGS" = "x"; then + test "x$silent" != "xyes" && echo " setting CPPFLAGS to \"-D_THREAD_SAFE -D_REENTRANT\"" + CPPFLAGS="-D_THREAD_SAFE -D_REENTRANT" + else + apr_addto_bugger="-D_THREAD_SAFE -D_REENTRANT" + for i in $apr_addto_bugger; do + apr_addto_duplicate="0" + for j in $CPPFLAGS; do + if test "x$i" = "x$j"; then + apr_addto_duplicate="1" + break + fi + done + if test $apr_addto_duplicate = "0"; then + test "x$silent" != "xyes" && echo " adding \"$i\" to CPPFLAGS" + CPPFLAGS="$CPPFLAGS $i" + fi + done + fi + + + if test -z "$enable_threads"; then + test "x$silent" != "xyes" && echo " setting enable_threads to \"no\"" + enable_threads="no" + fi + + fi + ;; *-k*bsd*-gnu) if test "x$CPPFLAGS" = "x"; then @@ -11346,7 +11388,7 @@ lt_cv_sys_max_cmd_len=8192; ;; - bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) + bitrig* | darwin* | dragonfly* | bsdsunix* | freebsd* | netbsd* | openbsd*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` @@ -11754,13 +11796,13 @@ lt_cv_deplibs_check_method=pass_all ;; -freebsd* | dragonfly*) +bsdsunix* | freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' + lt_cv_deplibs_check_method='file_magic (BSDSUniX|FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; @@ -15996,7 +16038,7 @@ ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) + bsdsunix* | freebsd* | dragonfly*) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes @@ -17041,6 +17083,16 @@ shlibpath_var=LD_LIBRARY_PATH ;; +bsdsunix*) + version_type=bsdsunix-elf + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. @@ -19436,6 +19488,9 @@ # For some platforms we need a version string which allows easy numeric # comparisons. case $host in + *bsdsunix*) + os_version="100006" + ;; *freebsd*) if test -x /sbin/sysctl; then os_version=`/sbin/sysctl -n kern.osreldate`