File: configure.ac

package info (click to toggle)
dcap 2.47.6-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 1,400 kB
  • sloc: ansic: 14,239; makefile: 412; xml: 136; python: 75; sh: 58
file content (587 lines) | stat: -rw-r--r-- 16,199 bytes parent folder | download
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
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
dnl $Id: configure.in,v 1.12 2003/10/07 11:51:53 omsynge Exp $
dnl -------------------------------------------------------------------------



AC_INIT(src/dcap.c)

AC_CONFIG_AUX_DIR(config)
AC_CANONICAL_SYSTEM
AM_CONFIG_HEADER(src/debug_level.h)


dnl uncomment when tagging
#RELEASE=TRUE

VER_ARCHITECTURE=2
VER_MAJOR=47
VER_MINOR=6
VER_PATCH=1
if test "A" = A$RELEASE; then
    VER_PATCH=${VER_PATCH}_`date '+20%y%m%d%H'`
fi

AM_INIT_AUTOMAKE(dcap,$VER_ARCHITECTURE.$VER_MAJOR.$VER_MINOR,"support@dcache.org","dcap","http://www.dcache.org/")
AC_SUBST(VER_ARCHITECTURE)
AC_SUBST(VER_MAJOR)
AC_SUBST(VER_MINOR)
AC_SUBST(VER_PATCH)

LIBRARY_VERSION="$VER_ARCHITECTURE:$VER_MAJOR:1"
AC_SUBST(LIBRARY_VERSION)

AC_PROG_CC

#
# Wall
#
AC_CACHE_CHECK([for maximum warnings compiler flag],
  ac_cv_cwflag,
[case "${CC-cc}" in
  *gcc*) ac_cv_cwflag="-Wall -pedantic -pipe";;
  *)
  ;;
esac])
AC_SUBST([CWFLAG], [$ac_cv_cwflag])



AC_PROG_INSTALL
AM_PROG_LIBTOOL
AC_PROG_LN_S

AM_PROG_CC_C_O
AC_SEARCH_LIBS([gethostbyname], [nsl])
AC_SEARCH_LIBS([bind], [socket])

AC_CHECK_FUNCS([alarm])
AC_CHECK_FUNCS([atexit])
AC_CHECK_FUNCS([bzero])
AC_CHECK_FUNCS([dup2])
AC_CHECK_FUNCS([ftruncate])
AC_CHECK_FUNCS([gethostbyaddr])
AC_CHECK_FUNCS([gethostbyname])
AC_CHECK_FUNCS([gethostname])
AC_CHECK_FUNCS([memmove])
AC_CHECK_FUNCS([memset])
AC_CHECK_FUNCS([mkdir])
AC_CHECK_FUNCS([realpath])
AC_CHECK_FUNCS([rmdir])
AC_CHECK_FUNCS([select])
AC_CHECK_FUNCS([socket])
AC_CHECK_FUNCS([strcasecmp])
AC_CHECK_FUNCS([strchr])
AC_CHECK_FUNCS([strdup])
AC_CHECK_FUNCS([strerror])
AC_CHECK_FUNCS([strndup])
AC_CHECK_FUNCS([strrchr])
AC_CHECK_FUNCS([strstr])
AC_CHECK_FUNCS([htonll])
AC_CHECK_FUNCS([ntohll])
AC_CHECK_FUNCS([acl])
AC_CHECK_FUNCS([facl])
AC_CHECK_FUNCS([_xstat])
AC_CHECK_FUNCS([_lxstat])
AC_CHECK_FUNCS([_fxstat])
AC_CHECK_FUNCS([lseek64])
AC_CHECK_FUNCS([pread64])
AC_CHECK_FUNCS([pwrite64])
AC_CHECK_FUNCS([ftello64])
AC_CHECK_FUNCS([fseeko64])
AC_CHECK_HEADERS([arpa/inet.h])
AC_CHECK_HEADERS([fcntl.h])
AC_CHECK_HEADERS([limits.h])
AC_CHECK_HEADERS([netdb.h])
AC_CHECK_HEADERS([netinet/in.h])
AC_CHECK_HEADERS([sys/param.h])
AC_CHECK_HEADERS([sys/socket.h])
AC_CHECK_HEADERS([sys/time.h])
AC_CHECK_HEADERS([sys/vfs.h])
AC_CHECK_HEADERS([termios.h])
AC_CHECK_HEADERS([stropts.h])
AC_CHECK_MEMBERS([struct stat.st_blksize])
AC_CHECK_MEMBERS([struct stat.st_rdev])
AC_CHECK_MEMBER([struct dirent.dirent])
AC_CHECK_MEMBER([struct dirent.dirent64])
AC_CHECK_MEMBERS([FILE._fileno])
AC_CHECK_MEMBERS([FILE._magic])
AC_CHECK_MEMBERS([FILE._file])
AC_CHECK_MEMBERS([FILE._flag])
AC_C_CONST
AC_FUNC_CHOWN
AC_FUNC_CLOSEDIR_VOID
AC_FUNC_FORK
AC_FUNC_FSEEKO
AC_FUNC_LSTAT
AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
AC_FUNC_MALLOC
AC_FUNC_MEMCMP
AC_FUNC_REALLOC
AC_FUNC_SELECT_ARGTYPES
AC_FUNC_STAT
AC_FUNC_VPRINTF
AC_HEADER_DIRENT
AC_HEADER_TIME
AC_PROG_RANLIB
AC_STRUCT_ST_BLOCKS
AC_TYPE_MODE_T
AC_TYPE_OFF_T
AC_TYPE_SIGNAL
AC_TYPE_SIZE_T
AC_TYPE_UID_T
AC_C_BIGENDIAN


