1 dnl ######################################################################
2 dnl Specify additional compile options based on the OS and the compiler
3 AC_DEFUN([AMU_OS_CFLAGS],
5 AC_CACHE_CHECK(additional compiler flags,
12 # do not use 64-bit compiler
13 ac_cv_os_cflags="-n32 -mips3 -Wl,-woff,84"
17 # HMS: am-utils needed this but we don't (apparently)
19 # # get the right version of struct sockaddr
22 # ac_cv_os_cflags="-std -D_SOCKADDR_LEN -D_NO_PROTO"
25 # ac_cv_os_cflags="-D_SOCKADDR_LEN -D_NO_PROTO"
30 # # get the right version of struct sockaddr
33 # ac_cv_os_cflags="-std -D_SOCKADDR_LEN"
36 # ac_cv_os_cflags="-D_SOCKADDR_LEN"
43 # turn on additional headers
44 ac_cv_os_cflags="-D_XOPEN_EXTENDED_SOURCE"
47 # avoid circular dependencies in yp headers, and more
48 ac_cv_os_cflags="-DHAVE_BAD_HEADERS -D_XOPEN_EXTENDED_SOURCE -D_USE_IRS -D_MSGQSUPPORT"
51 # avoid circular dependencies in yp headers
52 ac_cv_os_cflags="-DHAVE_BAD_HEADERS -D_XOPEN_EXTENDED_SOURCE -D_USE_IRS"
55 # make sure passing whole structures is handled in gcc
58 ac_cv_os_cflags="-fpcc-struct-return"
62 sunos[[34]]* | solaris1* | solaris2.[[0-5]] | sunos5.[[0-5]] | solaris2.5.* | sunos5.5.* )
65 # turn on 64-bit file offset interface
68 ac_cv_os_cflags="-D_LARGEFILE64_SOURCE"
73 # use Ansi compiler on HPUX
80 darwin* | macosx* | rhapsody* )
81 ac_cv_os_cflags="-D_P1003_1B_VISIBLE"
88 CFLAGS="$CFLAGS $ac_cv_os_cflags"
90 dnl ======================================================================