-dnl $Id: aclocal.m4,v 1.91 2002/01/07 20:24:23 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)
])
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
typedef $1 testing;
main() {
- FILE *f=fopen("conftestval2", "w");
+ FILE *f=fopen("conftestval", "w");
if (!f) exit(1);
if (((testing)((int)((testing)1.4))) == ((testing)1.4)) {
fprintf(f, "%s%d\n",
}
fclose(f);
exit(0);
-}], AC_CV_NAME=`cat conftestval2`,
-echo $AC_CV_NAME
+}], AC_CV_NAME=`cat conftestval`,
ifelse([$2], , AC_CV_NAME=NotReallyAType, AC_CV_NAME=$2),
ifelse([$3], , AC_CV_NAME=NotReallyATypeCross, AC_CV_NAME=$3))]) dnl
AC_MSG_RESULT($AC_CV_NAME)
</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