case $gxx_version in
2.7*) CXXFLAGS="$lyx_opt";;
2.95.1) CXXFLAGS="-g $lyx_opt -fpermissive -fno-rtti";;
- 2.95.*) CXXFLAGS="-g $lyx_opt -fno-rtti";;
+ 2.95.*) CXXFLAGS="-g $lyx_opt -fno-rtti -fno-exceptions";;
*) CXXFLAGS="-g $lyx_opt -fno-exceptions -fno-rtti";;
esac
else
dnl var-name.
AC_DEFUN(LYX_ADD_INC_DIR,[$1="${$1} -I$2 "])
+### Check for a headers existence and location iff it exists
+## This is supposed to be a generalised version of LYX_STL_STRING_FWD
+## It almost works. I've tried a few variations but they give errors
+## of one sort or other: bad substitution or file not found etc. The
+## actual header _is_ found though and the cache variable is set however
+## the reported setting (on screen) is equal to $ac_safe for some unknown
+## reason.
+AC_DEFUN(LYX_PATH_HEADER,
+[ AC_CHECK_HEADER($1,[
+ ac_tr_safe=PATH_`echo $ac_safe | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ AC_CACHE_CHECK([path to $1],lyx_cv_path_$ac_safe,
+ [ cat > conftest.$ac_ext <<EOF
+#line __oline__ "configure"
+#include "confdefs.h"
+
+#include <$1>
+EOF
+lyx_cv_path_$ac_safe=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | \
+ grep $1 2>/dev/null | \
+ sed -e 's/.*\(".*$1"\).*/\1/' -e "1q"`
+rm -f conftest*])
+ AC_DEFINE_UNQUOTED(${ac_tr_safe},${lyx_cv_path_$ac_safe})])
+])
+### end of LYX_PATH_HEADER
+
+### Check for stl_string_fwd.h existence and location if it exists
+AC_DEFUN(LYX_STL_STRING_FWD,
+[ AC_CHECK_HEADER(stl_string_fwd.h,[
+ AC_CACHE_CHECK([path to stl_string_fwd.h],lyx_cv_path_stl_string_fwd_h,
+ [ cat > conftest.$ac_ext <<EOF
+#line __oline__ "configure"
+#include "confdefs.h"
+
+#include <stl_string_fwd.h>
+EOF
+lyx_cv_path_stl_string_fwd_h=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | \
+ grep 'stl_string_fwd.h' 2>/dev/null | \
+ sed -e 's/.*\(".*stl_string_fwd.h"\).*/\1/' -e "1q"`
+rm -f conftest*])
+ AC_DEFINE_UNQUOTED(STL_STRING_FWD_H_LOCATION,$lyx_cv_path_stl_string_fwd_h,
+[define this to the location of stl_string_fwd.h to be used with #include,
+ NOTE: Do not set it to <stl_string_fwd.h> as that will find the LyX
+ supplied version of the header.
+ e.g. <../include/stl_string_fwd.h> or better yet use an absolute path])])
+])
+
dnl AC_VALIDATE_CACHE_SYSTEM_TYPE[(cmd)]
dnl if the cache file is inconsistent with the current host,
LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
-$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
+$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
|| AC_MSG_ERROR([libtool configure failed])
# Reload cache, that may have been modified by ltconfig
AC_REQUIRE([AC_PROG_LN_S])dnl
dnl
+case "$target" in
+NONE) lt_target="$host" ;;
+*) lt_target="$target" ;;
+esac
+
# Check for any special flags to pass to ltconfig.
-#
-# the following will cause an existing older ltconfig to fail, so
-# we ignore this at the expense of the cache file... Checking this
-# will just take longer ... bummer!
-#libtool_flags="--cache-file=$cache_file"
-#
+libtool_flags="--cache-file=$cache_file"
test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
# Some flags need to be propagated to the compiler or linker for good
# libtool support.
-case "$host" in
+case "$lt_target" in
*-*-irix6*)
# Find out which ABI we are using.
echo '[#]line __oline__ "configure"' > conftest.$ac_ext
AC_MSG_RESULT(no)
fi
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
-AC_SUBST(LD)
AC_PROG_LD_GNU
])
fi])
NM="$ac_cv_path_NM"
AC_MSG_RESULT([$NM])
-AC_SUBST(NM)
])
# AC_CHECK_LIBM - check for math library
AC_DEFUN(AC_CHECK_LIBM,
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
LIBM=
-case "$host" in
+case "$lt_target" in
*-*-beos* | *-*-cygwin*)
# These system don't have libm
;;
esac
])
-
-### Check for a headers existence and location iff it exists
-## This is supposed to be a generalised version of LYX_STL_STRING_FWD
-## It almost works. I've tried a few variations but they give errors
-## of one sort or other: bad substitution or file not found etc. The
-## actual header _is_ found though and the cache variable is set however
-## the reported setting (on screen) is equal to $ac_safe for some unknown
-## reason.
-AC_DEFUN(LYX_PATH_HEADER,
-[ AC_CHECK_HEADER($1,[
- ac_tr_safe=PATH_`echo $ac_safe | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- AC_CACHE_CHECK([path to $1],lyx_cv_path_$ac_safe,
- [ cat > conftest.$ac_ext <<EOF
-#line __oline__ "configure"
-#include "confdefs.h"
-
-#include <$1>
-EOF
-lyx_cv_path_$ac_safe=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | \
- grep $1 2>/dev/null | \
- sed -e 's/.*\(".*$1"\).*/\1/' -e "1q"`
-rm -f conftest*])
- AC_DEFINE_UNQUOTED(${ac_tr_safe},${lyx_cv_path_$ac_safe})])
-])
-### end of LYX_PATH_HEADER
-
-### Check for stl_string_fwd.h existence and location if it exists
-AC_DEFUN(LYX_STL_STRING_FWD,
-[ AC_CHECK_HEADER(stl_string_fwd.h,[
- AC_CACHE_CHECK([path to stl_string_fwd.h],lyx_cv_path_stl_string_fwd_h,
- [ cat > conftest.$ac_ext <<EOF
-#line __oline__ "configure"
-#include "confdefs.h"
-
-#include <stl_string_fwd.h>
-EOF
-lyx_cv_path_stl_string_fwd_h=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | \
- grep 'stl_string_fwd.h' 2>/dev/null | \
- sed -e 's/.*\(".*stl_string_fwd.h"\).*/\1/' -e "1q"`
-rm -f conftest*])
- AC_DEFINE_UNQUOTED(STL_STRING_FWD_H_LOCATION,$lyx_cv_path_stl_string_fwd_h,
-[define this to the location of stl_string_fwd.h to be used with #include,
- NOTE: Do not set it to <stl_string_fwd.h> as that will find the LyX
- supplied version of the header.
- e.g. <../include/stl_string_fwd.h> or better yet use an absolute path])])
-])
-
-
# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
# the libltdl convenience library, adds --enable-ltdl-convenience to
# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
dnl This is just to silence aclocal about the macro not being used
ifelse([AC_DISABLE_FAST_INSTALL])dnl
-
# Macro to add for using GNU gettext.
# Ulrich Drepper <drepper@cygnus.com>, 1995.
#
else
AC_MSG_CHECKING(for catalogs to be installed)
NEW_LINGUAS=
-dnl ============== Fix is here! =======================
+dnl ============== Fix is here! ======================
dnl Some sh do not like substitution in bounds of for loops
-dnl for lang in ${LINGUAS=$ALL_LINGUAS}; do
+dnl for lang in ${LINGUAS=$ALL_LINGUAS}; do
tmplinguas=${LINGUAS=$ALL_LINGUAS}
for lang in ${tmplinguas}; do
+dnl ==== end of fix
case "$ALL_LINGUAS" in
*$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
esac
sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
< $srcdir/po/POTFILES.in > po/POTFILES
])
+# Check whether LC_MESSAGES is available in <locale.h>.
+# Ulrich Drepper <drepper@cygnus.com>, 1995.
+#
+# This file can be copied and used freely without restrictions. It can
+# be used in projects which are not available under the GNU Public License
+# but which still want to provide support for the GNU gettext functionality.
+# Please note that the actual code is *not* freely available.
+
+# serial 1
+
+AC_DEFUN(AM_LC_MESSAGES,
+ [if test $ac_cv_header_locale_h = yes; then
+ AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
+ [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
+ am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
+ if test $am_cv_val_LC_MESSAGES = yes; then
+ AC_DEFINE(HAVE_LC_MESSAGES)
+ fi
+ fi])
+# Search path for a program which passes the given test.
+# Ulrich Drepper <drepper@cygnus.com>, 1996.
+#
+# This file can be copied and used freely without restrictions. It can
+# be used in projects which are not available under the GNU Public License
+# but which still want to provide support for the GNU gettext functionality.
+# Please note that the actual code is *not* freely available.
+
+# serial 1
+
+dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
+dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
+AC_DEFUN(AM_PATH_PROG_WITH_TEST,
+[# Extract the first word of "$2", so it can be a program name with args.
+set dummy $2; ac_word=[$]2
+AC_MSG_CHECKING([for $ac_word])
+AC_CACHE_VAL(ac_cv_path_$1,
+[case "[$]$1" in
+ /*)
+ ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in ifelse([$5], , $PATH, [$5]); do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if [$3]; then
+ ac_cv_path_$1="$ac_dir/$ac_word"
+ break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+dnl If no 4th arg is given, leave the cache variable unset,
+dnl so AC_PATH_PROGS will keep looking.
+ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
+])dnl
+ ;;
+esac])dnl
+$1="$ac_cv_path_$1"
+if test -n "[$]$1"; then
+ AC_MSG_RESULT([$]$1)
+else
+ AC_MSG_RESULT(no)
+fi
+AC_SUBST($1)dnl
+])