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

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

nettoyage pour portabilite

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