From 22db8e0d7d2c5f9d77ac5410f33158dcb5f83ee0 Mon Sep 17 00:00:00 2001 From: Laurent Bartholdi Date: Tue, 23 Feb 2016 22:55:06 +0100 Subject: [PATCH] Fixed detection of gap-system on configure --- cnf/aclocal.m4 | 4 +-- cnf/configure.ac | 6 +---- cnf/files.g.in | 6 ++--- cnf/m4/ac_find_gap.m4 | 63 +++++++++++++++---------------------------- configure | 36 +++---------------------- 5 files changed, 32 insertions(+), 83 deletions(-) diff --git a/cnf/aclocal.m4 b/cnf/aclocal.m4 index 6256f06..70c524e 100644 --- a/cnf/aclocal.m4 +++ b/cnf/aclocal.m4 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.14.1 -*- Autoconf -*- +# generated automatically by aclocal 1.15 -*- Autoconf -*- -# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Copyright (C) 1996-2014 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff --git a/cnf/configure.ac b/cnf/configure.ac index f20810a..55a467e 100644 --- a/cnf/configure.ac +++ b/cnf/configure.ac @@ -48,10 +48,6 @@ fi mkdir -p bin/$GAPARCH CONFIG_STATUS=bin/$GAPARCH/config.status -AC_CONFIG_FILES([$GAP_MAKEFILE:cnf/Makefile.in bin/$GAPARCH/files.g:cnf/files.g.in]) - -if test "$GAP_MAKEFILE" != Makefile; then - ln -sf "$GAP_MAKEFILE" Makefile -fi +AC_CONFIG_FILES([Makefile:cnf/Makefile.in bin/$GAPARCH/files.g:cnf/files.g.in]) AC_OUTPUT diff --git a/cnf/files.g.in b/cnf/files.g.in index 0f5797d..f61fc3f 100644 --- a/cnf/files.g.in +++ b/cnf/files.g.in @@ -1,3 +1,3 @@ -EXEC@FR.dot := "@DOT@"; -EXEC@FR.psviewer := "@PSVIEWER@"; -EXEC@FR.svgviewer := "@SVGVIEWER@"; +EXEC@fr.dot := "@DOT@"; +EXEC@fr.psviewer := "@PSVIEWER@"; +EXEC@fr.svgviewer := "@SVGVIEWER@"; diff --git a/cnf/m4/ac_find_gap.m4 b/cnf/m4/ac_find_gap.m4 index a2cc31a..9d73e26 100644 --- a/cnf/m4/ac_find_gap.m4 +++ b/cnf/m4/ac_find_gap.m4 @@ -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+.}: @@ -19,31 +19,27 @@ AC_DEFUN([AC_FIND_GAP], variable empty for GAP versions < 4.5.]) if test "x$CONFIGNAME" = "x"; then SYSINFO="sysinfo.gap" - GAP_MAKEFILE="Makefile" - GAP_EXEC="gap.sh" AC_MSG_RESULT([none]) else SYSINFO="sysinfo.gap-$CONFIGNAME" - GAP_MAKEFILE="Makefile-$CONFIGNAME" - GAP_EXEC="gap-$CONFIGNAME.sh" AC_MSG_RESULT([$CONFIGNAME]) 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="../.. /usr/local/src/gap /usr/local/gap4r5" - + DEFAULT_GAPROOTS="../.." + #Allow the user to specify the location of GAP # - AC_ARG_WITH(gaproot, + AC_ARG_WITH(gaproot, [AC_HELP_STRING([--with-gaproot=], [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` @@ -52,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" @@ -70,13 +66,13 @@ 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 @@ -84,11 +80,11 @@ AC_DEFUN([AC_FIND_GAP], GAPARCH=$GAParch fi - AC_ARG_WITH(gaparch, + AC_ARG_WITH(gaparch, [AC_HELP_STRING([--with-gaparch=], [override GAP architecture string])], [GAPARCH=$withval]) AC_MSG_RESULT([${GAPARCH}]) - + if test "x$GAPARCH" = "xUnknown" -o ! -d $GAPROOT/bin/$GAPARCH ; then echo "" echo "********************************************************************" @@ -102,17 +98,11 @@ AC_DEFUN([AC_FIND_GAP], echo " GAP installation." echo "********************************************************************" echo "" - - AC_MSG_ERROR([Unable to find plausible GAParch information.]) - fi - GAPARCH_SYSTEM_GUESS="`$ac_aux_dir/config.guess`-$CC-`echo $GAPARCH | sed 's/.*-//'`" - if test "$GAPARCH_SYSTEM_GUESS" != "$GAParch_system"; then - echo "********************************************************************" - AC_WARN([The guessed target $GAPARCH_SYSTEM_GUESS is not the gap target $GAParch_system. Cross your fingers]) - echo "********************************************************************" + AC_MSG_ERROR([Unable to find plausible GAParch information.]) fi + ##################################### # Now check for the GAP header files @@ -145,7 +135,7 @@ AC_DEFUN([AC_FIND_GAP], echo " in particular the files" echo " /sysinfo.gap" echo " /src/" - echo " and /bin//bin/config.h." + echo " and /bin//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=" @@ -153,30 +143,21 @@ AC_DEFUN([AC_FIND_GAP], echo "" AC_MSG_ERROR([Unable to find GAP include files in /src subdirectory]) fi - + ARCHPATH=$GAPROOT/bin/$GAPARCH GAP_CPPFLAGS="-I$GAPROOT -I$ARCHPATH" AC_MSG_CHECKING([for GAP's gmp.h location]) if test -r "$ARCHPATH/extern/gmp/include/gmp.h"; then GAP_CPPFLAGS="$GAP_CPPFLAGS -I$ARCHPATH/extern/gmp/include" - GMP_ROOT="$ARCHPATH/extern/gmp" AC_MSG_RESULT([$ARCHPATH/extern/gmp/include/gmp.h]) - elif `grep -q 'define USE_GMP 1' $ARCHPATH/config.h`; then - eval `grep '^GMP_CFLAGS=' $GAPROOT/$GAP_MAKEFILE` - GAP_CPPFLAGS="$GAP_CPPFLAGS $GMP_CFLAGS" - GMP_ROOT=`echo "$GMP_CFLAGS" | cut -c3- | sed 's,/include$,,'` - AC_MSG_RESULT([$GMP_ROOT/include/gmp.h]) else - AC_MSG_RESULT([not found, GAP was compiled without GMP]) - fi + AC_MSG_RESULT([not found, GAP was compiled without its own GMP]) + fi; - GAP_EXEC="$GAPROOT/bin/$GAP_EXEC" AC_SUBST(GAPARCH) AC_SUBST(GAPROOT) AC_SUBST(GAP_CPPFLAGS) - AC_SUBST(GAP_EXEC) - AC_SUBST(GMP_ROOT) AC_LANG_POP([C]) ]) diff --git a/configure b/configure index fa431b0..2f68e5a 100755 --- a/configure +++ b/configure @@ -588,8 +588,6 @@ LIBOBJS SVGVIEWER PSVIEWER DOT -GMP_ROOT -GAP_EXEC GAP_CPPFLAGS GAPROOT GAPARCH @@ -1716,11 +1714,9 @@ ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. -#AC_CONFIG_MACRO_DIR([cnf/m4]) # Locates GAP -#AC_PROG_CC ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -1740,14 +1736,10 @@ $as_echo_n "checking for CONFIGNAME... " >&6; } if test "x$CONFIGNAME" = "x"; then SYSINFO="sysinfo.gap" - GAP_MAKEFILE="Makefile" - GAP_EXEC="gap.sh" { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } else SYSINFO="sysinfo.gap-$CONFIGNAME" - GAP_MAKEFILE="Makefile-$CONFIGNAME" - GAP_EXEC="gap-$CONFIGNAME.sh" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONFIGNAME" >&5 $as_echo "$CONFIGNAME" >&6; } fi @@ -1757,7 +1749,7 @@ $as_echo "$CONFIGNAME" >&6; } # checking for the sysinfo.gap file { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GAP root directory" >&5 $as_echo_n "checking for GAP root directory... " >&6; } - DEFAULT_GAPROOTS="../.. /usr/local/src/gap /usr/local/gap4r5" + DEFAULT_GAPROOTS="../.." #Allow the user to specify the location of GAP # @@ -1840,13 +1832,6 @@ $as_echo "${GAPARCH}" >&6; } as_fn_error $? "Unable to find plausible GAParch information." "$LINENO" 5 fi - GAPARCH_SYSTEM_GUESS="`$ac_aux_dir/config.guess`-$CC-`echo $GAPARCH | sed 's/.*-//'`" - if test "$GAPARCH_SYSTEM_GUESS" != "$GAParch_system"; then - echo "********************************************************************" - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The guessed target $GAPARCH_SYSTEM_GUESS is not the gap target $GAParch_system. Cross your fingers" >&5 -$as_echo "$as_me: WARNING: The guessed target $GAPARCH_SYSTEM_GUESS is not the gap target $GAParch_system. Cross your fingers" >&2;} - echo "********************************************************************" - fi ##################################### # Now check for the GAP header files @@ -1902,22 +1887,12 @@ $as_echo "Not found" >&6; } $as_echo_n "checking for GAP's gmp.h location... " >&6; } if test -r "$ARCHPATH/extern/gmp/include/gmp.h"; then GAP_CPPFLAGS="$GAP_CPPFLAGS -I$ARCHPATH/extern/gmp/include" - GMP_ROOT="$ARCHPATH/extern/gmp" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARCHPATH/extern/gmp/include/gmp.h" >&5 $as_echo "$ARCHPATH/extern/gmp/include/gmp.h" >&6; } - elif `grep -q 'define USE_GMP 1' $ARCHPATH/config.h`; then - eval `grep '^GMP_CFLAGS=' $GAPROOT/$GAP_MAKEFILE` - GAP_CPPFLAGS="$GAP_CPPFLAGS $GMP_CFLAGS" - GMP_ROOT=`echo "$GMP_CFLAGS" | cut -c3- | sed 's,/include$,,'` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMP_ROOT/include/gmp.h" >&5 -$as_echo "$GMP_ROOT/include/gmp.h" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, GAP was compiled without GMP" >&5 -$as_echo "not found, GAP was compiled without GMP" >&6; } - fi - - GAP_EXEC="$GAPROOT/bin/$GAP_EXEC" - + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, GAP was compiled without its own GMP" >&5 +$as_echo "not found, GAP was compiled without its own GMP" >&6; } + fi; @@ -1931,9 +1906,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu -#AC_SYS_IS_CYGWIN -#AC_SYS_IS_DARWIN - ################################################################ # external programs configuration