dnl Store the compile flags prior to testing the presence.

_cppflags="${CPPFLAGS}"
_ldflags="${LDFLAGS}"
_ldlibpath="${LD_LIBRARY_PATH}"


dnl === zlib stuff ===

AC_CHECK_LIB(z, adler32, [ZLIB="-lz"],[
AC_MSG_ERROR([zlib was not found])
])
AC_SUBST(ZLIB)

dnl === Manage variables ===

CPPFLAGS=${_cppflags}
LDFLAGS=${_ldflags}
dnl Should not be needed but becasue globus libraries
dnl linking is somewhat problematic this is needed.
export LD_LIBRARY_PATH=${_ldlibpath}



dnl === openssl stuff ===

nossl=0
AC_CHECK_HEADERS([openssl/ssl.h], [], [nossl=1])
AC_CHECK_HEADERS([openssl/err.h], [], [nossl=1])
if test "${nossl}" != "0" ; then
AC_MSG_RESULT([Disabling ssl plugin as header files not found.])
else
AC_CHECK_LIB(ssl,SSL_library_init,[
SSL_LIBS="-lssl"
],[
nossl=1
])
AC_CHECK_LIB(crypto,ERR_print_errors_fp,[
SSL_LIBS="${SSL_LIBS} -lcrypto"
],[
nossl=1
])
fi
AC_SUBST(SSL_LIBS)

CPPFLAGS=${_cppflags}
LDFLAGS=${_ldflags}
export LD_LIBRARY_PATH=${_ldlibpath}

