Changeset 726f4d in git


Ignore:
Timestamp:
Jun 9, 1998, 11:59:30 AM (26 years ago)
Author:
Jens Schmidt <schmidt@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
d370e9aa7dc8770d5d61477811ef73dc9add5b3f
Parents:
f306b384282fadc2da8035dbab764dc244672bc4
Message:
	* configure.in (ac_save_path): renamed to `$save_path'.  All
	  references changed
	  (expl_datadir, expl_gftabledir): renamed to `$explicit_datadir',
	  `$explicit_gftabledir', resp.  All references changed.

	* configure.in: checks for gmp.h and libgmp.a search in
	  `$includedir' and `$libdir', resp.

	* configure.in: new section added to get a safer explicit path
	  expansion

	* configure.in: `$gftabledir' is not longer handled in a special
	  way for Singular


git-svn-id: file:///usr/local/Singular/svn/trunk@2101 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • factory/configure.in

    rf306b3 r726f4d  
    11dnl # emacs edit mode for this file is -*- sh -*-
    2 dnl # $Id: configure.in,v 1.20 1998-06-03 12:04:33 obachman Exp $
     2dnl # $Id: configure.in,v 1.21 1998-06-09 09:59:30 schmidt Exp $
    33
    44dnl #
     
    1313# - initialisation.
    1414#
    15 AC_REVISION($Id: configure.in,v 1.20 1998-06-03 12:04:33 obachman Exp $)
     15AC_REVISION($Id: configure.in,v 1.21 1998-06-09 09:59:30 schmidt Exp $)
    1616AC_INIT(canonicalform.cc)
    1717AC_CONFIG_HEADER(config.h)
     
    9191  enable_debugoutput=no)
    9292
    93 # an ugly tribute to Singular
     93# an tribute to Singular
    9494AC_ARG_ENABLE(
    9595  gmp,
     
    160160unset ac_cv_path_FACTORY_MKINSTALLDIRS
    161161unset ac_cv_path_FACTORY_MAKEHEADER
    162 ac_save_path="$PATH"
     162save_path="$PATH"
    163163PATH="$PATH:$srcdir/bin"
    164164AC_PATH_PROG(FACTORY_MKINSTALLDIRS, mkinstalldirs, -mkdir)
    165 PATH="$srcdir/bin:$ac_save_path"
     165PATH="$srcdir/bin:$save_path"
    166166AC_PATH_PROG(FACTORY_MAKEHEADER, makeheader)
    167 PATH="$ac_save_path"
     167PATH="$save_path"
     168
     169#
     170# - expand paths.
     171#
     172
     173# Attention!  We use file descriptor 9 for our purposes!
     174# This may fail with future version of `autoconf'.
     175AC_MSG_CHECKING(and generating explicit install paths)
     176save_prefix="$prefix"
     177save_exec_prefix="$exec_prefix"
     178test "x$prefix" = xNONE && prefix=$ac_default_prefix
     179test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
     180for dir in prefix exec_prefix bindir sbindir libexecdir \
     181           datadir sysconfdir sharedstatedir localstatedir libdir \
     182           includedir oldincludedir infodir mandir; do
     183  eval "dir_value=\$$dir"
     184  echo "$dir=$dir_value" >> ./conftest.mk
     185  echo "explicit_$dir:" >> ./conftest.mk
     186  echo "        echo \$($dir) >&9" >> ./conftest.mk
     187done
     188prefix="$save_prefix"
     189exec_prefix="$save_exec_prefix"
     190
     191explicit_datadir=`make 9>&1 >&5 2>&1 -f ./conftest.mk explicit_datadir`
     192explicit_libdir=`make 9>&1 >&5 2>&1 -f ./conftest.mk explicit_libdir`
     193explicit_includedir=`make 9>&1 >&5 2>&1 -f ./conftest.mk explicit_includedir`
     194
     195rm -f ./conftest.mk
     196AC_MSG_RESULT(done)
     197
     198# make paths absolut
     199if echo "$explicit_datadir" | grep -v '^/' > /dev/null 2> /dev/null; then
     200  explicit_datadir="`pwd`/$explicit_datadir"
     201fi
     202if echo "$explicit_libdir" | grep -v '^/' > /dev/null 2> /dev/null; then
     203  explicit_libdir="`pwd`/$explicit_libdir"
     204fi
     205if echo "$explicit_includedir" | grep -v '^/' > /dev/null 2> /dev/null; then
     206  explicit_includedir="`pwd`/$explicit_includedir"
     207fi
    168208
    169209#
     
    174214if test "x$gmp_in_installation" != xyes; then
    175215  AC_CHECK_LIB(gmp, mpz_init, ,
    176     [ AC_MSG_ERROR(libgmp.a not found.  Use option --with-gmp to specify path) ])
     216    [
     217      # check a second time in `$(libdir)'.  This is a bit tricky,
     218      # but I think its worth avoiding long option values.
     219      unset ac_cv_lib_gmp_mpz_init
     220      LDFLAGS="-L$explicit_libdir $LDFLAGS"
     221      AC_CHECK_LIB(gmp, mpz_init, ,
     222        [ AC_MSG_ERROR(libgmp.a not found.  Use option --with-gmp to specify path) ])
     223      unset ac_cv_lib_gmp_mpz_init
     224    ])
    177225fi
    178226
     
    184232if test "x$gmp_in_installation" != xyes; then
    185233  AC_CHECK_HEADERS(gmp.h, ,
    186     [ AC_MSG_ERROR(gmp.h not found.  Use option --with-gmp to specify path) ])
     234    [
     235      # check a second time in `$(includedir)'.  This is a bit tricky,
     236      # but I think it's worth avoiding long option values.
     237      unset ac_cv_header_gmp_h
     238      CPPFLAGS="-I$explicit_includedir $CPPFLAGS"
     239      AC_CHECK_HEADERS(gmp.h, ,
     240        [ AC_MSG_ERROR(gmp.h not found.  Use option --with-gmp to specify path) ])
     241      unset ac_cv_header_gmp_h
     242    ])
    187243fi
    188244
     
    250306#
    251307
    252 # we have to get datadir explicitely for config.h
    253 save_prefix="$prefix"
    254 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
    255 expl_datadir=`eval echo "$datadir"`
    256 prefix="$save_prefix"
    257 # get absolute path of expl_datadir
    258 if echo "$expl_datadir" | grep -v '^/' > /dev/null 2> /dev/null; then
    259   expl_datadir="`pwd`/$expl_datadir"
    260 fi
    261 
    262 if test "x$with_Singular" = xyes; then
    263   gftabledir='${datadir}/Singular/gftables'
    264   expl_gftabledir="$expl_datadir/Singular/gftables"
    265   templatedir='${includedir}/templates'
    266 else
    267   gftabledir='${datadir}/factory/gftables'
    268   expl_gftabledir="$expl_datadir/factory/gftables"
    269   templatedir='${includedir}/templates'
    270 fi
     308# note that Singular has its own mechanism to search the tables,
     309# hence we do not need to mind it here
     310gftabledir='${datadir}/factory/gftables'
     311explicit_gftabledir="$explicit_datadir/factory/gftables"
     312
     313# for installation of the templates
     314templatedir='${includedir}/templates'
    271315
    272316#
     
    405449AC_DEFINE_UNQUOTED(FACTORYVERSION, "$factory_version")
    406450AC_DEFINE_UNQUOTED(FACTORYCONFIGURATION, "$factory_configuration")
    407 AC_DEFINE_UNQUOTED(GFTABLEDIR, "$expl_gftabledir")
     451AC_DEFINE_UNQUOTED(GFTABLEDIR, "$explicit_gftabledir")
    408452
    409453AC_OUTPUT(GNUmakefile ftest/GNUmakefile)
Note: See TracChangeset for help on using the changeset viewer.