~ubuntu-branches/ubuntu/quantal/qgis/quantal

« back to all changes in this revision

Viewing changes to configure.in

  • Committer: Bazaar Package Importer
  • Author(s): Steve Halasz
  • Date: 2005-11-05 16:04:45 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20051105160445-l0g4isz5bc9yehet
Tags: 0.7.4-1
* New upstream release
* Build GRASS support in qgis-plugin-grass package (Closes: #248649)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
 
2
1
dnl Process this file with autoconf to produce a configure script.
3
2
dnl configure.in,v 1.204 2004/10/21 17:27:35 mcoletti Exp
4
3
 
24
23
dnl version number
25
24
dnl ---------------------------------------------------------------------------
26
25
MAJOR_VERSION=0
27
 
MINOR_VERSION=6
28
 
MICRO_VERSION=0
 
26
MINOR_VERSION=7
 
27
MICRO_VERSION=4
29
28
EXTRA_VERSION=0
30
29
if test $EXTRA_VERSION -eq 0; then
31
30
    VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}
32
31
else
33
 
   VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}rc${EXTRA_VERSION}
 
32
   VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}pre${EXTRA_VERSION}
34
33
fi
35
34
 
36
35
dnl ---------------------------------------------------------------------------
73
72
 
74
73
 
75
74
dnl ---------------------------------------------------------------------------
 
75
dnl check lib64 environment
 
76
dnl ---------------------------------------------------------------------------
 
77
AQ_CHECK_LIB64
 
78
 
 
79
 
 
80
dnl ---------------------------------------------------------------------------
76
81
dnl Qt check
77
82
dnl ---------------------------------------------------------------------------
78
83
AQ_CHECK_QT
79
84
 
 
85
dnl ---------------------------------------------------------------------------
 
86
dnl Qt/Mac check (install everything into application bundle)
 
87
dnl ---------------------------------------------------------------------------
 
88
if test x$QTDIR != x -a -f "$QTDIR/config.tests/mac/tst_mac_version"; then
 
89
  have_qtmac=yes
 
90
  bundle_suffix=$PACKAGE.app/Contents/MacOS
 
91
  if test `expr "$prefix" : ".*$bundle_suffix$"` -eq 0; then
 
92
    prefix="$prefix/$bundle_suffix"
 
93
  fi
 
94
fi
 
95
AM_CONDITIONAL([HAVE_QTMAC], [test "$have_qtmac" = "yes"])
80
96
 
81
97
dnl ---------------------------------------------------------------------------
82
98
dnl GDAL/OGR
92
108
fi
93
109
 
94
110
dnl ---------------------------------------------------------------------------
 
111
dnl PROJ
 
112
dnl ---------------------------------------------------------------------------
 
113
 
 
114
AC_ARG_WITH(projdir,
 
115
    AC_HELP_STRING([--with-projdir=DIR],
 
116
      [ Proj4 installation directory, e.g. '--with-projdir=/usr/local']),
 
117
    [
 
118
    AC_MSG_CHECKING([for Proj4 library in $with_projdir])
 
119
      if test -d "$with_projdir/lib"; then
 
120
          LDFLAGS="$LDFLAGS -L$with_projdir/lib"
 
121
    CPPFLAGS="$CPPFLAGS -I$with_projdir/include"
 
122
    AC_MSG_RESULT(["$with_projdir exists"])
 
123
    AC_CHECK_HEADERS(proj_api.h,
 
124
      [PROJ_INC="-I$with_projdir/include"], 
 
125
      [
 
126
      AC_MSG_ERROR([*** Proj4 headers not found.])
 
127
      ])
 
128
    AC_CHECK_LIB(proj,pj_is_latlong, 
 
129
      [
 
130
      have_proj_lib=yes
 
131
      PROJ_LIB="-L$with_projdir/lib -lproj"
 
132
      ],
 
133
      [
 
134
      AC_MSG_ERROR([*** Proj4 library not found.])
 
135
      ])
 
136
    else
 
137
      AC_MSG_ERROR([*** directory $with_projdir does not exist.])
 
138
  fi
 
139
    ],  
 
140
    [
 
141
    AC_CHECK_HEADERS(proj_api.h,[PROJ_INC=""],
 
142
      [
 
143
      AC_MSG_ERROR([*** Proj4 headers not found.])
 
144
      ])
 
145
    ]  
 
146
    AC_CHECK_LIB(proj,pj_is_latlong,
 
147
  [
 
148
  have_proj_lib=yes
 
149
  PROJ_LIB="-lproj"
 
150
  ],
 
151
  [
 
152
  AC_MSG_ERROR([Proj4 is required and was not found.])
 
153
  ])
 
154
  
 
155
    
 
156
    )
 
