aboutsummaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
Diffstat (limited to 'm4')
-rw-r--r--m4/check-libc.m415
-rw-r--r--m4/check-os-options.m421
-rw-r--r--m4/disable-compiler-warnings.m415
3 files changed, 48 insertions, 3 deletions
diff --git a/m4/check-libc.m4 b/m4/check-libc.m4
index 8cb849b..dadf0da 100644
--- a/m4/check-libc.m4
+++ b/m4/check-libc.m4
@@ -1,3 +1,18 @@
1#
2# Copyright (c) 2014 Brent Cook
3#
4# Permission to use, copy, modify, and distribute this software for any
5# purpose with or without fee is hereby granted, provided that the above
6# copyright notice and this permission notice appear in all copies.
7#
8# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15
1AC_DEFUN([CHECK_LIBC_COMPAT], [ 16AC_DEFUN([CHECK_LIBC_COMPAT], [
2# Check for libc headers 17# Check for libc headers
3AC_CHECK_HEADERS([endian.h machine/endian.h err.h readpassphrase.h]) 18AC_CHECK_HEADERS([endian.h machine/endian.h err.h readpassphrase.h])
diff --git a/m4/check-os-options.m4 b/m4/check-os-options.m4
index 2ef4293..fd63d77 100644
--- a/m4/check-os-options.m4
+++ b/m4/check-os-options.m4
@@ -1,3 +1,18 @@
1#
2# Copyright (c) 2014 Brent Cook
3#
4# Permission to use, copy, modify, and distribute this software for any
5# purpose with or without fee is hereby granted, provided that the above
6# copyright notice and this permission notice appear in all copies.
7#
8# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15
1AC_DEFUN([CHECK_OS_OPTIONS], [ 16AC_DEFUN([CHECK_OS_OPTIONS], [
2 17
3CFLAGS="$CFLAGS -Wall -std=gnu99 -fno-strict-aliasing" 18CFLAGS="$CFLAGS -Wall -std=gnu99 -fno-strict-aliasing"
@@ -74,14 +89,14 @@ char buf[1]; getentropy(buf, 1);
74 ;; 89 ;;
75 *hpux*) 90 *hpux*)
76 HOST_OS=hpux; 91 HOST_OS=hpux;
77 if test "`echo $host_os | cut -c 1-4`" = "ia64" ; then 92 if test "echo $host_os | cut -c 1-4" = "ia64" ; then
78 if test "`echo $CC | cut -d ' ' -f 1`" = "gcc" ; then 93 if test "echo $CC | cut -d ' ' -f 1" = "gcc" ; then
79 CFLAGS="$CFLAGS -mlp64" 94 CFLAGS="$CFLAGS -mlp64"
80 else 95 else
81 CFLAGS="+DD64" 96 CFLAGS="+DD64"
82 fi 97 fi
83 fi 98 fi
84 if ! test "`echo $CC | cut -d ' ' -f 1`" = "gcc" ; then 99 if ! test "echo $CC | cut -d ' ' -f 1" = "gcc" ; then
85 CFLAGS="-g -O2 +Otype_safety=off $CFLAGS $USER_CFLAGS" 100 CFLAGS="-g -O2 +Otype_safety=off $CFLAGS $USER_CFLAGS"
86 fi 101 fi
87 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=600 -D__STRICT_ALIGNMENT" 102 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=600 -D__STRICT_ALIGNMENT"
diff --git a/m4/disable-compiler-warnings.m4 b/m4/disable-compiler-warnings.m4
index 2792722..052e8ab 100644
--- a/m4/disable-compiler-warnings.m4
+++ b/m4/disable-compiler-warnings.m4
@@ -1,3 +1,18 @@
1#
2# Copyright (c) 2014 Brent Cook
3#
4# Permission to use, copy, modify, and distribute this software for any
5# purpose with or without fee is hereby granted, provided that the above
6# copyright notice and this permission notice appear in all copies.
7#
8# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15
1AC_DEFUN([DISABLE_COMPILER_WARNINGS], [ 16AC_DEFUN([DISABLE_COMPILER_WARNINGS], [
2# Clang throws a lot of warnings when it does not understand a flag. Disable 17# Clang throws a lot of warnings when it does not understand a flag. Disable
3# this warning for now so other warnings are visible. 18# this warning for now so other warnings are visible.