summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorJiri Pirko <jiri@resnulli.us>2013-03-11 09:22:54 +0100
committerJiri Pirko <jiri@resnulli.us>2013-03-15 15:32:12 +0100
commit04c2d9d32a7dad6a4830bca132fc4ca72b276ac6 (patch)
tree1fcdf5323a61e7ef18bfa0f8be5f22bcbc797335 /configure.ac
downloadlibndp-04c2d9d32a7dad6a4830bca132fc4ca72b276ac6.tar.gz
initial
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac62
1 files changed, 62 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..52f499d
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,62 @@
+# -*- Autoconf -*-
+# Process this file with autoconf to produce a configure script.
+
+AC_INIT([libndp], [0.1], [jiri@resnulli.us])
+AC_CONFIG_MACRO_DIR([m4])
+AM_INIT_AUTOMAKE([-Wall foreign subdir-objects])
+#m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES(yes)], [])
+AM_PROG_AR
+
+# Here are a set of rules to help you update your library version information:
+# 1. Start with version information of ‘0:0:0’ for each libtool library.
+# 2. Update the version information only immediately before a public release
+# of your software. More frequent updates are unnecessary, and only guarantee
+# that the current interface number gets larger faster.
+# 3. If the library source code has changed at all since the last update,
+# then increment revision (‘c:r:a’ becomes ‘c:r+1:a’).
+# 4. If any interfaces have been added, removed, or changed since the last
+# update, increment current, and set revision to 0.
+# 5. If any interfaces have been added since the last public release, then
+# increment age.
+# 6. If any interfaces have been removed or changed since the last public
+# release, then set age to 0.
+
+AC_SUBST(LIBNDP_CURRENT, 0)
+AC_SUBST(LIBNDP_REVISION, 0)
+AC_SUBST(LIBNDP_AGE, 0)
+
+CFLAGS="$CFLAGS -Wall -Werror"
+
+# Checks for programs.
+AC_PROG_CC
+LT_INIT
+
+# Checks for header files.
+AC_CHECK_HEADERS([stdint.h stdlib.h])
+
+# Checks for typedefs, structures, and compiler characteristics.
+AC_C_INLINE
+
+# Checks for library functions.
+AC_FUNC_MALLOC
+
+AC_ARG_ENABLE([logging],
+ AS_HELP_STRING([--disable-logging], [disable system logging @<:@default=enabled@:>@]),
+ [], enable_logging=yes)
+AS_IF([test "x$enable_logging" = "xyes"], [
+ AC_DEFINE(ENABLE_LOGGING, [1], [System logging.])
+])
+
+AC_ARG_ENABLE([debug],
+ AS_HELP_STRING([--enable-debug], [enable debug messages @<:@default=disabled@:>@]),
+ [], [enable_debug=no])
+AS_IF([test "x$enable_debug" = "xyes"], [
+ AC_DEFINE(ENABLE_DEBUG, [1], [Debug messages.])
+])
+
+AC_CONFIG_FILES([Makefile
+include/Makefile \
+libndp/Makefile \
+libndp/libndp.pc \
+utils/Makefile])
+AC_OUTPUT