aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac84
1 files changed, 81 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index 423e2e2d..ff195417 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,7 +2,7 @@ dnl Process this file with autoconf to produce a configure script.
dnl This config.in requires autoconf 2.5 or greater.
AC_PREREQ([2.68])
-AC_INIT([qpdf],[8.1.0])
+AC_INIT([qpdf],[8.4.0])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_FILES([autoconf.mk])
@@ -11,6 +11,28 @@ AC_CONFIG_FILES([libqpdf.pc])
AC_CONFIG_FILES([libqpdf.map])
AC_CONFIG_HEADERS([libqpdf/qpdf/qpdf-config.h])
+AC_ARG_ENABLE(check-autofiles,
+ AS_HELP_STRING([--enable-check-autofiles],
+ [if specified, verify checksums on automatically generated files (default=yes); package maintainers may want to disable this]),
+ [if test "$enableval" = "no"; then
+ CHECK_AUTOFILES=0
+ else
+ CHECK_AUTOFILES=1
+ fi],
+ [CHECK_AUTOFILES=1])
+
+# Check to see if automatically generated files are outdated and if we
+# can update them.
+AC_CHECK_PROG(AUTOCONF,autoconf,1,0)
+AC_CHECK_PROG(AUTOHEADER,autoheader,1,0)
+AC_CHECK_PROG(ACLOCAL,aclocal,1,0)
+AC_CHECK_PROG(SHA256SUM,sha256sum,1,0)
+if test "$CHECK_AUTOFILES$AUTOCONF$AUTOHEADER$ACLOCAL$SHA256SUM" = "11111"; then
+ if ! sha256sum -c autofiles.sums; then
+ AC_MSG_ERROR(autofiles are autodated; rerun autogen.sh)
+ fi
+fi
+
AC_PROG_CC
AC_PROG_CC_C99
AC_PROG_CXX
@@ -29,8 +51,8 @@ LT_INIT([win32-dll])
# * Otherwise, increment LT_REVISION
# LT = libtool
-LT_CURRENT=22
-LT_AGE=1
+LT_CURRENT=25
+LT_AGE=4
LT_REVISION=0
AC_SUBST(LT_CURRENT)
AC_SUBST(LT_REVISION)
@@ -70,6 +92,21 @@ fi
AX_RANDOM_DEVICE
+AC_ARG_ENABLE(avoid-windows-handle,
+ AS_HELP_STRING([--enable-avoid-windows-handle],
+ [whether to avoid use of HANDLE, useful for some embedded Windows builds (default is no)]),
+ [if test "$enableval" = "yes"; then
+ qpdf_AVOID_HANDLE=1;
+ else
+ qpdf_AVOID_HANDLE=0;
+ fi], [qpdf_AVOID_HANDLE=0])
+if test "$qpdf_AVOID_HANDLE" = "1"; then
+ AC_MSG_RESULT(yes)
+ AC_DEFINE([AVOID_WINDOWS_HANDLE], [1], [Whether to avoid use of HANDLE in Windows])
+else
+ AC_MSG_RESULT(no)
+fi
+
USE_EXTERNAL_LIBS=0
AC_MSG_CHECKING(for whether to use external libraries distribution)
AC_ARG_ENABLE(external-libs,
@@ -108,6 +145,47 @@ if test "$BUILD_INTERNAL_LIBS" = "0"; then
AC_SEARCH_LIBS(jpeg_destroy,jpeg,,[MISSING_JPEG=1; MISSING_ANY=1])
fi
+qpdf_USE_WMAIN=0
+AC_LANG_PUSH([C++])
+AC_SUBST(WINDOWS_WMAIN_COMPILE)
+AC_SUBST(WINDOWS_WMAIN_LINK)
+for i in 0 1; do
+ if test "$qpdf_USE_WMAIN" = "0"; then
+ oLDFLAGS="$LDFLAGS"
+ if test "$i" = "1"; then
+ nLDFLAGS="-municode"
+ LDFLAGS="$LDFLAGS $nLDFLAGS"
+ msg="checking for wmain with $nLDFLAGS"
+ else
+ nLDFLAGS=
+ msg="checking for wmain"
+ fi
+ AC_MSG_CHECKING($msg)
+ AC_LINK_IFELSE([AC_LANG_SOURCE(
+ [[#include <windows.h>
+ #include <string.h>
+ #include <stdio.h>
+ extern "C"
+ int wmain(int argc, wchar_t* argv[])
+ {
+ size_t x = wcslen(argv[0]);
+ return 0;
+ }
+ ]])],
+ [qpdf_USE_WMAIN=1],
+ [qpdf_USE_WMAIN=0])
+ LDFLAGS="$oLDFLAGS"
+ if test "$qpdf_USE_WMAIN" = "1"; then
+ AC_MSG_RESULT(yes)
+ WINDOWS_WMAIN_COMPILE="-DWINDOWS_WMAIN $nLDFLAGS"
+ WINDOWS_WMAIN_LINK="$nLDFLAGS"
+ else
+ AC_MSG_RESULT(no)
+ fi
+ fi
+done
+AC_LANG_POP
+
if test "x$qpdf_OS_SECURE_RANDOM" = "x1"; then
OLIBS=$LIBS
LIBS="$LIBS Advapi32.lib"