From 532d4a24e2013262dfa41fd85c06a9715c99abf7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Mon, 24 Oct 2022 21:03:42 +0200 Subject: New upstream version 4.7 --- configure.ac | 41 ++++++++++++++++++++++++++--------------- 1 file changed, 26 insertions(+), 15 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 119bd7f..67ef049 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -AC_INIT([libHX], [3.25]) +AC_INIT([libHX], [4.7]) AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_MACRO_DIR([m4]) @@ -11,9 +11,15 @@ AC_PROG_CXX m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) AC_DISABLE_STATIC -AC_LIBTOOL_DLOPEN AM_PROG_LIBTOOL +saved_CXXFLAGS="$CXXFLAGS" +regular_CPPFLAGS="-D_FILE_OFFSET_BITS=64 -D_REENTRANT" +regular_CFLAGS="-Wall -Waggregate-return -Wmissing-declarations \ + -Wmissing-prototypes -Wredundant-decls -Wshadow -Wstrict-prototypes \ + -Wformat=2 -pipe $visibility_CFLAGS" +regular_CXXFLAGS="-Wall -Wno-pointer-arith -Wredundant-decls -pipe \ + $visibility_CFLAGS" # # Check whether there really is a C++ compiler. # It is not mandatory to compile libHX, but we want to know. @@ -22,6 +28,21 @@ AC_LANG_PUSH([C++]) AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([], [return 0;])], [ac_cv_cxx=yes], [ac_cv_cxx=no]) +AC_MSG_CHECKING([available C++ standard]) +cxxmode="" +for i in "c++20" "c++17"; do + AS_IF([test "$i" = "c++20" && test -n "$COVERITY"], [continue]) + CXXFLAGS="$saved_CXXFLAGS -std=$i" + AC_COMPILE_IFELSE([AC_LANG_SOURCE([])], [cxxmode="$i"]) + AS_IF([test -n "$cxxmode"], [break]) +done +CXXFLAGS="$saved_CXXFLAGS" +AS_IF([test -n "$cxxmode"], [ + regular_CXXFLAGS="$regular_CXXFLAGS -std=$cxxmode" + AC_MSG_RESULT([$cxxmode]) +], [ + AC_MSG_RESULT([none]) +]) AC_LANG_POP([C++]) AM_CONDITIONAL([HAVE_CXX], [test "$ac_cv_cxx" = yes]) @@ -103,22 +124,12 @@ AC_CHECK_MEMBERS( #include #include ]) -AC_CHECK_FUNCS([fork execv execvp pipe], [b_proc="1"]) +AC_CHECK_FUNCS([fork execv execvp pipe]) AC_CHECK_FUNCS([getegid geteuid getpid getppid]) -AM_CONDITIONAL([B_PROC], [test "$b_proc" = 1]) - -AC_CHECK_PROGS([LYX], [lyx]) -AM_CONDITIONAL([BUILD_DOCS], [test -n "$LYX"]) +AC_CHECK_FUNCS([initgroups setgid]) -regular_CPPFLAGS="-D_FILE_OFFSET_BITS=64 -D_REENTRANT" -regular_CFLAGS="-Wall -Waggregate-return -Wmissing-declarations \ - -Wmissing-prototypes -Wredundant-decls -Wshadow -Wstrict-prototypes \ - -Wformat=2 -pipe $visibility_CFLAGS" -regular_CXXFLAGS="-Wall -Wno-pointer-arith -Wredundant-decls -pipe \ - $visibility_CFLAGS"; AC_SUBST([regular_CPPFLAGS]) AC_SUBST([regular_CFLAGS]) AC_SUBST([regular_CXXFLAGS]) -AC_CONFIG_FILES([Makefile assorted/Makefile doc/Makefile src/Makefile - include/Makefile libHX.pc]) +AC_CONFIG_FILES([Makefile src/Makefile include/Makefile libHX.pc]) AC_OUTPUT -- cgit v1.2.3