summary refs log tree commit diff
path: root/m4
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2022-02-27 09:57:33 -0500
committerJune McEnroe <june@causal.agency>2022-02-27 09:57:33 -0500
commit913a7ee3584b9cdb05b473123b529677f16e4e0b (patch)
tree45ed028bf5e09339cd815eb1277b6343213d44b6 /m4
parentImport LibreSSL 3.4.2 (diff)
downloadlibretls-913a7ee3584b9cdb05b473123b529677f16e4e0b.tar.gz
libretls-913a7ee3584b9cdb05b473123b529677f16e4e0b.zip
Import LibreSSL 3.5.0
Diffstat (limited to '')
-rw-r--r--m4/check-libc.m412
-rw-r--r--m4/check-os-options.m415
2 files changed, 17 insertions, 10 deletions
diff --git a/m4/check-libc.m4 b/m4/check-libc.m4
index e511f6d..40df67f 100644
--- a/m4/check-libc.m4
+++ b/m4/check-libc.m4
@@ -1,6 +1,11 @@
 AC_DEFUN([CHECK_LIBC_COMPAT], [
 # Check for libc headers
-AC_CHECK_HEADERS([err.h readpassphrase.h])
+AC_CHECK_HEADERS([endian.h err.h readpassphrase.h])
+AC_CHECK_HEADERS([netinet/ip.h], [], [],
+[#include <sys/types.h>
+#include <arpa/inet.h>
+])
+AC_HEADER_RESOLV
 # Check for general libc functions
 AC_CHECK_FUNCS([asprintf freezero memmem])
 AC_CHECK_FUNCS([readpassphrase reallocarray recallocarray])
@@ -9,10 +14,7 @@ AC_CHECK_FUNCS([timegm _mkgmtime timespecsub])
 AC_CHECK_FUNCS([getprogname syslog syslog_r])
 AC_CACHE_CHECK([for getpagesize], ac_cv_func_getpagesize, [
 	AC_LINK_IFELSE([AC_LANG_PROGRAM([[
-// Since Android NDK v16 getpagesize is defined as inline inside unistd.h
-#ifdef __ANDROID__
-#	include <unistd.h>
-#endif
+#include <unistd.h>
 		]], [[
 	getpagesize();
 ]])],
diff --git a/m4/check-os-options.m4 b/m4/check-os-options.m4
index 644bf71..bd38938 100644
--- a/m4/check-os-options.m4
+++ b/m4/check-os-options.m4
@@ -68,10 +68,15 @@ char buf[1]; getentropy(buf, 1);
 		;;
 	*hpux*)
 		HOST_OS=hpux;
-		if test "`echo $CC | cut -d ' ' -f 1`" = "gcc" ; then
-			CFLAGS="$CFLAGS -mlp64"
-		else
-			CFLAGS="-g -O2 +DD64 +Otype_safety=off $USER_CFLAGS"
+		if test "`echo $host_os | cut -c 1-4`" = "ia64" ; then
+			if test "`echo $CC | cut -d ' ' -f 1`" = "gcc" ; then
+				CFLAGS="$CFLAGS -mlp64"
+			else
+				CFLAGS="+DD64"
+			fi
+		fi
+		if ! test "`echo $CC | cut -d ' ' -f 1`" = "gcc" ; then
+			CFLAGS="-g -O2 +Otype_safety=off $CFLAGS $USER_CFLAGS"
 		fi
 		CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=600 -D__STRICT_ALIGNMENT"
 		;;
@@ -118,7 +123,7 @@ char buf[1]; getentropy(buf, 1);
 		HOST_OS=solaris
 		HOST_ABI=elf
 		CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__ -D_XOPEN_SOURCE=600 -DBSD_COMP"
-		AC_SUBST([PLATFORM_LDADD], ['-ldl -lnsl -lsocket'])
+		AC_SUBST([PLATFORM_LDADD], ['-ldl -lmd -lnsl -lsocket'])
 		;;
 	*) ;;
 esac