dnl === Thinks that should be in macros already ===
AC_CACHE_CHECK([for off64_t],
    ac_cv_have_off64_t,
    AC_TRY_COMPILE([
        #define _LARGEFILE64_SOURCE
        #include <sys/types.h>],
        [off64_t testoffset],
        ac_cv_have_off64_t=yes,
        ac_cv_have_off64_t=no))
if test x"$ac_cv_have_off64_t" = "xyes" ; then
    AC_DEFINE(HAVE_OFF64_T, 1, [Whether off64_t type is available])
fi


dnl === Globus stuff ===
noglobus=0
EPEL_LIBS_NOT=0


AC_ARG_WITH(globus-lib,
[ --with-globus-lib[[=DIR]] use libglobus libdir],[
if test "X${withval}" != "X" ; then
GLOBUS_LIB_DIR=$withval
LDFLAGS="${LDFLAGS} -L$withval"
if test "X${LD_LIBRARY_PATH}" = "X" ; then
export LD_LIBRARY_PATH="${withval}"
else
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${withval}"
fi
fi
])
AC_ARG_WITH(globus-include,
[ --with-globus-include[[=DIR]] use libglobus includedir],[
if test "X${withval}" != "X" ; then
GLOBUS_INCLUDE_DIR=$withval
CPPFLAGS="${CPPFLAGS} -I$withval"
fi
])

AC_CHECK_HEADERS( [globus_config.h],[], [noglobus=1])
AC_CHECK_HEADERS([gssapi.h],[],[noglobus=1])

if test "${noglobus}" != "0" ; then
AC_MSG_RESULT([Disabling Globus plugins as header files not found.])
else

dnl Set up the flags for found libraries


EPEL_LIBS_NOT=0
GCC64PTHR_LIBS_NOT=0
GCC64DBGPTHR_LIBS_NOT=0
GCC32PTHR_LIBS_NOT=0
GCC32DBGPTHR_LIBS_NOT=0

AC_CHECK_LIB(globus_gssapi_gsi,gss_wrap, [
GLOBUS_EPEL_LIBS="-lglobus_gssapi_gsi ${GLOBUS_EPEL_LIBS}"
],[
EPEL_LIBS_NOT=1
])


dnl == 64pthreads library checking version ==

AC_CHECK_LIB(globus_gssapi_gsi_gcc64pthr,gss_wrap, [
GLOBUS_GCC64PTHR_LIBS="-lglobus_gssapi_gsi_gcc64pthr ${GLOBUS_GCC64PTHR_LIBS}"
],[
GCC64PTHR_LIBS_NOT=1
])


dnl == 64dbgpthr library checking version ==

AC_CHECK_LIB(globus_gssapi_gsi_gcc64dbgpthr,gss_wrap, [
GLOBUS_GCC64DBGPTHR_LIBS="-lglobus_gssapi_gsi_gcc64dbgpthr ${GLOBUS_GCC64DBGPTHR_LIBS}"
],[
GCC64DBGPTHR_LIBS_NOT=1
])


dnl == 32pthreads library checking version ==

AC_CHECK_LIB(globus_gssapi_gsi_gcc32pthr,gss_wrap, [
GLOBUS_GCC32PTHR_LIBS="-lglobus_gssapi_gsi_gcc32pthr ${GLOBUS_GCC32PTHR_LIBS}"
],[
GCC32PTHR_LIBS_NOT=1
])


dnl == 32dbgpthr library checking version ==

AC_CHECK_LIB(globus_gssapi_gsi_gcc32dbgpthr,gss_wrap, [
GLOBUS_GCC32DBGPTHR_LIBS="-lglobus_gssapi_gsi_gcc32dbgpthr ${GLOBUS_GCC32DBGPTHR_LIBS}"
],[
GCC32DBGPTHR_LIBS_NOT=1
])


dnl set the version of globus fully detected and the library linking.
want_globus=no
if test "0" = "${GCC32DBGPTHR_LIBS_NOT}" ; then
GLOBUS_LIBS=${GLOBUS_GCC32DBGPTHR_LIBS}
PKGDEPVDT=1
want_globus=yes
fi

if test "0" = "${GCC32PTHR_LIBS_NOT}" ; then
GLOBUS_LIBS=${GLOBUS_GCC32PTHR_LIBS}
PKGDEPVDT=1
want_globus=yes
fi

if test "0" = "${GCC64DBGPTHR_LIBS_NOT}" ; then
GLOBUS_LIBS=${GLOBUS_GCC64DBGPTHR_LIBS}
PKGDEPVDT=1
want_globus=yes
fi

if test "0" = "${GCC64PTHR_LIBS_NOT}" ; then
GLOBUS_LIBS=${GLOBUS_GCC64PTHR_LIBS}
PKGDEPVDT=1
want_globus=yes
fi

if test "0" = "${EPEL_LIBS_NOT}" ; then
GLOBUS_LIBS=${GLOBUS_EPEL_LIBS}
PKGDEPEPEL=1
want_globus=yes
fi



dnl == End checking as globus header files exist ==
fi

dnl Substitute the globus library linking variable

AC_SUBST(GLOBUS_LIBS)

dnl restore the compile flags to what they where before checking for globus.

CPPFLAGS=${_cppflags}
LDFLAGS=${_ldflags}
export LD_LIBRARY_PATH=${_ldlibpath}



dnl == MIT Kerberos ==

AC_ARG_WITH(krb5-gssapi-include,
[ --with-krb5-gssapi-include[[=DIR]] use krb5 gssapi includedir],[
if test "X${withval}" != "X" ; then
KRB5_GSSAPI_INCLUDE_DIR=$withval
fi
],[
KRB5_GSSAPI_INCLUDE_DIR=/usr/include/gssapi
])
AC_SUBST(KRB5_GSSAPI_INCLUDE_DIR)

nokrb=0
CPPFLAGS="${CPPFLAGS} -I${KRB5_GSSAPI_INCLUDE_DIR}"
AC_CHECK_HEADERS([gssapi_krb5.h],[],[nokrb=1])
AC_CHECK_HEADERS([gssapi_generic.h],[],[nokrb=1])


if test "${nokrb}" != "0" ; then
AC_MSG_RESULT([Disabling KRB plugins as header files not found.])
else

AC_CHECK_LIB(gssapi_krb5,gss_import_name, [
KRB_LIBS="-lgssapi_krb5 ${KRB_LIBS}"
],[
nokrb=1
])

fi
AC_SUBST(KRB_LIBS)



CPPFLAGS=${_cppflags}
LDFLAGS=${_ldflags}
export LD_LIBRARY_PATH=${_ldlibpath}

dnl ====================
dnl Check and set Prefix
dnl ====================

if test "${prefix}" = NONE ; then
    dcap_prefix=/usr/local
else
    dcap_prefix=${prefix}
fi

dnl =============
dnl Check RPM dir
dnl =============

if test X = "X${RPMD}" ; then
    RPMD=`pwd`
fi
AC_MSG_CHECKING([for directory where to create rpms])
AC_ARG_WITH(rpm-dir,[  --with-rpm-dir=<dir> Default is \$RPMD/],
            rpm_dir="$withval", rpm_dir="$RPMD")
if test -d "$rpm_dir" ; then
    AC_MSG_RESULT([found $rpm_dir])
    RPM_DIR=$rpm_dir
else
    AC_MSG_RESULT([no such directory $rpm_dir])
    AC_MSG_RESULT([the directory $rpm_dir will be created for you if possible])
    RPM_DIR=$rpm_dir
fi
AC_SUBST(RPM_DIR)

dnl =============
dnl Check Doc dir
dnl =============
dnl Note: as of autoconf 2.6 this is included by default

if test X = "X${DOCD}" ; then
    DOCD=${dcap_prefix}/share/doc/${PACKAGE}-${VERSION}
fi
AC_MSG_CHECKING([for directory where to install docs])
AC_ARG_WITH(doc-dir,[  --with-doc-dir=<dir> Default is \$DOCD/],
            doc_dir="$withval", doc_dir="$DOCD")
if test -d "$doc_dir" ; then
    AC_MSG_RESULT([found $doc_dir])
    DOC_DIR=$doc_dir
else
    AC_MSG_RESULT([no such directory $doc_dir])
    AC_MSG_RESULT([the directory $doc_dir will be created for you if possible])
    DOC_DIR=$doc_dir
fi

AC_SUBST(DOC_DIR)

AC_SUBST(ac_aux_dir)

dnl Some debugging dcap #defines

AC_DEFINE_UNQUOTED(DC_NO_OUTPUT,0,[dcap debug level for no output])
AC_DEFINE_UNQUOTED(DC_ERROR,1,[dcap debug level for error])
AC_DEFINE_UNQUOTED(DC_INFO,2,[dcap debug level for info])
AC_DEFINE_UNQUOTED(DC_TIME,4,[dcap debug level to include time stamps])
AC_DEFINE_UNQUOTED(DC_TRACE,8,[dcap debug level to include stacks])
AC_DEFINE_UNQUOTED(DC_CALLS,16,[dcap debug level to include calls])
AC_DEFINE_UNQUOTED(DC_IO,32,[dcap debug level to include IO logging])
AC_DEFINE_UNQUOTED(DC_THREADS,64,[dcap debug level to include thread tracing])


dnl Set default preload options

OPEN_SYM="open"
CLOSE_SYM="close"
READ_SYM="read"
WRITE_SYM="write"
LSEEK_SYM="lseek"
LSEEK64_SYM="lseek64"
PREAD_SYM="pread"
PREAD64_SYM="pread64"
PWRITE_SYM="pwrite"
PWRITE64_SYM="pwrite64"
STAT_SYM="stat"
STAT64_SYM="stat64"
FSTAT64_SYM="fstat64"
LSTAT_SYM="lstat"
LSTAT64_SYM="lstat64"
FSTAT_SYM="fstat"
FSYNC_SYM="fsync"
DUP_SYM="dup"
OPENDIR_SYM="opendir"
CLOSEDIR_SYM="closedir"
READDIR_SYM="readdir"
READDIR64_SYM="readdir64"
TELLDIR_SYM="telldir"
SEEKDIR_SYM="seekdir"
UNLINK_SYM="unlink"
RMDIR_SYM="rmdir"
MKDIR_SYM="mkdir"
CHMOD_SYM="chmod"
ACCESS_SYM="access"
RENAME_SYM="rename"
CHOWN_SYM="chown"
WRITEV_SYM="writev"
READV_SYM="readv"
ACL_SYM="acl"
FACL_SYM="facl"
dnl Override defaults By OS
case "${target_os}" in
linux-gnu)
AC_MSG_RESULT([Setting the Linux preload methods])
STAT_SYM="__xstat"
STAT64_SYM="__xstat64"
FSTAT64_SYM="__fxstat64"
LSTAT_SYM="__lxstat"
LSTAT64_SYM="__lxstat64"
FSTAT_SYM="__fxstat"
;;
darwin*)
AC_MSG_RESULT([Setting Darwin preload methods])
;;
sgi*)
AC_MSG_RESULT([Setting SGI preload methods])
OPENDIR_SYM="_opendir"
CLOSEDIR_SYM="_closedir"
READDIR_SYM="_readdir"
READDIR64_SYM="_readdir64"
TELLDIR_SYM="_telldir"
SEEKDIR_SYM="_seekdir"
;;
solaris*)
AC_MSG_RESULT([Setting SUN preload methods])
OPENDIR_SYM="_opendir"
CLOSEDIR_SYM="_closedir"
READDIR_SYM="_readdir"
READDIR64_SYM="_readdir64"
TELLDIR_SYM="_telldir"
SEEKDIR_SYM="_seekdir"
;;
*)
AC_MSG_RESULT([Operating system not coded for explicitly so disabling preload])
CPPFLAGS=${CPPFLAGS} -DDCAP_NO_PREAD
;;
esac

