From 0e7ab7a7d08c48f80d1ea66f15b4b28588d95f2f Mon Sep 17 00:00:00 2001 From: David Adam Date: Thu, 21 Apr 2016 22:33:29 +0800 Subject: configure: work harder to ensure mkostemp usability Closes #2952. --- configure.ac | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 90065e9b..2e3409bc 100644 --- a/configure.ac +++ b/configure.ac @@ -522,10 +522,12 @@ AC_STRUCT_DIRENT_D_TYPE AC_CHECK_FUNCS( wcsdup wcsndup wcslen wcscasecmp wcsncasecmp fwprintf ) AC_CHECK_FUNCS( futimes wcwidth wcswidth wcstok fputwc fgetwc ) -AC_CHECK_FUNCS( wcstol wcslcat wcslcpy lrand48_r killpg mkostemp ) +AC_CHECK_FUNCS( wcstol wcslcat wcslcpy lrand48_r killpg ) AC_CHECK_FUNCS( backtrace backtrace_symbols_fd sysconf getifaddrs ) AC_CHECK_FUNCS( futimens clock_gettime ) +AC_CHECK_DECL( [mkostemp], [ AC_CHECK_FUNCS([mkostemp]) ] ) + if test x$local_gettext != xno; then AC_CHECK_FUNCS( gettext dcgettext ) -- cgit v1.2.3 From 375bef44432a0fad7ebbd3634a3e950e2d457ec1 Mon Sep 17 00:00:00 2001 From: David Adam Date: Thu, 21 Apr 2016 22:34:37 +0800 Subject: configure: enable GNU/POSIX extensions by default Reenable mkostemp on Cygwin. Work on #2952. --- configure.ac | 1 + 1 file changed, 1 insertion(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 2e3409bc..537e9dc5 100644 --- a/configure.ac +++ b/configure.ac @@ -92,6 +92,7 @@ AC_PROG_CXX([g++ c++]) AC_PROG_INSTALL AC_PROG_SED AC_LANG(C++) +AC_USE_SYSTEM_EXTENSIONS echo "CXXFLAGS: $CXXFLAGS" -- cgit v1.2.3 From 8a940a2ee77b5e0ce1c98f33467a8bf701e34368 Mon Sep 17 00:00:00 2001 From: Michael Steed Date: Sat, 23 Apr 2016 22:09:17 -0600 Subject: configure: require at least pcre2-10.21 (cherry picked from commit c4c7983497e7be798c3bd1c97df38e8d1d1a58b8) --- configure.ac | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 537e9dc5..2d60a9a0 100644 --- a/configure.ac +++ b/configure.ac @@ -792,6 +792,7 @@ else AC_MSG_RESULT(no) fi +pcre2_min_version=10.21 EXTRA_PCRE2= AC_ARG_WITH( included-pcre2, @@ -820,8 +821,28 @@ if test "x$included_pcre2" != "xyes"; then # and so AC_CHECK_LIB won't work (can't use a variable as library name) # AC_SEARCH_LIBS will use the existing $LIBS flags with no additional library first AC_SEARCH_LIBS([pcre2_compile_$WCHAR_T_BITS], [], - [ working_pcre2=yes - AC_MSG_NOTICE([using system PCRE2 library]) + [ # pcre2 lib found, check for minimum version + pcre2_version=`$PCRE2_CONFIG --version` + AS_VERSION_COMPARE([$pcre2_version], [$pcre2_min_version], + [ # version < minimum + AC_MSG_NOTICE([system PCRE2 library version $pcre2_version, need $pcre2_min_version or later]) + if test "x$included_pcre2" = "xno"; then + # complain about pcre2 version + AC_MSG_ERROR([system PCRE2 library is too old, but --without-included-pcre2 was given.]) + else + # use the internal version; undo changes to LIBS/CXXFLAGS + included_pcre2=yes + LIBS="$XLIBS" + CXXFLAGS="$XCXXFLAGS" + fi + ], + [ # version == minimum + working_pcre2=yes + ], + [ # version > minimum + working_pcre2=yes + ] + ) ], [ # fail case; undo the changes to LIBS/CXXFLAGS working_pcre2=no @@ -831,7 +852,9 @@ if test "x$included_pcre2" != "xyes"; then ) fi - if test "x$working_pcre2" != "xyes"; then + if test "x$working_pcre2" = "xyes"; then + AC_MSG_NOTICE([using system PCRE2 library]) + else # pcre2 size wrong or pcre2-config not found # is it OK to use the included version? if test "x$included_pcre2" = "xno"; then -- cgit v1.2.3