Changeset 1253

Show
Ignore:
Timestamp:
05/04/07 21:40:15 (1 year ago)
Author:
till
Message:

configure.in cleaned up

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • honeytrap/trunk/ChangeLog

    r1249 r1253  
    11Version 0.7.0 
    22- Plugins can be prioritized 
     3- x86 CPU emulation module for generic shellcode analysis 
     4  based on libemu by Markus and Paul 
    35- PostgreSQL module for commits into mwcollect database 
    46- SHA512 hash support 
  • honeytrap/trunk/configure.in

    r1251 r1253  
    1313AM_MAINTAINER_MODE 
    1414AM_PROG_CC_STDC 
    15 AC_PROG_RANLIB 
    1615AC_PROG_CC 
    1716AC_PROG_LD(gnu-ld) 
     
    166165fi 
    167166 
    168 # some funky macro to be backwards compatible with earlier autoconfs 
    169 # in current they have AC_CHECK_DECLS 
    170  
    171 AC_DEFUN(SN_CHECK_DECL,[ 
    172 AC_MSG_CHECKING([whether $1 must be declared]) 
    173 AC_CACHE_VAL(sn_cv_decl_needed_$1, 
    174 [AC_TRY_COMPILE([ 
    175 #include <stdio.h> 
    176 #ifdef HAVE_STRING_H 
    177 #include <string.h> 
    178 #endif 
    179 #ifdef HAVE_STRINGS_H 
    180 #include <strings.h> 
    181 #endif 
    182 #ifdef HAVE_STDLIB_H 
    183 #include <stdlib.h> 
    184 #endif 
    185 #ifdef HAVE_UNISTD_H 
    186 #include <unistd.h> 
    187 #endif 
    188 #include <sys/types.h> 
    189 #include <sys/socket.h> 
    190 #ifndef HAVE_PCAP_BPF_H 
    191   #ifdef HAVE_NET_BPF_H 
    192   #include <net/bpf.h> 
    193   #endif 
    194 #else 
    195 #include <pcap.h> 
    196 #endif 
    197 ], 
    198 [char *(*pfn) = (char *(*)) $1],  
    199 eval "sn_cv_decl_needed_$1=no",eval "sn_cv_decl_needed_$1=yes") ]) 
    200  
    201 if eval "test \"`echo '$sn_cv_decl_needed_'$1`\" != no"; then  
    202  AC_MSG_RESULT(yes) 
    203  ifelse([$2], , :, [$2]) 
    204 else 
    205  AC_MSG_RESULT(no) 
    206  ifelse([$3], , ,[$3]) 
    207 fi 
    208 ])dnl 
    209  
    210 AC_DEFUN(SN_CHECK_DECLS, 
    211 [for sn_decl in $1 
    212 do 
    213 sn_def_decl=`echo $sn_decl | tr [a-z] [A-Z]` 
    214 SN_CHECK_DECL($sn_decl, 
    215 [ 
    216 AC_DEFINE_UNQUOTED(NEED_DECL_$sn_def_decl, 1, 
    217                   [you have this cuz autoheader is dumb]) 
    218 $2], $3)dnl 
    219 done 
    220 ]) 
    221  
    222 # some stuff for declarations which were missed on sunos4 platform too. 
    223 # 
    224 # add `#undef NEED_DECL_FUNCTIONAME to acconfig.h` because autoheader 
    225 # fails to work properly with custom macroses. 
    226 # you will see also #undef for each SN_CHECK_DECLS macros invocation 
    227 # because autoheader doesn't execute shell script commands. 
    228 # it is possible to make loops using m4 but the code would look even 
    229 # more confusing..  
    230 SN_CHECK_DECLS(printf fprintf fopen fclose fwrite fflush getopt \ 
    231            bzero bcopy memset strtol strerror perror socket sendto \ 
    232            snprintf strtoul) 
    233167 
    234168AC_CHECK_FUNCS(snprintf) 
     
    382316#----------------------- optional plugins --------------------------- 
    383317 
     318AC_ARG_WITH(cpuemu, 
     319        [  --with-cpuemu            Perform shellcode analysis in x86 CPU emulation]) 
     320AM_CONDITIONAL(BUILD_CPUEMU_PLUGIN, test x$with_cpuemu = xyes) 
     321if test "$with_cpuemu" = "yes"; then 
     322  AC_ARG_WITH(libemu_includes, 
     323    [  --with-libemu-includes=DIR  libemu include directory], 
     324    [with_libemu_includes="$withval"],[with_libemu_includes=no]) 
     325 
     326  AC_ARG_WITH(libemu_libraries, 
     327    [  --with-libemu-libraries=DIR  libemu library directory], 
     328    [with_libemu_libraries="$withval"],[with_libemu_libraries=no]) 
     329 
     330  if test "$with_libemu_includes" != "no"; then 
     331    CPPFLAGS="${CPPFLAGS} -I${with_libemu_includes}" 
     332  fi 
     333  AC_CHECK_HEADER(emu/emu.h,,[AC_ERROR(emu.h not found.)]) 
     334 
     335  if test "$with_libemu_libraries" != "no"; then 
     336    LDFLAGS="${LDFLAGS}  -L${with_libemu_libraries}" 
     337  fi 
     338  LEMU="yes" 
     339#  AC_CHECK_LIB(emu, emu_getpc_check,, LEMU="no") 
     340 
     341  if test "$LEMU" = "no"; then 
     342    echo 
     343    echo "   ERROR!  Libemu library/headers not found. Install it or use the" 
     344    echo "   --with-libemu-* options, if you have it installed in unusual place." 
     345    echo 
     346    exit 
     347  fi 
     348 
     349else 
     350  with_cpuemu="no" 
     351fi 
     352 
     353 
    384354 
    385355AC_ARG_WITH(spamsum, 
     
    412382    LDFLAGS="${LDFLAGS}  -L${with_libpq_libraries}" 
    413383  fi 
    414   LIPQ="" 
     384  LPQ="" 
    415385  AC_CHECK_LIB(pq, PQconnectdb,, LPQ="no") 
    416386 
     
    432402 
    433403default_directory="/usr /usr/local" 
    434  
    435 AC_DEFUN(FAIL_MESSAGE,[ 
    436    echo 
    437    echo 
    438    echo "**********************************************" 
    439    echo "  ERROR: unable to find" $1 
    440    echo "  checked in the following places" 
    441    for i in `echo $2`; do 
    442      echo "        $i" 
    443    done 
    444    echo "**********************************************" 
    445    echo 
    446    exit 1 
    447 ]) 
    448404 
    449405AC_CHECK_LIB(dl, dlsym,, DLLIB="no") 
     
    529485echo "  PostgeSQL:                        $with_postgres" 
    530486echo "  SpamSum:                          $with_spamsum" 
     487echo "  cpuEmu:                           $with_cpuemu"