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

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

install target

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