Autoconf 2.71 now show all warnings. Instead of cherry picking the 2.4
patch, the choice was made to apply autoupdate directly.
Additionally, AC_INIT now clearly indicates that automake >= 1.14 is required.
lyx_devel_version=no
lyx_prerelease=no
AC_ARG_ENABLE(build-type,
lyx_devel_version=no
lyx_prerelease=no
AC_ARG_ENABLE(build-type,
- AC_HELP_STRING([--enable-build-type=STR],[set build type to rel(ease), pre(release), dev(elopment), prof(iling), or gprof (default: LYX_BUILD_TYPE)]),
+ AS_HELP_STRING([--enable-build-type=STR],[set build type to rel(ease), pre(release), dev(elopment), prof(iling), or gprof (default: LYX_BUILD_TYPE)]),
[case $enableval in
dev*) build_type=development;;
pre*) build_type=prerelease;;
prof*) build_type=profiling;;
gprof*) build_type=gprof;;
rel*) build_type=release;;
[case $enableval in
dev*) build_type=development;;
pre*) build_type=prerelease;;
prof*) build_type=profiling;;
gprof*) build_type=gprof;;
rel*) build_type=release;;
- *) AC_MSG_ERROR([bad build type specification \"$enableval\". Please use one of rel(ease), pre(release), dev(elopment), prof(iling), or gprof]);;
+ *) AC_MSG_ERROR([bad build type specification '$enableval'. Please use one of rel(ease), pre(release), dev(elopment), prof(iling), or gprof]);;
esac],
[build_type=LYX_BUILD_TYPE])
AC_MSG_RESULT([$build_type])
esac],
[build_type=LYX_BUILD_TYPE])
AC_MSG_RESULT([$build_type])
dnl We need the literal double quotes in the rpm spec file
RPM_VERSION_SUFFIX='""'
AC_ARG_WITH(version-suffix,
dnl We need the literal double quotes in the rpm spec file
RPM_VERSION_SUFFIX='""'
AC_ARG_WITH(version-suffix,
- [AC_HELP_STRING([--with-version-suffix@<:@=STR@:>@], install lyx files as lyxSTR (default STR: -AC_PACKAGE_VERSION))],
+ [AS_HELP_STRING([--with-version-suffix@<:@=STR@:>@],[install lyx files as lyxSTR (default STR: -AC_PACKAGE_VERSION)])],
[if test "x$withval" = "xyes";
then
withval="-"AC_PACKAGE_VERSION
[if test "x$withval" = "xyes";
then
withval="-"AC_PACKAGE_VERSION
AC_DEFUN([LYX_PROG_CLANG],
[AC_CACHE_CHECK([whether the compiler is clang],
[lyx_cv_prog_clang],
AC_DEFUN([LYX_PROG_CLANG],
[AC_CACHE_CHECK([whether the compiler is clang],
[lyx_cv_prog_clang],
+[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
#ifndef __clang__
this is not clang
#endif
#ifndef __clang__
this is not clang
#endif
-],
-[lyx_cv_prog_clang=yes ; CLANG=yes], [lyx_cv_prog_clang=no ; CLANG=no])])
+]])],[lyx_cv_prog_clang=yes ; CLANG=yes],[lyx_cv_prog_clang=no ; CLANG=no])])
if test $CLANG = yes ; then
AC_CACHE_CHECK([for clang version],
[lyx_cv_clang_version],
if test $CLANG = yes ; then
AC_CACHE_CHECK([for clang version],
[lyx_cv_clang_version],
save_CXXFLAGS=$CXXFLAGS
CXXFLAGS="$flag $AM_CXXFLAGS $CXXFLAGS"
dnl sample openmp source code to test
save_CXXFLAGS=$CXXFLAGS
CXXFLAGS="$flag $AM_CXXFLAGS $CXXFLAGS"
dnl sample openmp source code to test
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
template <typename T>
struct check
{
template <typename T>
struct check
{
check_type c;
check_type&& cr = static_cast<check_type&&>(c);
check_type c;
check_type&& cr = static_cast<check_type&&>(c);
- auto d = a;], [],
- [lyx_cv_cxx11_flags=$flag; break])
+ auto d = a;]], [[]])],[lyx_cv_cxx11_flags=$flag; break],[])
CXXFLAGS=$save_CXXFLAGS
CPPFLAGS=$save_CPPFLAGS
done])
if test $lyx_cv_cxx11_flags = none ; then
CXXFLAGS=$save_CXXFLAGS
CPPFLAGS=$save_CPPFLAGS
done])
if test $lyx_cv_cxx11_flags = none ; then
- AC_ERROR([Cannot find suitable C++11 mode for compiler $CXX])
+ AC_MSG_ERROR(Cannot find suitable C++11 mode for compiler $CXX)
fi
AM_CXXFLAGS="$lyx_cv_cxx11_flags $AM_CXXFLAGS"
])
fi
AM_CXXFLAGS="$lyx_cv_cxx11_flags $AM_CXXFLAGS"
])
dnl LYX_USE_STD_REGEX macro and conditional accordingly.
AC_DEFUN([LYX_CXX_USE_REGEX],
[AC_ARG_ENABLE(std-regex,
dnl LYX_USE_STD_REGEX macro and conditional accordingly.
AC_DEFUN([LYX_CXX_USE_REGEX],
[AC_ARG_ENABLE(std-regex,
- AC_HELP_STRING([--enable-std-regex],[use std::regex instead of boost::regex (default is autodetected)]),
+ AS_HELP_STRING([--enable-std-regex],[use std::regex instead of boost::regex (default is autodetected)]),
[lyx_std_regex=$enableval],
[AC_MSG_CHECKING([for correct regex implementation])
save_CPPFLAGS=$CPPFLAGS
[lyx_std_regex=$enableval],
[AC_MSG_CHECKING([for correct regex implementation])
save_CPPFLAGS=$CPPFLAGS
CXXFLAGS="$AM_CXXFLAGS $CXXFLAGS"
# The following code snippet has been taken taken from example in
# http://stackoverflow.com/questions/8561850/compile-stdregex-iterator-with-gcc
CXXFLAGS="$AM_CXXFLAGS $CXXFLAGS"
# The following code snippet has been taken taken from example in
# http://stackoverflow.com/questions/8561850/compile-stdregex-iterator-with-gcc
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <regex>
#include <iostream>
#include <string.h>
typedef std::regex_iterator<const char *> Myiter;
#include <regex>
#include <iostream>
#include <string.h>
typedef std::regex_iterator<const char *> Myiter;
const char *pat = "axayaz";
Myiter::regex_type rx("a");
Myiter next(pat, pat + strlen(pat), rx);
Myiter end;
const char *pat = "axayaz";
Myiter::regex_type rx("a");
Myiter next(pat, pat + strlen(pat), rx);
Myiter end;
- ], [lyx_std_regex=yes], [lyx_std_regex=no])
+ ]])],[lyx_std_regex=yes],[lyx_std_regex=no])
CXXFLAGS=$save_CXXFLAGS
CPPFLAGS=$save_CPPFLAGS
AC_MSG_RESULT([$lyx_std_regex])
CXXFLAGS=$save_CXXFLAGS
CPPFLAGS=$save_CPPFLAGS
AC_MSG_RESULT([$lyx_std_regex])
CPPFLAGS="$AM_CPPFLAGS $CPPFLAGS"
save_CXXFLAGS=$CXXFLAGS
CXXFLAGS="$AM_CXXFLAGS $CXXFLAGS"
CPPFLAGS="$AM_CPPFLAGS $CPPFLAGS"
save_CXXFLAGS=$CXXFLAGS
CXXFLAGS="$AM_CXXFLAGS $CXXFLAGS"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <mutex>
static std::once_flag flag;
#include <mutex>
static std::once_flag flag;
std::call_once(flag, [](){ return; });
std::call_once(flag, [](){ return; });
- ], [lyx_std_call_once=yes], [lyx_std_call_once=no])
+ ]])],[lyx_std_call_once=yes],[lyx_std_call_once=no])
CXXFLAGS=$save_CXXFLAGS
CPPFLAGS=$save_CPPFLAGS
AC_MSG_RESULT([$lyx_std_call_once])
CXXFLAGS=$save_CXXFLAGS
CPPFLAGS=$save_CPPFLAGS
AC_MSG_RESULT([$lyx_std_call_once])
AC_DEFUN([LYX_LIB_STDCXX],
[AC_CACHE_CHECK([whether STL is libstdc++],
[lyx_cv_lib_stdcxx],
AC_DEFUN([LYX_LIB_STDCXX],
[AC_CACHE_CHECK([whether STL is libstdc++],
[lyx_cv_lib_stdcxx],
-[AC_TRY_COMPILE([#include<vector>], [
+[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include<vector>]], [[
#if ! defined(__GLIBCXX__) && ! defined(__GLIBCPP__)
this is not libstdc++
#endif
#if ! defined(__GLIBCXX__) && ! defined(__GLIBCPP__)
this is not libstdc++
#endif
-],
-[lyx_cv_lib_stdcxx=yes], [lyx_cv_lib_stdcxx=no])])
+]])],[lyx_cv_lib_stdcxx=yes],[lyx_cv_lib_stdcxx=no])])
AC_DEFUN([LYX_LIB_STDCXX_CXX11_ABI],
[AC_CACHE_CHECK([whether STL is libstdc++ using the C++11 ABI],
[lyx_cv_lib_stdcxx_cxx11_abi],
AC_DEFUN([LYX_LIB_STDCXX_CXX11_ABI],
[AC_CACHE_CHECK([whether STL is libstdc++ using the C++11 ABI],
[lyx_cv_lib_stdcxx_cxx11_abi],
-[AC_TRY_COMPILE([#include<vector>], [
+[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include<vector>]], [[
#if ! defined(_GLIBCXX_USE_CXX11_ABI) || ! _GLIBCXX_USE_CXX11_ABI
this is not libstdc++ using the C++11 ABI
#endif
#if ! defined(_GLIBCXX_USE_CXX11_ABI) || ! _GLIBCXX_USE_CXX11_ABI
this is not libstdc++ using the C++11 ABI
#endif
-],
-[lyx_cv_lib_stdcxx_cxx11_abi=yes], [lyx_cv_lib_stdcxx_cxx11_abi=no])])
+]])],[lyx_cv_lib_stdcxx_cxx11_abi=yes],[lyx_cv_lib_stdcxx_cxx11_abi=no])])
### We might want to get or shut warnings.
AC_ARG_ENABLE(warnings,
### We might want to get or shut warnings.
AC_ARG_ENABLE(warnings,
- AC_HELP_STRING([--enable-warnings],[tell the compiler to display more warnings]),,
- [ if test $lyx_devel_version = yes -o $lyx_prerelease = yes && test $ac_cv_prog_gxx = yes ; then
+ AS_HELP_STRING([--enable-warnings],[tell the compiler to display more warnings]),,
+ [ if test $lyx_devel_version = yes -o $lyx_prerelease = yes && test $ac_cv_cxx_compiler_gnu = yes ; then
enable_warnings=yes;
else
enable_warnings=no;
enable_warnings=yes;
else
enable_warnings=no;
### We might want to disable debug
AC_ARG_ENABLE(debug,
### We might want to disable debug
AC_ARG_ENABLE(debug,
- AC_HELP_STRING([--enable-debug],[enable debug information]),,
+ AS_HELP_STRING([--enable-debug],[enable debug information]),,
[AS_CASE([$build_type], [rel*], [enable_debug=no], [enable_debug=yes])]
)
AC_ARG_ENABLE(stdlib-debug,
[AS_CASE([$build_type], [rel*], [enable_debug=no], [enable_debug=yes])]
)
AC_ARG_ENABLE(stdlib-debug,
- AC_HELP_STRING([--enable-stdlib-debug],[enable debug mode in the standard library]),,
+ AS_HELP_STRING([--enable-stdlib-debug],[enable debug mode in the standard library]),,
[AS_CASE([$build_type], [dev*], [enable_stdlib_debug=yes],
[enable_stdlib_debug=no])]
)
### set up optimization
AC_ARG_ENABLE(optimization,
[AS_CASE([$build_type], [dev*], [enable_stdlib_debug=yes],
[enable_stdlib_debug=no])]
)
### set up optimization
AC_ARG_ENABLE(optimization,
- AC_HELP_STRING([--enable-optimization@<:@=ARG@:>@],[enable compiler optimisation]),,
+ AS_HELP_STRING([--enable-optimization@<:@=ARG@:>@],[enable compiler optimisation]),,
enable_optimization=yes;)
case $enable_optimization in
yes)
enable_optimization=yes;)
case $enable_optimization in
yes)
esac
AC_ARG_ENABLE(assertions,
esac
AC_ARG_ENABLE(assertions,
- AC_HELP_STRING([--enable-assertions],[add runtime sanity checks in the program]),,
+ AS_HELP_STRING([--enable-assertions],[add runtime sanity checks in the program]),,
[AS_CASE([$build_type], [dev*|pre*], [enable_assertions=yes],
[enable_assertions=no])]
)
[AS_CASE([$build_type], [dev*|pre*], [enable_assertions=yes],
[enable_assertions=no])]
)
AC_LANG_POP(C++)
fi
case $gxx_version in
AC_LANG_POP(C++)
fi
case $gxx_version in
- 2.*|3.*) AC_ERROR([gcc >= 4.6 is required]);;
- 4.0*|4.1*|4.2*|4.3*|4.4*|4.5*) AC_ERROR([gcc >= 4.6 is required]);;
+ 2.*|3.*) AC_MSG_ERROR(gcc >= 4.6 is required);;
+ 4.0*|4.1*|4.2*|4.3*|4.4*|4.5*) AC_MSG_ERROR(gcc >= 4.6 is required);;
esac
if test x$enable_stdlib_debug = xyes ; then
dnl FIXME: for clang/libc++, one should define _LIBCPP_DEBUG2=0
esac
if test x$enable_stdlib_debug = xyes ; then
dnl FIXME: for clang/libc++, one should define _LIBCPP_DEBUG2=0
AC_DEFUN([LYX_USE_INCLUDED_BOOST],[
AC_MSG_CHECKING([whether to use included boost library])
AC_ARG_WITH(included-boost,
AC_DEFUN([LYX_USE_INCLUDED_BOOST],[
AC_MSG_CHECKING([whether to use included boost library])
AC_ARG_WITH(included-boost,
- [AC_HELP_STRING([--without-included-boost], [do not use the boost lib supplied with LyX, try to find one in the system directories - compilation will abort if nothing suitable is found])],
+ [AS_HELP_STRING([--without-included-boost],[do not use the boost lib supplied with LyX, try to find one in the system directories - compilation will abort if nothing suitable is found])],
[lyx_cv_with_included_boost=$withval],
[lyx_cv_with_included_boost=yes])
AM_CONDITIONAL(USE_INCLUDED_BOOST, test x$lyx_cv_with_included_boost = xyes)
[lyx_cv_with_included_boost=$withval],
[lyx_cv_with_included_boost=yes])
AM_CONDITIONAL(USE_INCLUDED_BOOST, test x$lyx_cv_with_included_boost = xyes)
AC_DEFUN([LYX_USE_INCLUDED_ICONV],[
AC_MSG_CHECKING([whether to use included iconv library])
AC_ARG_WITH(included-iconv,
AC_DEFUN([LYX_USE_INCLUDED_ICONV],[
AC_MSG_CHECKING([whether to use included iconv library])
AC_ARG_WITH(included-iconv,
- [AC_HELP_STRING([--with-included-iconv], [use the iconv lib supplied with LyX instead of the system one])],
+ [AS_HELP_STRING([--with-included-iconv],[use the iconv lib supplied with LyX instead of the system one])],
[lyx_cv_with_included_iconv=$withval],
[lyx_cv_with_included_iconv=no])
AM_CONDITIONAL(USE_INCLUDED_ICONV, test x$lyx_cv_with_included_iconv = xyes)
[lyx_cv_with_included_iconv=$withval],
[lyx_cv_with_included_iconv=no])
AM_CONDITIONAL(USE_INCLUDED_ICONV, test x$lyx_cv_with_included_iconv = xyes)
AC_DEFUN([LYX_USE_INCLUDED_ZLIB],[
AC_MSG_CHECKING([whether to use included zlib library])
AC_ARG_WITH(included-zlib,
AC_DEFUN([LYX_USE_INCLUDED_ZLIB],[
AC_MSG_CHECKING([whether to use included zlib library])
AC_ARG_WITH(included-zlib,
- [AC_HELP_STRING([--with-included-zlib], [use the zlib lib supplied with LyX instead of the system one])],
+ [AS_HELP_STRING([--with-included-zlib],[use the zlib lib supplied with LyX instead of the system one])],
[lyx_cv_with_included_zlib=$withval],
[lyx_cv_with_included_zlib=no])
AM_CONDITIONAL(USE_INCLUDED_ZLIB, test x$lyx_cv_with_included_zlib = xyes)
[lyx_cv_with_included_zlib=$withval],
[lyx_cv_with_included_zlib=no])
AM_CONDITIONAL(USE_INCLUDED_ZLIB, test x$lyx_cv_with_included_zlib = xyes)
AC_DEFUN([LYX_CHECK_CALLSTACK_PRINTING],
[AC_CACHE_CHECK([whether printing callstack is possible],
[lyx_cv_callstack_printing],
AC_DEFUN([LYX_CHECK_CALLSTACK_PRINTING],
[AC_CACHE_CHECK([whether printing callstack is possible],
[lyx_cv_callstack_printing],
+[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <execinfo.h>
#include <cxxabi.h>
#include <execinfo.h>
#include <cxxabi.h>
void* array[200];
size_t size = backtrace(array, 200);
backtrace_symbols(array, size);
int status = 0;
abi::__cxa_demangle("abcd", 0, 0, &status);
void* array[200];
size_t size = backtrace(array, 200);
backtrace_symbols(array, size);
int status = 0;
abi::__cxa_demangle("abcd", 0, 0, &status);
-],
-[lyx_cv_callstack_printing=yes], [lyx_cv_callstack_printing=no])])
+]])],[lyx_cv_callstack_printing=yes],[lyx_cv_callstack_printing=no])])
if test x"$lyx_cv_callstack_printing" = xyes; then
AC_DEFINE([LYX_CALLSTACK_PRINTING], 1,
[Define if callstack can be printed])
if test x"$lyx_cv_callstack_printing" = xyes; then
AC_DEFINE([LYX_CALLSTACK_PRINTING], 1,
[Define if callstack can be printed])
dnl be used.
AC_DEFUN([LYX_USE_INCLUDED_MYTHES],[
AC_ARG_WITH(included-mythes,
dnl be used.
AC_DEFUN([LYX_USE_INCLUDED_MYTHES],[
AC_ARG_WITH(included-mythes,
- [AC_HELP_STRING([--with-included-mythes], [force to use the MyThes lib supplied with LyX])],
+ [AS_HELP_STRING([--with-included-mythes],[force to use the MyThes lib supplied with LyX])],
[use_included_mythes=$withval],
[use_included_mythes=no])
if test x$use_included_mythes != xyes ; then
[use_included_mythes=$withval],
[use_included_mythes=no])
if test x$use_included_mythes != xyes ; then
dnl Adds a --with-'dir-name' option (described by 'desc') and puts the
dnl resulting directory name in 'dir-var-name'.
AC_DEFUN([LYX_WITH_DIR],[
dnl Adds a --with-'dir-name' option (described by 'desc') and puts the
dnl resulting directory name in 'dir-var-name'.
AC_DEFUN([LYX_WITH_DIR],[
- AC_ARG_WITH($1,[AC_HELP_STRING([--with-$1],[specify $2])])
+ AC_ARG_WITH($1,[AS_HELP_STRING([--with-$1],[specify $2])])
AC_MSG_CHECKING([for $2])
if test -z "$with_$3"; then
AC_CACHE_VAL(lyx_cv_$3, lyx_cv_$3=$4)
AC_MSG_CHECKING([for $2])
if test -z "$with_$3"; then
AC_CACHE_VAL(lyx_cv_$3, lyx_cv_$3=$4)
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
for dir in `eval "echo $1"`; do
if test ! "$dir" = NONE; then
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
for dir in `eval "echo $1"`; do
if test ! "$dir" = NONE; then
- test ! -d "$dir" && AC_MSG_ERROR([\"$dir\" is not a directory])
+ test ! -d "$dir" && AC_MSG_ERROR(['$dir' is not a directory])
$1="${$1} -L$2"
if test "`(uname) 2>/dev/null`" = SunOS &&
uname -r | grep '^5' >/dev/null; then
$1="${$1} -L$2"
if test "`(uname) 2>/dev/null`" = SunOS &&
uname -r | grep '^5' >/dev/null; then
- if test $ac_cv_prog_gxx = yes ; then
+ if test $ac_cv_cxx_compiler_gnu = yes ; then
$1="${$1} -Wl[,]-R$2"
else
$1="${$1} -R$2"
$1="${$1} -Wl[,]-R$2"
else
$1="${$1} -R$2"
AC_DEFUN([LYX_USE_PACKAGING],
[AC_MSG_CHECKING([what packaging should be used])
AC_ARG_WITH(packaging,
AC_DEFUN([LYX_USE_PACKAGING],
[AC_MSG_CHECKING([what packaging should be used])
AC_ARG_WITH(packaging,
- [AC_HELP_STRING([--with-packaging=STR], [set packaging for installation among:
+ [AS_HELP_STRING([--with-packaging=STR],[set packaging for installation among:
posix, windows, macosx, haiku (default is autodetected)])],
[lyx_use_packaging="$withval"], [
case $host in
posix, windows, macosx, haiku (default is autodetected)])],
[lyx_use_packaging="$withval"], [
case $host in
[AC_CHECK_FUNCS([mkdir _mkdir])
AC_CACHE_CHECK([whether mkdir takes one argument],
[ac_cv_mkdir_takes_one_arg],
[AC_CHECK_FUNCS([mkdir _mkdir])
AC_CACHE_CHECK([whether mkdir takes one argument],
[ac_cv_mkdir_takes_one_arg],
+[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <sys/stat.h>
#if HAVE_UNISTD_H
# include <unistd.h>
#endif
#include <sys/stat.h>
#if HAVE_UNISTD_H
# include <unistd.h>
#endif
-], [mkdir (".");],
-[ac_cv_mkdir_takes_one_arg=yes], [ac_cv_mkdir_takes_one_arg=no])])
+]], [[mkdir (".");]])],[ac_cv_mkdir_takes_one_arg=yes],[ac_cv_mkdir_takes_one_arg=no])])
if test x"$ac_cv_mkdir_takes_one_arg" = xyes; then
AC_DEFINE([MKDIR_TAKES_ONE_ARG], 1,
[Define if mkdir takes only one argument.])
if test x"$ac_cv_mkdir_takes_one_arg" = xyes; then
AC_DEFINE([MKDIR_TAKES_ONE_ARG], 1,
[Define if mkdir takes only one argument.])
save_CXXFLAGS=$CXXFLAGS
CXXFLAGS="$AM_CXXFLAGS $CXXFLAGS"
AC_LANG_PUSH(C++)
save_CXXFLAGS=$CXXFLAGS
CXXFLAGS="$AM_CXXFLAGS $CXXFLAGS"
AC_LANG_PUSH(C++)
- AC_TRY_COMPILE([#include <$2>], [$3],
- lyx_have_def_name=yes,
- lyx_have_def_name=no)
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <$2>]], [[$3]])],[lyx_have_def_name=yes],[lyx_have_def_name=no])
AC_LANG_POP(C++)
CXXFLAGS=$save_CXXFLAGS
CPPFLAGS=$save_CPPFLAGS
AC_LANG_POP(C++)
CXXFLAGS=$save_CXXFLAGS
CPPFLAGS=$save_CPPFLAGS
[
SAVE_LIBS="$LIBS"
LIBS="$LIBS $1"
[
SAVE_LIBS="$LIBS"
LIBS="$LIBS $1"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <qglobal.h>
#include <qstring.h>
#include <qglobal.h>
#include <qstring.h>
QString s("mangle_failure");
#if (QT_VERSION < 400)
break_me_(\\\);
#endif
QString s("mangle_failure");
#if (QT_VERSION < 400)
break_me_(\\\);
#endif
- ],
- qt_cv_libname=$1,
- )
+ ]])],[qt_cv_libname=$1],[])
AC_CACHE_VAL(qt_cv_libname,
[
AC_CACHE_VAL(qt_cv_libname,
[
SAVE_CXXFLAGS=$CXXFLAGS
CXXFLAGS="$CXXFLAGS $QT_INCLUDES $QT_LDFLAGS"
qt_corelibs="-lQtCore -lQtCore4"
SAVE_CXXFLAGS=$CXXFLAGS
CXXFLAGS="$CXXFLAGS $QT_INCLUDES $QT_LDFLAGS"
qt_corelibs="-lQtCore -lQtCore4"
[
AC_CACHE_CHECK([Qt version],lyx_cv_qtversion,
[
[
AC_CACHE_CHECK([Qt version],lyx_cv_qtversion,
[
SAVE_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $QT_INCLUDES"
SAVE_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $QT_INCLUDES"
dnl this variable is precious
AC_ARG_VAR(QTDIR, [the place where the Qt files are, e.g. /usr/lib/qt4])
dnl this variable is precious
AC_ARG_VAR(QTDIR, [the place where the Qt files are, e.g. /usr/lib/qt4])
- AC_ARG_WITH(qt-dir, [AC_HELP_STRING([--with-qt-dir], [where the root of Qt is installed])],
+ AC_ARG_WITH(qt-dir, [AS_HELP_STRING([--with-qt-dir],[where the root of Qt is installed])],
[ qt_cv_dir=`eval echo "$withval"/` ])
[ qt_cv_dir=`eval echo "$withval"/` ])
- AC_ARG_WITH(qt-includes, [AC_HELP_STRING([--with-qt-includes], [where the Qt includes are])],
+ AC_ARG_WITH(qt-includes, [AS_HELP_STRING([--with-qt-includes],[where the Qt includes are])],
[ qt_cv_includes=`eval echo "$withval"` ])
[ qt_cv_includes=`eval echo "$withval"` ])
- AC_ARG_WITH(qt-libraries, [AC_HELP_STRING([--with-qt-libraries], [where the Qt library is installed])],
+ AC_ARG_WITH(qt-libraries, [AS_HELP_STRING([--with-qt-libraries],[where the Qt library is installed])],
[ qt_cv_libraries=`eval echo "$withval"` ])
dnl pay attention to $QTDIR unless overridden
[ qt_cv_libraries=`eval echo "$withval"` ])
dnl pay attention to $QTDIR unless overridden
AC_DEFUN([CHECK_WITH_ASPELL],
[
lyx_use_aspell=true
AC_DEFUN([CHECK_WITH_ASPELL],
[
lyx_use_aspell=true
- AC_ARG_WITH(aspell, AC_HELP_STRING([--without-aspell],[do not check for ASpell library]))
+ AC_ARG_WITH(aspell, AS_HELP_STRING([--without-aspell],[do not check for ASpell library]))
test "$with_aspell" = "no" && lyx_use_aspell=false
if $lyx_use_aspell ; then
test "$with_aspell" = "no" && lyx_use_aspell=false
if $lyx_use_aspell ; then
save_CXXFLAGS=$CXXFLAGS
CXXFLAGS="$ENCHANT_CFLAGS $AM_CXXFLAGS $CXXFLAGS"
save_CXXFLAGS=$CXXFLAGS
CXXFLAGS="$ENCHANT_CFLAGS $AM_CXXFLAGS $CXXFLAGS"
- AC_TRY_COMPILE([#include <enchant++.h>],
- [enchant::Broker broker;],
- [AC_MSG_RESULT(yes)
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <enchant++.h>]], [[enchant::Broker broker;]])],[AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_ENCHANT2, 1, [Define to 1 if enchant 2.x is detected])
AC_DEFINE(HAVE_ENCHANT2, 1, [Define to 1 if enchant 2.x is detected])
- ],
- [AC_MSG_RESULT(no)])
CXXFLAGS=$save_CXXFLAGS
])
AC_DEFUN([CHECK_WITH_ENCHANT],
[
lyx_use_enchant=true
CXXFLAGS=$save_CXXFLAGS
])
AC_DEFUN([CHECK_WITH_ENCHANT],
[
lyx_use_enchant=true
- AC_ARG_WITH(enchant, AC_HELP_STRING([--without-enchant],[do not check for Enchant library]))
+ AC_ARG_WITH(enchant, AS_HELP_STRING([--without-enchant],[do not check for Enchant library]))
test "$with_enchant" = "no" && lyx_use_enchant=false
if $lyx_use_enchant; then
test "$with_enchant" = "no" && lyx_use_enchant=false
if $lyx_use_enchant; then
CXXFLAGS="$ENCHANT_CFLAGS $AM_CXXFLAGS $CXXFLAGS"
# in the C++ ABI, stem() returns a vector, in the C ABI, it returns an int
CXXFLAGS="$ENCHANT_CFLAGS $AM_CXXFLAGS $CXXFLAGS"
# in the C++ ABI, stem() returns a vector, in the C ABI, it returns an int
- AC_TRY_COMPILE([#include <hunspell/hunspell.hxx>],
- [Hunspell sp("foo", "bar");
- int i = sp.stem("test").size();],
- [AC_MSG_RESULT(yes)
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <hunspell/hunspell.hxx>]], [[Hunspell sp("foo", "bar");
+ int i = sp.stem("test").size();]])],[AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_HUNSPELL_CXXABI, 1, [Define to 1 if hunspell C++ (rather than C) ABI is detected])
have_hunspell_cxx_abi=yes
AC_DEFINE(HAVE_HUNSPELL_CXXABI, 1, [Define to 1 if hunspell C++ (rather than C) ABI is detected])
have_hunspell_cxx_abi=yes
- ],
- [AC_MSG_RESULT(no)])
CXXFLAGS=$save_CXXFLAGS
])
CXXFLAGS=$save_CXXFLAGS
])
AC_DEFUN([CHECK_WITH_HUNSPELL],
[
lyx_use_hunspell=true
AC_DEFUN([CHECK_WITH_HUNSPELL],
[
lyx_use_hunspell=true
- AC_ARG_WITH(hunspell, AC_HELP_STRING([--without-hunspell],[do not check for Hunspell library]))
+ AC_ARG_WITH(hunspell, AS_HELP_STRING([--without-hunspell],[do not check for Hunspell library]))
test "$with_hunspell" = "no" && lyx_use_hunspell=false
if $lyx_use_hunspell ; then
test "$with_hunspell" = "no" && lyx_use_hunspell=false
if $lyx_use_hunspell ; then
AC_DEFUN([LYX_USE_INCLUDED_HUNSPELL],[
AC_MSG_CHECKING([whether to use included hunspell library])
AC_ARG_WITH(included-hunspell,
AC_DEFUN([LYX_USE_INCLUDED_HUNSPELL],[
AC_MSG_CHECKING([whether to use included hunspell library])
AC_ARG_WITH(included-hunspell,
- [AC_HELP_STRING([--with-included-hunspell], [use the hunspell lib supplied with LyX instead of the system one])],
+ [AS_HELP_STRING([--with-included-hunspell],[use the hunspell lib supplied with LyX instead of the system one])],
[lyx_cv_with_included_hunspell=$withval],
[lyx_cv_with_included_hunspell=no])
AM_CONDITIONAL(USE_INCLUDED_HUNSPELL, test x$lyx_cv_with_included_hunspell = xyes)
[lyx_cv_with_included_hunspell=$withval],
[lyx_cv_with_included_hunspell=no])
AM_CONDITIONAL(USE_INCLUDED_HUNSPELL, test x$lyx_cv_with_included_hunspell = xyes)
dnl Process with autoconf to generate configure script -*- sh -*-
dnl Process with autoconf to generate configure script -*- sh -*-
-AC_INIT(LyX,2.3.7dev,[lyx-devel@lists.lyx.org],[lyx])
+AC_INIT([LyX],[2.3.7dev],[lyx-devel@lists.lyx.org],[lyx])
AC_PRESERVE_HELP_ORDER
# Use ISO format only. The frontend needs to parse this
AC_SUBST(LYX_DATE, ["2020-11-30"])
AC_PRESERVE_HELP_ORDER
# Use ISO format only. The frontend needs to parse this
AC_SUBST(LYX_DATE, ["2020-11-30"])
AC_CONFIG_SRCDIR(src/main.cpp)
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_SRCDIR(src/main.cpp)
AC_CONFIG_HEADERS([config.h])
# file names only up to 99 characters. tar-ustar selects the ustar format defined
# by POSIX 1003.1-1988. This format is believed to be old enough to be portable.
save_PACKAGE=$PACKAGE
# file names only up to 99 characters. tar-ustar selects the ustar format defined
# by POSIX 1003.1-1988. This format is believed to be old enough to be portable.
save_PACKAGE=$PACKAGE
-AM_INIT_AUTOMAKE([foreign dist-bzip2 no-define 1.8 tar-ustar subdir-objects])
+AM_INIT_AUTOMAKE([foreign dist-bzip2 no-define 1.14 tar-ustar subdir-objects])
PACKAGE=$save_PACKAGE
# Allow to build some parts of the code as one big chunk
m4_define([ALLPARTS],[boost,client,insets,mathed,core,tex2lyx,frontend_qt])
AC_ARG_ENABLE(monolithic-build,
PACKAGE=$save_PACKAGE
# Allow to build some parts of the code as one big chunk
m4_define([ALLPARTS],[boost,client,insets,mathed,core,tex2lyx,frontend_qt])
AC_ARG_ENABLE(monolithic-build,
- AC_HELP_STRING([--enable-monolithic-build@<:@=LIST@:>@],
- [Use monolithic build for modules in LIST (default: ALLPARTS)]),
+ AS_HELP_STRING([--enable-monolithic-build@<:@=LIST@:>@],[Use monolithic build for modules in LIST (default: ALLPARTS)]),
[test "$enable_monolithic_build" = yes && enable_monolithic_build="ALLPARTS"
test "$enable_monolithic_build" = no && enable_monolithic_build=
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=" ,"
[test "$enable_monolithic_build" = yes && enable_monolithic_build="ALLPARTS"
test "$enable_monolithic_build" = no && enable_monolithic_build=
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=" ,"
# Taken from gettext, needed for libiconv
AC_CACHE_CHECK([for wchar_t], [gt_cv_c_wchar_t],
# Taken from gettext, needed for libiconv
AC_CACHE_CHECK([for wchar_t], [gt_cv_c_wchar_t],
- [AC_TRY_COMPILE([#include <stddef.h>
- wchar_t foo = (wchar_t)'\0';], ,
- [gt_cv_c_wchar_t=yes], [gt_cv_c_wchar_t=no])])
+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stddef.h>
+ wchar_t foo = (wchar_t)'\0';]], [[]])],[gt_cv_c_wchar_t=yes],[gt_cv_c_wchar_t=no])])
if test $gt_cv_c_wchar_t = yes; then
AC_DEFINE([HAVE_WCHAR_T], [1], [Define if you have the 'wchar_t' type.])
HAVE_WCHAR_T=1
if test $gt_cv_c_wchar_t = yes; then
AC_DEFINE([HAVE_WCHAR_T], [1], [Define if you have the 'wchar_t' type.])
HAVE_WCHAR_T=1
if test "x$lyx_win_res" = "xtrue"; then
AC_CHECK_TOOL(RC, windres,)
if test -z "$RC"; then
if test "x$lyx_win_res" = "xtrue"; then
AC_CHECK_TOOL(RC, windres,)
if test -z "$RC"; then
- AC_ERROR([Could not find a resource compiler])
+ AC_MSG_ERROR(Could not find a resource compiler)
fi
fi
AM_CONDITIONAL(LYX_WIN_RESOURCE, $lyx_win_res)
fi
fi
AM_CONDITIONAL(LYX_WIN_RESOURCE, $lyx_win_res)