-dnl $Id: aclocal.m4,v 1.85 2001/10/13 20:26:13 sof Exp $
+dnl $Id: aclocal.m4,v 1.95 2002/02/13 19:42:38 sof Exp $
dnl
dnl Extra autoconf macros for the Glasgow fptools
dnl
re_search_2 (&patbuf, "", 0, "",0, 0,0,0,0); ],
fptools_cv_have_regex=yes, fptools_cv_have_regex=no)])
if test "$fptools_cv_have_regex" = yes; then
- HaveRegex=YES
+ HaveGNURegex=YES
else
- HaveRegex=NO
+ HaveGNURegex=NO
fi
-AC_SUBST(HaveRegex)
+AC_SUBST(HaveGNURegex)
])
if test -d $srcdir/happy; then
SrcTreeHappyCmd=$hardtop/happy/src/happy-inplace
fi
-AC_PATH_PROG(HappyCmd,happy,$SrcTreeHappyCmd)
+if test x"$UseSrcTreeHappy" = xYES; then
+ HappyCmd=$SrcTreeHappyCmd
+else
+ AC_PATH_PROG(HappyCmd,happy,$SrcTreeHappyCmd)
+fi
AC_CACHE_CHECK([for version of happy], fptools_cv_happy_version,
changequote(, )dnl
[if test x"$HappyCmd" = x"$SrcTreeHappyCmd"; then
fi
HappyVersion=$fptools_cv_happy_version;
AC_SUBST(HappyVersion)
+
+# 1.9 and later is required, assume that we can use
+# the "-agc" options.
+HappyOpts="-agc"
+
+FPTOOLS_PROG_CHECK_VERSION([$fptools_cv_happy_version],-gt,[1.11],
+ [HappyOpts=-agcs])
+
+AC_SUBST(HappyOpts)
])
dnl
])
dnl
+dnl Check whether ld supports -x
+dnl
+AC_DEFUN(FPTOOLS_LD_X,
+[AC_CACHE_CHECK([whether ld understands -x], fptools_cv_ld_x,
+[
+echo 'foo() {}' > conftest.c
+${CC-cc} -c conftest.c
+if ${LdCmd} -r -x -o foo.o conftest.o; then
+ fptools_cv_ld_x=yes
+else
+ fptools_cv_ld_x=no
+fi
+rm -rf conftest.c conftest.o foo.o
+])
+if test "$fptools_cv_ld_x" = yes; then
+ LdXFlag=-x
+else
+ LdXFlag=
+fi
+AC_SUBST(LdXFlag)
+])
+
+dnl
dnl Finding the Right Yacc
dnl
AC_DEFUN(FPTOOLS_PROG_YACCY,
dnl -input (take list of files from external file) flags.
dnl
AC_DEFUN(FPTOOLS_PROG_AR_AND_RANLIB,
-[AC_PATH_PROG(ArCmd,ar)
-if test -z "$ArCmd"; then
+[AC_PATH_PROG(ArCmdRaw,ar)
+if test -z "$ArCmdRaw"; then
echo "You don't seem to have ar in your PATH...I have no idea how to make a library"
exit 1;
fi
-if $ArCmd clqsZ conftest.a >/dev/null 2>/dev/null; then
- ArCmd="$ArCmd clqsZ"
+if $ArCmdRaw clqsZ conftest.a >/dev/null 2>/dev/null; then
+ ArCmdArgs="clqsZ"
NeedRanLib=''
-elif $ArCmd clqs conftest.a >/dev/null 2>/dev/null; then
- ArCmd="$ArCmd clqs"
+elif $ArCmdRaw clqs conftest.a >/dev/null 2>/dev/null; then
+ ArCmdArgs="clqs"
NeedRanLib=''
-elif $ArCmd cqs conftest.a >/dev/null 2>/dev/null; then
- ArCmd="$ArCmd cqs"
+elif $ArCmdRaw cqs conftest.a >/dev/null 2>/dev/null; then
+ ArCmdArgs="cqs"
NeedRanLib=''
-elif $ArCmd clq conftest.a >/dev/null 2>/dev/null; then
- ArCmd="$ArCmd clq"
+elif $ArCmdRaw clq conftest.a >/dev/null 2>/dev/null; then
+ ArCmdArgs="clq"
NeedRanLib='YES'
-elif $ArCmd cq conftest.a >/dev/null 2>/dev/null; then
- ArCmd="$ArCmd cq"
+elif $ArCmdRaw cq conftest.a >/dev/null 2>/dev/null; then
+ ArCmdArgs="cq"
NeedRanLib='YES'
-elif $ArCmd cq conftest.a 2>&1 | grep 'no archive members specified' >/dev/null 2>/dev/null; then
- ArCmd="$ArCmd cq"
+elif $ArCmdRaw cq conftest.a 2>&1 | grep 'no archive members specified' >/dev/null 2>/dev/null; then
+ ArCmdArgs="cq"
NeedRanLib='YES'
else
echo "I can't figure out how to use your $ArCmd"
exit 1
fi
rm -rf conftest*
+case $HostPlatform in
+ *mingw32)
+ ArCmd="`cygpath -w ${ArCmdRaw} | sed -e 's@\\\\@/@g' ` ${ArCmdArgs}"
+ ;;
+ *) ArCmd="${ArCmdRaw} ${ArCmdArgs}"
+ ;;
+esac
test -n "$ArCmd" && test -n "$verbose" && echo " setting ArCmd to $ArCmd"
AC_SUBST(ArCmd)
if $ArCmd conftest.a -input /dev/null >/dev/null 2>/dev/null; then
AC_CACHE_VAL(AC_CV_NAME,
[AC_TRY_RUN([#include <stdio.h>
#include <stddef.h>
+
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#ifdef HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
#ifdef HAVE_SIGNAL_H
-#include <signal.h>
+# include <signal.h>
#endif
+
#ifdef HAVE_TIME_H
-#include <time.h>
+# include <time.h>
+#endif
+
+#ifdef HAVE_TERMIOS_H
+# include <termios.h>
#endif
+
+#ifdef HAVE_STRING_H
+# include <string.h>
+#endif
+
+#ifdef HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
#ifdef HAVE_GL_GL_H
-#include <GL/gl.h>
+# include <GL/gl.h>
#endif
typedef $1 testing;
</Article>
EOF
fptools_cv_sgml_catalog=no
-for fptools_catalog in $4; do
- ac_try="$2 -t rtf -d $3#print -c $fptools_catalog conftest.sgml"
- if AC_TRY_EVAL(ac_try); then
- fptools_cv_sgml_catalog=[$]fptools_catalog
- break
- fi
-done
+if test -z "$SGML_CATALOG_FILES" ; then
+ for fptools_catalog in $4; do
+ ac_try="$2 -t rtf -d $3#print -c $fptools_catalog conftest.sgml"
+ if AC_TRY_EVAL(ac_try); then
+ fptools_cv_sgml_catalog=[$]fptools_catalog
+ break
+ fi
+ done
+else
+# If the env var SGML_CATALOG_FILES is defined, assume things are cool.
+ fptools_cv_sgml_catalog="yes"
+fi
])
rm -rf conftest*
if test $fptools_cv_sgml_catalog != "no"; then
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
LIBM=
case "$host" in
-*-*-beos* | *-*-macosx*)
+*-*-beos*)
# These system don't have libm
;;
*-ncr-sysv4.3*)