source: ether_eccad/trunk/ECCAD_INSERT/configure.ac @ 85

Last change on this file since 85 was 73, checked in by cbipsl, 14 years ago

ok

  • Property svn:executable set to *
File size: 2.9 KB
Line 
1#                                               -*- Autoconf -*-
2# Process this file with autoconf to produce a configure script.
3
4# Init
5
6        AC_PREREQ(2.5)
7        AC_INIT([eccad_extractor],[1.0],[Renaud.Bodichon@ipsl.jussieu.fr])
8        AC_CONFIG_SRCDIR([src/main.cpp])
9        AM_INIT_AUTOMAKE
10        AC_SUBST(VERSION)
11        AC_CONFIG_HEADER([config.h])
12        AC_CONFIG_FILES([Makefile
13                             src/Makefile])
14                             
15        AC_ARG_WITH(blankline,
16                                AS_HELP_STRING([ ],
17                                           [ ]))
18       
19        CGIDIR=/var/www/cgi-bin
20        AC_ARG_WITH(cgidir,
21                                AS_HELP_STRING([--with-cgidir=PATH],
22                                           [Specifies the directory where the cgi scripts should be installed. Default: /var/www/cgi-bin]),
23                [CGIDIR=$with_cgidir])
24        AC_SUBST(CGIDIR)
25
26
27# Includes
28
29        m4_include(ac-macros/ac_cxx_namespaces.m4)
30        m4_include(ac-macros/ac_cxx_have_sstream.m4)
31        m4_include(ac-macros/ac_cxx_have_std.m4)
32        m4_include(ac-macros/ac_cxx_have_stl.m4)
33        m4_include(ac-macros/netcdf_header.m4)
34        m4_include(ac-macros/netcdf.m4)
35        m4_include(ac-macros/pgsql.m4)
36        m4_include(ac-macros/libxml2.m4)
37        m4_include(ac-macros/gdalGeos.m4)
38
39# Checks for programs.
40
41        AC_PROG_CXX
42        AC_PROG_CC
43        AC_PROG_INSTALL
44        AC_PROG_MAKE_SET
45        # AC_RUNPATH_SWITCH
46
47
48# Checks for libraries.
49
50    LDFLAGS="-L/usr/lib64 $LDFLAGS"
51   
52   
53        AC_CXX_HAVE_STD
54        AC_CXX_HAVE_SSTREAM
55        AC_CXX_HAVE_STL
56
57        AC_CHECK_NETCDF([
58                LIBS="$LIBS $NC_LIBS"
59                LDFLAGS="$LDFLAGS $NC_LDFLAGS"
60                CPPFLAGS="$CPPFLAGS $NC_CPPFLAGS"
61                ],[
62                echo "*** Use --with-netcdf for the root netcdf directory."
63                echo "*** Otherwise use --with-netcdf-include switch for includes directory"
64                echo "*** and --with-netcdf-libdir switch for libraries directory."
65                echo "*** To install, check http://www.unidata.ucar.edu/software/netcdf/"
66                AC_MSG_ERROR([netcdf library and netcdf headers are required.])
67                ])
68               
69       
70   
71        AC_LIB_PGSQL([
72                LIBS="$LIBS $WZD_PGSQL_LIBS"
73                CPPFLAGS="$CPPFLAGS $WZD_PGSQL_INCLUDES"
74                ],[
75                echo "*** Use --with-pgsql to define an alternate location of PostgreSQL headers and libs."
76                AC_MSG_ERROR([libpq is required.])
77                ])
78               
79     
80        AM_PATH_XML2([2.0.0],[
81                LIBS="$LIBS $XML_LIBS"
82                CPPFLAGS="$CPPFLAGS $XML_CPPFLAGS"
83                ],[
84                echo ""
85                echo "*** You can use the --with-xml2-config switch to specify the path to the xml2-config program."
86                AC_MSG_ERROR([libxml2 is required.])
87                ])
88 
89        AQ_CHECK_GDAL()
90        LDFLAGS="$LDFLAGS $GDAL_LDADD"
91    CPPFLAGS="$CPPFLAGS $GDAL_CFLAGS"
92   
93        AQ_CHECK_GEOS()
94        LDFLAGS="$LDFLAGS $GEOS_LDADD"
95    CPPFLAGS="$CPPFLAGS $GEOS_CFLAGS"
96 
97 
98    LIBS="$LIBS -L/home/eccad/eccad3.0.0/eccadlib/lib -leccad -lgd"
99    CPPFLAGS="$CPPFLAGS -I/home/eccad/eccad3.0.0/eccadlib/include/eccad"
100
101# Checks for typedefs, structures, and compiler characteristics.
102
103        AC_HEADER_STDBOOL
104        AC_C_CONST
105        AC_C_INLINE
106
107
108# Checks for library functions.
109
110        AC_CHECK_FUNCS([pow strdup])
111        AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.