AC_DEFINE_UNQUOTED(OPEN_SYM,"$OPEN_SYM",[native function for native or local file system access.])
AC_DEFINE_UNQUOTED(CLOSE_SYM,"$CLOSE_SYM",[native function for native or local file system access.])
AC_DEFINE_UNQUOTED(READ_SYM,"$READ_SYM",[native function for native or local file system access.])
AC_DEFINE_UNQUOTED(WRITE_SYM,"$WRITE_SYM",[native function for native or local file system access.])
AC_DEFINE_UNQUOTED(LSEEK_SYM,"$LSEEK_SYM",[native function for native or local file system access.])
AC_DEFINE_UNQUOTED(LSEEK64_SYM,"$LSEEK64_SYM",[native function for native or local file system access.])
AC_DEFINE_UNQUOTED(PREAD_SYM,"$PREAD_SYM",[native function for native or local file system access.])
AC_DEFINE_UNQUOTED(PREAD64_SYM,"$PREAD64_SYM",[native function for native or local file system access.])
AC_DEFINE_UNQUOTED(PWRITE_SYM,"$PWRITE_SYM",[native function for native or local file system access.])
AC_DEFINE_UNQUOTED(PWRITE64_SYM,"$PWRITE64_SYM",[native function for native or local file system access.])
AC_DEFINE_UNQUOTED(STAT_SYM,"$STAT_SYM",[native function for native or local file system access.])
AC_DEFINE_UNQUOTED(STAT64_SYM,"$STAT64_SYM",[native function for native or local file system access.])
AC_DEFINE_UNQUOTED(FSTAT64_SYM,"$FSTAT64_SYM",[native function for native or local file system access.])
AC_DEFINE_UNQUOTED(LSTAT_SYM,"$LSTAT_SYM",[native function for native or local file system access.])
AC_DEFINE_UNQUOTED(LSTAT64_SYM,"$LSTAT64_SYM",[native function for native or local file system access.])
AC_DEFINE_UNQUOTED(FSTAT_SYM,"$FSTAT_SYM",[native function for native or local file system access.])
AC_DEFINE_UNQUOTED(FSYNC_SYM,"$FSYNC_SYM",[native function for native or local file system access.])
AC_DEFINE_UNQUOTED(DUP_SYM,"$DUP_SYM",[native function for native or local file system access.])
AC_DEFINE_UNQUOTED(OPENDIR_SYM,"$OPENDIR_SYM",[native function for native or local file system access.])
AC_DEFINE_UNQUOTED(CLOSEDIR_SYM,"$CLOSEDIR_SYM",[native function for native or local file system access.])
AC_DEFINE_UNQUOTED(READDIR_SYM,"$READDIR_SYM",[native function for native or local file system access.])
AC_DEFINE_UNQUOTED(READDIR64_SYM,"$READDIR64_SYM",[native function for native or local file system access.])
AC_DEFINE_UNQUOTED(TELLDIR_SYM,"$TELLDIR_SYM",[native function for native or local file system access.])
AC_DEFINE_UNQUOTED(SEEKDIR_SYM,"$SEEKDIR_SYM",[native function for native or local file system access.])
AC_DEFINE_UNQUOTED(UNLINK_SYM,"$UNLINK_SYM",[native function for native or local file system access.])
AC_DEFINE_UNQUOTED(RMDIR_SYM,"$RMDIR_SYM",[native function for native or local file system access.])
AC_DEFINE_UNQUOTED(MKDIR_SYM,"$MKDIR_SYM",[native function for native or local file system access.])
AC_DEFINE_UNQUOTED(CHMOD_SYM,"$CHMOD_SYM",[native function for native or local file system access.])
AC_DEFINE_UNQUOTED(ACCESS_SYM,"$ACCESS_SYM",[native function for native or local file system access.])
AC_DEFINE_UNQUOTED(RENAME_SYM,"$RENAME_SYM",[native function for native or local file system access.])
AC_DEFINE_UNQUOTED(CHOWN_SYM,"$CHOWN_SYM",[native function for native or local file system access.])
AC_DEFINE_UNQUOTED(WRITEV_SYM,"$WRITEV_SYM",[native function for native or local file system access.])
AC_DEFINE_UNQUOTED(READV_SYM,"$READV_SYM",[native function for native or local file system access.])
AC_DEFINE_UNQUOTED(ACL_SYM,"$ACL_SYM",[native function for native or local file system access.])
AC_DEFINE_UNQUOTED(FACL_SYM,"$FACL_SYM",[native function for native or local file system access.])

