summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2018-09-22 11:58:24 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2018-09-22 11:58:24 +0200
commit6837474129968d7de13d91e5454bd824c9136e73 (patch)
treee7837bcfefadee676868a6bd9a71b16ec45cdd7a
parentf15cffae936c5643a8fe502a2170d0d2aab0fb5f (diff)
configure.ac: fix following commits f15cffae936c5643a8fe502a2170d0d2aab0fb5f and 23afa673f821e389f4d5fe07a464d02c4c0af74a
-rw-r--r--configure.ac33
1 files changed, 29 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index a3d7e09..ed06d17 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6,7 +6,7 @@ AC_INIT([testdisk],[7.1-WIP],[grenier@cgsecurity.org])
AC_LANG(C)
sinclude(acx_pthread.m4)
sinclude(mkdir.m4)
-TESTDISKDATE="June 2018"
+TESTDISKDATE="September 2018"
AC_SUBST(TESTDISKDATE)
AC_DEFINE_UNQUOTED([TESTDISKDATE],"$TESTDISKDATE",[Date of release])
AC_CONFIG_AUX_DIR(config)
@@ -548,7 +548,8 @@ if test "x$with_ncurses" != "xno"; then
if test "${ncurses_lib}" = "ncursesw"; then
AC_CHECK_LIB(tinfow,keypad, [ tinfo_lib="tinfow" ])
- else
+ fi
+ if test -z "${tinfo_lib}"; then
AC_CHECK_LIB(tinfo,keypad, [ tinfo_lib="tinfo" ])
fi
if test "${tinfo_lib}" != ""; then
@@ -914,7 +915,19 @@ then
if test "x$qt_config" != "x" ;
then
AC_MSG_RESULT([[yes]])
- CXXFLAGS="$CXXFLAGS --std=c++14"
+ AC_LANG_PUSH([C++])
+ option="--std=c++14"
+ SAVE_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS $option"
+ AC_MSG_CHECKING([whether g++ understands $option])
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+ [has_option=yes],
+ [has_option=no; CXXFLAGS="$SAVE_CXXFLAGS"])
+ AC_MSG_RESULT($has_option)
+ unset has_option
+ unset SAVE_CXXFLAGS
+ unset option
+ AC_LANG_POP([C++])
else
AC_MSG_RESULT([[no]])
AC_MSG_CHECKING([whether Qt5 is using --std=c++11])
@@ -922,7 +935,19 @@ then
if test "x$qt_config" != "x" ;
then
AC_MSG_RESULT([[yes]])
- CXXFLAGS="$CXXFLAGS --std=c++11"
+ AC_LANG_PUSH([C++])
+ option="--std=c++11"
+ SAVE_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS $option"
+ AC_MSG_CHECKING([whether g++ understands $option])
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+ [has_option=yes],
+ [has_option=no; CXXFLAGS="$SAVE_CXXFLAGS"])
+ AC_MSG_RESULT($has_option)
+ unset has_option
+ unset SAVE_CXXFLAGS
+ unset option
+ AC_LANG_POP([C++])
else
AC_MSG_RESULT([[no]])
fi