]> git.lyx.org Git - lyx.git/blobdiff - config/lyxinclude.m4
remove noload/don't typeset
[lyx.git] / config / lyxinclude.m4
index eb20c0c6f9d21ebaab2d3adc7fb461ee60ebea87..2da7eede203fc9df53b8246d6c6cbc42ca81dea4 100644 (file)
@@ -156,7 +156,7 @@ AC_DEFUN(LYX_PROG_CXX,
 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)
 
@@ -207,12 +207,11 @@ if test x$GXX = xyes; then
   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
@@ -223,7 +222,7 @@ if test x$GXX = 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
@@ -285,7 +284,7 @@ AC_CACHE_CHECK(whether the C++ compiler understands explicit,lyx_cv_explicit,
  [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
@@ -503,8 +502,8 @@ AC_DEFUN(LYX_CXX_GLOBAL_CSTD,[
 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>"
@@ -513,7 +512,8 @@ AC_CHECK_HEADER(X11/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
@@ -551,53 +551,6 @@ changequote([,])
 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 *',
@@ -638,7 +591,7 @@ AC_DEFUN(LYX_LOOP_DIR,[
 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
@@ -693,34 +646,10 @@ lyx_path_header_path=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | \
   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()])
@@ -792,7 +721,7 @@ tr_hdr=`echo $2 | tr . _`
 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)