Skip to content

Commit

Permalink
configure.ac: fix following commits f15cffa and 23afa67
Browse files Browse the repository at this point in the history
  • Loading branch information
cgsecurity committed Sep 22, 2018
1 parent f15cffa commit 6837474
Showing 1 changed file with 29 additions and 4 deletions.
33 changes: 29 additions & 4 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -914,15 +915,39 @@ 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])
qt_config=`$PKG_CONFIG --variable=qt_config Qt5Core | grep "c++11"`
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
Expand Down

0 comments on commit 6837474

Please sign in to comment.