summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac75
1 files changed, 75 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..2155474
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,75 @@
+#Autoconfigure for lander
+#$Id$
+AC_INIT([dag_scrubber], [0.5], [yuri@isi.edu])
+AC_SUBST(RELEASE, [${RELEASE:-2}])
+
+AC_CONFIG_AUX_DIR(.build-aux)
+AM_INIT_AUTOMAKE([-Wall -Wno-portability -Werror foreign])
+
+AC_CONFIG_HEADERS([config.h])
+
+#checks for programs
+AC_PROG_CC
+AC_PROG_INSTALL
+#AC_PROG_MKDIR_P
+AC_PROG_LN_S
+#AC_PROG_SED
+AC_PROG_AWK
+
+
+#check for libraries
+found_pcap=
+AC_CHECK_LIB([pcap], [pcap_open_offline],
+ [#restore libs
+ LIBS=$ac_check_lib_save_LIBS
+ found_pcap=yes
+ ])
+found_ssl=
+
+AC_CHECK_LIB([crypto], [BF_ecb_encrypt],
+ [#restore libs
+ LIBS=$ac_check_lib_save_LIBS
+ found_ssl=yes
+ ])
+#check for headers
+if test -n "$found_ssl"; then
+ AC_CHECK_HEADER([openssl/md5.h],,[found_ssl=])
+fi
+if test -n "$found_ssl"; then
+ AC_CHECK_HEADER([openssl/blowfish.h],,[found_ssl=])
+fi
+if test -n "$found_ssl"; then
+ AC_CHECK_HEADER([openssl/sha.h],,[found_ssl=])
+fi
+if test -n "$found_pcap"; then
+ AC_CHECK_HEADER([pcap.h],, [found_pcap=])
+fi
+AC_CACHE_SAVE
+
+
+
+AC_CONFIG_FILES([
+ Makefile
+ dag_scrubber.spec
+ ])
+
+AC_OUTPUT
+
+if test -z "$found_ssl" -o -z "$found_pcap"; then
+ AC_MSG_WARN([--------------------------------------------------])
+ AC_MSG_WARN([Some scrubber components were not found: ])
+ AC_MSG_WARN([])
+ test -z "$found_ssl" && {
+ AC_MSG_ERROR([ Could not find libssl ])
+ }
+ test -z "$found_pcap" && {
+ AC_MSG_WARN([ Could not find libpcap ])
+ }
+ AC_MSG_WARN([])
+ AC_MSG_WARN([--------------------------------------------------])
+else
+ AC_MSG_NOTICE([------------------------------------------------])
+ AC_MSG_NOTICE([No errors, everything seems to be in place ])
+ AC_MSG_NOTICE([------------------------------------------------])
+fi
+