summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorJan Engelhardt <jengelh@medozas.de>2009-06-23 01:12:53 +0200
committerJan Engelhardt <jengelh@medozas.de>2009-06-23 01:24:51 +0200
commitbf4fd3acee4e611afee20025f55454e37813f8ca (patch)
treed2bc642c03454626551adc86cb56f34e45530f2a /configure.in
parentef8ba32e0ca7ac7bbbaf87f6fd7b197af18aed25 (diff)
downloadlibnl-bf4fd3acee4e611afee20025f55454e37813f8ca.tar.gz
Move to automake-based build
Issues solved: * PACKAGE_VERSION was abused for SOVERSION * unneeded DEP stage * did not support out-of-tree builds * no way to turn off silent mode * overriding CFLAGS at make time was not supported * no static libs were provided Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in30
1 files changed, 14 insertions, 16 deletions
diff --git a/configure.in b/configure.in
index aa4dd98..b00a759 100644
--- a/configure.in
+++ b/configure.in
@@ -10,28 +10,26 @@
#
AC_INIT(libnl, 2.0, tgraf@suug.ch)
-AC_CONFIG_HEADER(lib/defs.h)
-
-save_CFLAGS="${CFLAGS}"
-save_LDFLAGS="${LDFLAGS}"
-save_CPPFLAGS="${CPPFLAGS}"
+AC_CONFIG_HEADERS([lib/defs.h])
+AC_CONFIG_MACRO_DIR([m4])
+AM_INIT_AUTOMAKE([-Wall foreign subdir-objects])
AC_PROG_CC
+AM_PROG_CC_C_O
AC_PROG_INSTALL
+AM_PROG_LIBTOOL
AC_C_CONST
AC_C_INLINE
-AC_CHECK_LIB(m, pow,
-[
- LIBM="-lm"
-],[
- echo
- echo "*** Error: libm required ***"
- echo
-])
+AC_ARG_WITH([pkgconfigdir], AS_HELP_STRING([--with-pkgconfigdir=PATH],
+ [Path to the pkgconfig directory [[LIBDIR/pkgconfig]]]),
+ [pkgconfigdir="$withval"], [pkgconfigdir='${libdir}/pkgconfig'])
+AC_SUBST([pkgconfigdir])
-LIBNL_LIB="$LIBM"
-AC_SUBST(LIBNL_LIB)
+AC_CHECK_LIB([m], [pow], [], AC_MSG_ERROR([libm is required]))
-AC_OUTPUT([Makefile.opts libnl-2.0.pc doc/Doxyfile include/netlink/version.h])
+AC_CONFIG_FILES([Makefile doc/Doxyfile doc/Makefile lib/Makefile
+ include/Makefile src/Makefile libnl-2.0.pc \
+ include/netlink/version.h])
+AC_OUTPUT