[GRASSLIST:7558] GDALOpen could not be found

I am new to grass and had a hard time to compile grass6 - my current problem is
GDALOpen. I have set the GDAL library paths but still get the error message -

checking whether to use GDAL... yes
yes
checking for gdal-config... /afs/isis/depts/geog/pkg/gdal/bin/gdal-config
Usage: gdal-config [OPTIONS]
Options:
        [--prefix[=DIR]]
        [--libs]
        [--cflags]
        [--version]
        [--ogr-enabled]
        [--formats]
checking for GDALOpen... no
checking for GDALOpen... no

And my configure option is -
./configure --prefix=/scratch/grassTest --exec-prefix=/scratch/grassTest
--bindir=/scratch/bin --with-jpeg-includes=/afs/isis/pkg/jpeg/include
--with-tiff-includes=/afs/isis/pkg/tiff/include
--with-tiff-libs=/afs/isis/pkg/tiff/lib
--with-png-includes=/afs/isis/pkg/libpng/include
--with-png-libs=/afs/isis/pkg/libpng/lib
--with-tcltk-includes="/afs/isis/pkg/tcl/include /afs/isis/pkg/tk/include"
--with-tcltk-libs="/afs/isis/pkg/tcl/lib /afs/isis/pkg/tk/lib" --with-postgres=no
--with-opengl=no --with-odbc=no --with-fftw-includes=/afs/isis/pkg/fftw/include
--with-fftw-libs=/afs/isis/pkg/fftw/lib --with-proj-includes=/scratch/proj4/include
--with-proj-libs=/scratch/proj4/lib
--with-gdal=/afs/isis/depts/geog/pkg/gdal/bin/gdal-config
--with-gdal-includes=/afs/isis/depts/geog/pkg/gdal/include
--with-gdal-libs=/afs/isis/depts/geog/pkg/gdal/lib

Thanks for any help and hints.
Jun Liang from UNC at Chapel Hill

jun liang wrote:

I am new to grass and had a hard time to compile grass6 - my current problem is
GDALOpen. I have set the GDAL library paths but still get the error message -

checking whether to use GDAL... yes
yes
checking for gdal-config... /afs/isis/depts/geog/pkg/gdal/bin/gdal-config
Usage: gdal-config [OPTIONS]
Options:
        [--prefix[=DIR]]
        [--libs]
        [--cflags]
        [--version]
        [--ogr-enabled]
        [--formats]

This indicates that gdal-config doesn't understand the --dep-libs
switch. That may or may not be a problem.

checking for GDALOpen... no
checking for GDALOpen... no

Search for GDALOpen the config.log file. That may provide some clues
as to the exact error. The most likely problem is that one of the
libraries which GDAL requires (and there may be a lot of them) isn't
found.

And my configure option is -

--with-gdal-includes=/afs/isis/depts/geog/pkg/gdal/include
--with-gdal-libs=/afs/isis/depts/geog/pkg/gdal/lib

These switches don't exist. The header and library directories for
GDAL are determined by running "gdal-config --cflags" and
"gdal-config --libs" respectively.

Essentially, the gdal-config script has to provide accurate
information on how to use the GDAL library. If the information is
inaccurate, attempts to use the library will fail, and you won't be
able to build GRASS (GDAL is a mandatory dependency for GRASS 6.x).

--
Glynn Clements <glynn@gclements.plus.com>