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

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

changements pour nouvelle structure

File size: 3.3 KB
RevLine 
[1365]1dnl Process this file with autoconf to produce a configure script.
[1957]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
[1751]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
[1732]26dnl on donne priorite a g++ sur c++ sur Linux
27if test `uname` = Linux -a -f /usr/bin/g++; then
[1803]28 CXX=g++
[1732]29fi
30
[1477]31AC_PROG_CC
[1365]32AC_PROG_CXX
[1788]33if test `uname` = "Darwin"; then
34 AR=libtool
35 ARFLAGS="-static -o"
36 RANLIB=":"
37 AC_SUBST(AR)
38 AC_SUBST(ARFLAGS)
39 AC_SUBST(RANLIB)
[1755]40else
[1788]41 ARFLAGS="-cr"
42 AC_SUBST(ARFLAGS)
43 if test -x /usr/bin/ar; then
44 AC_PATH_PROG(AR, ar, /usr/bin/ar, /usr/bin:$PATH)
45 else
46 AC_CHECK_PROG(AR, ar)
47 fi
48 if test -x /usr/bin/ranlib; then
49 AC_PATH_PROG(RANLIB, ranlib, /usr/bin/ranlib, /usr/bin:$PATH)
50 else
51 AC_PROG_RANLIB
52 fi
[1755]53fi
[1788]54
[1745]55AC_PROG_INSTALL
[1365]56
[1692]57if test $GCC = "yes"; then
58 gcc=$CC
59else
60 gcc=gcc
61fi
62AC_SUBST(gcc)
63
[1365]64AC_CHECK_SIZEOF(short)
65AC_CHECK_SIZEOF(int)
66AC_CHECK_SIZEOF(long)
[1663]67AC_CHECK_SIZEOF(long long)
[1365]68AC_CHECK_SIZEOF(float)
69AC_CHECK_SIZEOF(double)
70AC_CHECK_SIZEOF(long double)
71
72dnl look for cfitsio include and cfitsio library
73dnl if installed in /usr/local, nothing to do
74
75AC_MSG_CHECKING("for cfitsio lib")
76MACHDIR=`uname`-$CXX
77if test -f $ARCHBASEREP/$MACHDIR/Libs/libcfitsio.a; then
78 cfitslibdir='-L$(ARCHBASEREP)/$(MACHDIR)/Libs'
[1730]79elif test -f $EXTLIBDIR/$MACHDIR/Libs/libcfitsio.a; then
80 cfitslibdir='-L$(EXTLIBDIR)/$(MACHDIR)/Libs'
[1365]81elif test -f $CFITSIOLIBDIR/$MACHDIR/Libs/libcfitsio.a; then
82 cfitslibdir='-L$(CFITSIOLIBDIR)/$(MACHDIR)/Libs'
83elif test -f $CFITSIOLIBDIR/$MACHDIR/libcfitsio.a; then
84 cfitslibdir='-L$(CFITSIOLIBDIR)/$(MACHDIR)'
85elif test -f $CFITSIOLIBDIR/`uname`/lib/libcfitsio.a; then
86 cfitslibdir='-L$(CFITSIOLIBDIR)/'`uname`/lib
87elif test -f $CFITSIOLIBDIR/`uname`/libcfitsio.a; then
88 cfitslibdir='-L$(CFITSIOLIBDIR)/'`uname`
89elif test -f $CFITSIOLIBDIR/libcfitsio.a; then
90 cfitslibdir='-L$(CFITSIOLIBDIR)'
91elif test -f $CFITSIODIR/libcfitsio.a; then
92 cfitslibdir='-L$(CFITSIODIR)'
93elif test -f /usr/local/lib/libcfitsio.a; then
94 cfitslibdir=""
95else
96 AC_MSG_ERROR("Cannot find cfitsio library")
97fi
98AC_MSG_RESULT($cfitslibdir)
99AC_SUBST(cfitslibdir)
100
101AC_MSG_CHECKING("for cfitsio includes")
102if test -f $CFITSIODIR/fitsio.h; then
103 cfitsincdir='-I$(CFITSIODIR)'
[1730]104elif test -f $EXTLIBDIR/Include/FitsIO/fitsio.h; then
[1738]105 cfitsincdir='-I$(EXTLIBDIR)/Include/FitsIO'
[1365]106elif test -f /usr/local/include/fitsio.h; then
107 cfitsincdir=""
108else
109 AC_MSG_ERROR("Cannot find cfitsio include fitsio.h")
110fi
111AC_MSG_RESULT($cfitsincdir)
112AC_SUBST(cfitsincdir)
113
114dnl Checks for libraries.
115dnl AC_CHECK_LIB(cfitsio, ffread,,AC_MSG_ERROR("Cannot find cfitsio library"))
116AC_CHECK_LIB(m, sin)
[1732]117AC_CHECK_LIB(pthread, pthread_create)
118AC_CHECK_LIB(blas, scopy_)
119AC_CHECK_LIB(g2c, s_copy)
[1365]120
121dnl Checks for header files.
122AC_HEADER_STDC
[1663]123AC_CHECK_HEADERS(values.h stdint.h)
[1365]124
[1957]125outfiles="Makefile Kernel/Makefile Processors/Makefile TestPipes/Makefile Makefile.h"
[1477]126if [[ $use_sophya = 1 ]]; then
[1957]127 outfiles="$outfiles ProcWSophya/Makefile"
[1477]128fi
129
130AC_OUTPUT($outfiles)
131
Note: See TracBrowser for help on using the repository browser.