diff --git a/ChangeLog b/ChangeLog
index 37f51de..483df6b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,27 +1,38 @@
+2016-04-03 16:19
+
+ * [r4] ChangeLog, configure.ac, debian/control.in, src/pdfsign.hxx:
+ after svn-server restore
+
2015-11-20 15:14 marc
- * examples, examples/oo-empty.pdf, examples/oo-empty_signed.pdf,
- src/pdfsign.hxx: added examples
+ * [r3] examples[ADD], examples/oo-empty.pdf[ADD],
+ examples/oo-empty_signed.pdf[ADD], src/pdfsign.hxx:
+ added examples
2015-11-10 22:56 marc
- * ChangeLog, configure.ac, debian/control.in,
+ * [r2] ChangeLog, configure.ac, debian/control.in,
debian/pdfsign-dev.install, debian/pdfsign.install, src/main.cxx,
- src/makefile.am, src/pdfsign.hxx, src/pdfsign.ui: read and show
- pdf file
+ src/makefile.am, src/pdfsign.hxx, src/pdfsign.ui:
+ read and show pdf file
2015-11-10 19:48 marc
- * ., AUTHORS, COPYING, ChangeLog, INSTALL, NEWS, README,
- ax_check_qt.m4, ax_cxx_compile_stdcxx_11.m4,
- ax_init_standard_project.m4, bootstrap.sh, build-in-docker.sh,
- build-resource-file.sh, configure.ac, debian,
- debian/changelog.in, debian/compat, debian/control.in,
- debian/docs, debian/pdfsign-dev.install, debian/pdfsign.install,
- debian/rules, doc, doc/doxyfile.in, doc/makefile.am,
- mac-create-app-bundle.sh, makefile.am, pdfsign.spec.in,
- resolve-debbuilddeps.sh, resolve-rpmbuilddeps.sh, sql-to-dot.sed,
- src, src/languages.qrc, src/main.cxx, src/makefile.am,
- src/pdfsign.hxx, src/pdfsign.pc.in, src/pdfsign.ui,
- src/version.cxx, src/version.hxx: initial setup
+ * [r1] .[ADD], AUTHORS[ADD], COPYING[ADD], ChangeLog[ADD],
+ INSTALL[ADD], NEWS[ADD], README[ADD], ax_check_qt.m4[ADD],
+ ax_cxx_compile_stdcxx_11.m4[ADD],
+ ax_init_standard_project.m4[ADD], bootstrap.sh[ADD],
+ build-in-docker.sh[ADD], build-resource-file.sh[ADD],
+ configure.ac[ADD], debian[ADD], debian/changelog.in[ADD],
+ debian/compat[ADD], debian/control.in[ADD], debian/docs[ADD],
+ debian/pdfsign-dev.install[ADD], debian/pdfsign.install[ADD],
+ debian/rules[ADD], doc[ADD], doc/doxyfile.in[ADD],
+ doc/makefile.am[ADD], mac-create-app-bundle.sh[ADD],
+ makefile.am[ADD], pdfsign.spec.in[ADD],
+ resolve-debbuilddeps.sh[ADD], resolve-rpmbuilddeps.sh[ADD],
+ sql-to-dot.sed[ADD], src[ADD], src/languages.qrc[ADD],
+ src/main.cxx[ADD], src/makefile.am[ADD], src/pdfsign.hxx[ADD],
+ src/pdfsign.pc.in[ADD], src/pdfsign.ui[ADD],
+ src/version.cxx[ADD], src/version.hxx[ADD]:
+ initial setup
diff --git a/autogen.sh b/autogen.sh
new file mode 100755
index 0000000..fe6d199
--- /dev/null
+++ b/autogen.sh
@@ -0,0 +1,8 @@
+#!/bin/bash -e
+if test -n "svn" -a -d ".svn" -a -e -x "$(which svn2cl)"; then
+ svn2cl
+fi
+aclocal
+libtoolize --force
+automake -a
+autoconf
diff --git a/ax_cxx_compile_stdcxx_11.m4 b/ax_cxx_compile_stdcxx_11.m4
index af37acd..4c831e0 100644
--- a/ax_cxx_compile_stdcxx_11.m4
+++ b/ax_cxx_compile_stdcxx_11.m4
@@ -4,12 +4,16 @@
#
# SYNOPSIS
#
+# AX_REQUIRE_STDCXX_11
+# AX_REQUIRE_STDCXX_14
# AX_CXX_COMPILE_STDCXX_11([ext|noext],[mandatory|optional])
+# AX_CXX_COMPILE_STDCXX_14([ext|noext],[mandatory|optional])
#
# DESCRIPTION
#
# Check for baseline language coverage in the compiler for the C++11
-# standard; if necessary, add switches to CXXFLAGS to enable support.
+# or C++14 standard; if necessary, add switches to CXXFLAGS to
+# enable support.
#
# The first argument, if specified, indicates whether you insist on an
# extended mode (e.g. -std=gnu++11) or a strict conformance mode (e.g.
@@ -131,3 +135,97 @@ AC_DEFUN([AX_CXX_COMPILE_STDCXX_11], [dnl
AC_SUBST(HAVE_CXX11)
fi
])
+
+AC_DEFUN([AX_CXX_COMPILE_STDCXX_14], [dnl
+ m4_if([$1], [], [],
+ [$1], [ext], [],
+ [$1], [noext], [],
+ [m4_fatal([invalid argument `$1' to AX_CXX_COMPILE_STDCXX_14])])dnl
+ m4_if([$2], [], [ax_cxx_compile_cxx14_required=true],
+ [$2], [mandatory], [ax_cxx_compile_cxx14_required=true],
+ [$2], [optional], [ax_cxx_compile_cxx14_required=false],
+ [m4_fatal([invalid second argument `$2' to AX_CXX_COMPILE_STDCXX_14])])dnl
+ AC_LANG_PUSH([C++])dnl
+ ac_success=no
+ AC_CACHE_CHECK(whether $CXX supports C++14 features by default,
+ ax_cv_cxx_compile_cxx14,
+ [AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])],
+ [ax_cv_cxx_compile_cxx14=yes],
+ [ax_cv_cxx_compile_cxx14=no])])
+ if test x$ax_cv_cxx_compile_cxx14 = xyes; then
+ ac_success=yes
+ fi
+
+ m4_if([$1], [noext], [], [dnl
+ if test x$ac_success = xno; then
+ for switch in -std=gnu++14 -std=gnu++0y; do
+ cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx14_$switch])
+ AC_CACHE_CHECK(whether $CXX supports C++14 features with $switch,
+ $cachevar,
+ [ac_save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS $switch"
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])],
+ [eval $cachevar=yes],
+ [eval $cachevar=no])
+ CXXFLAGS="$ac_save_CXXFLAGS"])
+ if eval test x\$$cachevar = xyes; then
+ CXXFLAGS="$CXXFLAGS $switch"
+ ac_success=yes
+ break
+ fi
+ done
+ fi])
+
+ m4_if([$1], [ext], [], [dnl
+ if test x$ac_success = xno; then
+ for switch in -std=c++14 -std=c++0y; do
+ cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx14_$switch])
+ AC_CACHE_CHECK(whether $CXX supports C++14 features with $switch,
+ $cachevar,
+ [ac_save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS $switch"
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])],
+ [eval $cachevar=yes],
+ [eval $cachevar=no])
+ CXXFLAGS="$ac_save_CXXFLAGS"])
+ if eval test x\$$cachevar = xyes; then
+ CXXFLAGS="$CXXFLAGS $switch"
+ ac_success=yes
+ break
+ fi
+ done
+ fi])
+ AC_LANG_POP([C++])
+ if test x$ax_cxx_compile_cxx14_required = xtrue; then
+ if test x$ac_success = xno; then
+ AC_MSG_ERROR([*** A compiler with support for C++14 language features is required.])
+ fi
+ else
+ if test x$ac_success = xno; then
+ HAVE_CXX14=0
+ AC_MSG_NOTICE([No compiler with C++14 support was found])
+ AX_CXX_COMPILE_STDCXX_11([$1], [optional])
+ else
+ HAVE_CXX11=1
+ HAVE_CXX14=1
+ AC_DEFINE(HAVE_CXX14,1,
+ [define if the compiler supports basic C++14 syntax])
+ AC_DEFINE(HAVE_CXX11,1,
+ [define if the compiler supports basic C++14 syntax])
+ fi
+ AC_SUBST(HAVE_CXX11)
+ AC_SUBST(HAVE_CXX14)
+ fi
+])
+
+AC_DEFUN([AX_REQUIRE_STDCXX_11], [
+ if test x${HAVE_CXX11} != x1; then
+ AC_MSG_ERROR([*** A compiler with support for C++11 language features is required.])
+ fi
+])
+
+AC_DEFUN([AX_REQUIRE_STDCXX_14], [
+ if test x${HAVE_CXX14} != x1; then
+ AC_MSG_ERROR([*** A compiler with support for C++14 language features is required.])
+ fi
+])
diff --git a/ax_init_standard_project.m4 b/ax_init_standard_project.m4
index 01404ac..0f6bd80 100644
--- a/ax_init_standard_project.m4
+++ b/ax_init_standard_project.m4
@@ -7,44 +7,55 @@
m4_define([mrw_esyscmd_s], [m4_normalize(m4_esyscmd([$1]))])
# define least version number from subversion's revision number:
-# it is taken modulo 256 due to a bug on Apple's MacOSX
-m4_define(x_least, m4_ifdef([x_least_diff], mrw_esyscmd_s([
- SVN_REVISION="ERROR-UNDEFINED-REVISION-to-be-built-in-subdirectory-of-svn-checkout"
- for path in . .. ../..; do
- if svn info $path 2>&1 > /dev/null; then
- SVN_REVISION=$(LANG= svn info $path | sed -n 's/Last Changed Rev: //p')
- if test -z "${SVN_REVISION}"; then SVN_REVISION=0; fi
- break;
- fi
- done
- echo $ECHO_N $(($SVN_REVISION))
-]), mrw_esyscmd_s([
- SVN_REVISION="ERROR-UNDEFINED-REVISION-to-be-built-in-subdirectory-of-svn-checkout"
- for path in . .. ../..; do
- if svn info $path 2>&1 > /dev/null; then
- SVN_REVISION=$(LANG= svn info $path | sed -n 's/Last Changed Rev: //p')
- if test -z "${SVN_REVISION}"; then SVN_REVISION=0; fi
- break;
- fi
- done
- # Mac does not support LEAST > 255
- echo $ECHO_N $(($SVN_REVISION%256))
-])))
+# it is taken modulo 256 due to a bug on Apple's MaxOSX
+m4_define(x_least, m4_ifdef([x_least_fix], [x_least_fix],
+ m4_ifdef([x_least_diff],
+ mrw_esyscmd_s([
+ VCS_REVISION="ERROR-UNDEFINED-REVISION-to-be-built-in-subdirectory-of-checkout"
+ for path in . .. ../.. ../../..; do
+ if test -d .svn; then
+ svn upgrade 1>&2 > /dev/null || true
+ VCS_REVISION=$(LANG= svn info $path | sed -n 's/Last Changed Rev: //p')
+ if test -n "${VCS_REVISION}"; then break; fi
+ elif test -d .git; then
+ VCS_REVISION=$(git rev-list --all --count)
+ if test -n "${VCS_REVISION}"; then break; fi
+ fi
+ done
+ echo $ECHO_N $(($VCS_REVISION))
+ ]), mrw_esyscmd_s([
+ VCS_REVISION="ERROR-UNDEFINED-REVISION-to-be-built-in-subdirectory-of-checkout"
+ for path in . .. ../.. ../../..; do
+ if test -d .svn; then
+ svn upgrade 1>&2 > /dev/null || true
+ VCS_REVISION=$(LANG= svn info $path | sed -n 's/Last Changed Rev: //p')
+ if test -n "${VCS_REVISION}"; then break; fi
+ elif test -d .git; then
+ VCS_REVISION=$(git rev-list --all --count)
+ if test -n "${VCS_REVISION}"; then break; fi
+ fi
+ done
+ # Mac does not support LEAST > 255
+ echo $ECHO_N $(($VCS_REVISION%256))]))))
+
# define version number from subversion's revision number:
# it is taken modulo 256 due to a bug on Apple's MacOSX
# add to x_minor if revision number is > 256
-m4_define(x_minor_diff, mrw_esyscmd_s([
- SVN_REVISION="ERROR-UNDEFINED-REVISION-to-be-built-in-subdirectory-of-svn-checkout"
- for path in . .. ../..; do
- if svn info $path 2>&1 > /dev/null; then
- SVN_REVISION=$(LANG= svn info $path | sed -n 's/Last Changed Rev: //p')
- if test -z "${SVN_REVISION}"; then SVN_REVISION=0; fi
- break;
+m4_define(x_minor_diff, m4_ifdef([x_least_fix], 0, mrw_esyscmd_s([
+ VCS_REVISION="ERROR-UNDEFINED-REVISION-to-be-built-in-subdirectory-of-checkout"
+ for path in . .. ../.. ../../..; do
+ if test -d .svn; then
+ svn upgrade 1>&2 > /dev/null || true
+ VCS_REVISION=$(LANG= svn info $path | sed -n 's/Last Changed Rev: //p')
+ if test -n "${VCS_REVISION}"; then break; fi
+ elif test -d .git; then
+ VCS_REVISION=$(git rev-list --all --count)
+ if test -n "${VCS_REVISION}"; then break; fi
fi;
done
# Mac does not support LEAST > 255
- echo $ECHO_N $(($SVN_REVISION/256))
-]))
+ echo $ECHO_N $(($VCS_REVISION/256))])))
+
# setup version number
m4_define(x_version, [x_major.m4_ifdef([x_least_diff], x_minor, m4_eval(x_minor+x_minor_diff)).m4_eval(m4_ifdef([x_least_diff], [x_least-x_least_diff], [x_least]))])
@@ -90,16 +101,19 @@ AC_DEFUN([AX_ADD_MAKEFILE_TARGET_DEP], [
fi
])
-# Same as AC_SUBST, but adds -Dname="value" option to CPPFLAGS
+# Same as AC_SUBST, but adds -Dname="value" option to CPPFLAGS and a
+# notz only a @name@ replacement, but also a @name_ENCODED@ one to be
+# used in code.
# - parameters:
# $1 = variable name
AC_DEFUN([AX_SUBST], [
+ [$1]_ENCODED=$(echo "${$1}" | awk 1 ORS='\\n' | sed 's,\\n$,,')
+ [$1]_ENCODED=${[$1]_ENCODED//\"/\\\"}
+ [$1]_ENCODED=${[$1]_ENCODED//\'/\'\"\'\"\'}
+ [$1]_ENCODED=${[$1]_ENCODED//#/\\#}
+ AM_CPPFLAGS+=" '-D$1=\"${[$1]_ENCODED}\"'"
AC_SUBST([$1])
- tmp_var=$(echo "${$1}" | awk 1 ORS='\\n' | sed 's,\\n$,,')
- tmp_var=${tmp_var//\"/\\\"}
- tmp_var=${tmp_var//\'/\'\"\'\"\'}
- tmp_var=${tmp_var//#/\\#}
- AM_CPPFLAGS+=" '-D$1=\"${tmp_var}\"'"
+ AC_SUBST([$1]_ENCODED)
AC_SUBST(AM_CPPFLAGS)
])
@@ -112,13 +126,23 @@ AC_DEFUN([AX_SUBST], [
# m4_define(x_minor, MINOR_NUMBER) # project's minor version
# m4_include(ax_init_standard_project.m4)
# AC_INIT(x_package_name, x_version, x_bugreport, x_package_name)
-# AM_INIT_AUTOMAKE([1.9 tar-pax])
+# AM_INIT_AUTOMAKE([1.9 tar-pax parallel-tests color-tests])
# AX_INIT_STANDARD_PROJECT
#
# you change nothing but: YOUR_PACKAGE_NAME, MAJOR_NUMBER, MINOR_NUMBER
#
# configures the basic environment
AC_DEFUN([AX_INIT_STANDARD_PROJECT], [
+ PREFIX=$(test "$prefix" = NONE && prefix=$ac_default_prefix; eval echo "${prefix}")
+ AX_SUBST(PREFIX)
+ SYSCONFDIR=$(test "$prefix" = NONE && prefix=$ac_default_prefix; eval echo "${sysconfdir}")
+ AX_SUBST(SYSCONFDIR)
+ DATADIR=$(test "$prefix" = NONE && prefix=$ac_default_prefix; eval echo "${datadir}")
+ AX_SUBST(DATADIR)
+ PKGDATADIR=$(test "$prefix" = NONE && prefix=$ac_default_prefix; eval echo "${DATADIR}/${PACKAGE_NAME}")
+ AX_SUBST(PKGDATADIR)
+ LOCALSTATEDIR=$(test "$prefix" = NONE && prefix=$ac_default_prefix; eval echo "${localstatedir}")
+ AX_SUBST(LOCALSTATEDIR)
AC_MSG_CHECKING([target platfrom])
UNIX=1
MINGW=
@@ -143,17 +167,65 @@ AC_DEFUN([AX_INIT_STANDARD_PROJECT], [
AM_CPPFLAGS+=" '-DMAKE_STRING(X)=\#X' '-DNAMESPACE=${PACKAGE_TARNAME//[^a-zA-Z0-9]/_}'"
AX_SUBST(NUMBERS)
AX_SUBST(HOME)
- README=$(tail -n +3 README)
+ if test -f README.md; then
+ README=$(tail -n +3 README.md)
+ DESCRIPTION=$(head -1 README.md)
+ else
+ README=$(tail -n +3 README)
+ DESCRIPTION=$(head -1 README)
+ fi
+ README_ESCAPED=$(echo "$README" | sed ':a;N;$!ba;s/\n/\\n/g;s,",\\",g')
+ if which pandoc 2>&1 > /dev/null; then
+ README_HTML=$(echo "$README" | pandoc -f markdown_github -t html | sed ':a;N;$!ba;s,\\\(.\),\\\\\1,g;s/\n/\\n/g;s,",\\",g;s, ,\ \ ,g')
+ else
+ README_HTML="${README}"
+ fi
AX_SUBST(README)
_AM_SUBST_NOTMAKE([README])
- DESCRIPTION=$(head -1 README)
+ AX_SUBST(README_ESCAPED)
+ _AM_SUBST_NOTMAKE([README_ESCAPED])
+ AX_SUBST(README_HTML)
+ _AM_SUBST_NOTMAKE([README_HTML])
AX_SUBST(DESCRIPTION)
_AM_SUBST_NOTMAKE([DESCRIPTION])
+ LICENSE=$(echo $(head -1 COPYING))
+ AX_SUBST(LICENSE)
+ COPYING=$(.*,\1,')
+ PACKAGER=$(gpg -K --display-charset utf-8 --lock-never 2>/dev/null | sed -n 's,uid *\(\[[ultimate\]] *\)\?,,p' | head -1)
+ if test -z "${PACKAGER}"; then
+ PACKAGER="$AUTHOR"
+ fi
AX_SUBST(AUTHOR)
_AM_SUBST_NOTMAKE([AUTHOR])
+ AX_SUBST(AUTHOR_NAME)
+ AX_SUBST(AUTHOR_URL)
+ AX_SUBST(AUTHOR_MAIL)
+ AX_SUBST(PACKAGER)
+ PROJECT_URL="${PROJECT_URL:-${AUTHOR_URL}/projects/${PACKAGE_NAME}}"
+ SOURCE_DOWNLOAD="${SOURCE_DOWNLOAD:-${AUTHOR_URL}/downloads/${PACKAGE_NAME}}"
+ AX_SUBST(PROJECT_URL)
+ AX_SUBST(SOURCE_DOWNLOAD)
+ VENDOR=$((lsb_release -is 2>/dev/null || echo unknown) | tr ' ' '_')
+ AX_SUBST(VENDOR)
DISTRO=$(lsb_release -sc 2>/dev/null || uname -s 2>/dev/null)
AX_SUBST(DISTRO)
+ ARCH=$((@<:@@<:@ $(uname -sm) =~ 64 @:>@@:>@ && echo amd64) || (@<:@@<:@ $(uname -sm) =~ 'i?86' @:>@@:>@ && echo i386 || uname -sm))
+ AX_SUBST(ARCH)
DISTRIBUTOR=$(lsb_release -si 2>/dev/null || uname -s 2>/dev/null)
case "${DISTRIBUTOR// /-}" in
(Ubuntu) UBUNTU=1; AX_SUBST(UBUNTU);;
@@ -167,14 +239,24 @@ AC_DEFUN([AX_INIT_STANDARD_PROJECT], [
AX_SUBST(BUILD_NUMBER)
BUILD_DATE=$(LANG= date +"%a, %d %b %Y %H:%M:%S %z")
AX_SUBST(BUILD_DATE)
- if test -f "${PROJECT_NAME}-logo.png"; then
- PROJECT_LOGO="${PROJECT_NAME}-logo.png"
+ if test -f "${PACKAGE_NAME}.desktop.in"; then
+ PACKAGE_DESKTOP="${PACKAGE_NAME}.desktop"
+ fi
+ AX_SUBST(PACKAGE_DESKTOP)
+ if test -f "${PACKAGE_NAME}-logo.png"; then
+ PACKAGE_LOGO="${PACKAGE_NAME}-logo.png"
fi
- AX_SUBST(PROJECT_LOGO)
- if test -f "${PROJECT_NAME}-icon.png"; then
- PROJECT_ICON="${PROJECT_NAME}-icon.png"
+ AX_SUBST(PACKAGE_LOGO)
+ if test -f "${PACKAGE_NAME}-icon.svg"; then
+ PACKAGE_ICON="${PACKAGE_NAME}-icon.svg"
+ elif test -f "${PACKAGE_NAME}-icon.png"; then
+ PACKAGE_ICON="${PACKAGE_NAME}-icon.png"
+ elif test -f "${PACKAGE_NAME}.svg"; then
+ PACKAGE_ICON="${PACKAGE_NAME}.svg"
+ elif test -f "${PACKAGE_NAME}.png"; then
+ PACKAGE_ICON="${PACKAGE_NAME}.png"
fi
- AX_SUBST(PROJECT_ICON)
+ AX_SUBST(PACKAGE_ICON)
AC_ARG_ENABLE(pedantic,
[AS_HELP_STRING([--enable-pedantic],
@@ -204,6 +286,29 @@ AC_DEFUN([AX_INIT_STANDARD_PROJECT], [
AM_CPPFLAGS="${AM_CPPFLAGS} -DQT_NO_DEBUG_OUTPUT -DQT_NO_DEBUG"
fi
+ AC_ARG_WITH(gcov,
+ [AS_HELP_STRING([--with-gcov=FILE],
+ [enable gcov, set gcov file (defaults to gcov)])],
+ [GCOV="$enableval"], [GCOV="no"])
+ AM_CONDITIONAL(COVERAGE, test "$GCOV" != "no")
+ if test "$GCOV" != "no"; then
+ if test "$GCOV" == "yes"; then
+ GCOV=gcov
+ fi
+ AC_CHECK_PROG(has_gcov, [$GCOV], [yes], [no])
+ if test "$has_gcov" != "yes"; then
+ AC_MSG_ERROR([gcov: program $GCOV not found])
+ fi
+ AC_MSG_NOTICE([Coverage tests enabled, using ${GCOV}]);
+ AM_CXXFLAGS="${AM_CXXFLAGS:-} -O0 --coverage -fprofile-arcs -ftest-coverage"
+ AM_LDFLAGS="${AM_LDFLAGS} -O0 --coverage -fprofile-arcs"
+ AX_SUBST(GCOV)
+ fi
+
+ if test -f ${PACKAGE_NAME}.desktop.in; then
+ AC_CONFIG_FILES([${PACKAGE_NAME}.desktop])
+ fi
+
AC_CONFIG_FILES([makefile])
AX_ADD_MAKEFILE_TARGET_DEP([clean-am], [clean-standard-project-targets], [makefile.in])
AX_ADD_MAKEFILE_TARGET_DEP([distclean-am], [distclean-standard-project-targets], [makefile.in])
@@ -230,7 +335,7 @@ EOF
AC_DEFUN([AX_USE_CXX], [
m4_include(ax_cxx_compile_stdcxx_11.m4)
AC_LANG(C++)
- AX_CXX_COMPILE_STDCXX_11(noext, optional)
+ AX_CXX_COMPILE_STDCXX_14(noext, optional)
AC_PROG_CXX
AC_PROG_CPP
@@ -268,6 +373,43 @@ maintainer-clean-cxx-targets:
EOF
])
+# use this in configure.ac to support old school C
+AC_DEFUN([AX_USE_C], [
+ AC_LANG(C)
+ AC_PROG_CC
+ AC_PROG_CPP
+
+ AC_CONFIG_FILES([src/makefile])
+
+ AM_CPPFLAGS+=' -I ${top_srcdir}/src -I ${top_builddir}/src -I ${srcdir} -I ${builddir}'
+ AM_LDFLAGS+=' -L ${top_srcdir}/src -L ${top_builddir}/src'
+
+ # Get rid of those stupid -g -O2 options!
+ CXXFLAGS="${CXXFLAGS//-g -O2/}"
+ CFLAGS="${CFLAGS//-g -O2/}"
+
+ # pass compile flags to make distcheck
+ AM_DISTCHECK_CONFIGURE_FLAGS="CFLAGS='${CFLAGS}' CPPFLAGS='${CPPFLAGS}' CFLAGS='${CFLAGS}' LDFLAGS='${LDFLAGS}'"
+ AC_SUBST(AM_DISTCHECK_CONFIGURE_FLAGS)
+
+ AC_SUBST(AM_CFLAGS)
+ AC_SUBST(AM_CPPFLAGS)
+ AC_SUBST(AM_LDFLAGS)
+ AX_ADD_MAKEFILE_TARGET_DEP([maintainer-clean-am], [maintainer-clean-c-targets], [src/makefile.in])
+ test -f src/makefile.in && cat >> src/makefile.in <> nodejs/makefile.in <> cordova/makefile.in <> makefile.in <> doc/makefile.in <> doc/makefile.in <Perl DocumentationPerl Documentation
" > perldoc/index.html
+ for p in \${PERL_SOURCES:%=perldoc/%}; do \
+ echo '- '"\$\${p#perldoc/}"'
' >> perldoc/index.html; \
+ done
+ echo "