-
Notifications
You must be signed in to change notification settings - Fork 1
/
configure.in
106 lines (92 loc) · 2.19 KB
/
configure.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
dnl Process this file with autoconf to produce a configure script.
AC_INIT(lats.c)
AC_REQUIRE([PC_OS])
dnl Checks for programs.
PC_PROG_CC
PC_PROG_FC
AC_PROG_RANLIB
AC_PROG_INSTALL
AC_SUBST(INSTALL)
AC_SUBST(INSTALL_PROGRAM)
if test -z "$INSTALL"
then
INSTALL=cp
INSTALL_PROGRAM=cp
else
INSTALL_PROGRAM="$INSTALL"
fi
dnl Checks for header files.
dnl
dnl get location of netCDF header from --with-ncinc=value
dnl
PC_DEFAULT(NCINC,/usr/local/include)
AC_ARG_WITH([ncinc],
[ --with-ncinc=DIR netcdf.h is in DIR (default [NCINC])],
[NCINC=$withval])dnl
echo "netcdf.h is in $NCINC (modify with --with-ncinc=DIR)"
AC_CHECK_HEADER($NCINC/netcdf.h, dnl
[PC_ENSURE(CFLAGS, -I$NCINC)], dnl
[NCINC=])
dnl
dnl get location of netCDF header from --with-ncincf=value
dnl
PC_DEFAULT(NCINCF,$NCINC)
AC_ARG_WITH([ncincf],
[ --with-ncincf=DIR netcdf.inc is in DIR (default [NCINCF])],
[NCINCF=$withval])dnl
echo "netcdf.inc is in $NCINCF (modify with --with-ncincf=DIR)"
dnl
dnl Can't use AC_CHECK_HEADER with FORTRAN include
dnl
AC_MSG_CHECKING(for netcdf.inc)
if test -r "$NCINCF/netcdf.inc"; then
PC_ENSURE(FFLAGS, -I$NCINCF)dnl
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
dnl Checks for libraries.
dnl
dnl set $(NCLIB) from --with-nclib=value
dnl
PC_DEFAULT(NCLIB,/usr/local/lib)
AC_ARG_WITH([nclib],
[ --with-nclib=DIR libnetcdf.a is in DIR (default [NCLIB])],
[NCLIB=$withval])dnl
echo "libnetcdf.a is in $NCLIB (modify with --with-nclib=DIR)"
PC_CHECK_LIB(NCOPTS, ncopen, $NCLIB, netcdf, HAVE_NETCDF, libnetcdf.a)
dnl Checks for typedefs, structures, and compiler characteristics.
dnl Checks for library functions.
dnl AC_FUNC_VPRINTF
dnl AC_CHECK_FUNCS(strtol)
dnl Set flags for CDMS compilation and linking
GRADS_CRAY=0
GRADS_BYTEORDER=1
GRADS_IEEE2CRAY_OBJECT=
case $OS in
aix)
;;
hpux*)
;;
osf*)
dnl
dnl Don't add -std to CFLAGS, since
dnl f77 chokes on it
dnl
GRADS_BYTEORDER=0
if test "$CC" = cc; then
CC="cc -std"
fi
;;
*ultrix)
GRADS_BYTEORDER=0
;;
unicos)
GRADS_CRAY=1
GRADS_IEEE2CRAY_OBJECT=ieee2cray.o
;;
esac
AC_SUBST(GRADS_BYTEORDER)dnl
AC_SUBST(GRADS_CRAY)dnl
AC_SUBST(GRADS_IEEE2CRAY_OBJECT)dnl
AC_OUTPUT(Makefile)