dnl We dont test for the dependencies for the telnet plugin
dnl as there appear to be no major ones.

notelnet="0"

dnl Do the conditional compilation flags in rest of autotools.

AM_CONDITIONAL([WANT_LIBGSITUNNEL], [test "${want_globus}" = "yes"])
AM_CONDITIONAL([WANT_LIBGSSTUNNEL], [test "${nokrb}" = "0"])
AM_CONDITIONAL([WANT_LIBTELNETTUNNEL], [test "${notelnet}" = "0"])
AM_CONDITIONAL([WANT_LIBSSLTUNNEL], [test "${nossl}" = "0"])
AM_CONDITIONAL([PKG_DEP_VDT], [test "${PKGDEPVDT}" = "1"])
AM_CONDITIONAL([PKG_DEP_EPEL], [test "${PKGDEPEPEL}" = "1"])



AC_SUBST(GSSAPI_TARGETS)

dnl Passing configure variables to spec file for rpm to build.

AC_SUBST(GLOBUS_INCLUDE_DIR)
AC_SUBST(GLOBUS_LIB_DIR)

TUNNELLIBDIR="$libdir"
AC_ARG_WITH(tunneldir,
[ --with-tunneldir[[=DIR]] where to install dcap plugins],[
if test "X${withval}" != "X" ; then
TUNNELLIBDIR="$withval"
fi
])

AC_DEFINE_UNQUOTED(TUNNELLIBDIR, "$TUNNELLIBDIR", [where to install dcap plugins])
AC_SUBST(TUNNELLIBDIR)

AC_OUTPUT(Makefile \
  src/Makefile \
  src/dcap.h \
  src/dcap_version.c \
  plugins/Makefile \
  plugins/gssapi/Makefile \
  plugins/ssl/Makefile \
  plugins/telnet/Makefile \
  dcap.spec )