Skip to content

Commit

Permalink
Tweak and cleanup AC_FIND_GAP macro
Browse files Browse the repository at this point in the history
The only user visible change is that now instead of
  "GAP was compiled without GMP"
we print the less ambiguous message
  "GAP was compiled without its own GMP"
  • Loading branch information
fingolfin committed Nov 8, 2014
1 parent 8864c58 commit 76f4740
Showing 1 changed file with 23 additions and 23 deletions.
46 changes: 23 additions & 23 deletions m4/ac_find_gap.m4
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Find the location of GAP
# Sets GAPROOT, GAPARCH and GAP_CPPFLAGS appropriately
# Can be configured using --with-gaproot=... and --with-configname=...
# Can be configured using --with-gaproot=... and CONFIGNAME=...
#######################################################################

AC_DEFUN([AC_FIND_GAP],
[
AC_LANG_PUSH([C])
# Make sure CDPATH is portably set to a sensible value
CDPATH=${ZSH_VERSION+.}:
Expand All @@ -26,20 +26,20 @@ AC_DEFUN([AC_FIND_GAP],
fi
######################################
# Find the GAP root directory by
# checking for the sysinfo.gap file
# Find the GAP root directory by
# checking for the sysinfo.gap file
AC_MSG_CHECKING([for GAP root directory])
DEFAULT_GAPROOTS="../.."
#Allow the user to specify the location of GAP
#
AC_ARG_WITH(gaproot,
AC_ARG_WITH(gaproot,
[AC_HELP_STRING([--with-gaproot=<path>], [specify root of GAP installation])],
[DEFAULT_GAPROOTS="$withval"])
havesysinfo=0
# Otherwise try likely directories
for GAPROOT in ${DEFAULT_GAPROOTS}
for GAPROOT in ${DEFAULT_GAPROOTS}
do
# Convert the path to absolute
GAPROOT=`cd $GAPROOT > /dev/null 2>&1 && pwd`
Expand All @@ -48,12 +48,12 @@ AC_DEFUN([AC_FIND_GAP],
break
fi
done
if test "x$havesysinfo" = "x1"; then
AC_MSG_RESULT([${GAPROOT}])
else
AC_MSG_RESULT([Not found])
echo ""
echo "********************************************************************"
echo " ERROR"
Expand All @@ -66,25 +66,25 @@ AC_DEFUN([AC_FIND_GAP],
echo " src/ and bin/."
echo "********************************************************************"
echo ""
AC_MSG_ERROR([Unable to find GAP root directory])
fi
#####################################
# Now find the architecture
AC_MSG_CHECKING([for GAP architecture])
GAPARCH="Unknown"
. $GAPROOT/$SYSINFO
if test "x$GAParch" != "x"; then
GAPARCH=$GAParch
fi
AC_ARG_WITH(gaparch,
AC_ARG_WITH(gaparch,
[AC_HELP_STRING([--with-gaparch=<path>], [override GAP architecture string])],
[GAPARCH=$withval])
AC_MSG_RESULT([${GAPARCH}])
if test "x$GAPARCH" = "xUnknown" -o ! -d $GAPROOT/bin/$GAPARCH ; then
echo ""
echo "********************************************************************"
Expand All @@ -98,11 +98,11 @@ AC_DEFUN([AC_FIND_GAP],
echo " GAP installation."
echo "********************************************************************"
echo ""
AC_MSG_ERROR([Unable to find plausible GAParch information.])
fi
fi
#####################################
# Now check for the GAP header files
Expand Down Expand Up @@ -135,15 +135,15 @@ AC_DEFUN([AC_FIND_GAP],
echo " in particular the files"
echo " <gaproot>/sysinfo.gap"
echo " <gaproot>/src/<includes>"
echo " and <gaproot>/bin/<architecture>/bin/config.h."
echo " and <gaproot>/bin/<architecture>/bin/config.h."
echo " Please make sure that your GAP root directory structure"
echo " conforms to this layout, or give the correct GAP root using"
echo " --with-gaproot=<path>"
echo "********************************************************************"
echo ""
AC_MSG_ERROR([Unable to find GAP include files in /src subdirectory])
fi
ARCHPATH=$GAPROOT/bin/$GAPARCH
GAP_CPPFLAGS="-I$GAPROOT -I$ARCHPATH"
Expand All @@ -152,9 +152,9 @@ AC_DEFUN([AC_FIND_GAP],
GAP_CPPFLAGS="$GAP_CPPFLAGS -I$ARCHPATH/extern/gmp/include"
AC_MSG_RESULT([$ARCHPATH/extern/gmp/include/gmp.h])
else
AC_MSG_RESULT([not found, GAP was compiled without GMP])
AC_MSG_RESULT([not found, GAP was compiled without its own GMP])
fi;
AC_SUBST(GAPARCH)
AC_SUBST(GAPROOT)
AC_SUBST(GAP_CPPFLAGS)
Expand Down

0 comments on commit 76f4740

Please sign in to comment.