Changeset 203 for trunk/configure.ac


Ignore:
Timestamp:
Dec 7, 2008, 7:26:17 PM (16 years ago)
Author:
katerina
Message:

Fix compile failures on RHEL3 (ticket #130) and FreeBSD7 amd64 (ticket #131).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure.ac

    r202 r203  
    3535AC_SUBST(BUILD_CC)
    3636
    37 if test "x$GCC" = "xyes"; then
    38    GCC_STACK_PROTECT_LIB
    39    GCC_STACK_PROTECT_CC
    40    GCC_PIE_CC
    41 fi
    42 
    4337AC_HEADER_STDC
    4438dnl
     
    4943
    5044
    51 AC_MSG_CHECKING([for host-specific issues])
     45AC_MSG_CHECKING([for OS specific issues])
    5246mydebugflag=no
    5347myneedg3=no
     
    5751sh_use_lcaps="undef"
    5852dnmalloc_ok=yes
     53sh_use_pie=yes
    5954
    6055case "$host_os" in
     
    6459        AC_DEFINE(HOST_IS_LINUX)
    6560        AC_DEFINE(HAVE_EXT2_IOCTLS)
    66         AC_MSG_RESULT(LINUX use ioctl to get e2fs flags)
     61        AC_MSG_RESULT(use ioctl to get e2fs flags)
    6762        case "$host_cpu" in
    6863           i*86*)
     
    8075          CFLAGS="$CFLAGS -O2 -assume noaligned_objects"
    8176          myneedg3=yes
    82           AC_MSG_RESULT(OSF1 compiler needs assume noaligned_objects)
     77          AC_MSG_RESULT(compiler needs assume noaligned_objects)
    8378        else
    8479          AC_MSG_RESULT(none)
     
    8984        AC_DEFINE(HOST_IS_CYGWIN)
    9085        dnmalloc_ok=no
    91         AC_MSG_RESULT(CYGWIN no trusted paths and no dnmalloc)
     86        AC_MSG_RESULT(no trusted paths and no dnmalloc)
    9287        ;;
    9388
    9489        *darwin*)
    9590        AC_DEFINE(HOST_IS_DARWIN)
    96         AC_MSG_RESULT(DARWIN check resource forks)
     91        AC_MSG_RESULT(check resource forks)
    9792        ;;
    9893
     94        *freebsd7*)
     95        AC_DEFINE(HOST_IS_FREEBSD)
     96        selectconfig=freebsd
     97        case "$host_cpu" in
     98                amd64)
     99                sh_use_pie=no
     100                dnmalloc_ok=no
     101                AC_MSG_RESULT([no dnmalloc and broken compiler toolchain])
     102                ;;
     103                *)
     104                AC_MSG_RESULT(none)
     105                ;;
     106        esac
     107        ;;
     108       
    99109        *freebsd*)
    100110        AC_DEFINE(HOST_IS_FREEBSD)
     
    107117        selectconfig=freebsd
    108118        dnmalloc_ok=no
    109         AC_MSG_RESULT(OpenBSD dnmalloc does not work with pthreads)
     119        AC_MSG_RESULT(dnmalloc does not work with pthreads)
    110120        ;;
    111121
     
    113123        mynetbsd=yes
    114124        selectconfig=netbsd
    115         AC_MSG_RESULT(NETBSD bug with libresolve)
     125        AC_MSG_RESULT(bug with libresolve)
    116126        ;;
    117127
     
    122132                i*86)
    123133                AC_DEFINE(HOST_IS_I86SOLARIS)
    124                 AC_MSG_RESULT(SOLARIS I86 vsnprintf prototype)
     134                AC_MSG_RESULT(vsnprintf prototype)
    125135                ;;
    126136                *)
     
    195205AC_DEFINE_UNQUOTED(UID_CAST, ${uid_cast})
    196206
    197 dnl Test whether gcc supports -Wno-empty-body
    198 dnl Suppresses warnings from glibc pthread_cleanup_pop
    199 dnl
    200 GCC_WEMPTY_BODY
    201207
    202208
     
    316322                AC_HEADER_EGREP(comp_t,   sys/acct.h, AC_DEFINE(HAVE_COMP_T, ,
    317323                                                                [Define if <sys/acct.h> uses the COMP_T type.]))
     324                AC_HEADER_EGREP([struct acct_v3],   sys/acct.h, AC_DEFINE(HAVE_ACCT_V3, ,
     325                                                                [Define if <sys/acct.h> has struct acct_v3.]))
    318326 )
    319327
     
    624632
    625633AM_SA_SIGACTION_WORKS
     634
     635if test "x$GCC" = "xyes"; then
     636   GCC_STACK_PROTECT_LIB
     637   GCC_STACK_PROTECT_CC
     638   GCC_PIE_CC
     639fi
    626640
    627641dnl *****************************************
     
    975989)
    976990
    977 if test x$enable_static = xyes; then
    978    :
    979 else
    980    LDFLAGS="$LDFLAGS $PIE_LDFLAGS"
    981    CFLAGS="$CFLAGS $PIE_CFLAGS"
    982 fi
    983 
    984991if test x"${mytclient}" = x-DSH_STANDALONE -o x"${mytclient}" = x-DSH_WITH_CLIENT;
    985992then
     
    9931000        CHECK_ZLIB()
    9941001fi
     1002
     1003if test x$enable_static = xyes; then
     1004   :
     1005else
     1006   if test x$sh_use_pie = xyes; then
     1007      LDFLAGS="$LDFLAGS $PIE_LDFLAGS"
     1008      CFLAGS="$CFLAGS $PIE_CFLAGS"
     1009   fi
     1010fi
     1011
    9951012       
    9961013#
     
    14401457                           LIBS="-lpcre $LIBS"
    14411458                           ],
    1442                            AC_MSG_ERROR([The --enable-logfile-monitor option requires libpcre. For compiling the pcre development package is needed.])
     1459                           [
     1460                                AC_CHECK_HEADER(pcre/pcre.h,
     1461                                [
     1462                                AC_DEFINE(USE_LOGFILE_MONITOR, 1, [Define if you want the logfile monitor module.])
     1463                                AC_DEFINE(HAVE_PCRE_PCRE_H, 1, [Define if you have pcre/pcre.h.])
     1464                                LIBS="-lpcre $LIBS"
     1465                                ],
     1466                                AC_MSG_ERROR([The --enable-logfile-monitor option requires libpcre. For compiling the pcre development package is needed.])
     1467                                )
     1468                          ]
    14431469           )
    14441470        fi
     
    15841610
    15851611fi
     1612
     1613dnl Test whether gcc supports -Wno-empty-body
     1614dnl Suppresses warnings from glibc pthread_cleanup_pop
     1615dnl
     1616GCC_WEMPTY_BODY
    15861617
    15871618AC_MSG_CHECKING([which random module to use])
Note: See TracChangeset for help on using the changeset viewer.