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"
18 # get the right version of struct sockaddr
21 ac_cv_os_cflags="-std -D_SOCKADDR_LEN -D_NO_PROTO"
24 ac_cv_os_cflags="-D_SOCKADDR_LEN -D_NO_PROTO"
29 # get the right version of struct sockaddr
32 ac_cv_os_cflags="-std -D_SOCKADDR_LEN"
35 ac_cv_os_cflags="-D_SOCKADDR_LEN"
42 # turn on additional headers
43 ac_cv_os_cflags="-D_XOPEN_EXTENDED_SOURCE"
46 # avoid circular dependencies in yp headers, and more
47 ac_cv_os_cflags="-DHAVE_BAD_HEADERS -D_XOPEN_EXTENDED_SOURCE -D_USE_IRS -D_MSGQSUPPORT"
50 # avoid circular dependencies in yp headers
51 ac_cv_os_cflags="-DHAVE_BAD_HEADERS -D_XOPEN_EXTENDED_SOURCE -D_USE_IRS"
54 # make sure passing whole structures is handled in gcc
57 ac_cv_os_cflags="-fpcc-struct-return"
61 sunos[[34]]* | solaris1* | solaris2.[[0-5]] | sunos5.[[0-5]] | solaris2.5.* | sunos5.5.* )
64 # turn on 64-bit file offset interface
67 ac_cv_os_cflags="-D_LARGEFILE64_SOURCE"
72 # use Ansi compiler on HPUX
79 darwin* | macosx* | rhapsody* )
80 ac_cv_os_cflags="-D_P1003_1B_VISIBLE"
87 AMU_CFLAGS="$AMU_CFLAGS $ac_cv_os_cflags"
88 # use same flags for configuring, so it matches what we do at compile time
89 CFLAGS="$CFLAGS $ac_cv_os_cflags"
92 dnl ======================================================================