Changeset 583 for trunk/configure.ac
- Timestamp:
- Nov 13, 2024, 2:47:31 PM (27 hours ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/configure.ac
r581 r583 1 1 dnl We want to override the standard _AC_INIT_PARSE_ARGS 2 2 dnl 3 AU_ALIAS([_AC_INIT_PARSE_ARGS], [SH_INIT_PARSE_ARGS] )4 AU_ALIAS([_AC_INIT_help], [SH_INIT_HELP])5 6 AC_INIT( src/samhain.c)7 3 AU_ALIAS([_AC_INIT_PARSE_ARGS], [SH_INIT_PARSE_ARGS], [], [silent]) 4 dnl AU_ALIAS([_AC_INIT_help], [SH_INIT_HELP]) 5 6 AC_INIT([samhain],[4.5.2]) 7 AC_CONFIG_SRCDIR(src/samhain.c) 8 8 9 9 AC_ARG_VAR([LIBS], [libraries to link against, e.g. -lintl]) … … 12 12 dnl start 13 13 dnl 14 AM_INIT_AUTOMAKE(samhain, 4.5.1) 14 dnl AM_INIT_AUTOMAKE 15 m4_pattern_allow([AC_DEFINE]) 15 16 AC_DEFINE([SAMHAIN], 1, [Application is samhain]) 17 AC_DEFINE_UNQUOTED([VERSION], [_("${PACKAGE_VERSION}")], [Current version] ) 18 AC_DEFINE_UNQUOTED([PACKAGE], [_("${PACKAGE_NAME}")], [Application name] ) 16 19 AC_CANONICAL_HOST 17 20 … … 34 37 AC_SUBST(cmd_hostname) 35 38 AC_SUBST(BUILD_CC) 39 36 40 37 41 if test "x$GCC" = "xyes"; then … … 55 59 56 60 57 AC_HEADER_STDC58 59 61 AC_CHECK_HEADERS([sys/ipc.h sys/sem.h sys/msg.h sys/uio.h fcntl.h]) 60 62 … … 74 76 *linux*) 75 77 sh_use_lcaps="yes" 76 AC_DEFINE( HOST_IS_LINUX)77 AC_DEFINE( HAVE_EXT2_IOCTLS)78 AC_DEFINE([HOST_IS_LINUX], [1], [] ) 79 AC_DEFINE([HAVE_EXT2_IOCTLS], [1], [] ) 78 80 AC_MSG_RESULT([use ioctl to get e2fs flags]) 79 81 case "$host_cpu" in 80 82 i*86*) 81 AC_DEFINE( HOST_IS_I86LINUX)83 AC_DEFINE([HOST_IS_I86LINUX], [1], [] ) 82 84 ;; 83 85 x86_64) 84 AC_DEFINE([HOST_IS_64LINUX], 1, [Define if host OS is 64bit Linux])86 AC_DEFINE([HOST_IS_64LINUX], [1], [Define if host OS is 64bit Linux]) 85 87 ;; 86 88 *) … … 103 105 104 106 *cygwin*) 105 AC_DEFINE( HOST_IS_CYGWIN)107 AC_DEFINE([HOST_IS_CYGWIN], [1], [] ) 106 108 AC_DEFINE([USE_REGISTRY_CHECK], 1, [Define for registry check]) 107 109 dnmalloc_ok=no … … 111 113 112 114 *darwin*|*apple*) 113 AC_DEFINE( HOST_IS_DARWIN)115 AC_DEFINE([HOST_IS_DARWIN], [1], [] ) 114 116 dnmalloc_ok=no 115 117 AC_MSG_RESULT([check resource forks, no dnmalloc]) 116 118 ;; 117 119 118 *freebsd8*|*freebsd9*)119 AC_DEFINE(HOST_IS_FREEBSD)120 selectconfig=freebsd121 case "$host_cpu" in122 amd64|x86_64)123 dnmalloc_ok=no124 AC_MSG_RESULT([no dnmalloc])125 ;;126 *)127 AC_MSG_RESULT([none])128 ;;129 esac130 ;;131 132 120 *freebsd7*) 133 AC_DEFINE( HOST_IS_FREEBSD)121 AC_DEFINE([HOST_IS_FREEBSD], [1], [] ) 134 122 selectconfig=freebsd 135 123 case "$host_cpu" in … … 146 134 147 135 *freebsd*) 148 AC_DEFINE( HOST_IS_FREEBSD)136 AC_DEFINE([HOST_IS_FREEBSD], [1], [] ) 149 137 selectconfig=freebsd 138 case "$host_cpu" in 139 amd64|x86_64) 140 dnmalloc_ok=no 141 AC_MSG_RESULT([no dnmalloc]) 142 ;; 143 *) 144 AC_MSG_RESULT([none]) 145 ;; 146 esac 150 147 AC_MSG_RESULT([none]) 151 148 ;; … … 166 163 *solaris*) 167 164 selectconfig=solaris 168 AC_DEFINE( HOST_IS_SOLARIS)165 AC_DEFINE([HOST_IS_SOLARIS], [1], [] ) 169 166 case "$host_cpu" in 170 167 i*86) 171 AC_DEFINE( HOST_IS_I86SOLARIS)168 AC_DEFINE([HOST_IS_I86SOLARIS], [1], [] ) 172 169 AC_MSG_RESULT([vsnprintf prototype]) 173 170 ;; … … 193 190 *sun*) 194 191 selectconfig=solaris 195 AC_DEFINE( HOST_IS_SOLARIS)192 AC_DEFINE([HOST_IS_SOLARIS], [1], []) 196 193 AC_MSG_RESULT([none]) 197 194 ;; 198 195 199 196 *aix*) 200 AC_DEFINE( HOST_IS_AIX)197 AC_DEFINE([HOST_IS_AIX], [1], [aix]) 201 198 selectconfig=aix5.2.0 202 199 uid_cast="unsigned long" … … 219 216 *hpux*) 220 217 AC_MSG_RESULT([HPUX need _XOPEN_SOURCE_EXTENDED for h_errno]) 221 AC_DEFINE( HOST_IS_HPUX)218 AC_DEFINE([HOST_IS_HPUX], [1], [hpux]) 222 219 if test "x$GCC" != "xyes"; then 223 220 if test ! -z "`echo "$CFLAGS" | grep "\-g" 2> /dev/null`" ; then … … 232 229 *ultrix*) 233 230 AC_MSG_RESULT([ULTRIX getcwd uses popen]) 234 AC_DEFINE( HAVE_BROKEN_GETCWD)231 AC_DEFINE([HAVE_BROKEN_GETCWD], [1], [bad implementation of getcwd]) 235 232 ;; 236 233 … … 241 238 242 239 AC_SUBST(selectconfig) 243 AC_DEFINE_UNQUOTED( UID_CAST, ${uid_cast})240 AC_DEFINE_UNQUOTED([UID_CAST], [${uid_cast}], [basic type to which we can cast a uid]) 244 241 245 242 … … 253 250 AC_HEADER_DIRENT 254 251 AC_HEADER_MAJOR 255 AC_ HEADER_TIME252 AC_CHECK_HEADERS([sys/time.h]) 256 253 dnl used in minilzo.c 257 254 AC_HEADER_STAT 258 AC_DECL_SYS_SIGLIST 255 256 AC_CHECK_DECLS([sys_siglist], [], [], 257 [#include <signal.h> 258 /* NetBSD declares sys_siglist in unistd.h. */ 259 #ifdef HAVE_UNISTD_H 260 # include <unistd.h> 261 #endif 262 ]) 259 263 260 264 AC_CHECK_HEADERS(stddef.h libgen.h sched.h malloc.h sys/uio.h \ … … 275 279 AC_CHECK_HEADER(utmpx.h, sh_utmpx="yes", sh_utmpx="no") 276 280 if test "x$sh_utmpx" = "xyes"; then 277 AC_DEFINE( HAVE_UTMPX_H)278 AC_EGREP_HEADER(ut_host, utmpx.h, AC_DEFINE( HAVE_UTHOST))279 AC_EGREP_HEADER(ut_addr, utmpx.h, AC_DEFINE( HAVE_UTADDR))280 AC_EGREP_HEADER(ut_addr_v6, utmpx.h, AC_DEFINE( HAVE_UTADDR_V6))281 AC_EGREP_HEADER(ut_xtime,utmpx.h, AC_DEFINE( HAVE_UTXTIME))282 AC_EGREP_HEADER(ut_type, utmpx.h, AC_DEFINE( HAVE_UTTYPE))281 AC_DEFINE([HAVE_UTMPX_H], [1], [whether we have utmpx.h]) 282 AC_EGREP_HEADER(ut_host, utmpx.h, AC_DEFINE([HAVE_UTHOST], [1], [] )) 283 AC_EGREP_HEADER(ut_addr, utmpx.h, AC_DEFINE([HAVE_UTADDR], [1], [] )) 284 AC_EGREP_HEADER(ut_addr_v6, utmpx.h, AC_DEFINE([HAVE_UTADDR_V6], [1], [] )) 285 AC_EGREP_HEADER(ut_xtime,utmpx.h, AC_DEFINE([HAVE_UTXTIME], [1], [] )) 286 AC_EGREP_HEADER(ut_type, utmpx.h, AC_DEFINE([HAVE_UTTYPE], [1], [] )) 283 287 else 284 AC_EGREP_HEADER(ut_addr, utmp.h, AC_DEFINE( HAVE_UTADDR))285 AC_EGREP_HEADER(ut_host, utmp.h, AC_DEFINE( HAVE_UTHOST))286 AC_EGREP_HEADER(ut_type, utmp.h, AC_DEFINE( HAVE_UTTYPE))288 AC_EGREP_HEADER(ut_addr, utmp.h, AC_DEFINE([HAVE_UTADDR], [1], [] )) 289 AC_EGREP_HEADER(ut_host, utmp.h, AC_DEFINE([HAVE_UTHOST], [1], [] )) 290 AC_EGREP_HEADER(ut_type, utmp.h, AC_DEFINE([HAVE_UTTYPE], [1], [] )) 287 291 fi 288 292 … … 301 305 AC_DEFINE(HAVE_SYS_ACCT_H, , 302 306 [Define if you have the <sys/acct.h> header file.]) 303 AC_ HEADER_EGREP(ac_utime, sys/acct.h,307 AC_EGREP_HEADER(ac_utime, sys/acct.h, 304 308 AC_DEFINE(HAVE_ACUTIME, , 305 309 [Define if <sys/acct.h> has the AC_UTIME field.]) 306 AC_ HEADER_EGREP(comp_t.*ac_utime, sys/acct.h,310 AC_EGREP_HEADER(comp_t.*ac_utime, sys/acct.h, 307 311 AC_DEFINE(ACUTIME_COMPT, , 308 312 [Define if <sys/acct.h>'s AC_UTIME field is a COMP_T.])) 309 313 ) 310 AC_ HEADER_EGREP(ac_stime, sys/acct.h,314 AC_EGREP_HEADER(ac_stime, sys/acct.h, 311 315 AC_DEFINE(HAVE_ACSTIME, , 312 316 [Define if <sys/acct.h> has the AC_STIME field.]) 313 AC_ HEADER_EGREP(comp_t.*ac_stime, sys/acct.h,317 AC_EGREP_HEADER(comp_t.*ac_stime, sys/acct.h, 314 318 AC_DEFINE(ACSTIME_COMPT, , 315 319 [Define if <sys/acct.h>'s AC_STIME field is a COMP_T.])) 316 320 ) 317 AC_ HEADER_EGREP(ac_etime, sys/acct.h,321 AC_EGREP_HEADER(ac_etime, sys/acct.h, 318 322 AC_DEFINE(HAVE_ACETIME, , 319 323 [Define if <sys/acct.h> has the AC_ETIME field.]) 320 AC_ HEADER_EGREP(comp_t.*ac_etime, sys/acct.h,324 AC_EGREP_HEADER(comp_t.*ac_etime, sys/acct.h, 321 325 AC_DEFINE(ACETIME_COMPT, , 322 326 [Define if <sys/acct.h>'s AC_ETIME field is a COMP_T.])) 323 327 ) 324 AC_ HEADER_EGREP(ac_io, sys/acct.h,328 AC_EGREP_HEADER(ac_io, sys/acct.h, 325 329 AC_DEFINE(HAVE_ACIO, , 326 330 [Define if <sys/acct.h> has the AC_IO field.]) 327 AC_ HEADER_EGREP(comp_t.*ac_io, sys/acct.h,331 AC_EGREP_HEADER(comp_t.*ac_io, sys/acct.h, 328 332 AC_DEFINE(ACIO_COMPT, , 329 333 [Define if <sys/acct.h>'s AC_IO field is a COMP_T.])) 330 334 ) 331 AC_ HEADER_EGREP(ac_mem, sys/acct.h,335 AC_EGREP_HEADER(ac_mem, sys/acct.h, 332 336 AC_DEFINE(HAVE_ACMEM, , 333 337 [Define if <sys/acct.h> has the AC_MEM field.]) 334 AC_ HEADER_EGREP(comp_t.*ac_mem, sys/acct.h,338 AC_EGREP_HEADER(comp_t.*ac_mem, sys/acct.h, 335 339 AC_DEFINE(ACMEM_COMPT, , 336 340 [Define if <sys/acct.h>'s AC_MEM field is a COMP_T.])) 337 341 ) 338 AC_ HEADER_EGREP(ac_minflt, sys/acct.h,339 AC_ HEADER_EGREP(ac_majflt, sys/acct.h,340 AC_ HEADER_EGREP(ac_swaps, sys/acct.h,342 AC_EGREP_HEADER(ac_minflt, sys/acct.h, 343 AC_EGREP_HEADER(ac_majflt, sys/acct.h, 344 AC_EGREP_HEADER(ac_swaps, sys/acct.h, 341 345 AC_DEFINE(HAVE_PAGING, , 342 346 [Define if <sys/acct.h> has the AC_MINFLT, AC_MAJFLT and AC_SWAPS fields.]) 343 AC_ HEADER_EGREP(comp_t.*ac_minflt, sys/acct.h,347 AC_EGREP_HEADER(comp_t.*ac_minflt, sys/acct.h, 344 348 AC_DEFINE(ACMINFLT_COMPT, , 345 349 [Define if <sys/acct.h>'s AC_MINFLT field is a COMP_T.])) 346 AC_ HEADER_EGREP(comp_t.*ac_mayflt, sys/acct.h,350 AC_EGREP_HEADER(comp_t.*ac_mayflt, sys/acct.h, 347 351 AC_DEFINE(ACMAJFLT_COMPT, , 348 352 [Define if <sys/acct.h>'s AC_MAJFLT field is a COMP_T.])) 349 AC_ HEADER_EGREP(comp_t.*ac_swaps, sys/acct.h,353 AC_EGREP_HEADER(comp_t.*ac_swaps, sys/acct.h, 350 354 AC_DEFINE(ACSWAPS_COMPT, , 351 355 [Define if <sys/acct.h>'s AC_SWAPS field is a COMP_T.])) … … 353 357 ) 354 358 ) 355 AC_ HEADER_EGREP(comp_t, sys/acct.h, AC_DEFINE(HAVE_COMP_T, ,359 AC_EGREP_HEADER(comp_t, sys/acct.h, AC_DEFINE(HAVE_COMP_T, , 356 360 [Define if <sys/acct.h> uses the COMP_T type.])) 357 AC_ HEADER_EGREP([struct acct_v3], sys/acct.h, AC_DEFINE(HAVE_ACCT_V3, ,361 AC_EGREP_HEADER([struct acct_v3], sys/acct.h, AC_DEFINE(HAVE_ACCT_V3, , 358 362 [Define if <sys/acct.h> has struct acct_v3.])) 359 AC_ HEADER_EGREP([struct acctv2], sys/acct.h, AC_DEFINE(HAVE_ACCTV2, ,363 AC_EGREP_HEADER([struct acctv2], sys/acct.h, AC_DEFINE(HAVE_ACCTV2, , 360 364 [Define if <sys/acct.h> has struct acctv2.])) 361 365 362 366 ) 363 364 367 365 368 dnl need to check because AIX 4.2 does not have it … … 408 411 mincore posix_fadvise inotify_init1 scandir 409 412 ) 410 AC_CHECK_FUNC(statfs, AC_DEFINE(HAVE_STATFS) statfs="yes", statfs="no") 413 AC_CHECK_FUNC([statfs], [ 414 AC_DEFINE([HAVE_STATFS], [1], [have statfs func]) 415 statfs="yes" 416 ], [statfs="no"]) 411 417 SL_CHECK_VA_COPY 412 418 AC_CHECK_FUNCS(vsnprintf, [SL_CHECK_VSNPRINTF]) … … 417 423 fstype=no 418 424 # The order of these tests is important. 419 AC_TRY_CPP([#include <sys/statvfs.h> 420 #include <sys/fstyp.h>], AC_DEFINE(FSTYPE_STATVFS) fstype=SVR4) 425 AC_PREPROC_IFELSE([AC_LANG_SOURCE([[#include <sys/statvfs.h> 426 #include <sys/fstyp.h> 427 ]])], [ 428 AC_DEFINE([FSTYPE_STATVFS], [1], [statvfs]) 429 fstype=SVR4]) 430 421 431 if test $fstype = no; then 422 AC_TRY_CPP([#include <sys/statfs.h> 423 #include <sys/fstyp.h>], AC_DEFINE(FSTYPE_USG_STATFS) fstype=SVR3) 424 fi 432 AC_PREPROC_IFELSE([AC_LANG_SOURCE([[#include <sys/statfs.h> 433 #include <sys/fstyp.h> 434 ]])], [ 435 AC_DEFINE([FSTYPE_USG_STATFS], [1], [usg]) 436 fstype=SVR3]) 437 fi 438 425 439 if test $fstype = no; then 426 AC_TRY_CPP([#include <sys/statfs.h> 427 #include <sys/vmount.h>], AC_DEFINE(FSTYPE_AIX_STATFS) fstype=AIX) 428 fi 440 AC_PREPROC_IFELSE([AC_LANG_SOURCE([[#include <sys/statfs.h> 441 #include <sys/vmount.h> 442 ]])], AC_DEFINE([FSTYPE_AIX_STATFS], [1], [aix]) fstype=AIX) 443 fi 444 429 445 if test $fstype = no; then 430 AC_TRY_CPP([#include <mntent.h>], AC_DEFINE(FSTYPE_MNTENT) fstype=4.3BSD) 431 fi 446 AC_PREPROC_IFELSE([AC_LANG_SOURCE([[#include <mntent.h> 447 ]])], AC_DEFINE([FSTYPE_MNTENT], [1], [mtent]) fstype=4.3BSD) 448 fi 449 432 450 if test $fstype = no; then 433 AC_EGREP_HEADER(f_type;, sys/mount.h, AC_DEFINE(FSTYPE_STATFS) fstype=4.4BSD/OSF) 434 fi 451 AC_EGREP_HEADER(f_type;, sys/mount.h, AC_DEFINE([FSTYPE_STATFS], [1], [statfs]) fstype=4.4BSD/OSF) 452 fi 453 435 454 if test $fstype = no; then 436 AC_TRY_CPP([#include <sys/mount.h> 437 #include <sys/fs_types.h>], AC_DEFINE(FSTYPE_GETMNT) fstype=Ultrix) 455 AC_PREPROC_IFELSE([AC_LANG_SOURCE([[#include <sys/mount.h> 456 #include <sys/fs_types.h> 457 ]])], AC_DEFINE([FSTYPE_GETMNT], [1], [getmnt]) fstype=Ultrix) 438 458 fi 439 459 AC_MSG_RESULT($fstype) 440 460 441 461 sh_libsocket= 442 443 462 dnl Solaris needs -lsocket and -lnsl. Unisys system includes 444 463 dnl gethostbyname in libsocket but needs libnsl for socket. … … 485 504 LIBS="$LIBS -lauparse" 486 505 sh_auparse=yes 487 AC_DEFINE( HAVE_AUPARSE_LIB, 1, [Define if you have the auparse lib])506 AC_DEFINE([HAVE_AUPARSE_LIB], [1], [Define if you have the auparse lib]) 488 507 ]) 489 508 fi … … 500 519 501 520 AC_MSG_CHECKING(for socklen_t) 502 AC_TRY_COMPILE([ 521 AC_COMPILE_IFELSE( 522 [AC_LANG_PROGRAM([[ 503 523 #ifdef HAVE_SYS_TYPES_H 504 524 #include <sys/types.h> … … 508 528 #endif 509 529 socklen_t x; 510 ], [],[ 530 ]], [[]])], 531 [ 511 532 AC_MSG_RESULT(yes) 512 533 AC_DEFINE_UNQUOTED([ACCEPT_TYPE_ARG3],[socklen_t], [type of arg3 of accept]) 513 534 AC_DEFINE([HAVE_SOCKLEN_T], 1, [Define if you have socklen_t]) 514 535 ],[ 515 AC_TRY_COMPILE([ 536 AC_COMPILE_IFELSE( 537 [AC_LANG_PROGRAM([[ 516 538 #ifdef HAVE_SYS_TYPES_H 517 539 #include <sys/types.h> … … 521 543 #endif 522 544 int accept (int, struct sockaddr *, size_t *); 523 ],[],[ 545 ]],[[]])], 546 [ 524 547 AC_MSG_RESULT(size_t) 525 548 AC_DEFINE_UNQUOTED([ACCEPT_TYPE_ARG3],[size_t], [type of arg3 of accept]) … … 556 579 dnl ***************************************** 557 580 558 AC_ C_LONG_DOUBLE581 AC_TYPE_LONG_DOUBLE 559 582 SH_CHECK_TYPEDEF(long long, HAVE_LONG_LONG) 560 583 SH_CHECK_TYPEDEF(uint16_t, HAVE_UINT16_T) … … 565 588 sh_sizeof_unsigned_long_long=`echo "$ac_cv_sizeof_unsigned_long_long" | sed 's%[^0-9]%%g'` 566 589 if test "$sh_sizeof_unsigned_long_long" = "8"; then 567 AC_DEFINE( HAVE_LONG_LONG_64, 1, [Define if you have 64bit long long])590 AC_DEFINE([HAVE_LONG_LONG_64], [1], [Define if you have 64bit long long]) 568 591 fi 569 592 fi … … 581 604 sh_sizeof_unsigned_long=`echo "$ac_cv_sizeof_unsigned_long" | sed 's%[^0-9]%%g'` 582 605 if test "$sh_sizeof_unsigned_long" = "4"; then 583 AC_DEFINE( HAVE_LONG_32)606 AC_DEFINE([HAVE_LONG_32], [1], [long32]) 584 607 fi 585 608 if test "$sh_sizeof_unsigned_long" = "8"; then 586 AC_DEFINE( HAVE_LONG_64)609 AC_DEFINE([HAVE_LONG_64], [1], [long64]) 587 610 fi 588 611 sh_sizeof_unsigned_int=`echo "$ac_cv_sizeof_unsigned_int" | sed 's%[^0-9]%%g'` 589 612 if test "$sh_sizeof_unsigned_int" = "4"; then 590 AC_DEFINE( HAVE_INT_32)613 AC_DEFINE([HAVE_INT_32], [1], [int32]) 591 614 fi 592 615 sh_sizeof_unsigned_short=`echo "$ac_cv_sizeof_unsigned_short" | sed 's%[^0-9]%%g'` 593 616 if test "$sh_sizeof_unsigned_short" = "4"; then 594 AC_DEFINE( HAVE_SHORT_32)617 AC_DEFINE([HAVE_SHORT_32], [1], [short32]) 595 618 fi 596 619 … … 612 635 AC_MSG_CHECKING(whether struct stat has a st_flags field) 613 636 AC_CACHE_VAL(e2fsprogs_cv_struct_st_flags, 614 AC_TRY_COMPILE([#include <sys/stat.h>], 615 [struct stat stat; stat.st_flags = 0;], 637 AC_COMPILE_IFELSE( 638 [AC_LANG_PROGRAM([[ 639 #include <sys/stat.h> 640 ]], 641 [[struct stat stat; stat.st_flags = 0;]])], 616 642 [e2fsprogs_cv_struct_st_flags=yes], 617 [e2fsprogs_cv_struct_st_flags=no])) 643 [e2fsprogs_cv_struct_st_flags=no] 644 )) 618 645 AC_MSG_RESULT($e2fsprogs_cv_struct_st_flags) 646 619 647 if test "$e2fsprogs_cv_struct_st_flags" = yes; then 620 648 AC_MSG_CHECKING(whether st_flags field is useful) 621 649 AC_CACHE_VAL(e2fsprogs_cv_struct_st_flags_immut, 622 AC_TRY_COMPILE([#include <sys/stat.h>], 623 [struct stat stat; stat.st_flags |= UF_IMMUTABLE;], 650 AC_COMPILE_IFELSE( 651 [AC_LANG_PROGRAM([[ 652 #include <sys/stat.h> 653 ]], 654 [[struct stat stat; stat.st_flags |= UF_IMMUTABLE;]])], 624 655 [e2fsprogs_cv_struct_st_flags_immut=yes], 625 [e2fsprogs_cv_struct_st_flags_immut=no])) 656 [e2fsprogs_cv_struct_st_flags_immut=no] 657 )) 626 658 AC_MSG_RESULT($e2fsprogs_cv_struct_st_flags_immut) 627 659 if test "$e2fsprogs_cv_struct_st_flags_immut" = yes; then 628 AC_DEFINE( HAVE_STAT_FLAGS)660 AC_DEFINE([HAVE_STAT_FLAGS], [1], [Have stat flags]) 629 661 fi 630 662 fi … … 634 666 dnl 635 667 AC_MSG_CHECKING(for struct cmsgcred) 636 AC_TRY_COMPILE([ 668 AC_COMPILE_IFELSE( 669 [AC_LANG_PROGRAM([[ 637 670 #include <sys/types.h> 638 671 #include <sys/socket.h> 639 ] ,[672 ]],[[ 640 673 struct cmsgcred cred; 641 674 642 675 cred.cmcred_pid = 0; 643 ] ,sh_have_struct_cmsgcred=yes,sh_have_struct_cmsgcred=no)676 ]])],sh_have_struct_cmsgcred=yes,sh_have_struct_cmsgcred=no) 644 677 AC_MSG_RESULT($sh_have_struct_cmsgcred) 645 678 646 679 if test x$sh_have_struct_cmsgcred = xyes; then 647 AC_DEFINE( HAVE_STRUCT_CMSGCRED,1,[Have cmsgcred structure])680 AC_DEFINE([HAVE_STRUCT_CMSGCRED], [1], [Have cmsgcred structure]) 648 681 fi 649 682 650 683 AC_MSG_CHECKING(for struct fcred) 651 AC_TRY_COMPILE([ 684 AC_COMPILE_IFELSE( 685 [AC_LANG_PROGRAM([[ 652 686 #include <sys/param.h> 653 687 #include <sys/socket.h> 654 688 #include <sys/ucred.h> 655 ] ,[689 ]],[[ 656 690 struct fcred sockcred; 657 ] ,sh_have_struct_fcred=yes,sh_have_struct_fcred=no)691 ]])],sh_have_struct_fcred=yes,sh_have_struct_fcred=no) 658 692 AC_MSG_RESULT($sh_have_struct_fcred) 659 693 660 694 if test x$sh_have_struct_fcred = xyes; then 661 AC_DEFINE( HAVE_STRUCT_FCRED,1,[Have fcred structure])695 AC_DEFINE([HAVE_STRUCT_FCRED], [1], [Have fcred structure]) 662 696 fi 663 697 664 698 AC_MSG_CHECKING(for struct sockcred) 665 AC_TRY_COMPILE([ 699 AC_COMPILE_IFELSE( 700 [AC_LANG_PROGRAM([[ 666 701 #include <sys/param.h> 667 702 #include <sys/socket.h> 668 703 #include <sys/ucred.h> 669 ] ,[704 ]],[[ 670 705 struct sockcred sockcred; 671 ] ,sh_have_struct_sockcred=yes,sh_have_struct_sockcred=no)706 ]])],sh_have_struct_sockcred=yes,sh_have_struct_sockcred=no) 672 707 AC_MSG_RESULT($sh_have_struct_sockcred) 673 708 674 709 if test x$sh_have_struct_sockcred = xyes; then 675 AC_DEFINE( HAVE_STRUCT_SOCKCRED,1,[Have sockcred structure])710 AC_DEFINE([HAVE_STRUCT_SOCKCRED], [1], [Have sockcred structure]) 676 711 fi 677 712 678 713 AC_MSG_CHECKING(for SO_PEERCRED) 679 AC_TRY_COMPILE([ 714 AC_COMPILE_IFELSE( 715 [AC_LANG_PROGRAM([[ 680 716 #include <sys/types.h> 681 717 #include <sys/socket.h> 682 ] ,[718 ]],[[ 683 719 int test = SO_PEERCRED; 684 ] ,sh_have_SO_PEERCRED=yes,sh_have_SO_PEERCRED=no)720 ]])],sh_have_SO_PEERCRED=yes,sh_have_SO_PEERCRED=no) 685 721 AC_MSG_RESULT($sh_have_SO_PEERCRED) 686 722 687 723 if test x$sh_have_SO_PEERCRED = xyes; then 688 AC_DEFINE( HAVE_SO_PEERCRED,1,[Have SO_PEERCRED define])724 AC_DEFINE([HAVE_SO_PEERCRED], [1], [Have SO_PEERCRED define]) 689 725 fi 690 726 691 727 AC_MSG_CHECKING(for union semun) 692 AC_TRY_COMPILE([#include <sys/types.h> 728 AC_COMPILE_IFELSE( 729 [AC_LANG_PROGRAM([[ 730 #include <sys/types.h> 693 731 #include <sys/ipc.h> 694 #include <sys/sem.h>],[union semun foo;], [sh_have_semun=yes], [sh_have_semun=no]) 732 #include <sys/sem.h> 733 ]],[[ 734 union semun foo; 735 ]])], [sh_have_semun=yes], [sh_have_semun=no]) 695 736 AC_MSG_RESULT($sh_have_semun) 696 737 if test x$sh_have_semun = xyes 697 738 then 698 AC_DEFINE( HAVE_UNION_SEMUN, 1, [union semun already defined in sys/ipc.h or sys/sem.h])739 AC_DEFINE([HAVE_UNION_SEMUN], [1], [union semun already defined in sys/ipc.h or sys/sem.h]) 699 740 fi 700 741 … … 741 782 if test -d "/proc/$$" 742 783 then 743 AC_DEFINE([HAVE_PROCFS], [1],[Define if you have a proc fs])784 AC_DEFINE([HAVE_PROCFS], [1], [Define if you have a proc fs]) 744 785 fi 745 786 … … 755 796 then 756 797 # LIBS="-lgmp $LIBS" 757 AC_DEFINE( HAVE_LIBGMP, 1, [Have GNU gmp library])798 AC_DEFINE([HAVE_LIBGMP], [1], [Have GNU gmp library]) 758 799 fi 759 800 AC_CHECK_HEADERS(gmp.h) … … 773 814 AC_MSG_ERROR([Cannot find ps in any of /usr/ucb /bin /usr/bin]) 774 815 fi 775 AC_DEFINE_UNQUOTED([PSPATH], _("$PS"), [Path to ps])816 AC_DEFINE_UNQUOTED([PSPATH], [_("$PS")], [Path to ps executable]) 776 817 777 818 AC_MSG_CHECKING([how to use ps]) … … 808 849 PSARG="-e" 809 850 fi 810 AC_DEFINE_UNQUOTED([PSARG], _("$PSARG"), [Argument for ps])851 AC_DEFINE_UNQUOTED([PSARG], [_("$PSARG")], [Argument for ps]) 811 852 AC_MSG_RESULT([$PS $PSARG]) 812 853 … … 821 862 [ 822 863 if test "x${enable_db_reload}" = xyes; then 823 AC_DEFINE( RELOAD_DATABASE)864 AC_DEFINE([RELOAD_DATABASE], [1], [database reload on SIGHUP]) 824 865 fi 825 866 ] … … 830 871 [ 831 872 if test "x${enable_xml_log}" = xyes; then 832 AC_DEFINE( SH_USE_XML)873 AC_DEFINE([SH_USE_XML], [1], [logfile in XML format]) 833 874 fi 834 875 ] … … 842 883 : 843 884 else 844 AC_DEFINE( SH_WITH_MAIL)885 AC_DEFINE([SH_WITH_MAIL], [1], [internal SMTP mailer]) 845 886 fi 846 887 ], 847 [AC_DEFINE( SH_WITH_MAIL)]888 [AC_DEFINE([SH_WITH_MAIL], [1], [internal SMTP mailer])] 848 889 ) 849 890 … … 875 916 : 876 917 else 877 AC_DEFINE( WITH_EXTERNAL)918 AC_DEFINE([WITH_EXTERNAL], [1], [can use external scripts]) 878 919 fi 879 920 ], 880 [AC_DEFINE( WITH_EXTERNAL)]921 [AC_DEFINE([WITH_EXTERNAL], [1], [can use external scripts])] 881 922 ) 882 923 … … 886 927 if test "x${ac_cv_header_sys_msg_h}" = "xyes"; then 887 928 if test "x${enable_message_queue}" = xyes; then 888 AC_DEFINE( WITH_MESSAGE_QUEUE)889 AC_DEFINE_UNQUOTED( MESSAGE_QUEUE_MODE, 0700)929 AC_DEFINE([WITH_MESSAGE_QUEUE], [1], [SysV message queue]) 930 AC_DEFINE_UNQUOTED([MESSAGE_QUEUE_MODE], [0700], [mode of message queue]) 890 931 elif test "x${enable_message_queue}" != xno; then 891 932 echo "${enableval}" | grep ['[^0123456789]'] >/dev/null 2>&1 && … … 894 935 grep ['0[0123456789][0123456789][0123456789]'] >/dev/null 2>&1 || 895 936 AC_MSG_ERROR([With --enable-message-queue=MODE, MODE must be an octal (0nnn) number]) 896 AC_DEFINE( WITH_MESSAGE_QUEUE)897 AC_DEFINE_UNQUOTED( MESSAGE_QUEUE_MODE, ${enable_message_queue})937 AC_DEFINE([WITH_MESSAGE_QUEUE], [1], [SysV message queue]) 938 AC_DEFINE_UNQUOTED([MESSAGE_QUEUE_MODE], [${enable_message_queue}], [mode of message queue]) 898 939 fi 899 940 else … … 966 1007 [], 967 1008 [ AC_MSG_ERROR([Could not find tcpd.h for libwrap. You need to install tcp_wrappers.]) ]) 968 AC_TRY_LINK([ #include <tcpd.h> 969 int allow_severity; int deny_severity; ], 970 [ hosts_access((struct request_info *) 0); ], 971 [ AC_DEFINE(SH_USE_LIBWRAP,1,[Build with tcp wrapper support]) ], 972 [ AC_MSG_ERROR([Could not find the libwrap library.]) ]) 1009 AC_LINK_IFELSE( 1010 [AC_LANG_PROGRAM([[ 1011 #include <tcpd.h> 1012 ]],[[ 1013 int allow_severity; 1014 int deny_severity; 1015 hosts_access((struct request_info *) 0); ]])], 1016 [ AC_DEFINE([SH_USE_LIBWRAP], [1], [Build with tcp wrapper support]) ], 1017 [ AC_MSG_ERROR([Could not find the libwrap library.]) ] 1018 ) 973 1019 fi ], 974 1020 AC_MSG_RESULT(no) … … 1072 1118 1073 1119 *) 1074 AC_DEFINE( SH_COMPILE_STATIC, 1, [Define if compiling static])1120 AC_DEFINE([SH_COMPILE_STATIC], [1], [Define if compiling static]) 1075 1121 sh_no_gcc_static=no 1076 1122 LDFLAGS="$LDFLAGS -static" … … 1078 1124 esac 1079 1125 else 1080 AC_DEFINE( SH_COMPILE_STATIC, 1, [Define if compiling static])1126 AC_DEFINE([SH_COMPILE_STATIC], [1], [Define if compiling static]) 1081 1127 sh_no_gcc_static=yes 1082 1128 case "$host_os" in … … 1149 1195 fi 1150 1196 AC_CHECK_FUNC(pmap_getmaps, 1151 AC_DEFINE([HAVE_PMAP_GETMAPS], [ ], [Define if pmap_getmaps available]), [],[])1197 AC_DEFINE([HAVE_PMAP_GETMAPS], [1], [Define if pmap_getmaps available]), [],[]) 1152 1198 1153 1199 … … 1203 1249 AM_PATH_LIBPRELUDE([0.9.6], 1204 1250 [ 1205 AC_DEFINE( HAVE_LIBPRELUDE,1,[Have libprelude])1251 AC_DEFINE([HAVE_LIBPRELUDE], [1], [Have libprelude]) 1206 1252 CFLAGS="$CFLAGS $LIBPRELUDE_PTHREAD_CFLAGS" 1207 1253 LDFLAGS="$LDFLAGS $LIBPRELUDE_LDFLAGS" … … 1313 1359 CPPFLAGS="$CPPFLAGS -I${MYSQL_INC_DIR}" 1314 1360 fi 1315 AC_DEFINE( WITH_MYSQL)1316 AC_DEFINE( WITH_DATABASE)1361 AC_DEFINE([WITH_MYSQL], [1], [Use mysql as database]) 1362 AC_DEFINE([WITH_DATABASE], [1], [Use a database]) 1317 1363 if test "x$zlib_found" = "xyes" 1318 1364 then … … 1343 1389 AC_CHECK_HEADERS(mysql/mysql.h) 1344 1390 elif test "x${withval}" = "xpostgresql"; then 1345 AC_DEFINE( WITH_POSTGRES)1346 AC_DEFINE( WITH_DATABASE)1391 AC_DEFINE([WITH_POSTGRES], [1], [Use postgres as database]) 1392 AC_DEFINE([WITH_DATABASE], [1], [Use a database]) 1347 1393 # 1348 1394 PGCONF="no" … … 1489 1535 CPPFLAGS="${CPPFLAGS} -I${ODBC_INC_DIR}" 1490 1536 LIBS="${LIBS} -L${ODBC_LIB_DIR} -l$ODBC_LIB" 1491 AC_DEFINE( WITH_ODBC)1492 AC_DEFINE( WITH_DATABASE)1537 AC_DEFINE([WITH_ODBC], [1], [Use odbc as database]) 1538 AC_DEFINE([WITH_DATABASE], [1], [Use a database]) 1493 1539 1494 1540 elif test "x${withval}" = "xoracle"; then … … 1555 1601 fi 1556 1602 fi 1557 AC_DEFINE( WITH_ORACLE)1558 AC_DEFINE( WITH_DATABASE)1603 AC_DEFINE([WITH_ORACLE], [1], [Use oracle as database]) 1604 AC_DEFINE([WITH_DATABASE], [1], [Use a database]) 1559 1605 1560 1606 else … … 1569 1615 if test "x${withval}" != xno; then 1570 1616 mycons="$withval" 1571 AC_DEFINE_UNQUOTED( DEFAULT_CONSOLE, _("${mycons}"))1617 AC_DEFINE_UNQUOTED([DEFAULT_CONSOLE], [_("${mycons}")], [] ) 1572 1618 fi 1573 1619 ]) … … 1583 1629 ], 1584 1630 [myaltcons="NULL"]) 1585 AC_DEFINE_UNQUOTED( ALT_CONSOLE, _("${myaltcons}"))1631 AC_DEFINE_UNQUOTED([ALT_CONSOLE], [_("${myaltcons}")], [] ) 1586 1632 1587 1633 AC_ARG_WITH(timeserver, … … 1590 1636 if test "x${withval}" != xno; then 1591 1637 mytimeserv="$withval" 1592 AC_DEFINE( HAVE_NTIME)1638 AC_DEFINE([HAVE_NTIME], [1], [use time server]) 1593 1639 else 1594 1640 mytimeserv="NULL" … … 1596 1642 ], 1597 1643 mytimeserv="NULL") 1598 AC_DEFINE_UNQUOTED( DEFAULT_TIMESERVER, _("${mytimeserv}"))1644 AC_DEFINE_UNQUOTED([DEFAULT_TIMESERVER], [_("${mytimeserv}")], [] ) 1599 1645 1600 1646 AC_ARG_WITH(alttimeserver, … … 1603 1649 if test "x${withval}" != xno; then 1604 1650 myalttimeserv="$withval" 1605 AC_DEFINE( HAVE_NTIME)1651 AC_DEFINE([HAVE_NTIME], [1], [use time server]) 1606 1652 else 1607 1653 myalttimeserv="NULL" … … 1609 1655 ], 1610 1656 myalttimeserv="NULL") 1611 AC_DEFINE_UNQUOTED( ALT_TIMESERVER, _("${myalttimeserv}"))1657 AC_DEFINE_UNQUOTED([ALT_TIMESERVER], [_("${myalttimeserv}")], [] ) 1612 1658 1613 1659 AC_ARG_ENABLE(login-watch, … … 1615 1661 [ 1616 1662 if test "x${enable_login_watch}" = xyes; then 1617 AC_DEFINE( SH_USE_UTMP)1663 AC_DEFINE([SH_USE_UTMP], [1], [watch for login/logout]) 1618 1664 fi 1619 1665 ] … … 1624 1670 [ 1625 1671 if test "x${enable_mounts_check}" = xyes; then 1626 AC_DEFINE( SH_USE_MOUNTS)1672 AC_DEFINE([SH_USE_MOUNTS], [1], [check mount options]) 1627 1673 fi 1628 1674 ] … … 1635 1681 AC_CHECK_HEADER(pcre.h, 1636 1682 [ 1637 AC_DEFINE( USE_LOGFILE_MONITOR, 1, [Define if you want the logfile monitor module.])1683 AC_DEFINE([USE_LOGFILE_MONITOR], [1], [Define if you want the logfile monitor module.]) 1638 1684 LIBS="-lpcre $LIBS" 1639 1685 ], … … 1641 1687 AC_CHECK_HEADER(pcre/pcre.h, 1642 1688 [ 1643 AC_DEFINE( USE_LOGFILE_MONITOR, 1, [Define if you want the logfile monitor module.])1644 AC_DEFINE( HAVE_PCRE_PCRE_H, 1, [Define if you have pcre/pcre.h.])1689 AC_DEFINE([USE_LOGFILE_MONITOR], [1], [Define if you want the logfile monitor module.]) 1690 AC_DEFINE([HAVE_PCRE_PCRE_H], [1], [Define if you have pcre/pcre.h.]) 1645 1691 LIBS="-lpcre $LIBS" 1646 1692 ], 1647 AC_MSG_ERROR([The --enable-logfile-monitor option requires libpcre. For compiling the pcre development package is needed.])1693 [AC_MSG_ERROR([The --enable-logfile-monitor option requires libpcre. For compiling the pcre development package is needed.])] 1648 1694 ) 1649 1695 ] 1650 1696 ) 1651 1697 AC_CHECK_LIB(pcre, pcre_dfa_exec, [ 1652 AC_DEFINE([HAVE_PCRE_DFA_EXEC], 1, [Define if you have pcre_dfa_exec])1698 AC_DEFINE([HAVE_PCRE_DFA_EXEC], [1], [Define if you have pcre_dfa_exec]) 1653 1699 ], [ 1654 1700 AC_MSG_WARN([pcre_dfa_exec not available]) … … 1670 1716 fi 1671 1717 LIBS="$LIBS $LIBRT" 1672 AC_DEFINE( SH_USE_PROCESSCHECK, [1], [Define if you want to check processes])1718 AC_DEFINE([SH_USE_PROCESSCHECK], [1], [Define if you want to check processes]) 1673 1719 fi 1674 1720 ] … … 1679 1725 [ 1680 1726 if test "x${enable_port_check}" = xyes; then 1681 AC_DEFINE( SH_USE_PORTCHECK, [1], [Define if you want to check ports])1727 AC_DEFINE([SH_USE_PORTCHECK], [1], [Define if you want to check ports]) 1682 1728 fi 1683 1729 ] … … 1688 1734 [ 1689 1735 if test "x${enableval}" = "xyes"; then 1690 AC_DEFINE( SH_USE_USERFILES)1736 AC_DEFINE([SH_USE_USERFILES], [1], [check user files]) 1691 1737 fi 1692 1738 ] … … 1698 1744 if test "x${enable_debug}" = "xyes"; then 1699 1745 if test "x${mydebugflag}" != "xyes"; then 1700 AC_DEFINE( MEM_DEBUG)1746 AC_DEFINE([MEM_DEBUG], [1], [] ) 1701 1747 fi 1702 AC_DEFINE( WITH_TPT)1703 AC_DEFINE( SL_DEBUG)1704 AC_DEFINE( DNMALLOC_CHECKS, 1, [Debug dnmalloc])1705 AC_DEFINE( PARANOIA, 0, [Paranoia level for dnmalloc])1706 AC_DEFINE( SL_FAIL_ON_ERROR)1748 AC_DEFINE([WITH_TPT], [1], [] ) 1749 AC_DEFINE([SL_DEBUG], [1], [] ) 1750 AC_DEFINE([DNMALLOC_CHECKS], [1], [Debug dnmalloc]) 1751 AC_DEFINE([PARANOIA], [0], [Paranoia level for dnmalloc]) 1752 AC_DEFINE([SL_FAIL_ON_ERROR], [1], [] ) 1707 1753 if test "x${myneedg3}" = "xyes"; then 1708 1754 mydebugdef="-g3" … … 1712 1758 mydebugit="yes" 1713 1759 elif test "x${enable_debug}" = "xmem"; then 1714 AC_DEFINE( MEM_DEBUG)1715 AC_DEFINE( SH_ABORT_ON_ERROR, 1, [Use abort])1760 AC_DEFINE([MEM_DEBUG], [1], [] ) 1761 AC_DEFINE([SH_ABORT_ON_ERROR], [1], [Use abort]) 1716 1762 if test "x${myneedg3}" = "xyes"; then 1717 1763 mydebugdef="-g3" … … 1721 1767 mydebugit="yes" 1722 1768 elif test "x${enable_debug}" = "xgdb"; then 1723 AC_DEFINE( SH_ABORT_ON_ERROR, 1, [Use abort])1769 AC_DEFINE([SH_ABORT_ON_ERROR], [1], [Use abort]) 1724 1770 if test "x${myneedg3}" = "xyes"; then 1725 1771 mydebugdef="-g3" … … 1749 1795 if test "x${samhain_64_asm}" = xyes; then 1750 1796 if test "x${sh_enable_asm}" = xyes; then 1751 AC_DEFINE([TIGER_OPT_ASM], 1,[Define to use tiger x86_64 optimized assembly])1797 AC_DEFINE([TIGER_OPT_ASM], [1], [Define to use tiger x86_64 optimized assembly]) 1752 1798 fi 1753 1799 fi … … 1757 1803 [ 1758 1804 if test "x${enable_ipv6}" = xno; then 1759 AC_DEFINE( USE_IPV4,1,[Define if you do not want IPv6])1805 AC_DEFINE([USE_IPV4], [1], [Define if you do not want IPv6]) 1760 1806 fi 1761 1807 ] … … 1797 1843 1798 1844 if test "x${sh_dnmalloc_enabled}" = xno; then 1799 AC_DEFINE( USE_SYSTEM_MALLOC,1,[Define if you want to use the system malloc])1845 AC_DEFINE([USE_SYSTEM_MALLOC], [1], [Define if you want to use the system malloc]) 1800 1846 fi 1801 1847 … … 1805 1851 if test "x${enable_ptrace}" = xyes; then 1806 1852 if test "x$mydebugit" != "xyes"; then 1807 AC_DEFINE( SCREW_IT_UP)1853 AC_DEFINE([SCREW_IT_UP], [1], [anti debug]) 1808 1854 fi 1809 1855 fi … … 1878 1924 esac 1879 1925 1926 dnl for entropy gathering daemon 1880 1927 AC_ARG_WITH(egd-socket, 1881 1928 [ --with-egd-socket=NAME EGD socket name], 1882 1929 egd_socket_name="$withval", egd_socket_name="" ) 1883 AC_DEFINE_UNQUOTED( EGD_SOCKET_NAME, _("$egd_socket_name"))1930 AC_DEFINE_UNQUOTED([EGD_SOCKET_NAME], [_("$egd_socket_name")], [] ) 1884 1931 1885 1932 dnl … … 1893 1940 ;; 1894 1941 egd) 1895 AC_DEFINE( HAVE_EGD_RANDOM)1942 AC_DEFINE([HAVE_EGD_RANDOM], [1], [entropy gathering daemon]) 1896 1943 try_dev_random=no 1897 1944 ;; 1898 1945 unix) 1899 AC_DEFINE( HAVE_UNIX_RANDOM)1946 AC_DEFINE([HAVE_UNIX_RANDOM], [1], [unix entropy gathering]) 1900 1947 try_dev_random=no 1901 1948 ;; … … 1906 1953 AC_MSG_CHECKING(whether /dev/random exists) 1907 1954 if test -r "/dev/srandom" && test -c "/dev/srandom"; then 1908 AC_DEFINE( HAVE_URANDOM)1909 AC_DEFINE_UNQUOTED( NAME_OF_DEV_RANDOM, _("/dev/srandom"))1955 AC_DEFINE([HAVE_URANDOM], [1], [] ) 1956 AC_DEFINE_UNQUOTED([NAME_OF_DEV_RANDOM], [_("/dev/srandom")], [] ) 1910 1957 AC_MSG_RESULT(yes) 1911 1958 if test -r "/dev/urandom" && test -c "/dev/urandom"; then 1912 AC_DEFINE_UNQUOTED( NAME_OF_DEV_URANDOM, _("/dev/urandom"))1959 AC_DEFINE_UNQUOTED([NAME_OF_DEV_URANDOM], [_("/dev/urandom")], [] ) 1913 1960 fi 1914 1961 else 1915 1962 if test -r "/dev/random" && test -c "/dev/random"; then 1916 AC_DEFINE( HAVE_URANDOM)1917 AC_DEFINE_UNQUOTED( NAME_OF_DEV_RANDOM, _("/dev/random"))1963 AC_DEFINE([HAVE_URANDOM], [1], [] ) 1964 AC_DEFINE_UNQUOTED([NAME_OF_DEV_RANDOM], [_("/dev/random")], [] ) 1918 1965 AC_MSG_RESULT(yes) 1919 1966 if test -r "/dev/urandom" && test -c "/dev/urandom"; then 1920 AC_DEFINE_UNQUOTED( NAME_OF_DEV_URANDOM, _("/dev/urandom"))1967 AC_DEFINE_UNQUOTED([NAME_OF_DEV_URANDOM], [_("/dev/urandom")], [] ) 1921 1968 fi 1922 1969 else 1923 1970 AC_MSG_RESULT(no) 1924 AC_DEFINE( HAVE_UNIX_RANDOM)1971 AC_DEFINE([HAVE_UNIX_RANDOM], [1], [unix entropy gathering]) 1925 1972 fi 1926 1973 fi … … 1932 1979 [ 1933 1980 if test "x${enable_udp}" = xyes; then 1934 AC_DEFINE( INET_SYSLOG)1981 AC_DEFINE([INET_SYSLOG], [1], [server may listen on 514/udp for syslog reports]) 1935 1982 fi 1936 1983 ] … … 1947 1994 ) 1948 1995 if test "x${myencrypt}" = "xyes"; then 1949 AC_DEFINE( SH_ENCRYPT)1950 AC_DEFINE( SH_ENCRYPT_2)1996 AC_DEFINE([SH_ENCRYPT], [1], [client/server encryption]) 1997 AC_DEFINE([SH_ENCRYPT_2], [1], [client/server encryption v2]) 1951 1998 fi 1952 1999 … … 1961 2008 ) 1962 2009 if test "x${sh_use_srp_proto}" = xyes; then 1963 AC_DEFINE( USE_SRP_PROTOCOL)2010 AC_DEFINE([USE_SRP_PROTOCOL], [1], [auth with SRP]) 1964 2011 fi 1965 2012 … … 1972 2019 ], 1973 2020 [myport="49777"]) 1974 AC_DEFINE_UNQUOTED( SH_DEFAULT_PORT, ${myport})2021 AC_DEFINE_UNQUOTED([SH_DEFAULT_PORT], [${myport}], [TCP port for client/server connection]) 1975 2022 AC_SUBST(myport) 1976 2023 … … 1988 2035 ], 1989 2036 [mylogsrv="NULL"]) 1990 AC_DEFINE_UNQUOTED( DEFAULT_LOGSERVER, _("${mylogsrv}"))2037 AC_DEFINE_UNQUOTED([DEFAULT_LOGSERVER], [_("${mylogsrv}")], [] ) 1991 2038 AC_SUBST(mylogsrv) 1992 2039 … … 2004 2051 ], 2005 2052 [myaltlogsrv="NULL"]) 2006 AC_DEFINE_UNQUOTED( ALT_LOGSERVER, _("${myaltlogsrv}"))2053 AC_DEFINE_UNQUOTED([ALT_LOGSERVER], [_("${myaltlogsrv}")], [] ) 2007 2054 2008 2055 … … 2017 2064 [ 2018 2065 if test "x${enableval}" != "x"; then 2019 AC_DEFINE( SH_STEALTH_NOCL)2066 AC_DEFINE([SH_STEALTH_NOCL], [1], [restrict CL parsing]) 2020 2067 fi 2021 2068 if test "x${enableval}" = "xstop" || test "x${enableval}" = "xstart"; then … … 2034 2081 ] 2035 2082 ) 2036 AC_DEFINE_UNQUOTED( NOCL_CODE, _("${nocl_code}"))2083 AC_DEFINE_UNQUOTED([NOCL_CODE], [_("${nocl_code}")], [code to enable CL parsing] ) 2037 2084 AC_SUBST(nocl_code) 2038 2085 AC_ARG_ENABLE(stealth, 2039 2086 [ --enable-stealth=XOR_VAL enable stealth mode [[no]]], 2040 [AC_DEFINE(SH_STEALTH) 2087 [ 2088 AC_DEFINE([SH_STEALTH], [1], [enable stealth mode]) 2041 2089 if test "x${enableval}" != "xyes"; then 2042 2090 echo "${enableval}" | grep ['[^0123456789]'] >/dev/null 2>&1 && … … 2063 2111 [ --enable-micro-stealth=XOR_VAL enable micro stealth mode [[no]]], 2064 2112 [ 2065 AC_DEFINE( SH_STEALTH)2066 AC_DEFINE( SH_STEALTH_MICRO)2113 AC_DEFINE([SH_STEALTH], [1], [enable stealth mode]) 2114 AC_DEFINE([SH_STEALTH_MICRO], [1], [enable micro stealth mode]) 2067 2115 if test "x${enableval}" != "xyes"; then 2068 2116 echo "${enableval}" | grep ['[^0123456789]'] >/dev/null 2>&1 && … … 2139 2187 fi 2140 2188 ]) 2141 AC_DEFINE_UNQUOTED( DEFAULT_IDENT, _("${myident}"))2189 AC_DEFINE_UNQUOTED([DEFAULT_IDENT], [_("${myident}")], [use this as install name] ) 2142 2190 AC_SUBST(myident) 2143 2191 AC_SUBST(need_user_install) … … 2148 2196 AC_SUBST(xor_code) 2149 2197 2150 AC_DEFINE_UNQUOTED(XOR_CODE, ${xor_code}) 2151 AC_DEFINE_UNQUOTED(SH_SYSCALLTABLE, ${sh_syscalltable}) 2198 AC_DEFINE_UNQUOTED([XOR_CODE], [${xor_code}], [] ) 2152 2199 2153 2200 … … 2156 2203 exepack_state2=`${srcdir}/c_random.sh 2>/dev/null` 2157 2204 2158 AC_DEFINE_UNQUOTED( EXEPACK_STATE_0, ${exepack_state0})2159 AC_DEFINE_UNQUOTED( EXEPACK_STATE_1, ${exepack_state1})2160 AC_DEFINE_UNQUOTED( EXEPACK_STATE_2, ${exepack_state2})2205 AC_DEFINE_UNQUOTED([EXEPACK_STATE_0], [${exepack_state0}], [exepack init key p1]) 2206 AC_DEFINE_UNQUOTED([EXEPACK_STATE_1], [${exepack_state1}], [exepack init key p2]) 2207 AC_DEFINE_UNQUOTED([EXEPACK_STATE_2], [${exepack_state2}], [exepack init key p3]) 2161 2208 2162 2209 … … 2165 2212 [ 2166 2213 if test "x${enableval}" = "xyes"; then 2167 AC_DEFINE( SH_USE_SUIDCHK)2214 AC_DEFINE([SH_USE_SUIDCHK], [1], [check for suid/sgid files]) 2168 2215 fi 2169 2216 ] … … 2236 2283 pos_tf=`expr $pos_tf_2 + 1` 2237 2284 AC_MSG_RESULT(${pos_tf}) 2238 AC_DEFINE_UNQUOTED( POS_TF, ${pos_tf})2285 AC_DEFINE_UNQUOTED([POS_TF], [${pos_tf}], [] ) 2239 2286 2240 2287 mykeybase=`echo ${my_key_A},${my_key_B}` 2241 AC_DEFINE_UNQUOTED( DEFKEY, ${mykeybase})2288 AC_DEFINE_UNQUOTED([DEFKEY], [${mykeybase}], [] ) 2242 2289 AC_SUBST(mykeybase) 2243 2290 … … 2307 2354 fi 2308 2355 fi 2309 AC_DEFINE([WITH_SIG], 1, [Define if signature checking is supported.])2310 AC_DEFINE([WITH_SIGNIFY], 1, [Define if using OpenBSD signify for signature checking.])2311 AC_DEFINE_UNQUOTED([DEFAULT_SIG_PATH], _("${mysignify}"), [Define as path to signing binary])2356 AC_DEFINE([WITH_SIG], [1], [Define if signature checking is supported.]) 2357 AC_DEFINE([WITH_SIGNIFY], [1], [Define if using OpenBSD signify for signature checking.]) 2358 AC_DEFINE_UNQUOTED([DEFAULT_SIG_PATH], [_("${mysignify}")], [Define as path to signing binary]) 2312 2359 AC_SUBST(mysignify) 2313 2360 fi … … 2326 2373 fi 2327 2374 fi 2328 AC_DEFINE([HAVE_SIG_KEY_HASH], 1, [Define if signing binary checksum available.])2329 AC_DEFINE_UNQUOTED([SIG_KEY_HASH], _("${withval}"), [Define as the signify public key checksum.] )2375 AC_DEFINE([HAVE_SIG_KEY_HASH], [1], [Define if signing binary checksum available.]) 2376 AC_DEFINE_UNQUOTED([SIG_KEY_HASH], [_("${withval}")], [Define as the signify public key checksum.] ) 2330 2377 fi 2331 2378 ] … … 2397 2444 fi 2398 2445 fi 2399 AC_DEFINE([WITH_SIG], 1, [Define if signature checking is supported.])2400 AC_DEFINE( WITH_GPG)2401 AC_DEFINE_UNQUOTED([DEFAULT_SIG_PATH], _("${mygpg}"), [Define as path to signing binary])2446 AC_DEFINE([WITH_SIG], [1], [Define if signature checking is supported.]) 2447 AC_DEFINE([WITH_GPG], [1], [] ) 2448 AC_DEFINE_UNQUOTED([DEFAULT_SIG_PATH], [_("${mygpg}")], [Define as path to signing binary]) 2402 2449 AC_SUBST(mygpg) 2403 2450 fi … … 2444 2491 fi 2445 2492 fi 2446 AC_DEFINE([HAVE_SIG_CHECKSUM], 1, [Define if signing binary checksum available.])2447 AC_DEFINE_UNQUOTED([SIG_HASH], _("${mychk}"), [Define as the signing binary TIGER192 checksum.] )2493 AC_DEFINE([HAVE_SIG_CHECKSUM], [1], [Define if signing binary checksum available.]) 2494 AC_DEFINE_UNQUOTED([SIG_HASH], [_("${mychk}")], [Define as the signing binary TIGER192 checksum.] ) 2448 2495 echo "${mychk}" | sed 's,.*:,,g' | sed 's, ,,g' | sed 's,\(.\),\1:,g' | awk '{ split($0, arr, ":"); m = length($1)/2; print "#ifndef CHKSUM_H"; print "#define CHKSUM_H"; print "char sigchk[50];"; for (i=1; i <= m; i++) printf "sigchk[%d] = %c%s%c;\n", i-1, 39, arr[i], 39; printf "sigchk[48] = %c%c0%c;\n", 39, 92, 39; print "#endif"; }' > sh_sig_chksum.h 2449 2496 fi … … 2453 2500 then 2454 2501 if test "x${mychk}" != "x"; then 2455 AC_DEFINE([HAVE_SIG_CHECKSUM], 1, [Define if signing binary checksum available.])2456 AC_DEFINE_UNQUOTED([SIG_HASH], _("${mychk}"), [Define as the signing binary TIGER192 checksum.] )2502 AC_DEFINE([HAVE_SIG_CHECKSUM], [1], [Define if signing binary checksum available.]) 2503 AC_DEFINE_UNQUOTED([SIG_HASH], [_("${mychk}")], [Define as the signing binary TIGER192 checksum.] ) 2457 2504 echo "${mychk}" | sed 's,.*:,,g' | sed 's, ,,g' | sed 's,\(.\),\1:,g' | awk '{ split($0, arr, ":"); m = length($1)/2; print "#ifndef CHKSUM_H"; print "#define CHKSUM_H"; print "char sigchk[50];"; for (i=1; i <= m; i++) printf "sigchk[%d] = %c%s%c;\n", i-1, 39, arr[i], 39; printf "sigchk[48] = %c%c0%c;\n", 39, 92, 39; print "#endif"; }' > sh_sig_chksum.h 2458 2505 fi … … 2475 2522 then 2476 2523 myfp="${withval0}" 2477 AC_DEFINE( USE_FINGERPRINT)2478 AC_DEFINE_UNQUOTED( SH_GPG_FP, _("${myfp}"))2524 AC_DEFINE([USE_FINGERPRINT], [1], [] ) 2525 AC_DEFINE_UNQUOTED([SH_GPG_FP], [_("${myfp}")], [] ) 2479 2526 echo "${myfp}" | sed 's,.*:,,g' | sed 's, ,,g' | sed 's,\(.\),\1:,g' | awk '{ split($0, arr, ":"); m = length($1)/2; print "#ifndef FINGERPRINT_H"; print "#define FINGERPRINT_H"; printf "char gpgfp[%d];\n", m+1; for (i=1; i <= m; i++) printf "gpgfp[%d] = %c%s%c;\n", i-1, 39, arr[i], 39; printf "gpgfp[%d] = %c%c0%c;\n", m, 39, 92, 39; print "#endif"; }' > sh_gpg_fp.h 2480 2527 else … … 2516 2563 ], 2517 2564 [myrcp="NULL"]) 2518 AC_DEFINE_UNQUOTED( DEFAULT_MAILADDRESS, _("${myrcp}"))2565 AC_DEFINE_UNQUOTED([DEFAULT_MAILADDRESS], [_("${myrcp}")], [] ) 2519 2566 2520 2567 … … 2527 2574 mysender="daemon" 2528 2575 ]) 2529 AC_DEFINE_UNQUOTED( DEFAULT_SENDER, _("${mysender}"))2576 AC_DEFINE_UNQUOTED([DEFAULT_SENDER], [_("${mysender}")], [] ) 2530 2577 2531 2578 … … 2555 2602 ], 2556 2603 [mytrust="0"] ) 2557 AC_DEFINE_UNQUOTED( SL_ALWAYS_TRUSTED, ${mytrust})2604 AC_DEFINE_UNQUOTED([SL_ALWAYS_TRUSTED], [${mytrust}], [UIDs of trusted users] ) 2558 2605 AC_SUBST(mytrust) 2559 2606 … … 2565 2612 if test "x${cross_compiling}" = xyes; then 2566 2613 mytmpdir="$withval" 2567 AC_DEFINE_UNQUOTED( SH_TMPDIR, _("${mytmpdir}"))2614 AC_DEFINE_UNQUOTED([SH_TMPDIR], [_("${mytmpdir}")], [] ) 2568 2615 else 2569 2616 if test -d "${withval}"; then 2570 2617 mytmpdir="$withval" 2571 AC_DEFINE_UNQUOTED( SH_TMPDIR, _("${mytmpdir}"))2618 AC_DEFINE_UNQUOTED([SH_TMPDIR], [_("${mytmpdir}")], [] ) 2572 2619 else 2573 2620 mytmpdir="$withval" 2574 AC_DEFINE_UNQUOTED( SH_TMPDIR, _("${mytmpdir}"))2621 AC_DEFINE_UNQUOTED([SH_TMPDIR], [_("${mytmpdir}")], [] ) 2575 2622 AC_MSG_WARN([--with-tmp-dir: tmp directory ${withval} does not exist]) 2576 2623 fi … … 2672 2719 ] 2673 2720 ) 2674 AC_DEFINE_UNQUOTED( DEFAULT_CONFIGFILE, _("${myconffile}"))2721 AC_DEFINE_UNQUOTED([DEFAULT_CONFIGFILE], [_("${myconffile}")], [] ) 2675 2722 AC_SUBST(myconffile) 2676 2723 AC_SUBST(myrpmconffile) … … 2694 2741 ] 2695 2742 ) 2696 AC_DEFINE_UNQUOTED( DEFAULT_ERRFILE, _("${mylogfile}"))2697 AC_DEFINE_UNQUOTED( DEFAULT_LOGDIR, _("${mylogdir}"))2743 AC_DEFINE_UNQUOTED([DEFAULT_ERRFILE], [_("${mylogfile}")], [] ) 2744 AC_DEFINE_UNQUOTED([DEFAULT_LOGDIR], [_("${mylogdir}")], [] ) 2698 2745 AC_SUBST(mylogfile) 2699 2746 AC_SUBST(mylogdir) … … 2717 2764 ] 2718 2765 ) 2719 AC_DEFINE_UNQUOTED( DEFAULT_ERRLOCK, _("${mylockfile}"))2720 AC_DEFINE_UNQUOTED( DEFAULT_PIDDIR, _("${mylockdir}"))2766 AC_DEFINE_UNQUOTED([DEFAULT_ERRLOCK], [_("${mylockfile}")], [] ) 2767 AC_DEFINE_UNQUOTED([DEFAULT_PIDDIR], [_("${mylockdir}")], [] ) 2721 2768 AC_SUBST(mylockfile) 2722 2769 AC_SUBST(mylockdir) … … 2755 2802 myrpmdatafile="${mydatafile}" 2756 2803 ]) 2757 AC_DEFINE_UNQUOTED( DEFAULT_DATA_FILE, _("${mydatafile}"))2804 AC_DEFINE_UNQUOTED([DEFAULT_DATA_FILE], [_("${mydatafile}")], [] ) 2758 2805 AC_SUBST(mydatafile) 2759 2806 AC_SUBST(myrpmdatafile) 2760 2807 2761 AC_DEFINE_UNQUOTED( DEFAULT_DATAROOT, _("${mydataroot}"))2808 AC_DEFINE_UNQUOTED([DEFAULT_DATAROOT], [_("${mydataroot}")], [] ) 2762 2809 AC_SUBST(mydataroot) 2763 2810 2764 AC_DEFINE_UNQUOTED( DEFAULT_QDIR, _("${mydataroot}/.quarantine"))2811 AC_DEFINE_UNQUOTED([DEFAULT_QDIR], [_("${mydataroot}/.quarantine")], [] ) 2765 2812 AC_SUBST(myqdir) 2766 2813 … … 2774 2821 myhtmlfile="${mylogdir}/${install_name}.html" 2775 2822 ]) 2776 AC_DEFINE_UNQUOTED( DEFAULT_HTML_FILE, _("${myhtmlfile}"))2823 AC_DEFINE_UNQUOTED([DEFAULT_HTML_FILE], [_("${myhtmlfile}")], [] ) 2777 2824 AC_SUBST(myhtmlfile) 2778 2825 … … 2790 2837 2791 2838 2792 AC_DEFINE_UNQUOTED(SH_INSTALL_DIR, _("${sbindir}")) 2793 AC_DEFINE_UNQUOTED(SH_INSTALL_PATH, _("${sbindir}/${install_name}")) 2794 AC_DEFINE_UNQUOTED(SH_INSTALL_NAME, _("${install_name}")) 2795 2796 AC_CONFIG_HEADER(config.h) 2797 2798 AC_OUTPUT( 2799 [ 2839 AC_DEFINE_UNQUOTED([SH_INSTALL_DIR], [_("${sbindir}")], [] ) 2840 AC_DEFINE_UNQUOTED([SH_INSTALL_PATH], [_("${sbindir}/${install_name}")], [] ) 2841 AC_DEFINE_UNQUOTED([SH_INSTALL_NAME], [_("${install_name}")], [] ) 2842 2843 AH_TOP([ 2844 #ifndef SH_CONFIG_H 2845 #define SH_CONFIG_H 2846 ]) 2847 AH_BOTTOM([ 2848 #ifdef SH_STEALTH 2849 char * globber(const char * string); 2850 #define _(string) globber(string) 2851 #define N_(string) string 2852 #else 2853 #define _(string) string 2854 #define N_(string) string 2855 #endif 2856 2857 #endif 2858 ]) 2859 AC_CONFIG_HEADERS([config.h]) 2860 AC_CONFIG_FILES([ 2800 2861 Makefile 2801 2862 samhain-install.sh … … 2823 2884 scripts/check_samhain.pl 2824 2885 deploy.sh 2825 ] ,2826 [2886 ]) 2887 AC_CONFIG_COMMANDS([stamp-h],[ 2827 2888 echo timestamp > stamp-h 2828 2889 chmod +x samhain-install.sh … … 2833 2894 ] 2834 2895 ) 2896 AC_OUTPUT 2835 2897 2836 2898 chmod +x deploy.sh
Note:
See TracChangeset
for help on using the changeset viewer.