Skip to content

Commit

Permalink
Made local exe checks run only of a server is being built. Removed ch…
Browse files Browse the repository at this point in the history
…ecks for external progs that may not be needed yet.

git-svn-id: file:///home/mbr/svn/fwknop/trunk@173 510a4753-2344-4c79-9c09-4d669213fbeb
  • Loading branch information
Damien Stuart committed Dec 29, 2009
1 parent 861c0e8 commit 2310b36
Showing 1 changed file with 45 additions and 42 deletions.
87 changes: 45 additions & 42 deletions configure.ac
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ AS_IF([test "x$with_gpgme" != xno],


dnl Check for libpcap, gdbm (or ndbm) if we are building the server component dnl Check for libpcap, gdbm (or ndbm) if we are building the server component
dnl dnl
AS_IF([test "$want_server" = yes], AS_IF([test "$want_server" = yes], [
# Looking for libpcap # Looking for libpcap
# #
AC_CHECK_LIB([pcap],[pcap_open_live], [], AC_CHECK_LIB([pcap],[pcap_open_live], [],
Expand All @@ -158,48 +158,47 @@ AS_IF([test "$want_server" = yes],
[ AC_MSG_ERROR([fwknopd needs either gdbm or ndbm])] [ AC_MSG_ERROR([fwknopd needs either gdbm or ndbm])]
)] )]
) )
)
dnl Find various locally-installed executables CONFIGURE_PART(Find local executables used by the server)
CONFIGURE_PART(Find Local Executables)
dnl Add various common way to sbin dir to the path (just in case) dnl Add various common way to sbin dir to the path (just in case)
APP_PATH=$PATH$PATH_SEPARATOR/sbin$PATH_SEPARATOR/usr/sbin$PATH_SEPARATOR/usr/local/sbin APP_PATH=$PATH$PATH_SEPARATOR/sbin$PATH_SEPARATOR/usr/sbin$PATH_SEPARATOR/usr/local/sbin

AC_PATH_PROG(IPTABLES_EXE, [iptables], [], [$APP_PATH]) AC_PATH_PROG(IPTABLES_EXE, [iptables], [], [$APP_PATH])
AS_IF([test x$IPTABLES_EXE != x], [ AS_IF([test x$IPTABLES_EXE != x], [
AC_DEFINE_UNQUOTED([IPTABLES_EXE], ["$IPTABLES_EXE"], [Path to iptables executable]) AC_DEFINE_UNQUOTED([IPTABLES_EXE], ["$IPTABLES_EXE"], [Path to iptables executable])
iptables_exe=$IPTABLES_EXE iptables_exe=$IPTABLES_EXE
], [ iptables_exe="(not found)"] ], [ iptables_exe="(not found)"]
) )

AC_PATH_PROG(IPFW_EXE, [ipfw], [], [$APP_PATH]) AC_PATH_PROG(IPFW_EXE, [ipfw], [], [$APP_PATH])
AS_IF([test x$IPFW_EXE != x], [ AS_IF([test x$IPFW_EXE != x], [
AC_DEFINE_UNQUOTED([IPFW_EXE], ["$IPFW_EXE"], [Path to ipfw executable]) AC_DEFINE_UNQUOTED([IPFW_EXE], ["$IPFW_EXE"], [Path to ipfw executable])
ipfw_exe=$IPFW_EXE ipfw_exe=$IPFW_EXE
], [ ipfw_exe="(not found)"] ], [ ipfw_exe="(not found)"]
) )

AC_PATH_PROG(SENDMAIL_EXE, [sendmail], [], [$APP_PATH$PATH_SEPARATOR/usr/lib]) AC_PATH_PROG(SENDMAIL_EXE, [sendmail], [], [$APP_PATH$PATH_SEPARATOR/usr/lib])
AS_IF([test x$SENDMAIL_EXE != x], [ AS_IF([test x$SENDMAIL_EXE != x], [
AC_DEFINE_UNQUOTED([SENDMAIL_EXE], ["$SENDMAIL_EXE"], [Path to sendmail executable]) AC_DEFINE_UNQUOTED([SENDMAIL_EXE], ["$SENDMAIL_EXE"], [Path to sendmail executable])
sendmail_exe=$SENDMAIL_EXE sendmail_exe=$SENDMAIL_EXE
], [ sendmail_exe="(not found)"] ], [ sendmail_exe="(not found)"]
) )

AC_PATH_PROG(MAIL_EXE, [mail], [], [$APP_PATH]) AC_PATH_PROG(MAIL_EXE, [mail], [], [$APP_PATH])
AS_IF([test x$MAIL_EXE != x], [ AS_IF([test x$MAIL_EXE != x], [
AC_DEFINE_UNQUOTED([MAIL_EXE], ["$MAIL_EXE"], [Path to mail executable]) AC_DEFINE_UNQUOTED([MAIL_EXE], ["$MAIL_EXE"], [Path to mail executable])
mail_exe=$MAIL_EXE mail_exe=$MAIL_EXE
], [ mail_exe="(not found)"] ], [ mail_exe="(not found)"]
) )

AC_PATH_PROG(SH_EXE, [sh], [], [$APP_PATH]) AC_PATH_PROG(SH_EXE, [sh], [], [$APP_PATH])
AS_IF([test x$SH_EXE != x], [ AS_IF([test x$SH_EXE != x], [
AC_DEFINE_UNQUOTED([SH_EXE], ["$SH_EXE"], [Path to sh executable]) AC_DEFINE_UNQUOTED([SH_EXE], ["$SH_EXE"], [Path to sh executable])
sh_exe=$SH_EXE sh_exe=$SH_EXE
], [ sh_exe="(not found)"] ], [ sh_exe="(not found)"]
) )
])


CONFIGURE_PART(Generating Files) CONFIGURE_PART(Generating Files)


Expand All @@ -215,17 +214,21 @@ AC_OUTPUT
CONFIGURE_PART(Configure Summary) CONFIGURE_PART(Configure Summary)


echo " echo "
$PACKAGE_NAME-$PACKAGE_VERSION has been configured. $PACKAGE_NAME-$PACKAGE_VERSION configuration.
========================================================== ==========================================================
Client build: $want_client Client build: $want_client
Server build: $want_server Server build: $want_server
GPG encryption support: $have_gpgme GPG encryption support: $have_gpgme


Installation prefix: $prefix Installation prefix: $prefix

"
if [test $want_server = "yes" ]; then
echo " Server support programs:
iptables: $iptables_exe iptables: $iptables_exe
ipfw: $ipfw_exe ipfw: $ipfw_exe
sendmail: $sendmail_exe sendmail: $sendmail_exe
mail: $mail_exe mail: $mail_exe
sh: $sh_exe sh: $sh_exe
" "
fi

0 comments on commit 2310b36

Please sign in to comment.