241
257
AC_SUBST(HAVE_HIDE_INTERNAL_SYMBOLS,$HAVE_HIDE_INTERNAL_SYMBOLS)
243
259
dnl ---------------------------------------------------------------------------
260
dnl Check if user requests renaming internal libtiff symbols
261
dnl ---------------------------------------------------------------------------
263
AC_ARG_WITH(rename_internal_libtiff_symbols,[ --with-rename-internal-libtiff-symbols[=ARG] Prefix internal libtiff symbols with gdal_ (ARG=yes/no)],,)
264
if test "$with_rename_internal_libtiff_symbols" = ""; then
265
with_rename_internal_libtiff_symbols=no
267
AC_SUBST(RENAME_INTERNAL_LIBTIFF_SYMBOLS,$with_rename_internal_libtiff_symbols)
269
dnl ---------------------------------------------------------------------------
270
dnl Check if user requests renaming internal libgeotiff symbols
271
dnl ---------------------------------------------------------------------------
273
AC_ARG_WITH(rename_internal_libgeotiff_symbols,[ --with-rename-internal-libgeotiff-symbols[=ARG] Prefix internal libgeotiff symbols with gdal_ (ARG=yes/no)],,)
274
if test "$with_rename_internal_libgeotiff_symbols" = ""; then
275
with_rename_internal_libgeotiff_symbols=no
277
AC_SUBST(RENAME_INTERNAL_LIBGEOTIFF_SYMBOLS,$with_rename_internal_libgeotiff_symbols)
280
dnl ---------------------------------------------------------------------------
244
281
dnl Check if user requests /usr/local to be included.
245
282
dnl ---------------------------------------------------------------------------
379
416
AC_SUBST(LIBZ_SETTING,$LIBZ_SETTING)
381
418
dnl ---------------------------------------------------------------------------
419
dnl Check for iconv/libiconv.
420
dnl A rationale for this macro is described in "GNU `gettext' utilities"
422
dnl http://www.gnu.org/software/gettext/manual/html_node/AM_005fICONV.html
423
dnl ---------------------------------------------------------------------------
426
dnl Extra test needed for GCC 4.5 on Solaris 11, where there is
427
dnl a different behaviour if the tests are compiled with gcc or g++.
428
dnl So we introduce a ICONV_CPP_CONST that must be used instead of
429
dnl ICONV_CONST when used from .cpp files.
430
if test "$am_func_iconv" = "yes"; then
432
echo '#include <iconv.h>' > testiconv.cpp
433
echo 'int main(int argc, char** argv) { iconv_t cd; return iconv (cd, (const char **) 0, 0, 0, 0); } ' >> testiconv.cpp
434
if test -z "`${CXX} testiconv.cpp -c 2>&1`" ; then
435
AC_MSG_RESULT([using ICONV_CPP_CONST="const"])
436
ICONV_CPP_CONST="const"
438
AC_MSG_RESULT([using ICONV_CPP_CONST=""])
443
AC_DEFINE_UNQUOTED(ICONV_CPP_CONST,$ICONV_CPP_CONST, [For.cpp files, define as const if the declaration of iconv() needs const.])
447
dnl ---------------------------------------------------------------------------
448
dnl Check if liblzma is available.
449
dnl ---------------------------------------------------------------------------
451
AC_ARG_WITH(liblzma,[ --with-liblzma[=ARG] Include liblzma support (ARG=yes/no)],,)
453
if test "$with_liblzma" = "yes" ; then
454
AC_CHECK_LIB(lzma,lzma_code,LIBLZMA_SETTING=yes,LIBLZMA_SETTING=no,)
456
if test "$LIBLZMA_SETTING" = "yes" ; then
463
AC_SUBST(LIBLZMA_SETTING,$LIBLZMA_SETTING)
465
dnl ---------------------------------------------------------------------------
382
466
dnl Select an PostgreSQL Library to use, or disable driver.
383
467
dnl ---------------------------------------------------------------------------
611
696
dnl ---------------------------------------------------------------------------
612
dnl Check if netcdf library is available.
613
dnl ---------------------------------------------------------------------------
615
AC_ARG_WITH([netcdf],[ --with-netcdf[=ARG] Include netCDF support (ARG=no or netCDF tree prefix)],,)
617
if test "$with_netcdf" = "no" ; then
621
echo "netCDF support disabled."
623
elif test "$with_netcdf" = "yes" -o "$with_netcdf" = "" ; then
625
AC_CHECK_LIB([netcdf], [nc_open], [NETCDF_SETTING=yes], [NETCDF_SETTING=no],)
627
if test "$NETCDF_SETTING" = "yes" ; then
628
LIBS="-lnetcdf $LIBS"
629
echo "using pre-installed libnetcdf."
631
echo "libnetcdf not found - netCDF support disabled"
634
dnl Fedora has netcdf headers in /usr/include/netcdf
635
if test "$NETCDF_SETTING" = "yes" -a -d /usr/include/netcdf ; then
636
EXTRA_INCLUDES="-I/usr/include/netcdf $EXTRA_INCLUDES"
637
dnl RHEL 5 has netcdf headers in /usr/include/netcdf-3
638
elif test "$NETCDF_SETTING" = "yes" -a -d /usr/include/netcdf-3 ; then
639
EXTRA_INCLUDES="-I/usr/include/netcdf-3 $EXTRA_INCLUDES"
644
LIBS="-L$with_netcdf -L$with_netcdf/lib -lnetcdf $LIBS"
645
EXTRA_INCLUDES="-I$with_netcdf -I$with_netcdf/include $EXTRA_INCLUDES"
647
echo "using libnetcdf from $with_netcdf."
650
AC_SUBST([NETCDF_SETTING], [$NETCDF_SETTING])
652
if test "$NETCDF_SETTING" != "no" ; then
653
OPT_GDAL_FORMATS="netcdf $OPT_GDAL_FORMATS"
656
dnl ---------------------------------------------------------------------------
657
697
dnl Select a PNG Library to use, or disable driver.
658
698
dnl ---------------------------------------------------------------------------
707
747
dnl ---------------------------------------------------------------------------
748
dnl Check if GTA library is available.
749
dnl ---------------------------------------------------------------------------
751
AC_ARG_WITH([gta],[ --with-gta[=ARG] Include GTA support (ARG=no or libgta tree prefix)],,)
753
if test "$with_gta" = "no" ; then
757
echo "GTA support disabled."
759
elif test "$with_gta" = "yes" -o "$with_gta" = "" ; then
761
AC_CHECK_LIB([gta], [gta_version], [GTA_SETTING=yes], [GTA_SETTING=no],)
763
if test "$GTA_SETTING" = "yes" ; then
765
echo "using pre-installed libgta."
767
echo "libgta not found - GTA support disabled"
773
LIBS="-L$with_gta -L$with_gta/lib -lgta $LIBS"
774
EXTRA_INCLUDES="-I$with_gta -I$with_gta/include $EXTRA_INCLUDES"
776
echo "using libgta from $with_gta."
779
AC_SUBST([GTA_SETTING], [$GTA_SETTING])
781
if test "$GTA_SETTING" != "no" ; then
782
OPT_GDAL_FORMATS="gta $OPT_GDAL_FORMATS"
785
dnl ---------------------------------------------------------------------------
708
786
dnl Select PCIDSK options.
709
787
dnl ---------------------------------------------------------------------------
750
828
AC_MSG_CHECKING([for libtiff])
752
if test "$with_libtiff" = "yes" -o "$with_libtiff" = "" ; then
754
dnl We now effectively require libtiff 3.6.0.
755
AC_CHECK_LIB(tiff,TIFFGetTagListCount,TIFF_SETTING=external,TIFF_SETTING=internal,)
757
dnl Cygwin takes a somewhat restrictive view of what should be exported
758
dnl from the dll, so don't use the external library if missing semi-private
830
if test "x${with_libtiff}" = "xyes" -o "x${with_libtiff}" = "x" ; then
832
dnl Only automatically pick up the external libtiff if it is >= 4.0.
833
AC_CHECK_LIB(tiff,TIFFScanlineSize64,TIFF_SETTING=external HAVE_BIGTIFF=yes,TIFF_SETTING=internal HAVE_BIGTIFF=yes,)
760
835
if test "$TIFF_SETTING" = "external" ; then
836
dnl Cygwin takes a somewhat restrictive view of what should be exported
837
dnl from the dll, so don't use the external library if missing semi-private
761
839
AC_CHECK_LIB(tiff,_TIFFsetDoubleArray,TIFF_SETTING=external,TIFF_SETTING=internal,)
762
dnl Check for the BigTIFF enabled library (libtiff >= 4.0)
763
AC_CHECK_LIB(tiff,TIFFScanlineSize64,HAVE_BIGTIFF=yes,HAVE_BIGTIFF=no,)
768
842
if test "$TIFF_SETTING" = "external" ; then
769
843
LIBS="-ltiff $LIBS"
770
echo "using pre-installed libtiff."
844
AC_MSG_RESULT([using pre-installed libtiff.])
772
echo "using internal TIFF code."
846
AC_MSG_RESULT([using internal TIFF code.])
775
elif test "$with_libtiff" = "internal" ; then
849
elif test "x${with_libtiff}" = "xinternal" ; then
777
851
TIFF_SETTING=internal
780
echo "using internal TIFF code."
854
AC_MSG_RESULT([using internal TIFF code.])
784
858
TIFF_SETTING=external
785
if test -r $with_libtiff/tiff.h ; then
859
if test -r "$with_libtiff/tiff.h" ; then
786
860
LIBS="-L$with_libtiff -ltiff $LIBS"
787
861
EXTRA_INCLUDES="-I$with_libtiff $EXTRA_INCLUDES"
1328
1405
dnl ---------------------------------------------------------------------------
1406
dnl Check if netcdf library is available.
1407
dnl ---------------------------------------------------------------------------
1414
AC_ARG_WITH([netcdf],[ --with-netcdf[=ARG] Include netCDF support (ARG=no or netCDF tree prefix)],,)
1416
if test "$with_netcdf" = "no" ; then
1420
echo "netCDF support disabled."
1422
elif test "$with_netcdf" = "yes" -o "$with_netcdf" = "" ; then
1424
AC_CHECK_LIB([netcdf], [nc_open], [NETCDF_SETTING=yes], [NETCDF_SETTING=no],)
1426
if test "$NETCDF_SETTING" = "yes" ; then
1428
dnl Fedora has netcdf headers in /usr/include/netcdf
1429
if test -d /usr/include/netcdf ; then
1430
EXTRA_INCLUDES="-I/usr/include/netcdf $EXTRA_INCLUDES"
1432
dnl RHEL 5 has netcdf headers in /usr/include/netcdf-3
1433
elif test -d /usr/include/netcdf-3 ; then
1434
EXTRA_INCLUDES="-I/usr/include/netcdf-3 $EXTRA_INCLUDES"
1436
dnl ubuntu and fedora have netcdf headers in /usr/include
1437
elif test -f /usr/include/netcdf.h ; then
1440
elif test -f /usr/local/include/netcdf.h ; then
1441
NETCDF_ROOT="/usr/local"
1442
dnl print warning if include cannot be found
1444
echo "using pre-installed libnetcdf."
1445
echo -n "libnetcdf is installed but its location cannot be found, "
1446
echo "use --with-netcdf=/path_to_netcdf for proper support"
1449
LIBS="-lnetcdf $LIBS"
1450
if test "$NETCDF_ROOT" != "" ; then
1451
echo "using pre-installed libnetcdf from "$NETCDF_ROOT
1455
echo "libnetcdf not found - netCDF support disabled"
1460
AC_CHECK_LIB([netcdf], [nc_open], [NETCDF_SETTING=yes], [NETCDF_SETTING=no],-L$with_netcdf -L$with_netcdf/lib)
1462
if test "$NETCDF_SETTING" = "yes" ; then
1465
NETCDF_ROOT="$with_netcdf"
1467
if test -d $with_netcdf/lib ; then
1468
LIBS="-L$with_netcdf/lib -lnetcdf $LIBS"
1469
EXTRA_INCLUDES="-I$with_netcdf/include $EXTRA_INCLUDES"
1471
LIBS="-L$with_netcdf -lnetcdf $LIBS"
1472
EXTRA_INCLUDES="-I$with_netcdf $EXTRA_INCLUDES"
1475
echo "using libnetcdf from $with_netcdf"
1478
echo "libnetcdf not found in "$with_netcdf" - netCDF support disabled"
1485
dnl test for NC4 and HDF4 support
1486
if test "$NETCDF_SETTING" = "yes" ; then
1488
ncdump=$NETCDF_ROOT"/bin/ncdump"
1491
dnl test for libnetcdf v4
1492
if { test -x "$ncdump"; }; then
1493
AC_MSG_CHECKING([libnetcdf version with $ncdump])
1494
netcdf_version=`$ncdump 2>&1 | grep "netcdf library version" | awk '{gsub(/"/,"");print $4}'`
1495
AC_MSG_RESULT([got $netcdf_version])
1496
if test "$netcdf_version" != "" -a "${netcdf_version:0:1}" == "4" ; then
1497
nc_config=$NETCDF_ROOT"/bin/nc-config"
1501
dnl if nc-config is found (only for libnetcdf-4), test for netcdf-4 and HDF4 support
1502
if { test -x "$nc_config"; }; then
1503
echo "checking libnetcdf config with $nc_config"
1505
AC_MSG_CHECKING([for netcdf-4 (and HDF5) support in libnetcdf])
1506
if test "x$($nc_config --has-nc4)" = "xyes"; then :
1507
AC_MSG_RESULT([yes])
1514
AC_MSG_CHECKING([for HDF4 support in libnetcdf])
1515
if test "x$($nc_config --has-hdf4)" = "xyes"; then :
1516
AC_MSG_RESULT([yes])
1524
AC_MSG_RESULT([ncdump and/or nc-config not found, skipping netcdf-4 tests])
1532
AC_SUBST([NETCDF_SETTING], [$NETCDF_SETTING])
1533
AC_SUBST([NETCDF_ROOT], [$NETCDF_ROOT])
1534
AC_SUBST([NETCDF_HAS_NC4], [$NETCDF_HAS_NC4])
1535
AC_SUBST([NETCDF_HAS_HDF4], [$NETCDF_HAS_HDF4])
1537
if test "$NETCDF_SETTING" != "no" ; then
1538
OPT_GDAL_FORMATS="netcdf $OPT_GDAL_FORMATS"
1542
dnl ---------------------------------------------------------------------------
1329
1543
dnl Select a JasPer Library to use, or disable driver.
1330
1544
dnl ---------------------------------------------------------------------------
1373
1587
AC_SUBST([HAVE_JASPER],$HAVE_JASPER)
1374
1588
AC_SUBST([JASPER_FLAGS],$JASPER_FLAGS)
1591
dnl ---------------------------------------------------------------------------
1592
dnl Select a OpenJPEG Library to use, or disable driver.
1593
dnl ---------------------------------------------------------------------------
1595
AC_ARG_WITH(openjpeg,[ --with-openjpeg[=ARG] Include JPEG-2000 support via OpenJPEG v2 library (ARG=path)],,)
1597
if test "$with_openjpeg" = "no" ; then
1601
AC_MSG_NOTICE([OpenJPEG (JPEG2000) support disabled.])
1603
elif test "$with_openjpeg" = "yes" -o "$with_openjpeg" = "" ; then
1605
AC_CHECK_LIB(openjpeg,opj_decode_tile_data,HAVE_OPENJPEG=yes,HAVE_OPENJPEG=no,)
1606
AC_CHECK_HEADERS(openjpeg.h)
1608
if test "$ac_cv_header_openjpeg_h" = "no"; then
1612
if test "$HAVE_OPENJPEG" = "yes" ; then
1613
LIBS="-lopenjpeg $LIBS"
1618
LIBS="-L$with_openjpeg -L$with_openjpeg/lib -lopenjpeg $LIBS"
1619
if test -r $with_openjpeg/include/openjpeg-2.0/openjpeg.h ; then
1620
EXTRA_INCLUDES="-I$with_openjpeg/include/openjpeg-2.0 $EXTRA_INCLUDES"
1621
elif test -r $with_openjpeg/include/openjpeg.h ; then
1622
EXTRA_INCLUDES="-I$with_openjpeg/include $EXTRA_INCLUDES"
1623
elif test -r $with_openjpeg/openjpeg.h ; then
1624
EXTRA_INCLUDES="-I$with_openjpeg $EXTRA_INCLUDES"
1626
AC_MSG_ERROR([openjpeg.h not found in $with_openjpeg/include or $with_openjpeg/include/openjpeg-2.0])
1629
AC_CHECK_LIB(openjpeg,opj_decode_tile_data,HAVE_OPENJPEG=yes,HAVE_OPENJPEG=no,)
1631
if test "$HAVE_OPENJPEG" = "yes" ; then
1632
AC_MSG_NOTICE([using OpenJPEG library from $with_openjpeg.])
1636
if test "$HAVE_OPENJPEG" != "no" ; then
1637
OPT_GDAL_FORMATS="openjpeg $OPT_GDAL_FORMATS"
1640
AC_SUBST([HAVE_OPENJPEG],$HAVE_OPENJPEG)
1644
dnl ---------------------------------------------------------------------------
1645
dnl Select a FGDB API to use, or disable driver.
1646
dnl ---------------------------------------------------------------------------
1648
AC_ARG_WITH(fgdb,[ --with-fgdb[=ARG] Include ESRI File Geodatabase support (ARG=FGDP API Path, yes or no)],,)
1650
if test "$with_fgdb" = "no" ; then
1654
echo "FGDB support disabled."
1656
elif test "$with_fgdb" = "yes" -o "$with_fgdb" = "" ; then
1658
AC_CHECK_LIB(FileGDBAPI,OpenGeodatabase,FGDB_ENABLED=yes,FGDB_ENABLED=no,-lFileGDBAPI -lfgdblinuxrtl)
1660
if test "$FGDB_ENABLED" = "yes" ; then
1661
LIBS="-lFileGDBAPI -lfgdblinuxrtl"
1666
AC_MSG_CHECKING([for libFileGDBAPI.so in in $with_fgdb/lib])
1668
if test -r $with_fgdb/lib/libFileGDBAPI.so ; then
1669
AC_MSG_RESULT([found.])
1670
FGDB_LIB="-L$with_fgdb/lib -lFileGDBAPI -lfgdblinuxrtl"
1672
AC_MSG_ERROR([not found.])
1675
AC_MSG_CHECKING([for FileGDBAPI.h in $with_fgdb/include])
1676
if test -r $with_fgdb/include/FileGDBAPI.h ; then
1677
AC_MSG_RESULT([found.])
1678
FGDB_INC="-I$with_fgdb/include"
1680
AC_MSG_ERROR([not found.])
1685
AC_SUBST(FGDB_ENABLED, $FGDB_ENABLED)
1686
AC_SUBST(FGDB_LIB, $FGDB_LIB)
1687
AC_SUBST(FGDB_INC, $FGDB_INC)
1376
1689
dnl ---------------------------------------------------------------------------
1377
1690
dnl Select a ECW Library to use, or disable driver.
1378
1691
dnl ---------------------------------------------------------------------------
1577
1905
OPT_GDAL_FORMATS="mrsid $OPT_GDAL_FORMATS"
1908
dnl ---------------------------------------------------------------------------
1909
dnl Select MrSID/MG4 Lidar library or disable driver.
1910
dnl ---------------------------------------------------------------------------
1915
AC_ARG_WITH(mrsid_lidar,[ --with-mrsid_lidar[=ARG] Include MrSID/MG4 LiDAR support (ARG=path to LizardTech LiDAR SDK or no)],,)
1917
if test "x$with_mrsid_lidar" = "xno" -o "x$with_mrsid_lidar" = "x" ; then
1919
AC_MSG_NOTICE([MrSID/MG4 Lidar support disabled.])
1921
MRSID_LIDAR_BASE="$with_mrsid_lidar"
1923
if test -r "$MRSID_LIDAR_BASE/include/lidar/Version.h" ; then
1924
AC_MSG_RESULT([found LizardTech LiDAR SDK 1.1 or newer.])
1925
HAVE_MRSID_LIDAR=yes
1928
AC_MSG_RESULT([not found.])
1929
AC_MSG_ERROR([ MrSID/MG4 Lidar requested, but components not found.])
1932
if test $HAVE_MRSID_LIDAR = yes ; then
1933
if test -e "$MRSID_LIDAR_BASE/lib/liblti_lidar_dsdk.so" \
1934
-o -e "$MRSID_LIDAR_BASE/lib/liblti_lidar_dsdk.dylib"; then
1935
MRSID_LIDAR_LIBS="-L$MRSID_LIDAR_BASE/lib -llti_lidar_dsdk"
1936
MRSID_LIDAR_INCLUDE="-I$MRSID_LIDAR_BASE/include"
1938
MRSID_LIDAR_LIBS="-L$MRSID_LIDAR_BASE/lib/Release -llti_lidar_dsdk"
1939
MRSID_LIDAR_INCLUDE="-I$MRSID_LIDAR_BASE/include"
1944
AC_SUBST(MRSID_LIDAR_INCLUDE,$MRSID_LIDAR_INCLUDE)
1945
AC_SUBST(MRSID_LIDAR_LIBS,$MRSID_LIDAR_LIBS)
1947
if test "$HAVE_MRSID_LIDAR" != "no" ; then
1948
OPT_GDAL_FORMATS="mrsid_lidar $OPT_GDAL_FORMATS"
1581
1951
dnl ---------------------------------------------------------------------------
1582
1952
dnl Enable MSG format if EUMETSAT Wavelet Transform Software
1885
2269
DODS_INC="-I$with_dods_root/include -I$with_dods_root/include/libdap -I$with_dods_root/include/dap"
1886
2270
DODS_BIN=$with_dods_root/bin
1888
dnl Test if we have libdap < 3.9
1889
dnl Before libdap < 3.9, DAS derived from AttrTable class
1890
dnl I wish they had defines with version numbers instead of this test !
1891
rm -f islibdappre39.*
1892
echo '#include "DAS.h"' > islibdappre39.cpp
1893
echo '#include "AttrTable.h"' >> islibdappre39.cpp
1894
echo 'using namespace libdap;' >> islibdappre39.cpp
1895
echo 'int main(int argc, char** argv) { DAS oDAS; AttrTable& oAttrTable = oDAS; } ' >> islibdappre39.cpp
1896
if test -z "`${CXX} islibdappre39.cpp -c ${DODS_INC} 2>&1`" ; then
1897
dnl yes, libdap < 3.9
1898
AC_MSG_RESULT([libdap < 3.9])
2272
dnl Test if we have libdap >= 3.10
2273
dnl From libdap 3.10, AISConnect.h has been renamed as Connect.h
2274
rm -f islibdappost310.*
2275
echo '#include "Connect.h"' > islibdappost310.cpp
2276
echo 'int main(int argc, char** argv) { return 0; } ' >> islibdappost310.cpp
2277
if test -z "`${CXX} islibdappost310.cpp -c ${DODS_INC} 2>&1`" ; then
2278
dnl yes, libdap >= 3.10
2279
DODS_INC="$DODS_INC -DLIBDAP_310 -DLIBDAP_39"
2280
AC_MSG_RESULT([libdap >= 3.10])
1900
DODS_INC="$DODS_INC -DLIBDAP_39"
1901
AC_MSG_RESULT([libdap >= 3.9])
2282
AC_MSG_RESULT([libdap < 3.10])
2284
dnl Test if we have libdap < 3.9
2285
dnl Before libdap < 3.9, DAS derived from AttrTable class
2286
dnl I wish they had defines with version numbers instead of this test !
2287
rm -f islibdappre39.*
2288
echo '#include "DAS.h"' > islibdappre39.cpp
2289
echo '#include "AttrTable.h"' >> islibdappre39.cpp
2290
echo 'using namespace libdap;' >> islibdappre39.cpp
2291
echo 'int main(int argc, char** argv) { DAS oDAS; AttrTable& oAttrTable = oDAS; } ' >> islibdappre39.cpp
2292
if test -z "`${CXX} islibdappre39.cpp -c ${DODS_INC} 2>&1`" ; then
2293
dnl yes, libdap < 3.9
2294
AC_MSG_RESULT([libdap < 3.9])
2296
DODS_INC="$DODS_INC -DLIBDAP_39"
2297
AC_MSG_RESULT([libdap >= 3.9])
2299
rm -f islibdappre39.*
1903
rm -f islibdappre39.*
2302
rm -f islibdappost310.*
1906
2305
dnl Add the DODS libraries to LIBS
1985
2389
dnl ---------------------------------------------------------------------------
1987
2391
AC_ARG_WITH(spatialite,
1988
[ --with-spatialite=ARG Include SpatiaLite support (ARG=no or path)],
2392
[ --with-spatialite=ARG Include SpatiaLite support (ARG=no(default), yes or path)],
2396
SPATIALITE_AMALGAMATION=no
1991
2398
if test -z "$with_spatialite" -o "$with_spatialite" = "no"; then
1992
2399
AC_MSG_RESULT(disabled)
2400
elif test "$with_spatialite" = "yes"; then
2401
AC_CHECK_HEADERS(sqlite3.h)
2402
if test "$ac_cv_header_sqlite3_h" = "yes"; then
2403
AC_MSG_CHECKING([for spatialite.h in /usr/include or /usr/local/include])
2404
if test -f "/usr/include/spatialite.h" -o -f "/usr/local/include/spatialite.h"; then
2405
AC_MSG_RESULT(found)
2406
AC_CHECK_LIB(spatialite,spatialite_init,SPATIALITE_INIT_FOUND=yes,SPATIALITE_INIT_FOUND=no,)
2407
if test "$SPATIALITE_INIT_FOUND" = "yes"; then
2409
LIBS="$LIBS -lspatialite"
2413
AC_MSG_RESULT(not found : spatialite support disabled)
1995
AC_MSG_CHECKING(for SpatiaLite)
1996
2417
AC_CHECK_LIB(spatialite,spatialite_init,SPATIALITE_INIT_FOUND=yes,SPATIALITE_INIT_FOUND=no,-L$with_spatialite/lib -lspatialite)
1997
2418
if test -f "$with_spatialite/include/spatialite.h" -a \
1998
2419
-f "$with_spatialite/include/spatialite/sqlite3.h" -a \
2237
2687
dnl ---------------------------------------------------------------------------
2688
dnl Check if webp library is available.
2689
dnl ---------------------------------------------------------------------------
2691
AC_ARG_WITH(webp,[ --with-webp[=ARG] Include WEBP support (ARG=no, yes or libwebp install root path)],,)
2695
if test "$with_webp" = "yes" ; then
2697
AC_CHECK_LIB(webp,WebPDecodeRGB,WEBP_SETTING=yes,WEBP_SETTING=no,)
2699
if test "$WEBP_SETTING" = "yes" ; then
2702
echo "libwebp not found - WEBP support disabled"
2705
elif test "$with_webp" != "no" -a "$with_webp" != ""; then
2707
AC_CHECK_LIB(webp,WebPDecodeRGB,WEBP_SETTING=yes,WEBP_SETTING=no,-L$with_webp/lib -lwebp)
2709
if test "$WEBP_SETTING" = "yes" ; then
2710
LIBS="-L$with_webp/lib -lwebp $LIBS"
2711
EXTRA_INCLUDES="-I$with_webp/include $EXTRA_INCLUDES"
2713
echo "libwebp not found - WEBP support disabled"
2718
if test "$WEBP_SETTING" != "no" ; then
2719
OPT_GDAL_FORMATS="webp $OPT_GDAL_FORMATS"
2722
dnl ---------------------------------------------------------------------------
2238
2723
dnl Check if geos library is available.
2239
2724
dnl ---------------------------------------------------------------------------
2250
2735
dnl ---------------------------------------------------------------------------
2251
dnl Check if geos library is available.
2736
dnl Check if opencl library is available.
2737
dnl ---------------------------------------------------------------------------
2744
[ --with-opencl[=ARG] Include OpenCL (GPU) support],,,)
2746
AC_MSG_CHECKING([for OpenCL support])
2748
if test "$with_opencl" = "yes" ; then
2750
AC_ARG_WITH(opencl-include,
2751
[ --with-opencl-include=ARG OpenCL Include directory (with a CL subdirectory)],,,)
2755
if test "x$with_opencl_include" = "x" ; then
2756
OPENCL_FLAGS=-DHAVE_OPENCL
2758
OPENCL_FLAGS="-I$with_opencl_include -DHAVE_OPENCL"
2761
AC_ARG_WITH(opencl-lib,
2762
[ --with-opencl-lib=ARG OpenCL Link Flags (ie. -L/xxx -lOpenCL)],,,)
2764
if test "x$with_opencl_lib" = "x" ; then
2765
if test ! -z "`uname | grep Darwin`" ; then
2766
OPENCL_LIB="-framework OpenCL"
2771
OPENCL_LIB="$with_opencl_lib"
2776
AC_MSG_RESULT([$OPENCL_SETTING])
2778
AC_SUBST(OPENCL_FLAGS, $OPENCL_FLAGS)
2779
AC_SUBST(OPENCL_LIB, $OPENCL_LIB)
2782
dnl ---------------------------------------------------------------------------
2783
dnl Check if FreeXL library is available.
2784
dnl ---------------------------------------------------------------------------
2786
AC_ARG_WITH(freexl,[ --with-freexl[=ARG] Include freexl support (ARG=no, yes (default) or libfreexl install path)],,)
2788
AC_MSG_CHECKING([for FreeXL support])
2793
if test "$with_freexl" = "" -o "$with_freexl" = "yes" ; then
2794
AC_CHECK_HEADERS(freexl.h)
2795
AC_CHECK_LIB(freexl,freexl_open,FREEXL_LIBS="-lfreexl",FREEXL_LIBS=missing)
2797
if test "$FREEXL_LIBS" = "missing"; then
2798
unset ac_cv_lib_freexl_freexl_open
2799
AC_CHECK_LIB(freexl,freexl_open,FREEXL_LIBS="-lfreexl -liconv",FREEXL_LIBS=missing,-liconv)
2802
if test "$FREEXL_LIBS" = "missing"; then
2803
unset ac_cv_lib_freexl_freexl_open
2804
AC_CHECK_LIB(freexl,freexl_open,FREEXL_LIBS="-lfreexl -liconv -lcharset",FREEXL_LIBS=missing,-liconv -lcharset)
2807
if test "$FREEXL_LIBS" != "missing" -a "$ac_cv_header_freexl_h" = "yes" ; then
2809
# Check that freexl is recent enough
2811
echo '#include <freexl.h>' > testfreexl.c
2812
echo 'int main(int argc, char** argv) { FreeXL_CellValue s; freexl_get_cell_value (0,0,0,&s); return 0; } ' >> testfreexl.c
2813
if test -z "`${CC} testfreexl.c -c 2>&1`" ; then
2815
LIBS="$FREEXL_LIBS $LIBS"
2818
AC_MSG_RESULT([freexl too old. Needs freexl >= 1.0])
2824
echo "libfreexl not found - FreeXL support disabled"
2827
elif test "$with_freexl" != "no"; then
2829
AC_CHECK_LIB(freexl,freexl_open,FREEXL_LIBS="-L$with_freexl/lib -lfreexl",FREEXL_LIBS=missing,-L$with_freexl/lib)
2831
if test "$FREEXL_LIBS" = "missing"; then
2832
unset ac_cv_lib_freexl_freexl_open
2833
AC_CHECK_LIB(freexl,freexl_open,FREEXL_LIBS="-L$with_freexl/lib -lfreexl -liconv",FREEXL_LIBS=missing,-L$with_freexl/lib -liconv)
2836
if test "$FREEXL_LIBS" = "missing"; then
2837
unset ac_cv_lib_freexl_freexl_open
2838
AC_CHECK_LIB(freexl,freexl_open,FREEXL_LIBS="-L$with_freexl/lib -lfreexl -liconv -lcharset",FREEXL_LIBS=missing,-L$with_freexl/lib -liconv -lcharset)
2841
if test "FREEXL_LIBS" != "missing" -a -f "$with_freexl/include/freexl.h" ; then
2843
# Check that freexl is recent enough
2845
echo '#include <freexl.h>' > testfreexl.c
2846
echo 'int main(int argc, char** argv) { FreeXL_CellValue s; freexl_get_cell_value (0,0,0,&s); return 0; } ' >> testfreexl.c
2847
if test -z "`${CC} -I$with_freexl/include testfreexl.c -c 2>&1`" ; then
2849
LIBS="$FREEXL_LIBS $LIBS"
2850
FREEXL_INCLUDE="-I$with_freexl/include"
2853
AC_MSG_RESULT([freexl too old. Needs freexl >= 1.0])
2859
echo "libfreexl not found - FreeXL support disabled"
2864
AC_SUBST(HAVE_FREEXL, $HAVE_FREEXL)
2865
AC_SUBST(FREEXL_INCLUDE, $FREEXL_INCLUDE)
2867
dnl ---------------------------------------------------------------------------
2868
dnl Check if we must enable PAM
2252
2869
dnl ---------------------------------------------------------------------------
2254
2871
AC_MSG_CHECKING([whether to enable PAM])
2267
2884
AC_SUBST(PAM_SETTING, $PAM_SETTING)
2269
2886
dnl ---------------------------------------------------------------------------
2887
dnl Check if libpoppler is available
2888
dnl ---------------------------------------------------------------------------
2890
AC_ARG_WITH(poppler,[ --with-poppler[=ARG] Include poppler(for PDF) support (ARG=no(default), yes or poppler install path)],,)
2893
POPPLER_HAS_OPTCONTENT=no
2894
POPPLER_BASE_STREAM_HAS_TWO_ARGS=no
2896
AC_MSG_CHECKING([for poppler])
2898
if test "$with_poppler" != "no" -a "$with_poppler" != ""; then
2900
if test "$with_poppler" = "yes" ; then
2901
TEST_POPPLER_INC="-I/usr/include -I/usr/include/poppler"
2902
TEST_POPPLER_LIB="-lpoppler"
2904
TEST_POPPLER_INC="-I$with_poppler/include -I$with_poppler/include/poppler"
2905
TEST_POPPLER_LIB="-L$with_poppler/lib -lpoppler"
2908
# Check that we can accept Page::pageObj private member
2910
echo '#define private public' > testpoppler.cpp
2911
echo '#include <poppler/Page.h>' >> testpoppler.cpp
2912
echo '#include <poppler/splash/SplashBitmap.h>' >> testpoppler.cpp
2913
echo 'int main(int argc, char** argv) { return &(((Page*)0x8000)->pageObj) == 0; } ' >> testpoppler.cpp
2914
if test -z "`${CXX} testpoppler.cpp -o testpoppler ${TEST_POPPLER_INC} ${TEST_POPPLER_LIB} 2>&1`" ; then
2916
LIBS="${TEST_POPPLER_LIB} ${LIBS}"
2917
OPT_GDAL_FORMATS="pdf $OPT_GDAL_FORMATS"
2918
AC_MSG_RESULT([yes])
2919
POPPLER_INC=$TEST_POPPLER_INC
2921
# And now try another dirty thing, but this one is
2923
AC_MSG_CHECKING([if Catalog::optContent exists])
2925
echo '#define private public' > testpoppler.cpp
2926
echo '#include <poppler/Object.h>' >> testpoppler.cpp
2927
echo '#include <poppler/Catalog.h>' >> testpoppler.cpp
2928
echo 'int main(int argc, char** argv) { return &(((Catalog*)0x8000)->optContent) == 0; }' >> testpoppler.cpp
2929
if test -z "`${CXX} testpoppler.cpp -c ${POPPLER_INC} 2>&1`" ; then
2930
POPPLER_HAS_OPTCONTENT=yes
2931
AC_MSG_RESULT([yes])
2936
# And now we check if we have Poppler >= 0.16.0
2937
AC_MSG_CHECKING([if BaseStream constructor needs 2 arguments])
2939
echo '#include <poppler/Object.h>' > testpoppler.cpp
2940
echo '#include <poppler/Stream.h>' >> testpoppler.cpp
2941
echo 'class TestStream: public BaseStream {' >> testpoppler.cpp
2942
echo 'public:' >> testpoppler.cpp
2943
echo ' TestStream() : BaseStream(0,0) {}' >> testpoppler.cpp
2944
echo ' ~TestStream() {}' >> testpoppler.cpp
2945
echo ' virtual Stream *makeSubStream(Guint start, GBool limited, Guint length, Object *dict) { return 0; }' >> testpoppler.cpp
2946
echo ' virtual void setPos(Guint pos, int dir = 0) { }' >> testpoppler.cpp
2947
echo ' virtual Guint getStart() { return 0; }' >> testpoppler.cpp
2948
echo ' virtual void moveStart(int delta) { }' >> testpoppler.cpp
2949
echo '};' >> testpoppler.cpp
2950
echo 'int main(int argc, char** argv) { return 0; }' >> testpoppler.cpp
2951
if test -z "`${CXX} testpoppler.cpp -c ${POPPLER_INC} 2>&1`" ; then
2952
POPPLER_BASE_STREAM_HAS_TWO_ARGS=yes
2953
AC_MSG_RESULT([yes])
2963
AC_MSG_RESULT([disabled])
2966
AC_SUBST(HAVE_POPPLER, $HAVE_POPPLER)
2967
AC_SUBST(POPPLER_HAS_OPTCONTENT, $POPPLER_HAS_OPTCONTENT)
2968
AC_SUBST(POPPLER_BASE_STREAM_HAS_TWO_ARGS, $POPPLER_BASE_STREAM_HAS_TWO_ARGS)
2969
AC_SUBST(POPPLER_INC, $POPPLER_INC)
2971
dnl ---------------------------------------------------------------------------
2972
dnl Check if libpodofo is available
2973
dnl ---------------------------------------------------------------------------
2975
AC_ARG_WITH(podofo,[ --with-podofo[=ARG] Include podofo(for PDF) support (ARG=no(default), yes or podofo install path)],,)
2979
AC_MSG_CHECKING([for podofo])
2981
if test "$with_podofo" != "no" -a "$with_podofo" != ""; then
2983
AC_ARG_WITH(podofo-lib,
2984
[ --with-podofo-lib=ARG podofo Link Flags (ie. -L/xxx -lpodofo ...). Mainly for static libpodofo],,,)
2986
if test "$HAVE_POPPLER" = "yes"; then
2987
AC_MSG_ERROR([--with-podofo and --with-poppler cannot be specified at the same time])
2990
if test "$with_podofo" = "yes" ; then
2991
TEST_PODOFO_INC="-I/usr/include -I/usr/include/podofo"
2992
PODOFO_LIB="-lpodofo"
2994
TEST_PODOFO_INC="-I$with_podofo/include -I$with_podofo/include/podofo"
2995
PODOFO_LIB="-L$with_podofo/lib -lpodofo"
2998
if test "x$with_podofo_lib" = "x" ; then
3000
echo '#include <podofo.h>' > testpodofo.cpp
3001
echo 'int main(int argc, char** argv) { PoDoFo::PdfError::EnableDebug( 0 ); return 0; } ' >> testpodofo.cpp
3002
if test -z "`${CXX} testpodofo.cpp -o testpodofo ${TEST_PODOFO_INC} ${PODOFO_LIB} 2>&1`" ; then
3004
LIBS="${PODOFO_LIB} ${LIBS}"
3005
OPT_GDAL_FORMATS="pdf $OPT_GDAL_FORMATS"
3006
PODOFO_INC=$TEST_PODOFO_INC
3007
AC_MSG_RESULT([yes])
3013
if test "$HAVE_PODOFO" = "no"; then
3014
if test "x$with_podofo_lib" != "x" ; then
3015
PODOFO_LIB="$with_podofo_lib"
3017
# This may be a static libpodofo.a, so add dependant libraries
3018
PODOFO_LIB="$PODOFO_LIB -lfreetype -lfontconfig -lpthread"
3021
AC_ARG_WITH(podofo-extra-lib-for-test,
3022
[ --with-podofo-extra-lib-for-test=ARG Additional libraries to pass the detection test, but not used for libgdal linking (ie. -ljpeg ...). Mainly for static libpodofo],,,)
3024
if test "x$with_podofo_extra_lib_for_test" = "x" ; then
3025
TEST_PODOFO_LIB="$PODOFO_LIB"
3027
TEST_PODOFO_LIB="$PODOFO_LIB $with_podofo_extra_lib_for_test"
3031
echo '#include <podofo.h>' > testpodofo.cpp
3032
echo 'int main(int argc, char** argv) { PoDoFo::PdfError::EnableDebug( 0 ); return 0; } ' >> testpodofo.cpp
3033
if test -z "`${CXX} testpodofo.cpp -o testpodofo ${TEST_PODOFO_INC} ${TEST_PODOFO_LIB} 2>&1`" ; then
3035
LIBS="${PODOFO_LIB} ${LIBS}"
3036
OPT_GDAL_FORMATS="pdf $OPT_GDAL_FORMATS"
3037
PODOFO_INC=$TEST_PODOFO_INC
3038
AC_MSG_RESULT([yes])
3046
AC_MSG_RESULT([disabled])
3049
AC_SUBST(HAVE_PODOFO, $HAVE_PODOFO)
3050
AC_SUBST(PODOFO_INC, $PODOFO_INC)
3052
dnl ---------------------------------------------------------------------------
2270
3053
dnl PROJ.4 related stuff.
2271
3054
dnl ---------------------------------------------------------------------------
2542
3325
AC_SUBST([PY_HAVE_SETUPTOOLS])
2543
3326
AC_SUBST([BINDINGS])
3328
dnl ---------------------------------------------------------------------------
3330
dnl ---------------------------------------------------------------------------
3332
AC_ARG_WITH(java,[ --with-java Include Java support (ARG=yes, no or JDK home path) [[default=no]]],,)
3334
AC_MSG_CHECKING([whether we should include Java support])
3339
if test "x$with_java" = "xyes"; then
3342
if test -d /usr/lib/jvm/java-6-openjdk; then
3343
with_java="/usr/lib/jvm/java-6-openjdk"
3346
elif test -d /usr/lib/jvm/java-openjdk; then
3347
with_java="/usr/lib/jvm/java-openjdk"
3349
dnl elif test -d /System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers; then
3350
dnl JAVA_INC="-I/System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers"
3353
elif test -d /usr/java; then
3354
with_java="/usr/java"
3356
AC_MSG_ERROR("cannot find JDK root directory.")
3359
if test \! -d "$with_java/include" ; then
3360
AC_MSG_ERROR("$with_java is not a valid JDK.")
3364
if test "x$JAVA_INC" != "x"; then
3365
AC_MSG_RESULT([yes])
3366
elif test "x$with_java" != "x" -a "x$with_java" != "xno"; then
3368
if test -d "$with_java/include"; then
3369
if test -d "$with_java/include/linux"; then
3370
JAVA_HOME="$with_java"
3371
JAVA_INC="-I$JAVA_HOME/include -I$JAVA_HOME/include/linux"
3372
AC_MSG_RESULT([yes])
3373
elif test -d "$with_java/include/solaris"; then
3374
JAVA_HOME="$with_java"
3375
JAVA_INC="-I$JAVA_HOME/include -I$JAVA_HOME/include/solaris"
3376
AC_MSG_RESULT([yes])
3377
elif test -d "$with_java/include/freebsd"; then
3378
JAVA_HOME="$with_java"
3379
JAVA_INC="-I$JAVA_HOME/include -I$JAVA_HOME/include/freebsd"
3380
AC_MSG_RESULT([yes])
3382
AC_MSG_ERROR("Cannot find $with_java/include/linux or solaris or freebsd directory.")
3385
AC_MSG_ERROR("Cannot find $with_java/include directory.")
3392
AC_SUBST(JAVA_HOME,$JAVA_HOME)
3393
AC_SUBST(JAVA_INC,$JAVA_INC)
3395
dnl ---------------------------------------------------------------------------
3397
dnl ---------------------------------------------------------------------------
3399
AC_ARG_WITH(mdb,[ --with-mdb Include MDB driver],,)
3401
AC_MSG_CHECKING([whether we should include MDB support])
3406
if test "$with_mdb" = "yes" ; then
3407
if test "x$JAVA_INC" = "x"; then
3408
AC_MSG_ERROR("--with-java must be specified.")
3411
AC_ARG_WITH(jvm-lib, [ --with-jvm-lib=[ARG] ARG points to Java libjvm path],,)
3413
AC_ARG_WITH(jvm-lib-add-rpath,[ --with-jvm-lib-add-rpath Add the libjvm path to the RPATH (no by default)],,)
3415
if test "x$with_jvm_lib" != "x"; then
3416
if test -d "$with_jvm_lib"; then
3417
saved_LDFLAGS="$LDFLAGS"
3418
LDFLAGS="$LDFLAGS -L$with_jvm_lib"
3419
AC_CHECK_LIB(jvm,JNI_CreateJavaVM,HAS_LIB_JVM=yes,HAS_LIB_JVM=no,)
3420
LDFLAGS="$saved_LDFLAGS"
3421
if test "$HAS_LIB_JVM" = "yes"; then
3422
JVM_LIB="-L$with_jvm_lib -ljvm"
3423
if test "x$with_jvm_lib_add_rpath" = "xyes"; then
3424
JVM_LIB="-Wl,-rpath=$with_jvm_lib $JVM_LIB"
3427
AC_MSG_ERROR("--with-jvm-lib must point to a directory with a libjvm.")
3430
AC_MSG_ERROR("--with-jvm-lib must point to a directory.")
3432
elif test "x$JAVA_HOME" != "x"; then
3433
TEST_DIR="$JAVA_HOME/jre/lib/amd64/server"
3434
if test "x$JVM_LIB" = "x" -a -d "$TEST_DIR"; then
3435
unset ac_cv_lib_jvm_JNI_CreateJavaVM
3436
saved_LDFLAGS="$LDFLAGS"
3437
LDFLAGS="$LDFLAGS -L$TEST_DIR"
3438
AC_CHECK_LIB(jvm,JNI_CreateJavaVM,HAS_LIB_JVM=yes,HAS_LIB_JVM=no,)
3439
LDFLAGS="$saved_LDFLAGS"
3440
if test "$HAS_LIB_JVM" = "yes"; then
3441
JVM_LIB="-L$TEST_DIR -ljvm"
3442
if test "x$with_jvm_lib_add_rpath" = "xyes"; then
3443
JVM_LIB="-Wl,-rpath=$TEST_DIR $JVM_LIB"
3448
TEST_DIR="$JAVA_HOME/jre/lib/i386/server"
3449
if test "x$JVM_LIB" = "x" -a -d "$TEST_DIR"; then
3450
unset ac_cv_lib_jvm_JNI_CreateJavaVM
3451
saved_LDFLAGS="$LDFLAGS"
3452
LDFLAGS="$LDFLAGS -L$TEST_DIR"
3453
AC_CHECK_LIB(jvm,JNI_CreateJavaVM,HAS_LIB_JVM=yes,HAS_LIB_JVM=no,)
3454
LDFLAGS="$saved_LDFLAGS"
3455
if test "$HAS_LIB_JVM" = "yes"; then
3456
JVM_LIB="-L$TEST_DIR -ljvm"
3457
if test "x$with_jvm_lib_add_rpath" = "xyes"; then
3458
JVM_LIB="-Wl,-rpath=$TEST_DIR $JVM_LIB"
3463
if test "x$JVM_LIB" = "x"; then
3464
AC_MSG_ERROR("--with-jvm-lib must be specified.")
3466
dnl elif test -f /System/Library/Frameworks/JavaVM.framework/Versions/Current/JavaVM; then
3467
dnl JVM_LIB="-framework /System/Library/Frameworks/JavaVM.framework/Versions/Current/JavaVM"
3469
AC_MSG_ERROR("--with-jvm-lib must be specified.")
3473
AC_MSG_RESULT([yes])
3479
AC_SUBST(MDB_ENABLED,$MDB_ENABLED)
3480
AC_SUBST(JVM_LIB,$JVM_LIB)
3483
dnl ---------------------------------------------------------------------------
3484
dnl Select Rasdaman or disable driver.
3485
dnl ---------------------------------------------------------------------------
3489
AC_CHECKING(whether we should include rasdaman support)
3490
AC_ARG_WITH(rasdaman,
3491
[ --with-rasdaman[=DIR] Include rasdaman support (DIR is rasdaman's install dir).],,)
3493
if test "$with_rasdaman" = "yes" ; then
3495
AC_CHECK_LIB(raslib,main,RASDAMAN_ENABLED=yes,,,)
3497
if test -n "$RASDAMAN_ENABLED" ; then
3498
RASDAMAN_LIB="-lrasodmg -lclientcomm -lcompression -lnetwork -lraslib"
3499
OPT_GDAL_FORMATS="rasdaman $OPT_GDAL_FORMATS"
3500
AC_MSG_RESULT([ using rasdaman from system libs.])
3502
AC_MSG_WARN([ rasdaman not found in system libs... use --with-rasdaman=DIR.])
3505
elif test -n "$with_rasdaman" -a "$with_rasdaman" != "no" ; then
3507
RASDAMAN_DIR=$with_rasdaman
3509
if test -f $RASDAMAN_DIR/include/rasdaman.hh -a -d$RASDAMAN_DIR/lib ; then
3510
RASDAMAN_INC=-I$RASDAMAN_DIR/include
3511
RASDAMAN_LIB="-L$RASDAMAN_DIR/lib -lrasodmg -lclientcomm -lcompression -lnetwork -lraslib"
3513
AC_MSG_ERROR("Could not find rasdaman.hh or libraslib.a in $RASDAMAN_DIR.")
3516
RASDAMAN_ENABLED=yes
3517
OPT_GDAL_FORMATS="rasdaman $OPT_GDAL_FORMATS"
3518
AC_MSG_RESULT([ using rasdaman from $RASDAMAN_DIR.])
3522
AC_MSG_RESULT([ rasdaman support not requested.])
3525
AC_SUBST(RASDAMAN_ENABLED,$RASDAMAN_ENABLED)
3526
AC_SUBST(RASDAMAN_INC, $RASDAMAN_INC)
3527
AC_SUBST(RASDAMAN_LIB, $RASDAMAN_LIB)
3529
dnl ---------------------------------------------------------------------------
3530
dnl Armadillo support
3531
dnl ---------------------------------------------------------------------------
3533
AC_ARG_WITH(armadillo,[ --with-armadillo=ARG Include Armadillo support for faster TPS transform computation (ARG=yes/no) [[default=no]]],,)
3535
AC_MSG_CHECKING([whether we should include Armadillo support])
3539
if test "$with_armadillo" = "yes" ; then
3540
rm -f testarmadillo.*
3542
echo '#include <armadillo>' > testarmadillo.cpp
3543
echo 'int main(int argc, char** argv) { arma::mat matInput(2,2); const arma::mat& matInv = arma::inv(matInput); return 0; } ' >> testarmadillo.cpp
3544
if test -z "`${CXX} testarmadillo.cpp -o testarmadillo -larmadillo 2>&1`" ; then
3546
LIBS="-larmadillo ${LIBS}"
3547
AC_MSG_RESULT([yes])
3551
rm -f testarmadillo.*
3557
AC_SUBST(HAVE_ARMADILLO,$HAVE_ARMADILLO)
2548
3560
AC_OUTPUT(GDALmake.opt)