Ticket #14406: prereq-1.2.diff

File prereq-1.2.diff, 3.9 KB (added by jdemeyer, 8 years ago)
  • configure.ac

    # HG changeset patch
    # User Jeroen Demeyer <jdemeyer@cage.ugent.be>
    # Date 1364995158 -7200
    # Node ID d3e07fa25f5999dc8ac176cf9cb8039847e739ba
    # Parent  43d0df44cc77129dfb0a0258f4cb247df1727539
    Trac #14406: remove sqrtl() and SAGE_FORTRAN/SAGE_FORTRAN_LIB checks
    
    diff --git a/configure.ac b/configure.ac
    a b  
    3838
    3939# Import environment variables.
    4040AC_ARG_VAR([SAGE_LOCAL],[Prefix to search for libraries and include files])
    41 AC_ARG_VAR([SAGE_FORTRAN_LIB],[The path to the fortran library])
    42 AC_ARG_VAR([SAGE_FORTRAN],[The path to the fortran compiler])
    4341AC_ARG_VAR([SAGE64],[If building 64-bit])
    4442
    4543CPPFLAGS="$CPPFLAGS -I$SAGE_LOCAL/include"
     
    5048# see http://www.gnu.org/software/hello/manual/autoconf/Fortran-Compiler.html
    5149if test x$SAGE_FORTRAN != 'x'
    5250then
    53    FC=$SAGE_FORTRAN
     51   FC="$SAGE_FORTRAN"
    5452fi
    5553
    5654#---------------------------------------------------------
     
    8886# As suggested in the autoconf manual, the characteristics of the compilers
    8987# are checked later.
    9088
    91 # Check if SAGE_FORTRAN_LIB is set. If so, make sure the file exists.
    92 if test x$SAGE_FORTRAN_LIB != x
    93 then
    94    AC_CHECK_FILE([$SAGE_FORTRAN_LIB],[],[AC_MSG_ERROR([Fortran library $SAGE_FORTRAN_LIB does not exist])])
    95 fi
    96 
    97 # Check if SAGE_FORTRAN_LIB is a 64-bit binary, if building in 64-bit mode on Solaris
    98 # and a 32-bit library if not building in 64-bit mode on Solaris.
    99 
    100 # 64-bit build. SAGE64 is set to yes.
    101 if test "x`uname`" = 'xSunOS' &&  test x$SAGE_FORTRAN_LIB != 'x' && test x$SAGE64 = 'xyes'
    102 then
    103    # if test "x`file $SAGE_FORTRAN_LIB | egrep 64-bit`" = 'x'
    104    if test "x`file $SAGE_FORTRAN_LIB | grep 64-bit | grep \"dynamic lib\" `" = 'x'
    105    then
    106      AC_MSG_NOTICE([The environment variable])
    107      AC_MSG_NOTICE([SAGE_FORTRAN_LIB=$SAGE_FORTRAN_LIB])
    108      AC_MSG_NOTICE([is a not a 64-bit dynamic library. SAGE64 was])
    109      AC_MSG_NOTICE([set to "yes", so you intend to build 64-bit.])
    110      AC_MSG_NOTICE([The environment variables SAGE_FORTRAN_LIB and/or SAGE64])
    111      AC_MSG_NOTICE([are not set properly.])
    112      AC_MSG_ERROR([Exiting, due to the incorrect configuration of environment variables])
    113    else
    114      AC_MSG_NOTICE([Good, the environment variable])
    115      AC_MSG_NOTICE([SAGE_FORTRAN_LIB=$SAGE_FORTRAN_LIB])
    116      AC_MSG_NOTICE([is a 64-bit dynamic library, as it should])
    117      AC_MSG_NOTICE([be as SAGE64 was set to "yes" ])
    118    fi
    119 fi
    120 
    121 
    122 # 32-bit build. SAGE64 is not set to "yes".
    123 if test "x`uname`" = 'xSunOS' &&  test x$SAGE_FORTRAN_LIB != 'x' && test x$SAGE64 != 'xyes'
    124 then
    125    if test "x`file $SAGE_FORTRAN_LIB | grep 32-bit | grep \"dynamic lib\" `" = 'x'
    126    then
    127      AC_MSG_NOTICE([The environment variable])
    128      AC_MSG_NOTICE([SAGE_FORTRAN_LIB=$SAGE_FORTRAN_LIB])
    129      AC_MSG_NOTICE([is a not a 32-bit dynamic library. SAGE64 was])
    130      AC_MSG_NOTICE([not set to "yes", so you intend to build 32-bit.])
    131      AC_MSG_NOTICE([The environment variables SAGE_FORTRAN_LIB and/or SAGE64])
    132      AC_MSG_NOTICE([are not set properly.])
    133      AC_MSG_ERROR([Exiting, due to the incorrect configuration of environment variables])
    134    else
    135      AC_MSG_NOTICE([Good, the environment variable])
    136      AC_MSG_NOTICE([SAGE_FORTRAN_LIB=$SAGE_FORTRAN_LIB])
    137      AC_MSG_NOTICE([is a 32-bit dynamic library, as it should])
    138      AC_MSG_NOTICE([be as SAGE64 was not set to "yes" ])
    139    fi
    140 fi
    141 
    14289
    14390# Check some programs needed actually exist.
    14491# ar, m4, ld and ranlib.
     
    458405                       AC_MSG_ERROR([Exiting, since a maths library was not found.])
    459406                       ])
    460407
    461 # Next check for something more obscure (sqrtl) that may not exist on all maths libraries
    462 # but which is needed to build Sage.
    463 AC_CHECK_LIB(m,sqrtl,[],[
    464     AC_MSG_NOTICE([You have an outdated and/or broken math library.])
    465     AC_MSG_ERROR([Exiting, since the library function 'sqrtl()' was not found.])
    466 ])
    467 
    468408# Next check for system services
    469409
    470410# Test for old versions of Solaris, and issue a warning if too old.