LYX_SEARCH_PROG(CXX, $CXX $CCC g++ gcc c++ CC cxx xlC cc++, [LYX_PROG_CXX_WORKS])
if test -z "$CXX" ; then
- AC_ERROR([Unable to find a good enough C++ compiler])
+ AC_MSG_ERROR([Unable to find a good enough C++ compiler])
fi
AC_MSG_RESULT($CXX)
else
case $gxx_version in
2.95.1) CXXFLAGS="$lyx_opt -fpermissive";;
- 2.95.2) CXXFLAGS="$lyx_opt";;
- 2.95.*) CXXFLAGS="$lyx_opt";;
+ 2.95.*) CXXFLAGS="$lyx_opt -Wno-non-template-friend";;
2.96*) CXXFLAGS="$lyx_opt -fno-exceptions -Wno-non-template-friend";;
3.0*) CXXFLAGS="$lyx_opt";;
3.1*) CXXFLAGS="$lyx_opt -finline-limit=500 -fno-exceptions";;
- 3.2*) CXXFLAGS="$lyx_opt";;
+ 3.2*) CXXFLAGS="$lyx_opt -fno-exceptions";;
*) CXXFLAGS="$lyx_opt";;
esac
if test x$enable_debug = xyes ; then
case $gxx_version in
2.95.*) CXXFLAGS="$CXXFLAGS -W -Wall";;
2.96*) CXXFLAGS="$CXXFLAGS -W -Wall";;
- 3.1*) CXXFLAGS="$CXXFLAGS -W -Wall -Winline";;
+ 3.1*) CXXFLAGS="$CXXFLAGS -W -Wall";;
*) CXXFLAGS="$CXXFLAGS -W -Wall";;
esac
if test $lyx_devel_version = yes ; then
[AC_TRY_COMPILE([
class Expl {
public:
- explicit Expl() {};
+ explicit Expl() {}
};],,lyx_cv_explicit=yes,lyx_cv_explicit=no)
])
if test $lyx_cv_explicit = no ; then
dnl Usage LYX_PATH_XPM: Checks for xpm library and header
AC_DEFUN(LYX_PATH_XPM,[
### Check for Xpm library
-AC_CHECK_LIB(Xpm, XpmCreateBufferFromImage,XPM_LIB="-lXpm",
- [LYX_LIB_ERROR(libXpm,Xpm)], $XPM_LIB)
+AC_CHECK_LIB(Xpm, XpmCreateBufferFromImage, XPM_LIB="-lXpm",
+ [LYX_LIB_ERROR(libXpm,Xpm)])
AC_SUBST(XPM_LIB)
### Check for Xpm headers
lyx_cv_xpm_h_location="<xpm.h>"
lyx_cv_xpm_h_location="<X11/xpm.h>"],[
AC_CHECK_HEADER(xpm.h,[],[
LYX_LIB_ERROR(xpm.h,Xpm)])])
-AC_DEFINE_UNQUOTED(XPM_H_LOCATION,$lyx_cv_xpm_h_location)
+AC_DEFINE_UNQUOTED(XPM_H_LOCATION,$lyx_cv_xpm_h_location,
+ [define this to the location of xpm.h to be used with #include, e.g. <xpm.h>])
### Test for the header version
if test $ac_cv_header_xpm_h = yes; then
fi])
-dnl Usage: LYX_HPUX Checks for HP-UX and update CXXFLAGS accordingly
-AC_DEFUN(LYX_HPUX,
-[#It seems that HPUX requires using -fpcc-struct-return with gcc.
-AC_CACHE_CHECK(for HP-UX,ac_cv_hpux,[
-os=`uname -s | tr '[A-Z]' '[a-z]'`
-ac_cv_hpux=no
-test "$os" = hp-ux && ac_cv_hpux=yes])
-if test "$ac_cv_hpux" = yes; then
- test "x$GXX" = xyes && CXXFLAGS="$CXXFLAGS -fpcc-struct-return"
-fi])
-
-
-dnl Usage: LYX_SUNOS4 Checks for SunOS 4.x and sets the flag lyx_broken_headers
-dnl if necessary
-AC_DEFUN(LYX_SUNOS4,
-[#The headers are not correct under SunOS4
-AC_CACHE_CHECK(for SunOS 4.x,ac_cv_sunos4,[
-changequote(, ) dnl
-os=`uname -a | sed -e 's/^\([^ ]*\) [^ ]* \([0-9]\)\..*/\1\2/'`
-changequote([, ]) dnl
-ac_cv_sunos4=no
-test "$os" = SunOS4 && ac_cv_sunos4=yes])
-if test "$ac_cv_sunos4" = yes; then
- test "x$GXX" = xyes && lyx_broken_headers=yes
-fi])
-
-
-dnl Usage: LYX_SCO Checks for SCO and sets the flag lyx_broken_headers
-dnl if necessary
-AC_DEFUN(LYX_SCO,
-[AC_CACHE_CHECK(for SCO 3.2v4,ac_cv_sco,[
-ac_cv_sco=no
-if test `uname -s` != "SCO_SV"; then
- lyx_machine_rel=`uname -m`:`uname -r`
- if test $lyx_machine_rel = i386:3.2 || test $lyx_machine_rel = i486:3.2;
- then
- if test -f /usr/options/cb.name; then
- ac_cv_sco=no
- elif /bin/uname -X 2>/dev/null >/dev/null ; then
- ac_cv_sco=yes
- fi
- fi
-fi])
-if test "$ac_cv_sco" = yes; then
- test "x$GXX" = xyes && lyx_broken_headers=yes
-fi])
-
dnl Usage: LYX_FUNC_PUTENV_ARGTYPE
dnl Checks whether putenv() takes 'char const *' or 'char *' as
dnl argument. This is needed because Solaris 7 (wrongly?) uses 'char *',
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
for dir in `eval "echo $1"`; do
if test ! "$dir" = NONE; then
- test ! -d "$dir" && AC_ERROR([\"$dir\" is not a directory])
+ test ! -d "$dir" && AC_MSG_ERROR([\"$dir\" is not a directory])
$2
fi
done
sed -e 's/.*\(".*$1"\).*/\1/' -e "1q"`
eval "lyx_cv_path2_${ac_safe}=\$lyx_path_header_path"
rm -f conftest*])
- AC_DEFINE_UNQUOTED($ac_tr_safe, $lyx_path_header_path)])
+ AC_DEFINE_UNQUOTED($ac_tr_safe, $lyx_path_header_path, [dummy])])
])
### end of LYX_PATH_HEADER
-dnl AC_VALIDATE_CACHE_SYSTEM_TYPE[(cmd)]
-dnl if the cache file is inconsistent with the current host,
-dnl target and build system types, execute CMD or print a default
-dnl error message.
-AC_DEFUN(AC_VALIDATE_CACHE_SYSTEM_TYPE, [
- AC_REQUIRE([AC_CANONICAL_SYSTEM])
- AC_MSG_CHECKING([config.cache system type])
- if { test x"${ac_cv_host_system_type+set}" = x"set" &&
- test x"$ac_cv_host_system_type" != x"$host"; } ||
- { test x"${ac_cv_build_system_type+set}" = x"set" &&
- test x"$ac_cv_build_system_type" != x"$build"; } ||
- { test x"${ac_cv_target_system_type+set}" = x"set" &&
- test x"$ac_cv_target_system_type" != x"$target"; }; then
- AC_MSG_RESULT([different])
- ifelse($#, 1, [$1],
- [AC_MSG_ERROR(["you must remove config.cache and restart configure"])])
- else
- AC_MSG_RESULT([same])
- fi
- ac_cv_host_system_type="$host"
- ac_cv_build_system_type="$build"
- ac_cv_target_system_type="$target"
-])
-
dnl We use this until autoconf fixes its version.
AC_DEFUN(LYX_FUNC_SELECT_ARGTYPES,
[AC_MSG_CHECKING([types of arguments for select()])
AC_CACHE_VAL([lyx_cv_declare_${tr_hdr}_$1],
[AC_EGREP_HEADER($1, $2, [eval "lyx_cv_declare_${tr_hdr}_$1=yes"], [eval "lyx_cv_declare_${tr_hdr}_$1=no"])])
if eval "test \"\${lyx_cv_declare_${tr_hdr}_$1}\" = \"yes\""; then
- AC_DEFINE_UNQUOTED(HAVE_DECL_${tr_func})
+ AC_DEFINE_UNQUOTED(HAVE_DECL_${tr_func},1,[dummy])
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)