157
 
 
158
AC_SUBST(PROJ_INC)
 
159
AC_SUBST(PROJ_LIB)
 
160
 
 
161
dnl ---------------------------------------------------------------------------
 
162
dnl SQLITE
 
163
dnl ---------------------------------------------------------------------------
 
164
 
 
165
AC_ARG_WITH(sqlite3dir,
 
166
    AC_HELP_STRING([--with-sqlite3dir=DIR],
 
167
        [ sqlite3 installation directory, e.g. '--with-sqlite3=/usr/local']),
 
168
    [
 
169
    AC_MSG_CHECKING([for Sqlite3 library in $with_sqlite3dir])
 
170
        if test -d "$with_sqlite3dir/lib"; then
 
171
          LDFLAGS="$LDFLAGS -L$with_sqlite3dir/lib"
 
172
          CPPFLAGS="$CPPFLAGS -I$with_sqlite3dir/include"
 
173
          AC_MSG_RESULT(["$with_sqlite3dir exists"])
 
174
          AC_CHECK_HEADERS(sqlite3.h,
 
175
                [SQLITE3_INC="-I$with_sqlite3dir/include"],
 
176
                [
 
177
                AC_MSG_ERROR([*** Sqlite3 headers not found.])
 
178
                ])
 
179
          AC_CHECK_LIB(sqlite3,sqlite3_open,
 
180
                [
 
181
                have_sqlite3_lib=yes
 
182
                SQLITE3_LIB="-L$with_sqlite3dir/lib -lsqlite3"
 
183
                ],
 
184
                [
 
185
                AC_MSG_ERROR([*** Sqlite3 library not found.])
 
186
                ])
 
187
                else
 
188
                AC_MSG_ERROR([*** directory $with_sqlite3dir does not exist.])
 
189
        fi
 
190
    ],
 
191
    [   
 
192
    AC_CHECK_HEADERS(sqlite3.h,[SQLITE3_INC=""],
 
193
        [
 
194
        AC_MSG_ERROR([*** Sqlite3 headers not found.])
 
195
        ])
 
196
    AC_CHECK_LIB(sqlite3,sqlite3_open,
 
197
        [
 
198
        have_sqlite3_lib=yes
 
199
        SQLITE3_LIB="-lsqlite3"
 
200
        ],
 
201
        [
 
202
        AC_MSG_ERROR([*** Sqlite3 library not found.])
 
203
        ])
 
204
 
 
205
    
 
206
    ]
 
207
    )
 
208
 
 
209
AC_SUBST(SQLITE3_INC)
 
210
AC_SUBST(SQLITE3_LIB)
 
