aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac60
1 files changed, 32 insertions, 28 deletions
diff --git a/configure.ac b/configure.ac
index 695d0b32..ebcbc9df 100644
--- a/configure.ac
+++ b/configure.ac
@@ -522,51 +522,55 @@ AC_DEFINE_UNQUOTED(DEFAULT_LOG_FACILITY, $DEFAULT_LOG_FACILITY,
522 [Default log facility]) 522 [Default log facility])
523 523
524# Test for libpmilter 524# Test for libpmilter
525AC_SUBST(META1_LIBS)
526
525AC_ARG_ENABLE([pmilter], 527AC_ARG_ENABLE([pmilter],
526 AC_HELP_STRING([--enable-pmilter=PATH-TO-META1], 528 AC_HELP_STRING([--enable-pmilter[[=PATH]]],
527 [enable pmilter support (EXPERIMENTAL)]), 529 [enable pmilter support (EXPERIMENTAL)]),
528 [case "${enableval}" in 530 [case "${enableval}" in
529 /*) meta1_dir=`echo ${enableval} | sed 's,/$,,'` 531 yes) enable_pmilter=yes;;
530 enable_pmilter=yes 532 no) enable_pmilter=no;;
531 ;; 533 /*) dir=$enableval/lib/meta1
532 *) AC_MSG_ERROR([Argument to --enable-pmilter is not a directory name]) 534 if test -d $dir; then
535 META1_LIBS="-L$dir"
536 else
537 AC_MSG_ERROR([$dir: No such directory])
538 fi
539 enable_pmilter=yes
540 ;;
541 *) AC_MSG_ERROR([Bad argument to --enable-pmilter])
533 esac],[enable_pmilter=no]) 542 esac],[enable_pmilter=no])
534 543
535if test "$enable_pmilter" = yes; then 544if test "$enable_pmilter" = yes; then
536 saved_LIBS=$LIBS 545 saved_LIBS=$LIBS
537 AC_SUBST(PTHREAD_LIBRARIES) 546 AC_SUBST(PTHREAD_LIBRARIES)
538 AC_CHECK_LIB(pthread, pthread_self, 547 AC_CHECK_LIB(pthread, pthread_self,
539 [ have_pthread=yes 548 [ have_pthread=yes
540 PTHREAD_LIBRARIES="-lpthread -lc" ], 549 PTHREAD_LIBRARIES="-lpthread -lc" ],
541 [ PTHREAD_LIBRARIES="-lpthread" 550 [ PTHREAD_LIBRARIES="-lpthread"
542 AC_CHECK_FUNC(pthread_self, 551 AC_CHECK_FUNC(pthread_self,
543 [HAVE_PTHREAD=yes]) ]) 552 [HAVE_PTHREAD=yes]) ])
544 if test $have_pthread != yes; then 553 if test $have_pthread != yes; then
545 AC_MSG_ERROR([POSIX threads library not found. Please install it and then reconfigure]) 554 AC_MSG_ERROR([POSIX threads library not found. Please install it and then reconfigure])
546 fi 555 fi
547 556
548 libs="libpmilter/libpmilter.a \ 557 AC_CHECK_HEADERS([sm/error.h sm/hdrmoddef.h sm/pmfapi.h sm/pmilter.h sm/smreplycodes.h sm/generic.h sm/mfapi.h sm/pmfdef.h sm/smmts.h],
549 libpmilter/libpmutil.a\ 558 [],
550 libevthr/libevthr.a\ 559 [AC_MSG_ERROR([Required header file $ac_header not found])],
551 libthr/libthr.a\ 560 [
552 libmta/librcbcomm.a\ 561#ifdef HAVE_SM_ERROR_H
553 libmta/librcb.a\ 562# include <sm/error.h>
554 libmta/libmtar.a\ 563#endif])
555 libmta/libcstrr.a\ 564
556 libcheck/libcheck.a\ 565 libs="pmilter pmutil evthr thr rcbcomm rcb mtar cstrr replr"
557 librepl/libreplr.a" 566 LDFLAGS="$LDFLAGS $META1_LIBS"
558
559 AC_SUBST(META1_LIBS)
560 for file in $libs 567 for file in $libs
561 do 568 do
562 if test -f $meta1_dir/$file; then 569 AC_CHECK_LIB($file, main,
563 META1_LIBS="$META1_LIBS $meta1_dir/$file" 570 [META1_LIBS="$META1_LIBS -l$file"],
564 else 571 [AC_MSG_ERROR([Required library lib$file not found])])
565 AC_MSG_ERROR([Required library $file not found in $meta1_dir])
566 fi
567 done 572 done
568 AC_SUBST(ENABLE_PMULT,'${PMULT_PROG}') 573 AC_SUBST(ENABLE_PMULT,'${PMULT_PROG}')
569 AC_SUBST(META1_INCLUDES,"-I$meta1_dir/include")
570 LIBS=$saved_LIBS 574 LIBS=$saved_LIBS
571fi 575fi
572 576

Return to:

Send suggestions and report system problems to the System administrator.