This file is indexed.

/usr/share/aclocal/libdap.m4 is in libdap-dev 3.19.1-2build1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
# -*- mode: autoconf -*-
# Configure macros for Libdap
#
# Code for version detection and comparison comes from freetype2.m4
# Marcelo Magallon 2001-10-26, based on gtk.m4 by Owen Taylor
#
# Copyright 2001, 2003 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
# and distributed under the terms of the FreeType project license,
# LICENSE.TXT.  By continuing to use, modify, or distribute this file you
# indicate that you have read the license and understand and accept it
# fully.
#
# As a special exception to the FreeType project license, this file may be
# distributed as part of a program that contains a configuration script
# generated by Autoconf, under the same distribution terms as the rest of
# that program.
#
# modified by Patrice Dumas 2005 for libdap
#
# AC_CHECK_DODS is based on code from gdal configure.in

# AC_CHECK_LIBDAP([MINIMUM-VERSION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
# Test for Libdap and define DAP_CFLAGS and DAP_LIBS.
# Check that the version is above MINIMUM-VERSION 
# use when linking with a c++ aware linker, with a c linker you may also
# need -lstdc++

AC_DEFUN([AC_CHECK_LIBDAP],
[
  dap_min_version=m4_if([$1], [], [3.5.0], [$1])
  dap_no=
  dap_pkgconfig_libdap=yes 
  PKG_CHECK_MODULES([DAP],[libdap >= $dap_min_version],,
    [dap_pkgconfig_libdap=no])
  PKG_CHECK_MODULES([DAP_CLIENT],[libdapclient >= $dap_min_version],,
    [dap_pkgconfig_libdap=no])
  PKG_CHECK_MODULES([DAP_SERVER],[libdapserver >= $dap_min_version],,
    [dap_pkgconfig_libdap=no])
  
  if test $dap_pkgconfig_libdap = no; then
    AC_PATH_PROG([DAP_CONFIG], [dap-config], [no])
    if test "$DAP_CONFIG" = "no" ; then
      dap_no=yes
    else
      dap_config_major_version=`$DAP_CONFIG --version | sed 's/^libdap \([[0-9]][[0-9]]*\)\.\([[0-9]][[0-9]]*\)\.\([[0-9]][[0-9]]*\)[[ab]]*$/\1/'`
      dap_config_minor_version=`$DAP_CONFIG --version | sed 's/^libdap \([[0-9]][[0-9]]*\)\.\([[0-9]][[0-9]]*\)\.\([[0-9]][[0-9]]*\)[[ab]]*$/\2/'`
      dap_config_micro_version=`$DAP_CONFIG --version | sed 's/^libdap \([[0-9]][[0-9]]*\)\.\([[0-9]][[0-9]]*\)\.\([[0-9]][[0-9]]*\)[[ab]]*$/\3/'`
      dap_min_major_version=`echo $dap_min_version | sed 's/\([[0-9]][[0-9]]*\).\([[0-9]][[0-9]]*\).\([[0-9]][[0-9]]*\)$/\1/'`
      dap_min_minor_version=`echo $dap_min_version | sed 's/\([[0-9]][[0-9]]*\).\([[0-9]][[0-9]]*\).\([[0-9]][[0-9]]*\)$/\2/'`
      dap_min_micro_version=`echo $dap_min_version | sed 's/\([[0-9]][[0-9]]*\).\([[0-9]][[0-9]]*\).\([[0-9]][[0-9]]*\)$/\3/'`

      dap_config_is_lt=""
      if test $dap_config_major_version -lt $dap_min_major_version ; then
        dap_config_is_lt=yes
      else
        if test $dap_config_major_version -eq $dap_min_major_version ; then
          if test $dap_config_minor_version -lt $dap_min_minor_version ; then
            dap_config_is_lt=yes
          else
            if test $dap_config_minor_version -eq $dap_min_minor_version ; then
              if test $dap_config_micro_version -lt $dap_min_micro_version ; then
                dap_config_is_lt=yes
              fi
            fi
          fi
        fi
      fi
      if test x$dap_config_is_lt = xyes ; then
        dap_no=yes
      else
        DAP_LIBS="`$DAP_CONFIG --libs`"
        if ($DAP_CONFIG --client-libs 2>&1 | grep unknown) >/dev/null 2>&1; then
          DAP_CLIENT_LIBS=$DAP_LIBS
          DAP_SERVER_LIBS=$DAP_LIBS
        else
          DAP_CLIENT_LIBS="`$DAP_CONFIG --client-libs`"
          DAP_SERVER_LIBS="`$DAP_CONFIG --server-libs`"
        fi
        DAP_CFLAGS="`$DAP_CONFIG --cflags`"
      fi
    fi
  else
     DAP_STATIC_LIBS="`$PKG_CONFIG --static --libs libdap`"
     DAP_CLIENT_STATIC_LIBS="`$PKG_CONFIG --static --libs libdapclient`"
     DAP_SERVER_STATIC_LIBS="`$PKG_CONFIG --static --libs libdapserver`"
  fi
  AC_MSG_CHECKING([for libdap version >= $dap_min_version])
  if test x$dap_no = x ; then
    AC_MSG_RESULT([yes])
    m4_if([$2], [], [:], [$2])
  else
    AC_MSG_RESULT([no])
    if test "$DAP_CONFIG" = "no" ; then
    AC_MSG_NOTICE([The dap-config script could not be found.])
    else
      if test x$dap_config_is_lt = xyes ; then
        AC_MSG_NOTICE([the installed libdap library is too old.])
      fi
    fi
    DAP_LIBS=""
    DAP_CFLAGS=""
    m4_if([$3], [], [:], [$3])
  fi
  if test x"$DAP_CFLAGS" != x -a x"$DAP_CLIENT_CFLAGS" = x ; then
    DAP_CLIENT_CFLAGS=$DAP_CFLAGS
  fi
  if test x"$DAP_CFLAGS" != x -a x"$DAP_SERVER_CFLAGS" = x ; then
    DAP_SERVER_CFLAGS=$DAP_CFLAGS
  fi
  if test x"$DAP_STATIC_LIBS" = x ; then
    DAP_STATIC_LIBS=$DAP_LIBS
    DAP_CLIENT_STATIC_LIBS=$DAP_CLIENT_LIBS
    DAP_SERVER_STATIC_LIBS=$DAP_SERVER_LIBS
  fi
  AC_SUBST([DAP_CFLAGS])
  AC_SUBST([DAP_CLIENT_CFLAGS])
  AC_SUBST([DAP_SERVER_CFLAGS])
  AC_SUBST([DAP_LIBS])
  AC_SUBST([DAP_CLIENT_LIBS])
  AC_SUBST([DAP_SERVER_LIBS])
  AC_SUBST([DAP_STATIC_LIBS])
  AC_SUBST([DAP_CLIENT_STATIC_LIBS])
  AC_SUBST([DAP_SERVER_STATIC_LIBS])
]) 

