diff options
-rw-r--r-- | configure.ac | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 2cd9814..59542d0 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -9,6 +9,9 @@ AC_CONFIG_MACRO_DIR([m4]) | |||
9 | 9 | ||
10 | m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) | 10 | m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) |
11 | 11 | ||
12 | # This must be called before AC_PROG_CC | ||
13 | USER_CFLAGS="$CFLAGS" | ||
14 | |||
12 | AC_PROG_CC | 15 | AC_PROG_CC |
13 | AC_PROG_CC_STDC | 16 | AC_PROG_CC_STDC |
14 | AM_PROG_CC_C_O | 17 | AM_PROG_CC_C_O |
@@ -20,6 +23,9 @@ CFLAGS="$CFLAGS -Wall -std=gnu99" | |||
20 | case $host_os in | 23 | case $host_os in |
21 | *aix*) | 24 | *aix*) |
22 | HOST_OS=aix | 25 | HOST_OS=aix |
26 | if [ $CC != "gcc" ]; then | ||
27 | CFLAGS="$USER_CFLAGS" | ||
28 | fi | ||
23 | AC_SUBST([PLATFORM_LDADD], ['-lperfstat -lpthread']) | 29 | AC_SUBST([PLATFORM_LDADD], ['-lperfstat -lpthread']) |
24 | ;; | 30 | ;; |
25 | *cygwin*) | 31 | *cygwin*) |
@@ -36,7 +42,11 @@ case $host_os in | |||
36 | ;; | 42 | ;; |
37 | *hpux*) | 43 | *hpux*) |
38 | HOST_OS=hpux; | 44 | HOST_OS=hpux; |
39 | CFLAGS="$CFLAGS -mlp64" | 45 | if [ $CC = "gcc" ]; then |
46 | CFLAGS="$CFLAGS -mlp64" | ||
47 | else | ||
48 | CFLAGS="-g -O2 +DD64 $USER_CFLAGS" | ||
49 | fi | ||
40 | CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=600 -D__STRICT_ALIGNMENT" | 50 | CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=600 -D__STRICT_ALIGNMENT" |
41 | AC_SUBST([PLATFORM_LDADD], ['-lpthread']) | 51 | AC_SUBST([PLATFORM_LDADD], ['-lpthread']) |
42 | ;; | 52 | ;; |