Changeset 526

Show
Ignore:
Timestamp:
03/02/08 21:45:45 (16 months ago)
Author:
hobu
Message:

add GDAL macro

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/configure.ac

    r504 r526  
    6767]) 
    6868 
     69dnl ########################################################### 
     70dnl GDAL 
     71dnl ########################################################### 
     72AC_ARG_WITH(gdal,[  --with-gdal=ARG         Path to gdal-config],,) 
     73if test "$with_gdal" = "yes" -o "$with_gdal" = "" ; then 
     74  AC_PATH_PROG(GDAL_CONFIG, gdal-config, no) 
     75else 
     76  if test "`basename xx/$with_gdal`" = "gdal-config" ; then 
     77    AC_MSG_RESULT([GDAL enabled with provided gdal-config]) 
     78    GDAL_CONFIG="$with_gdal" 
     79  else 
     80    AC_MSG_ERROR([--with-gdal should have yes or a path to gdal-config]) 
     81  fi 
     82fi 
     83if test "$GDAL_CONFIG" != "no" ; then 
     84  VERSION=`$GDAL_CONFIG --version` 
     85  AC_MSG_RESULT([$GDAL_CONFIG reports version $VERSION]) 
     86  LIBS="`$GDAL_CONFIG --libs` $LIBS" 
     87  GDAL_INC=`$GDAL_CONFIG --cflags` 
     88  GDAL_PREFIX=`$GDAL_CONFIG --prefix` 
     89  OGR=`$GDAL_CONFIG --ogr-enabled` 
     90  if test "$OGR" != "yes" ; then 
     91        AC_MSG_ERROR([$GDAL_CONFIG says OGR is not enabled]) 
     92  fi 
     93fi 
     94AC_SUBST(GDAL_INC GDAL_PREFIX) 
     95 
    6996AC_HAVE_LONG_LONG 
    7097 
     
    93120LOC_MSG([  C++ compiler.............: ${CXX} ${CXXFLAGS}]) 
    94121LOC_MSG([  Debugging support........: ${enable_debug}]) 
     122LOC_MSG([  GDAL support........: ${with_gdal}]) 
    95123LOC_MSG()