2004-08-28 16:21:25 +00:00
|
|
|
## @file
|
|
|
|
##
|
|
|
|
## $Id$
|
|
|
|
##
|
|
|
|
## $Date$
|
|
|
|
## $Author$
|
|
|
|
##
|
|
|
|
## @copy © Marc Wäckerlin
|
|
|
|
## @license LGPL, see file <a href="license.html">COPYING</a>
|
|
|
|
##
|
|
|
|
## $Log$
|
2004-10-11 16:50:50 +00:00
|
|
|
## Revision 1.13 2004/10/11 16:50:50 marc
|
|
|
|
## Version 1.2.0
|
|
|
|
##
|
2004-10-07 16:01:03 +00:00
|
|
|
## Revision 1.12 2004/10/07 16:01:03 marc
|
|
|
|
## new headers missing in installation
|
|
|
|
##
|
2004-10-07 13:41:16 +00:00
|
|
|
## Revision 1.11 2004/10/07 13:41:16 marc
|
|
|
|
## devel in the same spec file
|
|
|
|
##
|
2004-10-07 07:02:30 +00:00
|
|
|
## Revision 1.10 2004/10/07 07:02:30 marc
|
|
|
|
## better naming for major minor and least (one is a keyword)
|
|
|
|
## PEDANTIC is now a AM variable
|
|
|
|
##
|
2004-09-09 20:09:06 +00:00
|
|
|
## Revision 1.9 2004/09/09 20:09:06 marc
|
|
|
|
## library versioning now works how i want it
|
|
|
|
##
|
2004-08-31 16:24:55 +00:00
|
|
|
## Revision 1.8 2004/08/31 16:24:55 marc
|
|
|
|
## no "if [];" but "if test;"!
|
|
|
|
##
|
2004-08-31 16:01:10 +00:00
|
|
|
## Revision 1.7 2004/08/31 16:01:10 marc
|
|
|
|
## no -lbfd for --disable-stacktrace
|
|
|
|
##
|
2004-08-28 16:21:25 +00:00
|
|
|
## Revision 1.6 2004/08/28 16:21:07 marc
|
|
|
|
## mrw-c++-0.92 (mrw)
|
|
|
|
## - new file: version.cpp
|
|
|
|
## - new file header for all sources
|
|
|
|
## - work around warning in mrw::auto<T>
|
|
|
|
## - possibility to compile without log4cxx
|
|
|
|
## - work around bugs in demangle.h and libiberty.h
|
|
|
|
## - corrections in documentation
|
|
|
|
## - added simple tracing mechanism
|
|
|
|
## - more warnings
|
|
|
|
## - small corrections in Auto<>::Free and a new test for it
|
|
|
|
## - possibility to compile without stack trace
|
|
|
|
##
|
|
|
|
|
2004-04-23 16:03:29 +00:00
|
|
|
# init
|
|
|
|
AC_INIT([mrw/mrw.hpp.in])
|
2004-04-21 06:39:20 +00:00
|
|
|
PACKAGENAME=mrw-c++
|
2004-10-07 07:02:30 +00:00
|
|
|
m4_define(x_major, 1)
|
2004-10-11 16:50:50 +00:00
|
|
|
m4_define(x_minor, 2)
|
2004-10-07 07:02:30 +00:00
|
|
|
m4_define(x_least, 0)
|
2004-09-09 20:09:06 +00:00
|
|
|
AM_INIT_AUTOMAKE(@PACKAGENAME@, @MAJOR@.@MINOR@.@LEAST@, [marc@waeckerlin.org])
|
|
|
|
|
|
|
|
# copy M4 to shell
|
2004-10-07 07:02:30 +00:00
|
|
|
MAJOR=x_major
|
|
|
|
MINOR=x_minor
|
|
|
|
LEAST=x_least
|
2004-09-09 20:09:06 +00:00
|
|
|
AC_SUBST(MAJOR)
|
|
|
|
AC_SUBST(MINOR)
|
|
|
|
AC_SUBST(LEAST)
|
|
|
|
|
|
|
|
# libtool versioning
|
2004-10-07 07:02:30 +00:00
|
|
|
LIB_MAJOR=m4_eval(x_major+x_minor)
|
|
|
|
LIB_MINOR=x_least
|
|
|
|
LIB_LEAST=x_minor
|
|
|
|
LIB_VERSION="${LIB_MAJOR}:${LIB_MINOR}:${LIB_LEAST}"
|
|
|
|
AC_SUBST(LIB_VERSION)
|
2004-04-23 16:03:29 +00:00
|
|
|
|
|
|
|
# macros
|
|
|
|
README=README
|
|
|
|
AC_SUBST_FILE(README)
|
|
|
|
CHANGE_LOG=ChangeLog
|
|
|
|
AC_SUBST_FILE(CHANGE_LOG)
|
2004-04-21 06:39:20 +00:00
|
|
|
|
|
|
|
# languages
|
|
|
|
AC_LANG(C++)
|
|
|
|
|
|
|
|
# programs
|
|
|
|
AC_PROG_CXX
|
|
|
|
AC_PROG_CPP
|
|
|
|
AC_PROG_INSTALL
|
|
|
|
AC_PROG_LN_S
|
|
|
|
AC_PROG_MAKE_SET
|
|
|
|
AC_PROG_LIBTOOL
|
|
|
|
AC_CHECK_PROG(have_doxygen, doxygen, yes, no)
|
|
|
|
AC_CHECK_PROG(have_dot, dot, yes, no)
|
|
|
|
|
2004-04-23 16:03:29 +00:00
|
|
|
# solaris?
|
|
|
|
AC_CHECK_HEADER(sys/old_procfs.h, [AM_CPPFLAGS=-D__solaris__])
|
|
|
|
|
2004-04-21 06:39:20 +00:00
|
|
|
# libraries
|
2004-08-28 16:21:25 +00:00
|
|
|
AC_CHECK_HEADER(log4cxx/logger.h, [have_log4cxx=yes])
|
2004-04-21 06:39:20 +00:00
|
|
|
|
|
|
|
# Arguments
|
|
|
|
AM_MAINTAINER_MODE
|
2004-05-05 06:13:29 +00:00
|
|
|
AC_ARG_ENABLE(pedantic,
|
2004-08-31 16:01:10 +00:00
|
|
|
[ --enable-pedantic enable all warnings and checks, abort on warnings],
|
2004-05-05 06:13:29 +00:00
|
|
|
[test "$enableval" = "yes" && \
|
2004-08-28 16:21:25 +00:00
|
|
|
AM_CXXFLAGS="${AM_CXXFLAGS:-} -pedantic-errors -Wall -W -Wfloat-equal -Wundef -Wendif-labels -Wpointer-arith -Wcast-align -Wwrite-strings -Wconversion -Wsign-compare -Wmissing-format-attribute -Wno-multichar -Wpacked -Wredundant-decls -Werror -Wshadow -Wcast-qual -Wno-ctor-dtor-privacy"])
|
|
|
|
dnl problem in libs: -Wshadow -Wcast-qual
|
|
|
|
dnl auto.hpp: -Wno-ctor-dtor-privacy (removed)
|
2004-10-07 07:02:30 +00:00
|
|
|
AM_CONDITIONAL(PEDANTIC, test "$enableval" = "yes")
|
2004-04-21 06:39:20 +00:00
|
|
|
AC_ARG_ENABLE(dot,
|
2004-08-28 16:21:25 +00:00
|
|
|
[ --disable-dot disable dot graphic tools for documentation],
|
2004-04-21 06:39:20 +00:00
|
|
|
[have_dot="$enableval"])
|
|
|
|
test "$enableval" = "yes" && HAVE_DOT="YES" || HAVE_DOT="NO";
|
2004-08-28 16:21:25 +00:00
|
|
|
AC_ARG_ENABLE(log4cxx,
|
|
|
|
[ --disable-log4cxx disable use of log4cxx library in automated
|
|
|
|
stack trace],
|
|
|
|
[have_log4cxx="$enableval"])
|
|
|
|
AM_CONDITIONAL(HAVE_LOG4CXX, test "$have_log4cxx" = "yes")
|
|
|
|
AC_ARG_ENABLE(stacktrace,
|
|
|
|
[ --disable-stacktrace disable stack trace, use this if you cannot
|
|
|
|
compile the library on your system otherwise and
|
|
|
|
you still want to use the other parts],
|
|
|
|
[have_stacktrace="$enableval"], [have_stacktrace="yes"])
|
|
|
|
AM_CONDITIONAL(HAVE_STACKTRACE, test "$have_stacktrace" = "yes")
|
2004-08-31 16:24:55 +00:00
|
|
|
if test "$have_stacktrace" = "yes"; then
|
2004-08-31 16:01:10 +00:00
|
|
|
AC_SEARCH_LIBS(cplus_demangle, iberty, [AC_MSG_RESULT([OK])],
|
|
|
|
[AC_MSG_ERROR([Library iberty is required!])])
|
|
|
|
AC_SEARCH_LIBS(bfd_arch_list, bfd, [AC_MSG_RESULT([OK])],
|
|
|
|
[ac_cv_search_bfd_arch_list=;
|
|
|
|
]AC_SEARCH_LIBS(bfd_arch_list, bfd, [AC_MSG_RESULT([OK])],
|
|
|
|
[AC_MSG_ERROR([BFD library libbfd is required])], [-lintl]))
|
|
|
|
fi
|
2004-04-21 06:39:20 +00:00
|
|
|
|
|
|
|
# export macros
|
|
|
|
AC_SUBST(HAVE_DOT)
|
|
|
|
AC_SUBST(PACKAGENAME)
|
2004-05-05 06:13:29 +00:00
|
|
|
AC_SUBST(AM_CXXFLAGS)
|
|
|
|
AC_SUBST(AM_CPPFLAGS)
|
2004-04-21 06:39:20 +00:00
|
|
|
|
|
|
|
# create output
|
2004-10-07 13:41:16 +00:00
|
|
|
AC_CONFIG_FILES([makefile mrw-c++.spec
|
2004-08-28 16:21:25 +00:00
|
|
|
mrw/makefile mrw/doxyfile mrw/mrw.hpp mrw/version.cpp])
|
2004-04-21 19:03:38 +00:00
|
|
|
AC_OUTPUT
|
2004-04-21 06:39:20 +00:00
|
|
|
|
|
|
|
# infos and warnings
|
|
|
|
if test "$have_doxygen" = "no"; then
|
|
|
|
AC_MSG_WARN([Missing program doxygen!
|
|
|
|
- you cannot rebuild the documentation with make doc
|
|
|
|
- there are precompiled derieved files in the distribution]); fi
|
|
|
|
if test "$have_dot" = "no"; then
|
|
|
|
AC_MSG_WARN([Missing program dot!
|
|
|
|
- when you rebild documentation with make doc, there are no generated images
|
|
|
|
- there are precompiled derieved files in the distribution]); fi
|
2004-08-28 16:21:25 +00:00
|
|
|
if test "$have_log4cxx" != "yes"; then
|
|
|
|
AC_MSG_WARN([Library log4cxx will not be used!
|
|
|
|
- if you want it, download it from:
|
|
|
|
http://logging.apache.org/log4cxx]); fi
|
|
|
|
if test "$have_stacktrace" != "yes"; then
|
|
|
|
AC_MSG_WARN([mrw::StackTrace is disabled!]); fi
|