# AC_CHECK_DODS([ ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
# Test for Libdap or older versions. Define DAP_CFLAGS and DAP_LIBS and
# optionnaly DAP_ROOT

AC_DEFUN([AC_CHECK_DODS],
[
  AC_ARG_WITH([dods_root],
    [AS_HELP_STRING([--with-dods-root=ARG],[DODS root fallback])],
    ,,)

  ac_dods_ok='no'
  DAP_ROOT=
  AC_MSG_CHECKING([DODS specific root])
  if test -z "$with_dods_root" -o "$with_dods_root" = "no"; then
    AC_MSG_RESULT([disabled])
  else
    AC_MSG_RESULT([$with_dods_root])
    DODS_ROOT=$with_dods_root
    DODS_LIB=$with_dods_root/lib
    DODS_INC=$with_dods_root/include
    DODS_BIN=$with_dods_root/bin

    dnl Add the DODS libraries to LIBS
    if test -x "$DODS_BIN/opendap-config" ; then 
      dnl OPeNDAP 3.4 and earlier lack opendap-config, but use it if avail.
      DAP_LIBS="`$DODS_BIN/opendap-config --libs`"
      DAP_CFLAGS="`$DODS_BIN/opendap-config --cflags`"
      ac_dods_ok='yes'
    elif test -x "$DODS_BIN/dap-config" ; then
      dnl for OPeNDAP 3.5
      DAP_LIBS="`$DODS_BIN/dap-config --libs`"
      DAP_CFLAGS="`$DODS_BIN/dap-config --cflags`"
      ac_dods_ok='yes'
    else
      dnl Otherwise try to put things together in a more primitive way.
      DAP_LIBS="-L$DODS_LIB -ldap++ -lpthread"
      DAP_CFLAGS="-I$DODS_INC"
    
      ac_dods_curl='yes'
      dnl Add curl to LIBS; it might be local to DODS or generally installed
      AC_MSG_CHECKING([For curl])
      if test -x "$DODS_BIN/curl-config"; then
         DAP_LIBS="$DAP_LIBS  `$DODS_BIN/curl-config --libs`"
      elif which curl-config > /dev/null 2>&1; then
         DAP_LIBS="$DAP_LIBS  `curl-config --libs`"
      else
         ac_dods_curl='no'
      fi
      if test $ac_dods_curl = 'no' ; then
         AC_MSG_RESULT([no]) 
         dnl AC_MSG_WARN([You gave a dods root, but I can't find curl!])
      else
         AC_MSG_RESULT([yes])
      fi 
         
      
      AC_MSG_CHECKING([For libxml2])
      ac_dods_xml2='yes'
      if test -x "$DODS_BIN/xml2-config"; then
         DAP_LIBS="$DAP_LIBS `$DODS_BIN/xml2-config --libs`"
      elif which xml2-config > /dev/null 2>&1; then
         DAP_LIBS="$DAP_LIBS  `xml2-config --libs`"
      else
         ac_dods_xml2='no'
      fi
      if test $ac_dods_xml2 = 'no' ; then
         AC_MSG_RESULT([no]) 
         dnl AC_MSG_WARN([You gave a dods root, but I can't find xml2!])
      else
         AC_MSG_RESULT([yes])
      fi 
         
      AC_LANG_PUSH([C++])
      if test $ac_dods_xml2 = 'yes' -a $ac_dods_curl = 'yes'; then
         dnl We check that linking is succesfull
         ac_save_LIBS=$LIBS
         ac_save_CFLAGS=$CFLAGS
         LIBS="$LIBS $DAP_LIBS"
         CFLAGS="$CFLAGS $DAP_CFLAGS"
         dnl AC_CHECK_LIB is not used because it caches results
         dnl AC_CHECK_LIB([dap++],[main],[ac_dods_ok='yes'],[ac_dods_ok='no'])
         AC_MSG_CHECKING([for DODS with curl and libxml2])
         AC_LINK_IFELSE([AC_LANG_CALL([],[main])],[
           ac_dods_ok='yes'
           AC_MSG_RESULT([yes])
         ],[
           ac_dods_ok='no'
           AC_MSG_RESULT([no])
         ])
         LIBS=$ac_save_LIBS
         CFLAGS=$ac_save_CFLAGS
         if test "z$ac_dods_ok" = "zno"; then
           ac_save_LIBS=$LIBS
           ac_save_CFLAGS=$CFLAGS
           LIBS="$LIBS $DAP_LIBS -lrx"
           CFLAGS="$CFLAGS $DAP_CFLAGS"
           AC_MSG_CHECKING([for DODS with curl, libxml2 and librx])
           AC_LINK_IFELSE([AC_LANG_CALL([],[main])],[
               AC_MSG_RESULT([yes])
               ac_dods_ok='yes'
               DAP_LIBS="$DAP_LIBS -lrx"
           ],[
               ac_dods_ok='no'
               AC_MSG_RESULT([no])
           ])
           LIBS=$ac_save_LIBS
           CFLAGS=$ac_save_CFLAGS
         fi
      fi
      if test $ac_dods_ok = 'no'; then
         dnl assume it is an old version of DODS
         AC_MSG_NOTICE([Checking for DODS with libwww and librx])
         DAP_LIBS="-L$DODS_LIB -ldap++ -lwww -lpthread -lrx"
         DAP_CFLAGS="-I$DODS_INC"
         ac_save_LIBS=$LIBS
         ac_save_CFLAGS=$CFLAGS
         LIBS="$LIBS $DAP_LIBS"
         CFLAGS="$CFLAGS $DAP_CFLAGS"
         AC_CHECK_LIB([dap++],[main],[ac_dods_ok='yes'],[ac_dods_ok='no'])
         LIBS=$ac_save_LIBS
         CFLAGS=$ac_save_CFLAGS
      fi
      AC_LANG_POP
    fi
      
    AC_MSG_CHECKING([for DODS in a specific root])
    if test "z$ac_dods_ok" = "zyes"; then
       AC_MSG_RESULT([yes])
       AC_MSG_NOTICE([setting DAP_ROOT directory to $DODS_ROOT])
       DAP_ROOT=$DODS_ROOT
    else
       AC_MSG_RESULT([no])
    fi
  fi
  if test "z$ac_dods_ok" = "zno" ; then
     AC_CHECK_LIBDAP([],[ac_dods_ok='yes'],[ac_dods_ok='no'])
     if test "z$ac_dods_ok" = "zno" ; then
       AC_PATH_PROG([OPENDAP_CONFIG], [opendap-config], [no])
       AC_MSG_CHECKING([for libdap with opendap-config])
       if test "$OPENDAP_CONFIG" = "no" ; then
         ac_dods_ok='no'
         AC_MSG_RESULT([no])
       else
         DAP_LIBS="`$OPENDAP_CONFIG --libs`"
         DAP_CFLAGS="`$OPENDAP_CONFIG --cflags`"
         ac_dods_ok='yes'
         AC_MSG_RESULT([yes])
       fi
     fi
  fi 
  if test "x$ac_dods_ok" = "xyes" ; then
     if test "z$DAP_CLIENT_LIBS" = 'z' ; then
       DAP_CLIENT_LIBS=$DAP_LIBS
       DAP_SERVER_LIBS=$DAP_LIBS
     fi
     if test x"$DAP_CFLAGS" != x -a x"$DAP_CLIENT_CFLAGS" = x ; then
        DAP_CLIENT_CFLAGS=$DAP_CFLAGS
     fi
     if test x"$DAP_CFLAGS" != x -a x"$DAP_SERVER_CFLAGS" = x ; then
       DAP_SERVER_CFLAGS=$DAP_CFLAGS
     fi
     if test x"$DAP_STATIC_LIBS" = x ; then
       DAP_STATIC_LIBS=$DAP_LIBS
       DAP_CLIENT_STATIC_LIBS=$DAP_CLIENT_LIBS
       DAP_SERVER_STATIC_LIBS=$DAP_SERVER_LIBS
     fi
     m4_if([$1], [], [:], [$1])
  else
     DAP_LIBS=""
     DAP_CFLAGS=""
     DAP_CLIENT_LIBS=""
     DAP_SERVER_LIBS=""
     m4_if([$2], [], [:], [$2])
  fi
dnl done above
dnl  AC_SUBST([DAP_CFLAGS])
dnl  AC_SUBST([DAP_CLIENT_CFLAGS])
dnl  AC_SUBST([DAP_SERVER_CFLAGS])
dnl  AC_SUBST([DAP_LIBS])
dnl  AC_SUBST([DAP_CLIENT_LIBS])
dnl  AC_SUBST([DAP_SERVER_LIBS])
dnl  AC_SUBST([DAP_STATIC_LIBS])
dnl  AC_SUBST([DAP_CLIENT_STATIC_LIBS])
dnl  AC_SUBST([DAP_SERVER_STATIC_LIBS])
dnl  AC_SUBST([DAP_ROOT])
])