Ticket #47882: patch-configure.diff

File patch-configure.diff, 3.9 KB (added by Schamschula (Marius Schamschula), 9 years ago)
  • configure

    old new  
    177177 exit
    178178fi
    179179
    180 # 11. CHECK TO SEE WHETHER THIS SYSTEM HAS GCC INSTALLED
     180# 11. CHECK TO SEE WHETHER THIS SYSTEM HAS GCC/CLANG INSTALLED
    181181
    182 echo $ECHO_N "Checking for gcc               ............. $ECHO_C"
    183 whichout=`which gcc 2> conf.stderr`
     182echo $ECHO_N "Checking for gcc/clang          ............. $ECHO_C"
     183whichout=`echo $CC 2> conf.stderr`
    184184rm -f conf.*
    185185if test "`echo $whichout | sed 's/\([a-z]*\).*/\1/'`" = "no" ; then whichout="" ; fi
    186186if test "$whichout" != "" ; then
    187187 echo "YES"
    188188else
    189  echo "NO" ; echo "ERROR: Required program gcc could not be found." >&2 ; exit
     189 echo "NO" ; echo "ERROR: Required program cc could not be found." >&2 ; exit
    190190fi
    191191
    192192# 12. CHECK TO SEE WHETHER THIS SYSTEM HAS GNU READLINE HEADERS
    193193
    194194echo $ECHO_N "Checking for libreadline-dev   ............. $ECHO_C"
    195 if printf '#include <stdio.h>\n#include <readline/readline.h>\nint main() { return 0; }\n' | gcc -x c - -o conf.out > conf.stdout 2> conf.stderr
     195if printf '#include <stdio.h>\n#include <readline/readline.h>\nint main() { return 0; }\n' | $CC -x c - -o conf.out > conf.stdout 2> conf.stderr
    196196then
    197197 rm -f conf.*
    198198 echo "YES"
     
    208208# 13. CHECK TO SEE WHETHER THIS SYSTEM HAS CFITSIO HEADERS
    209209
    210210echo $ECHO_N "Checking for libcfitsio-dev    ............. $ECHO_C"
    211 if printf '#include <fitsio.h>\nint main() { return 0; }\n' | gcc -x c - -o conf.out > conf.stdout 2> conf.stderr
     211if printf '#include <fitsio.h>\nint main() { return 0; }\n' | $CC -x c - -o conf.out > conf.stdout 2> conf.stderr
    212212then
    213213 rm -f conf.*
    214214 echo "YES"
     
    224224# 14. CHECK TO SEE WHETHER THIS SYSTEM HAS GSL HEADERS
    225225
    226226echo $ECHO_N "Checking for libgsl0-dev       ............. $ECHO_C"
    227 if printf '#include <gsl/gsl_version.h>\nint main() { return 0; }\n' | gcc `gsl-config --cflags` -x c - -o conf.out > conf.stdout 2> conf.stderr
     227if printf '#include <gsl/gsl_version.h>\nint main() { return 0; }\n' | $CC `gsl-config --cflags` -x c - -o conf.out > conf.stdout 2> conf.stderr
    228228then
    229229 rm -f conf.*
    230230 echo "YES"
     
    250250# 15. CHECK TO SEE WHETHER THIS SYSTEM HAS FFTW HEADERS
    251251
    252252echo $ECHO_N "Checking for libfftw3-dev      ............. $ECHO_C"
    253 if printf '#include <fftw3.h>\nint main() { return 0; }\n' | gcc -x c - -o conf.out > conf.stdout 2> conf.stderr
     253if printf '#include <fftw3.h>\nint main() { return 0; }\n' | $CC -x c - -o conf.out > conf.stdout 2> conf.stderr
    254254then
    255255 rm -f conf.*
    256256 echo "YES"
     
    260260 rm -f conf.*
    261261 echo "NO"
    262262 echo $ECHO_N "Checking for libfftw2-dev      ............. $ECHO_C"
    263  if printf '#include <fftw.h>\nint main() { return 0; }\n' | gcc -x c - -o conf.out > conf.stdout 2> conf.stderr
     263 if printf '#include <fftw.h>\nint main() { return 0; }\n' | $CC -x c - -o conf.out > conf.stdout 2> conf.stderr
    264264 then
    265265  rm -f conf.*
    266266  echo "YES"
     
    290290# 17. CHECK TO SEE WHETHER THIS SYSTEM HAS LIBPNG HEADERS
    291291
    292292echo $ECHO_N "Checking for libpng-dev        ............. $ECHO_C"
    293 if printf '#include <stdlib.h>\n#include <stdio.h>\n#include <png.h>\nint main() { return 0; }\n' | gcc -x c - -o conf.out > conf.stdout 2> conf.stderr
     293if printf '#include <stdlib.h>\n#include <stdio.h>\n#include <png.h>\nint main() { return 0; }\n' | $CC -x c - -o conf.out > conf.stdout 2> conf.stderr
    294294then
    295295 rm -f conf.*
    296296 echo "YES"
     
    304304# 18. CHECK TO SEE WHETHER THIS SYSTEM HAS KPATHSEA HEADERS
    305305
    306306echo $ECHO_N "Checking for libkpathsea-dev   ............. $ECHO_C"
    307 if printf '#include <stdlib.h>\n#include <stdio.h>\n#include <kpathsea/kpathsea.h>\nint main() { return 0; }\n' | gcc -x c - -o conf.out > conf.stdout 2> conf.stderr
     307if printf '#include <stdlib.h>\n#include <stdio.h>\n#include <kpathsea/kpathsea.h>\nint main() { return 0; }\n' | $CC -x c - -o conf.out > conf.stdout 2> conf.stderr
    308308then
    309309 rm -f conf.*
    310310 echo "YES"