|
|
|
@ -52,7 +52,7 @@ while test $MINOR -gt 255; do |
|
|
|
|
MAJOR=$((MAJOR+1)) |
|
|
|
|
done |
|
|
|
|
|
|
|
|
|
AC_MSG_NOTICE([Version number of $PACKAGENAME is: ${MAJOR}.${MINOR}.${LEAST}]) |
|
|
|
|
AC_MSG_NOTICE([Version number of $PACKAGENAME is: ${MAJOR}.${MINOR}.${LEAST}$(<build-string)]) |
|
|
|
|
AM_INIT_AUTOMAKE($PACKAGENAME, $MAJOR.$MINOR.$LEAST, [marc@waeckerlin.org]) |
|
|
|
|
|
|
|
|
|
# author for signing packages |
|
|
|
@ -60,8 +60,6 @@ if test -z "$PACKAGERID"; then |
|
|
|
|
PACKAGERID="Marc Wäckerlin (http://marc.waeckerlin.org) <marc@waeckerlin.org>" |
|
|
|
|
fi |
|
|
|
|
AC_ARG_VAR(PACKAGERID, [Signature identification of the package author.]) |
|
|
|
|
BUILDDATE=$(date --rfc-2822) |
|
|
|
|
AC_SUBST(BUILDDATE) |
|
|
|
|
|
|
|
|
|
# files to create |
|
|
|
|
AC_CONFIG_FILES([makefile ${PACKAGENAME}.spec src/version.cxx |
|
|
|
@ -98,6 +96,8 @@ README=README |
|
|
|
|
AC_SUBST_FILE(README) |
|
|
|
|
CHANGE_LOG=ChangeLog |
|
|
|
|
AC_SUBST_FILE(CHANGE_LOG) |
|
|
|
|
DISTRO=$(lsb_release -sc) |
|
|
|
|
AC_SUBST(DISTRO) |
|
|
|
|
|
|
|
|
|
AM_CPPFLAGS="-DPACKAGEVERSION='\"${VERSION}\"' -DPACKAGENAME='\"${PACKAGENAME}\"'" |
|
|
|
|
|
|
|
|
@ -127,7 +127,7 @@ AC_CHECK_HEADERS(unistd.h fcntl.h, [have_exec=yes]) |
|
|
|
|
AC_CHECK_HEADER(dirent.h, [have_dir=yes]) |
|
|
|
|
|
|
|
|
|
# solaris? |
|
|
|
|
AC_CHECK_HEADER(sys/old_procfs.h, [AM_CPPFLAGS=-D__solaris__]) |
|
|
|
|
AC_CHECK_HEADER(sys/old_procfs.h, [AM_CPPFLAGS+="-D__solaris__"]) |
|
|
|
|
|
|
|
|
|
# Arguments |
|
|
|
|
AM_MAINTAINER_MODE |
|
|
|
@ -253,9 +253,11 @@ AC_ARG_WITH([boost-thread],AS_HELP_STRING([--with-boost-thread], |
|
|
|
|
else |
|
|
|
|
chk_libs="" |
|
|
|
|
fi], |
|
|
|
|
[chk_libs="boost_thread boost_thread-mt boost_thread-${CXX} boost_thread-${CC} boost_thread-${CXX}-mt boost_thread-${CC}-mt"]) |
|
|
|
|
for ax_lib in $chk_libs; do |
|
|
|
|
AC_CHECK_LIB($ax_lib, main, [BOOST_THREAD_LIB="-l$ax_lib" break]) |
|
|
|
|
[chk_libs=( "boost_thread boost_thread-mt boost_thread-${CXX} boost_thread-${CC} boost_thread-${CXX}-mt boost_thread-${CC}-mt" "boost_system" )]) |
|
|
|
|
for (( i=0; i<${#chk_libs[*]}; ++i )); do rnd=${chk_libs[$i]} |
|
|
|
|
for ax_lib in $rnd; do |
|
|
|
|
AC_CHECK_LIB($ax_lib, main, [BOOST_THREAD_LIB="${BOOST_THREAD_LIB} -l$ax_lib" break]) |
|
|
|
|
done |
|
|
|
|
done |
|
|
|
|
AC_SUBST(BOOST_THREAD_LIB) |
|
|
|
|
AM_CONDITIONAL(HAVE_BOOST_THREAD, test -n "$BOOST_THREAD_LIB") |
|
|
|
@ -263,7 +265,7 @@ AC_ARG_ENABLE(pedantic, |
|
|
|
|
[AS_HELP_STRING([--enable-pedantic], |
|
|
|
|
[enable all warnings and checks, abort on warnings])], |
|
|
|
|
[have_pedantic="$enableval"; test "$enableval" = "yes" && \ |
|
|
|
|
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"]) |
|
|
|
|
CXXFLAGS="${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.hxx: -Wno-ctor-dtor-privacy (removed) |
|
|
|
|
AM_CONDITIONAL(PEDANTIC, test "$enableval" = "yes") |
|
|
|
@ -291,6 +293,8 @@ AM_CONDITIONAL(MAC, test "$MAC" = "yes") |
|
|
|
|
# export macros |
|
|
|
|
RPMBUILD=${BUILD_NUMBER:-1} |
|
|
|
|
AC_SUBST(RPMBUILD) |
|
|
|
|
BUILD_NUMBER=${BUILD_NUMBER:-1} |
|
|
|
|
AC_SUBST(BUILD_NUMBER) |
|
|
|
|
SRCDIR=${srcdir} |
|
|
|
|
AC_SUBST(SRCDIR) |
|
|
|
|
AC_SUBST(SRC_DIR) |
|
|
|
@ -300,6 +304,7 @@ AC_SUBST(HAVE_DOT) |
|
|
|
|
AC_SUBST(HAVE_DOXYGEN) |
|
|
|
|
AC_SUBST(THREADS) |
|
|
|
|
AC_SUBST(PACKAGENAME) |
|
|
|
|
AC_SUBST(VERSION) |
|
|
|
|
AC_SUBST(AM_CXXFLAGS) |
|
|
|
|
AC_SUBST(AM_CPPFLAGS) |
|
|
|
|
AC_SUBST(LIBS) |
|
|
|
|