[Gdal-dev] opendap config for gdal

Russell Moffitt Russell.Moffitt at noaa.gov
Mon Mar 13 17:52:37 EST 2006


I had trouble building GDAL with opendap/dods support using the standard
configure script.  The configure script was setting the include
directory to be dods-root/include/dap.  On my system, opendap put its
include files at dods-root/include/libdap by default.  Since configure
is already looking for the dap-config executable to get the proper
libraries for linking, it should probably get the -cflags from there,
too.  Here's what I did to change the configure script to work for me. 
It's really simple, but I thought I'd pass it on.
Aloha,
Russ

(around line 25808):

    DODS_LIB=$with_dods_root/lib
    DODS_INC="-I$with_dods_root/include -I$with_dods_root/include/dap"
    DODS_BIN=$with_dods_root/bin

        if test -x $DODS_BIN/opendap-config ; then
            LIBS="$LIBS `$DODS_BIN/opendap-config --libs`"
        DODS_INC="$DODS_INC `$DODS_BIN/opendap-config --cflags`"
    elif test -x $DODS_BIN/dap-config ; then
            LIBS="$LIBS `$DODS_BIN/dap-config --libs`"
        DODS_INC="$DODS_INC `$DODS_BIN/dap-config --cflags`"
    else
            LIBS="$LIBS -L$DODS_LIB -ldap++ -lpthread -lrx"



More information about the Gdal-dev mailing list