211
 
 
212
 
 
213
 
 
214
dnl ---------------------------------------------------------------------------
95
215
dnl PostgreSQL
96
216
dnl ---------------------------------------------------------------------------
97
217
AC_ARG_WITH(postgresql,
112
232
 
113
233
if test x"$PG_CONFIG" != "xno" ; then
114
234
  PG_LIB="-L`$PG_CONFIG --libdir` -lpq"
115
 
  PG_INC="`$PG_CONFIG --includedir`"
 
235
  PG_INC="-I`$PG_CONFIG --includedir`"
116
236
  AC_MSG_CHECKING([for postgreSQL libs])
117
237
  AC_MSG_RESULT([$PG_LIB])
118
238
  AC_DEFINE([HAVE_POSTGRESQL],1,
176
296
if test -n "$with_grass" -a x"$with_grass" != "xno"; then
177
297
    # I don't know how to add library path to AC_CHECK_LIB()
178
298
    if test ! -f "$GISLIB"; then
179
 
      GISLIB=`ls $with_grass/lib/libgrass_gis.dylib 2> /dev/null`
180
 
    fi
181
 
    if test ! -f "$GISLIB"; then
182
 
      GISLIB=`ls $with_grass/lib/libgrass_gis.so 2> /dev/null`
183
 
    fi
184
 
    if test ! -f "$GISLIB"; then
185
 
      GISLIB=`ls $with_grass/lib/libgrass_gis.a 2> /dev/null`
 
299
      GISLIB=`ls $with_grass/${_lib}/libgrass_gis.dylib 2> /dev/null`
 
300
    fi
 
301
    if test ! -f "$GISLIB"; then
 
302
      GISLIB=`ls $with_grass/${_lib}/libgrass_gis.so 2> /dev/null`
 
303
    fi
 
304
    if test ! -f "$GISLIB"; then
 
305
      GISLIB=`ls $with_grass/${_lib}/libgrass_gis.a 2> /dev/null`
186
306
    fi
187
307
 
188
308
    if test ! -f "$GISLIB"; then
189
 
        AC_MSG_ERROR( [GRASS library not found] )
 
309
  AC_MSG_ERROR( [GRASS library not found in $with_grass/${_lib}] )
190
310
    fi
191
 
    GRASS_LIB="-L$with_grass/lib/ -lgrass_vect -lgrass_dig2 -lgrass_dbmiclient -lgrass_dbmibase -lgrass_shape -lgrass_dgl -lgrass_rtree -lgrass_gis -lgrass_datetime -lgrass_linkm -lgrass_form"
 
311
    GRASS_LIB="-L$with_grass/${_lib} -lgrass_vect -lgrass_dig2 -lgrass_dbmiclient -lgrass_dbmibase -lgrass_shape -lgrass_dgl -lgrass_rtree -lgrass_gis -lgrass_datetime -lgrass_linkm -lgrass_form -lgrass_gproj"
192
312
 
193
313
    GISINC=`ls $with_grass/include/gis.h`
194
314
    if test ! -f "$GISINC"; then
195
 
        AC_MSG_ERROR( [GRASS headers not found] )
 
315
  AC_MSG_ERROR( [GRASS headers not found] )
196
316
    fi
197
317
 
 
318
    GRASS_BASE="$with_grass"
198
319
    GRASS_INC="$with_grass/include/"
199
320
    HAVE_GRASS=1
200
321
    AC_MSG_RESULT([yes])
204
325
    ac_grass="no"
205
326
fi
206
327
 
 
328
AC_SUBST(GRASS_BASE)
207
329
AC_SUBST(HAVE_GRASS)
208
330
AC_SUBST(GRASS_LIB)
209
331
AC_SUBST(GRASS_INC)
210
332
AM_CONDITIONAL([HAVE_GRASS], [test "$ac_grass" = "yes"])
211
333
 
212
334
 
 
335
dnl ---------------------------------------------------------------------------
 
336
dnl GPX and GPS plugins
 
337
dnl ---------------------------------------------------------------------------
 
338
AC_ARG_ENABLE(gpx,
 
339
  AC_HELP_STRING([--disable-gpx],
 
340
                 [Disable the GPX provider and the GPS plugin (built by default if libexpat is found)]),
 
341
                 [ac_gpx=$enableval], [ac_gpx=yes])
 
342
AC_MSG_CHECKING([GPX provider and GPS plugin should be installed (default: yes)])
 
343
AC_MSG_RESULT([$ac_gpx])
 
344
have_expat_lib=no
 
345
if [ test $ac_gpx = yes ] ; then
 
346
  AC_CHECK_LIB(expat, XML_ParserCreate, have_expat_lib=yes)
 
347
fi
 
348
AM_CONDITIONAL([HAVE_EXPAT], [test "$have_expat_lib" = "yes"])
 
349
 
 
350
dnl ---------------------------------------------------------------------------
 
351
dnl Community registration plugin
 
352
dnl ---------------------------------------------------------------------------
 
353
AC_ARG_ENABLE(community,
 
354
  AC_HELP_STRING([--enable-community],
 
355
                 [Enable the community registration plugin (broken!)]),
 
356
                 [ac_com=yes], [ac_com=no])
 
357
AC_MSG_CHECKING([community registration plugin should be installed (broken)])
 
358
AC_MSG_RESULT([$ac_com])
 
359
AM_CONDITIONAL([WITH_COMMUNITY], [test "$ac_com" = "yes"])
 
360
 
 
361
 
 
362
dnl ---------------------------------------------------------------------------
 
363
dnl Georeferencing plugin
 
364
dnl ---------------------------------------------------------------------------
 
365
AC_ARG_ENABLE(georef,
 
366
  AC_HELP_STRING([--disable-georef],
 
367
                 [Disable the georeferencing plugin (built by default if libgsl is found)]),
 
368
                 [ac_georef=$enableval], [ac_georef=yes])
 
369
ac_gsl=no
 
370
AC_MSG_CHECKING([if the georeferencer plugin should be built])
 
371
AC_MSG_RESULT($ac_georef)
 
372
if [ test $ac_georef = yes ] ; then
 
373
  AM_PATH_GSL(1.5.9, [ac_gsl=yes], [ac_gsl=no])
 
374
fi
 
375
AM_CONDITIONAL([HAVE_GSL], [test "$ac_gsl" = "yes"])
 
376
 
213
377
 
214
378
dnl ---------------------------------------------------------------------------
215
379
dnl Debugging
251
415
  src/images/splash/Makefile
252
416
  src/images/icons/Makefile
253
417
  src/images/developers/Makefile
 
418
  src/resources/Makefile
254
419
  src/themes/Makefile
255
420
  src/themes/default/Makefile
 
421
  src/themes/nkids/Makefile
 
422
  src/mac/Makefile
 
423
  src/mac/Contents/Makefile
 
424
  src/mac/Contents/Resources/Makefile
256
425
  providers/Makefile 
257
426
  providers/ogr/Makefile
258
427
  providers/postgres/Makefile
260
429
  providers/grass/Makefile
261
430
  providers/gpx/Makefile
262
431
  plugins/Makefile
263
 
  plugins/spit/Makefile
 
432
  plugins/community_reg_plugin/Makefile
 
433
  plugins/copyright_label/Makefile
 
434
  plugins/delimited_text/Makefile
264
435
  plugins/example/Makefile
265
 
  plugins/maplayer/Makefile
266
436
  plugins/geoprocessing/Makefile
 
437
  plugins/georeferencer/Makefile
267
438
  plugins/gps_importer/Makefile
268
439
  plugins/grid_maker/Makefile
269
440
  plugins/grass/Makefile
 
441
  plugins/grass/config/Makefile
 
442
  plugins/grass/modules/Makefile
 
443
  plugins/grass/themes/Makefile
 
444
  plugins/grass/themes/default/Makefile
 
445
  plugins/maplayer/Makefile
 
446
  plugins/north_arrow/Makefile
 
447
  plugins/scale_bar/Makefile
 
448
  plugins/spit/Makefile
270
449
  doc/Makefile
271
450
  doc/install_guide/Makefile
272
451
  doc/images/Makefile
274
453
  doc/plugins/geoprocessing/Makefile
275
454
  doc/plugins/geoprocessing/buffer/Makefile
276
455
  doc/plugins/delimited_text/Makefile
277
 
  qgis.spec
278
 
  plugins/delimited_text/Makefile
279
456
  tools/Makefile
280
457
  tools/qgis_config/Makefile
 
458
  widgets/Makefile
 
459
  widgets/projectionselector/Makefile
 
460
  designer_plugins/Makefile
281
461
  i18n/Makefile
282
 
        plugins/north_arrow/Makefile
283
 
        plugins/copyright_label/Makefile
284
 
        plugins/scale_bar/Makefile
 
462
  helpviewer/Makefile
 
463
  qgis.spec
285
464
])
286
465
 
287
466
AC_OUTPUT
296
475
echo "PostgreSQL    : $ac_postgresql $postgresql_version_string"
297
476
echo "GRASS         : $ac_grass"
298
477
echo "SPIT          : $ac_spit"
 
478
echo "Georeferencer : $ac_gsl"
 
479
echo "GPS/GPX       : $have_expat_lib"
 
480
echo "PROJ4         : $have_proj_lib"
 
481
echo "SQLITE3       : $have_sqlite3_lib"
299
482
echo ""
300
483
echo "Debug         : $ac_debug"
301
484
echo "Plugin dir    : ${libdir}/$PACKAGE"
302
485
echo ""
303
 
echo "The binary will be installed in $prefix/bin"
 
486
if test "$have_qtmac" = "yes"; then
 
487
  echo "The binary will be installed in $prefix"
 
488
else
 
489
  echo "The binary will be installed in $prefix/bin"
 
490
fi
 
491
echo ""
 
492
echo "The build is using Qt in $QTDIR"
 
493
echo "Linking with $QT_LIBS"
304
494
echo "------------------------------------------"
305
495
echo "Configure finished, type 'make' to build."