12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
- #
- # 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-2008 Thomas Graf <tgraf@suug.ch>
- #
- AC_INIT(libnl, 1.1.4, tgraf@suug.ch)
- AC_CONFIG_HEADER(lib/defs.h)
- save_CFLAGS="${CFLAGS}"
- save_LDFLAGS="${LDFLAGS}"
- save_CPPFLAGS="${CPPFLAGS}"
- AC_PROG_CC
- AC_PROG_INSTALL
- AC_C_CONST
- AC_C_INLINE
- #####################################################################
- ##
- ## libm check
- ##
- #####################################################################
- M="No "
- AC_CHECK_LIB(m, pow,
- [
- LIBM="-lm"
- M="Yes"
- ],[
- echo
- echo "*** Error: libm required ***"
- echo
- exit
- ])
- #####################################################################
- ##
- ## verbose error strings
- ##
- #####################################################################
- AC_ARG_ENABLE(verbose-errors,
- [ --enable-verbose-errors enable verbose errors (debugging)],[
- if test x$enableval = xyes; then
- AC_DEFINE_UNQUOTED(VERBOSE_ERRORS,"1",[verbose errors])
- fi
- ])
- AC_ARG_ENABLE([pthreads],
- AS_HELP_STRING([--disable-pthreads], [Disable pthreads support]),
- [enable_pthreads="$enableval"], [enable_pthreads="yes"])
- if test "x$enable_pthreads" = "xno"; then
- AC_DEFINE([DISABLE_PTHREADS], [1], [Define to 1 to disable pthreads])
- else
- # libpthread
- AC_CHECK_LIB([pthread], [pthread_mutex_lock],
- [
- LIBPTHREAD="-lpthread"
- PTHREAD="Yes"
- ], AC_MSG_ERROR([libpthread is required]))
- fi
- #####################################################################
- ##
- ## compile decisions
- ##
- #####################################################################
- COMPILE_LIBNL="Yes "
- LIBNL_LIB="$LIBM $LIBPTHREAD"
- AC_SUBST(LIBNL_LIB)
- AC_OUTPUT([Makefile.opts libnl-1.pc doc/Doxyfile])
- #####################################################################
- ##
- ## status report
- ##
- #####################################################################
- echo "
- ----------------------------------------------------------------------
- SUMMARY:
- Included in Compilation:
- libnl: $COMPILE_LIBNL $LIBNL_LIB
- Dependencies:
- libm $M (required)"
|