diff options
author | Rich Fought <rmf.aero@gmail.com> | 2012-10-26 12:19:26 -0700 |
---|---|---|
committer | Rich Fought <rmf.aero@gmail.com> | 2012-10-26 12:19:26 -0700 |
commit | a8ef3525c89b0a2049abedd2a0b2d54f0d574476 (patch) | |
tree | 4c94d83eea392753c5c98e989aa6521d3c5dbcb8 /configure.in | |
parent | 609b47961b061281e9532551ded6225545fc9128 (diff) | |
download | libnl-a8ef3525c89b0a2049abedd2a0b2d54f0d574476.tar.gz |
Add configure option to disable pthreads support
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/configure.in b/configure.in index 79cd93f..9a190c2 100644 --- a/configure.in +++ b/configure.in @@ -41,7 +41,7 @@ m4_define([libnl_lt_age], [11]) m4_define([libnl_version], [libnl_major_version.libnl_minor_version.libnl_micro_version]) -AC_INIT(libnl, [libnl_version], [http://www.infradead.org/~tgr/libnl/]) +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]) @@ -83,8 +83,18 @@ AC_ARG_ENABLE([cli], [enable_cli="$enableval"], [enable_cli="yes"]) AM_CONDITIONAL([ENABLE_CLI], [test "$enable_cli" = "yes"]) +AC_ARG_ENABLE([pthreads], + AS_HELP_STRING([--disable-pthreads], [Disable pthreads support]), + [enable_pthreads="$enableval"], [enable_pthreads="yes"]) +AM_CONDITIONAL([DISABLE_PTHREADS], [test "$enable_pthreads" = "no"]) + AC_CHECK_LIB([m], [pow], [], AC_MSG_ERROR([libm is required])) -AC_CHECK_LIB([pthread], [pthread_mutex_lock], [], AC_MSG_ERROR([libpthread is required])) + +if test "x$enable_pthreads" = "xno"; then + AC_DEFINE([DISABLE_PTHREADS], [1], [Define to 1 to disable pthreads]) +else + AC_CHECK_LIB([pthread], [pthread_mutex_lock], [], AC_MSG_ERROR([libpthread is required])) +fi AC_CONFIG_SUBDIRS([doc]) |