| # |
| # configure.in |
| # |
| # This library is free software; you can redistribute it and/or |
| # modify it under the terms of the GNU Lesser General Public |
| # License as published by the Free Software Foundation version 2.1 |
| # of the License. |
| # |
| # Copyright (c) 2003-2011 Thomas Graf <tgraf@suug.ch> |
| # |
| |
| |
| # copied from glib |
| m4_define([libnl_major_version], [3]) |
| m4_define([libnl_minor_version], [2]) |
| m4_define([libnl_micro_version], [3]) # bump for every release unless minor was bumped |
| m4_define([libnl_lt_revision], [0]) # bump or reset to 0 if interfaces were added |
| m4_define([libnl_lt_age], [3]) # bump whenever a release is backwards compatible |
| # bump with +100 if a minor release is compatible |
| # reset to 0 if interfaces were removed |
| |
| m4_define([libnl_version], |
| [libnl_major_version.libnl_minor_version.libnl_micro_version]) |
| |
| m4_define([libnl_lt_current], |
| [m4_eval(100 * libnl_minor_version + libnl_micro_version - libnl_lt_revision)]) |
| |
| AC_INIT(libnl, [libnl_version], [http://www.infradead.org/~tgr/libnl/]) |
| AC_CONFIG_HEADERS([lib/defs.h]) |
| AC_CONFIG_MACRO_DIR([m4]) |
| AM_INIT_AUTOMAKE([-Wall foreign subdir-objects]) |
| m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES(yes)], []) |
| |
| MAJ_VERSION=libnl_major_version |
| AC_SUBST(MAJ_VERSION) |
| MIN_VERSION=libnl_minor_version |
| AC_SUBST(MIN_VERSION) |
| MIC_VERSION=libnl_micro_version |
| AC_SUBST(MIC_VERSION) |
| LIBNL_VERSION=libnl_version |
| AC_SUBST(LIBNL_VERSION) |
| |
| LT_CURRENT=libnl_lt_current |
| AC_SUBST(LT_CURRENT) |
| LT_REVISION=libnl_lt_revision |
| AC_SUBST(LT_REVISION) |
| LT_AGE=libnl_lt_age |
| AC_SUBST(LT_AGE) |
| |
| AC_PROG_CC |
| AM_PROG_CC_C_O |
| AC_PROG_INSTALL |
| AM_PROG_LIBTOOL |
| AM_PROG_LEX |
| AC_PROG_YACC |
| |
| AC_C_CONST |
| AC_C_INLINE |
| |
| 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]) |
| |
| AC_ARG_ENABLE([cli], |
| AS_HELP_STRING([--disable-cli], [Do not build command line interface utils]), |
| [enable_cli="$enableval"], [enable_cli="yes"]) |
| AM_CONDITIONAL([ENABLE_CLI], [test "$enable_cli" = "yes"]) |
| |
| AC_CHECK_LIB([m], [pow], [], AC_MSG_ERROR([libm is required])) |
| AC_CHECK_LIB([pthread], [pthread_mutex_lock], [], AC_MSG_ERROR([libpthread is required])) |
| |
| AC_CONFIG_FILES([ |
| Makefile |
| libnl-3.0.pc |
| libnl-route-3.0.pc |
| libnl-genl-3.0.pc |
| libnl-nf-3.0.pc |
| libnl-cli-3.0.pc |
| doc/Doxyfile |
| doc/Makefile |
| lib/Makefile |
| include/Makefile |
| src/Makefile |
| src/lib/Makefile |
| man/Makefile |
| python/Makefile |
| python/setup.py |
| python/netlink/Makefile |
| python/netlink/route/Makefile |
| include/netlink/version.h |
| ]) |
| |
| AC_OUTPUT |
| |
| echo "-------------------------------------------------------------------------------" |
| echo " NOTE" |
| echo "" |
| echo " There have been some changes starting with 3.2 regarding where and how libnl" |
| echo " is being installed on the system in order to allow multiple libnl versions" |
| echo " to be installed in parallel:" |
| echo "" |
| echo " - Headers will be installed in ${includedir}/libnl${MAJ_VERSION}, therefore" |
| echo " you will need to add \"-I/usr/include/libnl${MAJ_VERSION}\" to CFLAGS" |
| echo "" |
| echo " - The library basename was renamed to libnl-${MAJ_VERSION}, i.e. the SO names become" |
| echo " libnl-${MAJ_VERSION}.so., libnl-route-${MAJ_VERSION}.so, etc." |
| echo "" |
| echo " - libtool versioning was assumed, to ease detection of compatible library" |
| echo " versions. libnl-${MAJ_VERSION}.so.CURRENT.REVISION.AGE where." |
| echo " CURRENT := 100 * \$MINOR_VERSION + \$MICRO_VERSION" |
| echo " REVISION := nth revision if API was unchanged" |
| echo " AGE := nth revision that is backwards compatible." |
| echo "" |
| echo " If you are using pkg-config for detecting and linking against the library " |
| echo " things will continue magically as if nothing every happened. If you are " |
| echo " linking manually you need to adapt your Makefiles or switch to using " |
| echo " pkg-config files." |
| echo "" |
| echo "-------------------------------------------------------------------------------" |
| |