diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2022-10-24 21:03:42 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2022-10-24 21:03:42 +0200 |
commit | 532d4a24e2013262dfa41fd85c06a9715c99abf7 (patch) | |
tree | 3b7f4fac1e983ead408c20a2f330b41aa2399ab1 /configure.ac | |
parent | a1bdcfa3ca8af4ddb69ee57d716aa943cf3fe94a (diff) |
New upstream version 4.7upstream/4.7
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 41 |
1 files changed, 26 insertions, 15 deletions
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 <sys/time.h> #include <time.h> ]) -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 |