-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.base.shared
103 lines (81 loc) · 2.87 KB
/
configure.base.shared
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
###############################################
# base template for configure
###############################################
AC_PREREQ([2.50])
AC_INIT([radx], [1.0], [http://www.ral.ucar.edu/projects/titan/docs])
# Create the VERSION file, which contains the package version from
# AC_INIT.
echo -n AC_PACKAGE_VERSION>VERSION
AC_SUBST(PACKAGE_VERSION)
AC_MSG_NOTICE([netCDF AC_PACKAGE_VERSION])
# Keep libtool macros in an m4 directory.
AC_CONFIG_MACRO_DIR([m4])
# Find out about the host we're building on.
AC_CANONICAL_HOST
# We will output a config.h for the C library, and a fortran inc file,
# nfconfig.inc.
AC_CONFIG_HEADERS([config.h])
# initialize automake
AM_INIT_AUTOMAKE([-Wall foreign])
# Check for the existance of this file before proceeding.
AC_CONFIG_SRCDIR([libs/Radx/src/include/Radx/Radx.hh])
AC_MSG_NOTICE([checking user options])
# Does the user want a 32-bit build?
AC_ARG_ENABLE([build-32bit], [AS_HELP_STRING([--build-32bit],
[build in 32-bit mode])])
# Did the user specify a location for the HDF5 library?
AC_MSG_CHECKING([whether a location for the HDF5 library was specified])
AC_ARG_WITH([hdf5],
[AS_HELP_STRING([--with-hdf5=<directory>],
[Specify location of HDF5 library. Configure will \
expect to find subdirs include and lib.])],
[HDF5DIR=$with_hdf5])
AC_MSG_RESULT([$HDF5DIR])
AC_SUBST(HDF5DIR, [$HDF5DIR])
# Did the user specify a location for the NETCDF library?
AC_MSG_CHECKING([whether a location for the NETCDF library was specified])
AC_ARG_WITH([netcdf],
[AS_HELP_STRING([--with-netcdf=<directory>],
[Specify location of NETCDF library. Configure will \
expect to find subdirs include and lib.])],
[NETCDFDIR=$with_netcdf])
AC_MSG_RESULT([$NETCDFDIR])
AC_SUBST(NETCDFDIR, [$NETCDFDIR])
# Add the HDF5 directory to includes and link flags
if test ! "x$HDF5DIR" = x; then
LDFLAGS="${LDFLAGS} -L${HDF5DIR}/lib"
CPPFLAGS="${CPPFLAGS} -I${HDF5DIR}/include"
fi
# Add the NETCDF directory to includes and link flags
if test ! "x$NETCDFDIR" = x; then
LDFLAGS="${LDFLAGS} -L${NETCDFDIR}/lib"
CPPFLAGS="${CPPFLAGS} -I${NETCDFDIR}/include"
fi
# add lib dir relative to ORIGIN
# Note: @S|@ is a quadrigraph for $
# LDFLAGS="${LDFLAGS} -Wl,-rpath,'\@S|@\@S|@ORIGIN'/radx_runtime_libs"
# Set up libtool.
AM_PROG_AR
AC_MSG_NOTICE([setting up libtool])
LT_PREREQ([2.2])
LT_INIT
AC_PROG_LIBTOOL
AM_PROG_LIBTOOL
# Checks for programs.
AC_PROG_CC
AC_PROG_CXX
# Checks for libraries.
# Checks for header files.
AC_CHECK_HEADERS([sys/time.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_C_CONST
AC_C_INLINE
AC_TYPE_SIZE_T
AC_HEADER_TIME
AC_STRUCT_TM
# Checks for library functions.
AC_HEADER_STDC
AC_FUNC_STAT
AC_FUNC_UTIME_NULL
AC_CHECK_FUNCS([floor gettimeofday memset modf pow strerror])