check for libtool

master
Marc Wäckerlin 20 years ago
parent 7343b2b55f
commit 1f15efbdc6
  1. 17
      configure.in

@ -12,8 +12,8 @@
# init # init
AC_INIT([mrw/mrw.hpp.in]) AC_INIT([mrw/mrw.hpp.in])
PACKAGENAME=mrw-c++ PACKAGENAME=mrw-c++
m4_define(x_major, 1) m4_define(x_major, 2)
m4_define(x_minor, 9) m4_define(x_minor, 0)
m4_define(x_least, 0) m4_define(x_least, 0)
AM_INIT_AUTOMAKE(@PACKAGENAME@, @MAJOR@.@MINOR@.@LEAST@, [marc@waeckerlin.org]) AM_INIT_AUTOMAKE(@PACKAGENAME@, @MAJOR@.@MINOR@.@LEAST@, [marc@waeckerlin.org])
@ -56,6 +56,7 @@ AC_CHECK_HEADER(sys/old_procfs.h, [AM_CPPFLAGS=-D__solaris__])
# libraries # libraries
AC_CHECK_HEADER(log4cxx/logger.h, [have_log4cxx=yes]) AC_CHECK_HEADER(log4cxx/logger.h, [have_log4cxx=yes])
AC_CHECK_HEADER(ltdl.h, [have_ltdl=yes])
# Arguments # Arguments
AM_MAINTAINER_MODE AM_MAINTAINER_MODE
@ -87,11 +88,16 @@ AC_ARG_ENABLE(log4cxx,
stack trace], stack trace],
[have_log4cxx="$enableval"]) [have_log4cxx="$enableval"])
AM_CONDITIONAL(HAVE_LOG4CXX, test "$have_log4cxx" = "yes") AM_CONDITIONAL(HAVE_LOG4CXX, test "$have_log4cxx" = "yes")
AC_ARG_ENABLE(ltdl,
[ --disable-ltdl disable use of libtool library dynamic loading
Note: For automated stack trace, you need ltdl],
[have_ltdl="$enableval"])
AM_CONDITIONAL(HAVE_LTDL, test "$have_ltdl" = "yes")
AC_ARG_ENABLE(stacktrace, AC_ARG_ENABLE(stacktrace,
[ --disable-stacktrace disable stack trace, use this if you cannot [ --disable-stacktrace disable stack trace, use this if you cannot
compile the library on your system otherwise and compile the library on your system otherwise and
you still want to use the other parts], you still want to use the other parts],
[have_stacktrace="$enableval"], [have_stacktrace="yes"]) [have_stacktrace="$enableval"], [have_stacktrace=$have_ltdl])
AM_CONDITIONAL(HAVE_STACKTRACE, test "$have_stacktrace" = "yes") AM_CONDITIONAL(HAVE_STACKTRACE, test "$have_stacktrace" = "yes")
if test "$have_stacktrace" = "yes"; then if test "$have_stacktrace" = "yes"; then
AC_SEARCH_LIBS(cplus_demangle, [demangle iberty], AC_SEARCH_LIBS(cplus_demangle, [demangle iberty],
@ -140,3 +146,8 @@ AC_MSG_WARN([Library log4cxx will not be used!
http://logging.apache.org/log4cxx]); fi http://logging.apache.org/log4cxx]); fi
if test "$have_stacktrace" != "yes"; then if test "$have_stacktrace" != "yes"; then
AC_MSG_WARN([mrw::StackTrace is disabled!]); fi AC_MSG_WARN([mrw::StackTrace is disabled!]); fi
if test "$have_ltdl" != "yes"; then
AC_MSG_ERROR([mrw::DynamicLibrary dynamic library loading is disabled!
- mrw::StackTrace is disabled without mrw::DynamicLibrary
- install the GNU libtool, if you need mrw::DynamicLibrary]);
fi

Loading…
Cancel
Save