diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac index 65e82bc..2128386 100644 --- a/configure.ac +++ b/configure.ac @@ -5,15 +5,24 @@ AM_MAINTAINER_MODE AC_CONFIG_SRCDIR([src/netnuke.c]) AC_CONFIG_HEADERS([config.h]) +CFLAGS="-Wall -O2 -I../include" +LDFLAGS="-lpthread" + # Checks for programs. +AC_PROG_CC AC_PROG_CC_C99 AS_IF([test "$ac_cv_prog_cc_c99" = "no"], [AC_MSG_ERROR([no C99 compiler found. Aborting.])]) # Checks for libraries. +AC_CHECK_LIB([pthread], [pthread_create], [], + [AC_MSG_ERROR([required library pthread missing])]) + +AC_CHECK_LIB([sysfs], [sysfs_read_attribute], [], + [AC_MSG_ERROR([required library libsysfs missing])]) # Checks for header files. -AC_CHECK_HEADERS([fcntl.h stdlib.h string.h sys/ioctl.h unistd.h]) +AC_CHECK_HEADERS([fcntl.h stdlib.h string.h sys/ioctl.h unistd.h sysfs/libsysfs.h]) # Checks for typedefs, structures, and compiler characteristics. AC_TYPE_UID_T @@ -22,8 +31,6 @@ AC_TYPE_UID_T AC_FUNC_MALLOC AC_CHECK_FUNCS([memmove memset strerror strncasecmp]) -AC_CONFIG_FILES( \ - Makefile \ - src/Makefile) +AC_CONFIG_FILES([Makefile src/Makefile]) AC_OUTPUT |