blob: 35efa44b388d861063c304e4b242ccdc5ca1a133 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
dnl ######################################################################
dnl Specify additional compile options based on the OS and the compiler
dnl From Erez Zadok <ezk@cs.sunysb.edu>, http://www.am-utils.org
AC_DEFUN([AMU_OS_CFLAGS],
[
AC_CACHE_CHECK(additional compiler flags,
ac_cv_os_cflags,
[
case "${host_os}" in
irix6* )
case "${CC}" in
cc )
# do not use 64-bit compiler
ac_cv_os_cflags="-n32 -mips3 -Wl,-woff,84"
;;
esac
;;
# HMS: am-utils needed this but we don't (apparently)
# osf[[1-3]]* )
# # get the right version of struct sockaddr
# case "${CC}" in
# cc )
# ac_cv_os_cflags="-std -D_SOCKADDR_LEN -D_NO_PROTO"
# ;;
# * )
# ac_cv_os_cflags="-D_SOCKADDR_LEN -D_NO_PROTO"
# ;;
# esac
# ;;
# osf* )
# # get the right version of struct sockaddr
# case "${CC}" in
# cc )
# ac_cv_os_cflags="-std -D_SOCKADDR_LEN"
# ;;
# * )
# ac_cv_os_cflags="-D_SOCKADDR_LEN"
# ;;
# esac
# ;;
aix[[1-3]]* )
ac_cv_os_cflags="" ;;
aix4.[[0-2]]* )
# turn on additional headers
ac_cv_os_cflags="-D_XOPEN_EXTENDED_SOURCE"
;;
aix* )
# avoid circular dependencies in yp headers
ac_cv_os_cflags="-DHAVE_BAD_HEADERS -D_XOPEN_EXTENDED_SOURCE"
;;
OFF-sunos4* )
# make sure passing whole structures is handled in gcc
case "${CC}" in
gcc )
ac_cv_os_cflags="-fpcc-struct-return"
;;
esac
;;
sunos[[34]]* | solaris1* | solaris2.[[0-5]]* | sunos5.[[0-5]]* )
ac_cv_os_cflags="" ;;
solaris* | sunos* )
# turn on 64-bit file offset interface
case "${CC}" in
* )
ac_cv_os_cflags="-D_LARGEFILE64_SOURCE"
;;
esac
;;
hpux* )
# use Ansi compiler on HPUX
case "${CC}" in
cc )
ac_cv_os_cflags="-Ae"
;;
esac
;;
darwin* | rhapsody* )
ac_cv_os_cflags="-D_P1003_1B_VISIBLE"
;;
* )
ac_cv_os_cflags=""
;;
esac
])
CFLAGS="$CFLAGS $ac_cv_os_cflags"
])
dnl ======================================================================
|