Changeset 171 for trunk/configure.ac


Ignore:
Timestamp:
Jul 8, 2008, 11:16:14 AM (16 years ago)
Author:
katerina
Message:

Include dnmalloc (ticket #108) and fix bugs #106 (EINPROGRESS) and #107 (compressBound).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure.ac

    r170 r171  
    1313dnl start
    1414dnl
    15 AM_INIT_AUTOMAKE(samhain, 2.4.4)
     15AM_INIT_AUTOMAKE(samhain, 2.4.5)
     16AC_DEFINE([SAMHAIN], 1, [Application is samhain])
    1617AC_CANONICAL_HOST
    1718
     
    3031AC_PROG_LN_S
    3132AC_PROG_AWK
     33SH_PROG_LD
    3234AC_PATH_PROG(cmd_hostname,hostname)
    3335AC_SUBST(cmd_hostname)
     
    3739   GCC_STACK_PROTECT_LIB
    3840   GCC_STACK_PROTECT_CC
     41   GCC_PIE_CC
    3942fi
    4043
     
    5457mynetbsd=no
    5558sh_use_lcaps="undef"
     59dnmalloc_ok=yes
    5660
    5761case "$host_os" in
     
    102106        AC_DEFINE([HOST_IS_OPENBSD], 1, [Define if host OS is OPENBSD])
    103107        selectconfig=freebsd
    104         AC_MSG_RESULT(none)
     108        dnmalloc_ok=no
     109        AC_MSG_RESULT(OpenBSD dnmalloc does not work with pthreads)
    105110        ;;
    106111
     
    165170       
    166171        *hpux*)
    167         AC_MSG_RESULT(HPUX has not always h_errno defined)
     172        AC_MSG_RESULT(HPUX need _XOPEN_SOURCE_EXTENDED for h_errno)
    168173        AC_DEFINE(HOST_IS_HPUX)
    169174        if test "x$GCC" != "xyes"; then
     
    204209AC_DECL_SYS_SIGLIST
    205210
    206 AC_CHECK_HEADERS(stddef.h libgen.h sched.h \
     211AC_CHECK_HEADERS(stddef.h libgen.h sched.h malloc.h sys/uio.h \
     212        sys/mman.h sys/param.h \
    207213        sys/vfs.h mntent.h \
    208214        sys/select.h sys/socket.h netinet/in.h \
     
    275281        inet_aton gethostbyname setutent setrlimit gethostname uname \
    276282        initgroups getpagesize \
    277         ttyname fchmod \
     283        ttyname fchmod writev mmap \
    278284        getsid getpriority getpgid statvfs \
    279         strerror_r \
    280         getgrgid_r getpwnam_r getpwuid_r gmtime_r localtime_r rand_r readdir_r strtok_r
     285        strerror_r getgrgid_r getpwnam_r getpwuid_r \
     286        gmtime_r localtime_r rand_r readdir_r strtok_r
    281287)
    282288AC_CHECK_FUNC(statfs, AC_DEFINE(HAVE_STATFS) statfs="yes",  statfs="no")
     
    827833AC_SUBST(clmytclient)
    828834
     835sh_no_gcc_static=no
     836
    829837AC_ARG_ENABLE(static,
    830838        [  --enable-static              enable static linking [[no]]],
     
    838846                AC_DEFINE(SH_COMPILE_STATIC, 1, [Define if compiling static])
    839847                if test "x$GCC" = "xyes"; then
     848                        sh_no_gcc_static=no
    840849                        LDFLAGS="$LDFLAGS -static"
    841850                else
     851                   sh_no_gcc_static=yes
    842852                   case "$host_os" in
    843853
     
    887897        ]
    888898)
     899
     900if test x$enable_static = xyes; then
     901   :
     902else
     903   LDFLAGS="$LDFLAGS $PIE_LDFLAGS"
     904   CFLAGS="$CFLAGS $PIE_CFLAGS"
     905fi
    889906
    890907if test x"${mytclient}" = x-DSH_STANDALONE -o x"${mytclient}" = x-DSH_WITH_CLIENT;
     
    13861403                AC_DEFINE(WITH_TPT)
    13871404                AC_DEFINE(SL_DEBUG)
     1405                AC_DEFINE(DNMALLOC_CHECKS, 1, [Debug dnmalloc])
     1406                AC_DEFINE(PARANOIA, 0, [Paranoia level for dnmalloc])
    13881407                AC_DEFINE(SL_FAIL_ON_ERROR)
    13891408                if test "x${myneedg3}" = "xyes"; then
     
    13971416)
    13981417AC_SUBST(mydebugdef)
     1418
     1419if test "x${dnmalloc_ok}" = "xyes"; then
     1420   sh_dnmalloc_enabled=yes
     1421else
     1422   sh_dnmalloc_enabled=no
     1423fi
     1424
     1425AC_ARG_ENABLE(dnmalloc,
     1426        [  --disable-dnmalloc                   disable dnmalloc],
     1427        [
     1428        if test "x${enable_dnmalloc}" = xno; then
     1429                sh_dnmalloc_enabled=no
     1430        else
     1431                sh_dnmalloc_enabled=yes
     1432        fi
     1433        ]
     1434)
     1435
     1436dnl Handle the problem that static linking against libc.a on Linux
     1437dnl produces the error "multiple definitions of malloc"
     1438dnl
     1439if test "x$sh_dnmalloc_enabled" = "xyes"; then
     1440   if test x$enable_static = xyes; then
     1441      if test "x$sh_no_gcc_static" = "xyes"; then
     1442         sh_dnmalloc_enabled=no
     1443      else
     1444         if test "x$with_gnu_ld" = "xyes"; then
     1445           LDFLAGS="$LDFLAGS -Wl,--allow-multiple-definition"
     1446         else
     1447           sh_dnmalloc_enabled=no
     1448         fi
     1449      fi
     1450   fi
     1451fi
     1452
     1453if test "x${sh_dnmalloc_enabled}" = xno; then
     1454   AC_DEFINE(USE_SYSTEM_MALLOC,1,[Define if you want to use the system malloc])
     1455fi
    13991456
    14001457AC_ARG_ENABLE(ptrace,
Note: See TracChangeset for help on using the changeset viewer.