-
Notifications
You must be signed in to change notification settings - Fork 3
/
configure.ac
41 lines (27 loc) · 1.09 KB
/
configure.ac
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
AC_INIT(pssac2, v3.0.gmt5, savage@uri.edu, pssac2)
AM_MAINTAINER_MODE
AC_CANONICAL_SYSTEM
# Check for LDFLAGS Variable and set default to ""
AS_IF( [ test x"${LDFLAGS}" = x ], [ LDFLAGS="" ] )
AS_IF( [ test x"${CFLAGS}" = x ], [ CFLAGS="" ] )
AC_CONFIG_SRCDIR([./pss.c])
AM_INIT_AUTOMAKE
AC_ARG_WITH(gmt, [AS_HELP_STRING([--with-gmt=path],[Specify path to GMT])],
[
[ LDFLAGS+=" -L${withval}/lib "]
[ CFLAGS+=" -I${withval}/include " ]
], [])
AC_ARG_WITH(netcdf, [AS_HELP_STRING([--with-netcdf=path],
[Specify path to NetCDF])],
[
[ LDFLAGS+=" -L${withval}/lib " ]
[ CFLAGS+=" -I${withval}/include " ]
], [])
AC_PROG_CC
AC_SEARCH_LIBS(sin, m)
#AC_SEARCH_LIBS(nc_create, netcdf, [], [AC_MSG_ERROR([NetCDF library not found])])
AC_CHECK_PROG([GMTCONFIG], [gmt-config], [gmt-config])
test -z "$GMTCONFIG" && AC_MSG_ERROR([Missing GMT5 nstallation.])
AM_PROG_CC_C_O
AC_CONFIG_HEADERS([config.h])
AC_OUTPUT([Makefile t/Makefile])