fix debian packaging and fix build on new mac; refs #11
This commit is contained in:
21
configure.in
21
configure.in
@@ -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)
|
||||
|
4
debian/changelog.in
vendored
4
debian/changelog.in
vendored
@@ -1,5 +1,5 @@
|
||||
@PACKAGE@ (@VERSION@-1) unstable; urgency=low
|
||||
@PACKAGE@ (@VERSION@-@BUILD_NUMBER@) @DISTRO@; urgency=low
|
||||
|
||||
* see https://dev.marc.waeckerlin.org/projects/mrw-c++++ for changes
|
||||
* see https://dev.marc.waeckerlin.org/projects/mrw-c++ for changes
|
||||
|
||||
-- @PACKAGERID@ @BUILDDATE@
|
||||
|
4
debian/control.in
vendored
4
debian/control.in
vendored
@@ -1,10 +1,10 @@
|
||||
Source: mrw-c++
|
||||
Priority: extra
|
||||
Maintainer: Marc Wäckerlin (http://marc.waeckerlin.org) <marc@waeckerlin.org>
|
||||
Build-Depends: debhelper (>= 7), autotools-dev
|
||||
Build-Depends: debhelper (>= 7), autotools-dev, libiberty-dev, libboost-thread-dev
|
||||
Standards-Version: 3.8.1
|
||||
Section: libs
|
||||
Homepage: https://dev.marc.waeckerlin.org/projects/mrw-c++++
|
||||
Homepage: https://dev.marc.waeckerlin.org/projects/mrw-c++
|
||||
|
||||
Package: mrw-c++-dev
|
||||
Section: libdevel
|
||||
|
20
makefile.am
20
makefile.am
@@ -15,7 +15,7 @@ SUBDIRS = @SRC_DIR@ @TST_DIR@ @DOC_DIR@
|
||||
|
||||
doc_DATA = AUTHORS COPYING ChangeLog NEWS README INSTALL
|
||||
|
||||
EXTRA_DIST = bootstrap.sh debian
|
||||
EXTRA_DIST = bootstrap.sh debian build-string
|
||||
|
||||
DISTCLEANFILES = debian/changelog
|
||||
|
||||
@@ -44,20 +44,26 @@ rpm: dist
|
||||
|
||||
deps = ${top_srcdir}/COPYING ${top_srcdir}/README ${top_srcdir}/INSTALL ${top_srcdir}/NEWS ${top_srcdir}/ChangeLog
|
||||
|
||||
build-string:
|
||||
touch build-string
|
||||
|
||||
clean-local:
|
||||
- rm README.debian
|
||||
- rm @PACKAGENAME@-dev_@MAJOR@.@MINOR@.@LEAST@-*.deb \
|
||||
@PACKAGENAME@_@MAJOR@.@MINOR@.@LEAST@-*.changes \
|
||||
@PACKAGENAME@_@MAJOR@.@MINOR@.@LEAST@-1.tar.gz \
|
||||
@PACKAGENAME@_@MAJOR@.@MINOR@.@LEAST@-1.dsc \
|
||||
@PACKAGENAME@-@MAJOR@.@MINOR@.@LEAST@.tar.gz \
|
||||
@PACKAGENAME@_@MAJOR@.@MINOR@.@LEAST@-*.deb
|
||||
@PACKAGENAME@_@MAJOR@.@MINOR@.@LEAST@*.changes \
|
||||
@PACKAGENAME@_@MAJOR@.@MINOR@.@LEAST@*.tar.gz \
|
||||
@PACKAGENAME@_@MAJOR@.@MINOR@.@LEAST@*.dsc \
|
||||
@PACKAGENAME@-@MAJOR@.@MINOR@.@LEAST@*.tar.gz \
|
||||
@PACKAGENAME@_@MAJOR@.@MINOR@.@LEAST@*.deb
|
||||
|
||||
distclean-local:
|
||||
- rm -r ${top_builddir}/@DOC_DIR@/html/* ${top_builddir}/@DOC_DIR@/latex/*
|
||||
- rm -r ${top_builddir}/@DOC_DIR@/html/*
|
||||
- rm -r ${top_builddir}/@DOC_DIR@/latex/*
|
||||
- rm makefile makefile.in doxygen.err libmrw.doxytag
|
||||
- find . -name '*~' | xargs rm
|
||||
- rm -rf autom4te.cache SPECS RPMS BUILD BUILDROOT SRPMS
|
||||
- rm aclocal.m4 config.guess config.sub configure \
|
||||
depcomp install-sh ltmain.sh makefile makefile.in \
|
||||
missing mkinstalldirs
|
||||
|
||||
MAINTAINERCLEANFILES = debian/control build-string
|
||||
|
@@ -71,13 +71,14 @@ namespace std {
|
||||
# warning trying standard C++11 support
|
||||
# endif
|
||||
# elif __APPLE__
|
||||
# if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_9
|
||||
/// Code is compiled with an old non C++11 standard compliant compiler
|
||||
/** There are workarounds for old non C++11 compatible
|
||||
compilers. These workarounds are deprecated, but will remain
|
||||
until most compilers fully support C++11. So this workaround
|
||||
will be removed in future releases, when support for C++11 is
|
||||
more common. Only rely on this workaround, if you really have
|
||||
to. */
|
||||
compilers. These workarounds are deprecated, but will
|
||||
remain until most compilers fully support C++11. So this
|
||||
workaround will be removed in future releases, when support
|
||||
for C++11 is more common. Only rely on this workaround, if
|
||||
you really have to. */
|
||||
# define MRW__OLD_PRE11_COMPILER
|
||||
# warning you need a C++11 compliant compiler, on gcc: add -std=c++11
|
||||
# warning emulating C++11 - this changes the way you use the library
|
||||
@@ -95,5 +96,6 @@ namespace std {
|
||||
};
|
||||
}
|
||||
# endif
|
||||
# endif
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user