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

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

prefer standard ar to any other

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