1 dnl ######################################################################
2 dnl Specify additional compile options based on the OS and the compiler
3 dnl From Erez Zadok <ezk@cs.sunysb.edu>, http://www.am-utils.org
4 AC_DEFUN([AMU_OS_CFLAGS],
6 AC_CACHE_CHECK(additional compiler flags,
13 # do not use 64-bit compiler
14 ac_cv_os_cflags="-n32 -mips3 -Wl,-woff,84"
18 # HMS: am-utils needed this but we don't (apparently)
20 # # get the right version of struct sockaddr
23 # ac_cv_os_cflags="-std -D_SOCKADDR_LEN -D_NO_PROTO"
26 # ac_cv_os_cflags="-D_SOCKADDR_LEN -D_NO_PROTO"
31 # # get the right version of struct sockaddr
34 # ac_cv_os_cflags="-std -D_SOCKADDR_LEN"
37 # ac_cv_os_cflags="-D_SOCKADDR_LEN"
44 # turn on additional headers
45 ac_cv_os_cflags="-D_XOPEN_EXTENDED_SOURCE"
48 # avoid circular dependencies in yp headers
49 ac_cv_os_cflags="-DHAVE_BAD_HEADERS -D_XOPEN_EXTENDED_SOURCE"
52 # make sure passing whole structures is handled in gcc
55 ac_cv_os_cflags="-fpcc-struct-return"
59 sunos[[34]]* | solaris1* | solaris2.[[0-5]]* | sunos5.[[0-5]]* )
62 # turn on 64-bit file offset interface
65 ac_cv_os_cflags="-D_LARGEFILE64_SOURCE"
70 # use Ansi compiler on HPUX
78 ac_cv_os_cflags="-D_P1003_1B_VISIBLE"
85 CFLAGS="$CFLAGS $ac_cv_os_cflags"
87 dnl ======================================================================