aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorJonathan McCrohan <jmccrohan@gmail.com>2012-02-05 19:03:25 +0000
committerJonathan McCrohan <jmccrohan@gmail.com>2012-02-05 19:03:25 +0000
commit03dfbc2efa31d3c4fd7e576111883ea488e3e179 (patch)
tree6f227b085f675e294edd98d66ccbf190e898f544 /configure.ac
downloadwavemon-6d314215d33f4a69a984b853156c2191c7f171f2.tar.gz
Imported Upstream version 0.6.10upstream/0.6.10
Diffstat (limited to '')
-rw-r--r--configure.ac65
1 files changed, 65 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..b66b40b
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,65 @@
+dnl Process this file with autoconf to produce a configure script.
+AC_PREREQ(2.50)
+AC_INIT([wavemon], [0.6.10], [gerrit@erg.abdn.ac.uk], [wavemon-current])
+
+
+# Variables
+AC_CONFIG_AUX_DIR([config])
+AC_CONFIG_FILES([Makefile])
+AC_DEFINE_UNQUOTED([BUILD_DATE], ["`/bin/date`"],
+ [date wavemon was last configured and built])
+
+CFLAGS="-O2 -Wall"
+
+# wavemon is only supported on Linux, warn user about futile compilations
+AC_CANONICAL_HOST
+case "$host_os" in
+ *linux*|*LINUX*) ;;
+ *) AC_MSG_ERROR([incompatible OS '$host_os' - required is Linux with wireless extensions.])
+esac
+
+# Checks for programs.
+AC_PROG_CC
+AC_PROG_CPP
+AC_PROG_INSTALL
+
+# Checks for header files.
+AC_HEADER_STDC
+AC_HEADER_TIME
+AC_CHECK_HEADERS([ncurses.h fcntl.h netdb.h sys/ioctl.h sys/time.h unistd.h\
+ net/if_arp.h netinet/ether.h net/ethernet.h],
+ [], [AC_MSG_ERROR($ac_header not found)])
+
+# linux/if.h needs 'struct sockaddr'
+# linux/wireless.h in turn depends on linux/if.h
+AC_CHECK_HEADERS([sys/socket.h linux/if.h linux/wireless.h], [],
+ [AC_MSG_ERROR(can not use $ac_header)],
+ [#if HAVE_SYS_SOCKET_H
+ # include <sys/socket.h>
+ #endif
+ #if HAVE_LINUX_IF_H
+ # include <linux/if.h>
+ #endif
+ ])
+AC_HEADER_STDBOOL
+
+# Tests involving libraries
+AC_CHECK_LIB([m], [pow])
+AC_CHECK_LIB([ncurses], [waddstr])
+
+
+# Testing library functions
+AC_CHECK_FUNCS([modf log10 gettimeofday \
+ memmove memset strdup \
+ strchr strspn strcspn \
+ strcasecmp strncasecmp \
+ strtol \
+ ether_ntohost], [],
+ [AC_MSG_ERROR(function '$ac_func' not supported)])
+
+# Checks for typedefs, structures, and compiler characteristics.
+AC_PROG_GCC_TRADITIONAL
+AC_C_CONST
+AC_C_INLINE
+
+AC_OUTPUT