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

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

iostream pour magique...

File size: 3.0 KB
Line 
1dnl Process this file with autoconf to produce a configure script.
2AC_INIT(kernel/toi.cc)
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
18if test `uname` = IRIX64 -a -z "$CXX"; then
19 if test -x /usr/bin/CC; then
20 echo "using CC on IRIX"
21 CXX=CC
22 export CXX
23 fi
24fi
25
26dnl on donne priorite a g++ sur c++ sur Linux
27if test `uname` = Linux -a -f /usr/bin/g++; then
28 CXX=/usr/bin/g++
29fi
30
31AC_PROG_CC
32AC_PROG_CXX
33if test -x /usr/bin/ar; then
34AC_PATH_PROG(AR, ar, /usr/bin/ar, /usr/bin:$PATH)
35else
36AC_CHECK_PROG(AR, ar)
37fi
38if test -x /usr/bin/ranlib; then
39AC_PATH_PROG(RANLIB, ranlib, /usr/bin/ranlib, /usr/bin:$PATH)
40else
41AC_PROG_RANLIB
42fi
43AC_PROG_INSTALL
44
45if test $GCC = "yes"; then
46 gcc=$CC
47else
48 gcc=gcc
49fi
50AC_SUBST(gcc)
51
52AC_CHECK_SIZEOF(short)
53AC_CHECK_SIZEOF(int)
54AC_CHECK_SIZEOF(long)
55AC_CHECK_SIZEOF(long long)
56AC_CHECK_SIZEOF(float)
57AC_CHECK_SIZEOF(double)
58AC_CHECK_SIZEOF(long double)
59
60dnl look for cfitsio include and cfitsio library
61dnl if installed in /usr/local, nothing to do
62
63AC_MSG_CHECKING("for cfitsio lib")
64MACHDIR=`uname`-$CXX
65if test -f $ARCHBASEREP/$MACHDIR/Libs/libcfitsio.a; then
66 cfitslibdir='-L$(ARCHBASEREP)/$(MACHDIR)/Libs'
67elif test -f $EXTLIBDIR/$MACHDIR/Libs/libcfitsio.a; then
68 cfitslibdir='-L$(EXTLIBDIR)/$(MACHDIR)/Libs'
69elif test -f $CFITSIOLIBDIR/$MACHDIR/Libs/libcfitsio.a; then
70 cfitslibdir='-L$(CFITSIOLIBDIR)/$(MACHDIR)/Libs'
71elif test -f $CFITSIOLIBDIR/$MACHDIR/libcfitsio.a; then
72 cfitslibdir='-L$(CFITSIOLIBDIR)/$(MACHDIR)'
73elif test -f $CFITSIOLIBDIR/`uname`/lib/libcfitsio.a; then
74 cfitslibdir='-L$(CFITSIOLIBDIR)/'`uname`/lib
75elif test -f $CFITSIOLIBDIR/`uname`/libcfitsio.a; then
76 cfitslibdir='-L$(CFITSIOLIBDIR)/'`uname`
77elif test -f $CFITSIOLIBDIR/libcfitsio.a; then
78 cfitslibdir='-L$(CFITSIOLIBDIR)'
79elif test -f $CFITSIODIR/libcfitsio.a; then
80 cfitslibdir='-L$(CFITSIODIR)'
81elif test -f /usr/local/lib/libcfitsio.a; then
82 cfitslibdir=""
83else
84 AC_MSG_ERROR("Cannot find cfitsio library")
85fi
86AC_MSG_RESULT($cfitslibdir)
87AC_SUBST(cfitslibdir)
88
89AC_MSG_CHECKING("for cfitsio includes")
90if test -f $CFITSIODIR/fitsio.h; then
91 cfitsincdir='-I$(CFITSIODIR)'
92elif test -f $EXTLIBDIR/Include/FitsIO/fitsio.h; then
93 cfitsincdir='-I$(EXTLIBDIR)/Include/FitsIO'
94elif test -f /usr/local/include/fitsio.h; then
95 cfitsincdir=""
96else
97 AC_MSG_ERROR("Cannot find cfitsio include fitsio.h")
98fi
99AC_MSG_RESULT($cfitsincdir)
100AC_SUBST(cfitsincdir)
101
102dnl Checks for libraries.
103dnl AC_CHECK_LIB(cfitsio, ffread,,AC_MSG_ERROR("Cannot find cfitsio library"))
104AC_CHECK_LIB(m, sin)
105AC_CHECK_LIB(pthread, pthread_create)
106AC_CHECK_LIB(blas, scopy_)
107AC_CHECK_LIB(g2c, s_copy)
108
109dnl Checks for header files.
110AC_HEADER_STDC
111AC_CHECK_HEADERS(values.h stdint.h)
112
113outfiles="Makefile kernel/Makefile processors/Makefile pipes/Makefile"
114if [[ $use_sophya = 1 ]]; then
115 outfiles="$outfiles sophya/Makefile"
116fi
117
118AC_OUTPUT($outfiles)
119
Note: See TracBrowser for help on using the repository browser.