source: Sophya/trunk/ArchTOIPipe/configure.in@ 1730

Last change on this file since 1730 was 1730, checked in by aubourg, 24 years ago

pour config linux CDF

File size: 2.6 KB
RevLine 
[1365]1dnl Process this file with autoconf to produce a configure script.
[1477]2AC_INIT(kernel/toi.cc)
[1365]3AC_CONFIG_HEADER(conf.h)
4
5AC_ARG_WITH(sophya, [ --with-sophya Compile and link with SOPHYA],
6 use_sophya=1, use_sophya=0)
7
8AC_SUBST(use_sophya)
9
10if test `uname` = OSF1 -a -z "$CXX"; then
11 if test -x /usr/bin/cxx; then
12 echo "using cxx on alpha"
13 CXX=cxx
14 export CXX
15 fi
16fi
17
[1477]18AC_PROG_CC
[1365]19AC_PROG_CXX
[1706]20AC_PATH_PROG(AR, ar, /usr/bin/ar, /usr/bin:$PATH)
[1707]21AC_PATH_PROG(RANLIB, ranlib, /usr/bin/ranlib, /usr/bin:$PATH)
[1365]22
[1692]23if test $GCC = "yes"; then
24 gcc=$CC
25else
26 gcc=gcc
27fi
28AC_SUBST(gcc)
29
[1365]30AC_CHECK_SIZEOF(short)
31AC_CHECK_SIZEOF(int)
32AC_CHECK_SIZEOF(long)
[1663]33AC_CHECK_SIZEOF(long long)
[1365]34AC_CHECK_SIZEOF(float)
35AC_CHECK_SIZEOF(double)
36AC_CHECK_SIZEOF(long double)
37
38dnl look for cfitsio include and cfitsio library
39dnl if installed in /usr/local, nothing to do
40
41AC_MSG_CHECKING("for cfitsio lib")
42MACHDIR=`uname`-$CXX
43if test -f $ARCHBASEREP/$MACHDIR/Libs/libcfitsio.a; then
44 cfitslibdir='-L$(ARCHBASEREP)/$(MACHDIR)/Libs'
[1730]45elif test -f $EXTLIBDIR/$MACHDIR/Libs/libcfitsio.a; then
46 cfitslibdir='-L$(EXTLIBDIR)/$(MACHDIR)/Libs'
[1365]47elif test -f $CFITSIOLIBDIR/$MACHDIR/Libs/libcfitsio.a; then
48 cfitslibdir='-L$(CFITSIOLIBDIR)/$(MACHDIR)/Libs'
49elif test -f $CFITSIOLIBDIR/$MACHDIR/libcfitsio.a; then
50 cfitslibdir='-L$(CFITSIOLIBDIR)/$(MACHDIR)'
51elif test -f $CFITSIOLIBDIR/`uname`/lib/libcfitsio.a; then
52 cfitslibdir='-L$(CFITSIOLIBDIR)/'`uname`/lib
53elif test -f $CFITSIOLIBDIR/`uname`/libcfitsio.a; then
54 cfitslibdir='-L$(CFITSIOLIBDIR)/'`uname`
55elif test -f $CFITSIOLIBDIR/libcfitsio.a; then
56 cfitslibdir='-L$(CFITSIOLIBDIR)'
57elif test -f $CFITSIODIR/libcfitsio.a; then
58 cfitslibdir='-L$(CFITSIODIR)'
59elif test -f /usr/local/lib/libcfitsio.a; then
60 cfitslibdir=""
61else
62 AC_MSG_ERROR("Cannot find cfitsio library")
63fi
64AC_MSG_RESULT($cfitslibdir)
65AC_SUBST(cfitslibdir)
66
67AC_MSG_CHECKING("for cfitsio includes")
68if test -f $CFITSIODIR/fitsio.h; then
69 cfitsincdir='-I$(CFITSIODIR)'
[1730]70elif test -f $EXTLIBDIR/Include/FitsIO/fitsio.h; then
71 cfitsincdir='-I$(EXTLIBDIR)/Include/FitsIO/fitsio.h'
[1365]72elif test -f /usr/local/include/fitsio.h; then
73 cfitsincdir=""
74else
75 AC_MSG_ERROR("Cannot find cfitsio include fitsio.h")
76fi
77AC_MSG_RESULT($cfitsincdir)
78AC_SUBST(cfitsincdir)
79
80dnl Checks for libraries.
81dnl AC_CHECK_LIB(cfitsio, ffread,,AC_MSG_ERROR("Cannot find cfitsio library"))
82AC_CHECK_LIB(m, sin)
83
84dnl Checks for header files.
85AC_HEADER_STDC
[1663]86AC_CHECK_HEADERS(values.h stdint.h)
[1365]87
[1477]88outfiles="Makefile kernel/Makefile processors/Makefile pipes/Makefile"
89if [[ $use_sophya = 1 ]]; then
90 outfiles="$outfiles sophya/Makefile"
91fi
92
93AC_OUTPUT($outfiles)
94
Note: See TracBrowser for help on using the repository browser.