Repository navigation
Expand file tree
/
Copy pathacinclude.m4
More file actions
713 lines (621 loc) · 18.2 KB
/
Copy pathacinclude.m4
File metadata and controls
713 lines (621 loc) · 18.2 KB
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
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
AC_DEFUN([AC_LINUX],
[
AC_MSG_CHECKING([if compiling on Linux])
if test "x`uname -s`" = "xLinux" ; then
AC_MSG_RESULT([yes])
AC_DEFINE(RUN_ON_LINUX, 1, [Define to 1 if running on a Linux System])
else
AC_MSG_RESULT([no])
fi
])
AC_DEFUN([AC_PARSER_GEN],
[
AC_ARG_ENABLE([parser-gen],
[ --disable-parser-gen disable the generation the parser code with flex/bison. ],
[ parser_gen=${enableval} ],
[ parser_gen="yes" ])
AM_CONDITIONAL([REGENERATE_PARSERS], [test "x${parser_gen}" = xyes])
])
AC_DEFUN([AC_BUILD_PARTS],
[
AC_ARG_WITH(all,
[ --with-all Enable compilation of the clients (yes)],
[
case "$withval" in
yes) build_all="yes" ;;
no) build_all="no" ;;
*) AC_MSG_ERROR([bad value $withval for --with-all]) ;;
esac
],
[ build_all="yes" ])
AC_ARG_WITH(clients,
[ --with-clients Enable compilation of the clients (yes)],
[
case "$withval" in
yes) build_clients="yes" ;;
no) build_clients="no" ;;
*) AC_MSG_ERROR([bad value $withval for --with-client]) ;;
esac
],
[ build_clients="$build_all" ])
AC_ARG_WITH(server,
[ --with-server Enable compilation of the server (yes)],
[
case "$withval" in
yes) build_server="yes" ;;
no) build_server="no" ;;
*) AC_MSG_ERROR([bad value $withval for --with-server]) ;;
esac
],
[ build_server="$build_all" ])
AC_ARG_WITH(c-api,
[ --with-c-api No effect],
[
case "$withval" in
yes) build_c_api="yes" ;;
no) build_c_api="no" ;;
*) AC_MSG_ERROR([bad value $withval for --with-c-api]) ;;
esac
],
[ build_c_api="$build_all" ])
AC_ARG_WITH(cpp-api,
[ --with-cpp-api Enable compilation of the C++ APIs (yes)],
[
case "$withval" in
yes) build_cpp_api="yes" ;;
no) build_cpp_api="no" ;;
*) AC_MSG_ERROR([bad value $withval for --with-cpp-api]) ;;
esac
],
[ build_cpp_api="$build_all" ])
AC_ARG_WITH(interfaces,
[ --with-interfaces Enable compilation of the includes (yes)],
[
case "$withval" in
yes) build_interfaces="yes" ;;
no) build_interfaces="no" ;;
*) AC_MSG_ERROR([bad value $withval for --with-interfaces]) ;;
esac
],
[ build_interfaces="$build_all" ])
AC_ARG_WITH(config,
[ --with-config Enable compilation of the configuration files (yes)],
[
case "$withval" in
yes) build_config="yes" ;;
no) build_config="no" ;;
*) AC_MSG_ERROR([bad value $withval for --with-config]) ;;
esac
],
[ build_config="$build_all" ])
AM_CONDITIONAL(BUILD_CPP_API, test x$build_cpp_api = xyes)
AM_CONDITIONAL(BUILD_INTERFACES, test x$build_interfaces = xyes)
AM_CONDITIONAL(BUILD_CLIENTS, test x$build_clients = xyes)
AM_CONDITIONAL(BUILD_SERVER, test x$build_server = xyes)
AM_CONDITIONAL(BUILD_CONFIG, test x$build_config = xyes)
])
# AC_OPENSSL checks system openssl availability
# ---------------------------------------------
AC_DEFUN([AC_OPENSSL],
[
AC_ARG_WITH(openssl_prefix,
[ --with-openssl-prefix=PFX prefix where OpenSSL is installed. (/usr)],
[with_openssl_prefix="$withval"],
[with_openssl_prefix=/usr])
if test "x$with_openssl_prefix" = "x/usr" ; then
AC_CHECK_LIB(crypto, CRYPTO_num_locks, [found=yes], [found=no])
if test "x$found" = "xyes" ; then
OPENSSL_LIBS="-lcrypto -lssl"
NO_GLOBUS_FLAGS=""
fi
else
SAVE_LD_LIBRARY_PATH=$LD_LIBRARY_PATH
LD_LIBRARY_PATH="$with_openssl_prefix/lib"
AC_LANG_PUSH(C)
AC_CHECK_LIB(crypto, CRYPTO_num_locks, [found=yes], [found=no])
AC_LANG_POP(C)
NO_GLOBUS_FLAGS="-I$with_openssl_prefix/include"
if test "x$found" = "xyes"; then
OPENSSL_LIBS="-L$with_openssl_prefix/lib -lcrypto -lssl"
AC_MSG_CHECKING([for system OpenSSL version])
cat >conftest.h <<HERE
#include <openssl/opensslv.h>
OPENSSL_VERSION_TEXT
HERE
openssl_version=`$CPP $NO_GLOBUS_FLAGS -o - -P conftest.h`
AC_MSG_RESULT($openssl_version)
rm -f conftest.h
fi
LD_LIBRARY_PATH="$SAVE_LD_LIBRARY_PATH"
fi
SAVE_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS -Werror"
AC_MSG_CHECKING(if asn1.h functions need const)
AC_TRY_COMPILE(
[
#include <openssl/asn1.h>
],
[
char **pp;
long length;
ASN1_PRINTABLESTRING *p;
(void)M_d2i_ASN1_PRINTABLESTRING(&p, pp, length);
],
[ac_need_const="no"],
[ac_need_const="yes"])
CFLAGS="$SAVE_CFLAGS"
AC_MSG_RESULT($ac_need_const)
AC_SUBST(OPENSSL_LIBS)
AC_SUBST(NO_GLOBUS_FLAGS)
if test "x$ac_need_const" = "xyes" ; then
AC_DEFINE(NEEDCONST, 1, [Define to 1 if openssl needs "consted" parameters])
fi
AH_BOTTOM([#if defined(NEEDCONST)
#define MAYBECONST const
#else
#define MAYBECONST
#endif])
])
# AC_COMPILER add switch to enable debug and warning
# options for gcc
# -------------------------------------------------------
AC_DEFUN([AC_COMPILER],
[
AC_ARG_WITH(debug,
[ --with-debug Compiles without optimizations and with debug activated],
[ac_with_debug="yes"],
[ac_with_debug="no"])
if test "x$ac_with_debug" = "xyes" ; then
CFLAGS="-g -O0"
CXXFLAGS="-g -O0"
fi
AC_ARG_WITH(warnings,
[ --with-warnings Compiles with maximum warnings],
[ac_with_warnings="yes"],
[ac_with_warnings="no"])
if test "x$ac_with_warnings" = "xyes" ; then
CFLAGS="-g -O0 -Wall -ansi -W $CFLAGS"
CXXFLAGS="-g -O0 -Wall -ansi -W $CXXFLAGS"
fi
])
AC_DEFUN([AC_BUILD_API_ONLY],
[
AC_ARG_WITH(api-only,
[ --with-api-only Enable compilation of the APIs only (no)],
[
case "$withval" in
yes) have_api_only="yes" ;;
no) have_api_only="no" ;;
*) AC_MSG_ERROR([bad value $(withval) for --with-api-only]) ;;
esac
],
[ have_api_only="no" ])
AM_CONDITIONAL(BUILD_ALL, test x$have_api_only = xno)
])
# AC_ENABLE_DOCS add switch to enable debug and warning
# options for gcc
# -------------------------------------------------------
AC_DEFUN([AC_ENABLE_DOCS],
[
AC_ARG_ENABLE(docs,
[ --enable-docs Enable doc generation],
[
case "$enableval" in
yes) build_docs="yes" ;;
no) ;;
*) AC_MSG_ERROR(bad value $(enableval) for --enable-docs) ;;
esac
],
[build_docs="no"])
AM_CONDITIONAL(BUILD_DOCS, test x$build_docs = xyes)
])
# AC_VOMS_TIME_T_TIMEZONE test whether time_t timezone is present
# int time.h
# ------------------------------------------------------------
AC_DEFUN([AC_VOMS_TIME_T_TIMEZONE],
[
AC_MSG_CHECKING(for time_t timezone in <time.h>)
AC_LANG_PUSH(C)
AC_TRY_COMPILE(
[
#include <time.h>
],
[
struct tm y;
time_t offset = 3;
time_t x = mktime(&y) + offset*60*60 - timezone;
],
[ac_have_time_t_timezone="yes"],
[ac_have_time_t_timezone="no"]
)
if test "X$ac_have_time_t_timezone" = "Xyes" ; then
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_TIME_T_TIMEZONE, 1, [Define to 1 if you have time_t timezone type in time.h])
else
dnl
dnl only place this should occur is on CYGWIN B20, which has an
dnl integer _timezone defined instead
dnl
AC_MSG_RESULT(no)
AC_MSG_CHECKING(checking for time_t _timezone in <time.h>)
AC_TRY_COMPILE(
[
#include <time.h>
],
[
struct tm y;
time_t offset = 3;
time_t x = mktime(&y) + offset*60*60 - _timezone;
],
[answer=yes]
[answer=no]
)
if test "X$answer" = "Xyes" ; then
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_TIME_T__TIMEZONE, 1, [Define to 1 if you have time_t _timezone type in time.h])
else
AC_MSG_RESULT(no)
fi
AC_LANG_POP(C)
fi
])
# AC_VOMS_STRNDUP
# ------------------------------------------------------------
AC_DEFUN([AC_VOMS_STRNDUP],
[
AC_MSG_CHECKING([for strndup])
AC_TRY_LINK([
#include <string.h>
],
[
char *s = strndup("prova",5);
],
[AC_DEFINE(HAVE_STRNDUP, 1, [Define to 1 if you have strndup in string.h])
AC_MSG_RESULT(yes)],
[AC_LIBOBJ(strndup)
AC_MSG_RESULT(no)])
])
# AC_SOCKLEN_T test whether socklen_t type is present
# ------------------------------------------------------------
AC_DEFUN([AC_VOMS_SOCKLEN_T],
[
AC_MSG_CHECKING([for (sane) socklen_t])
AC_TRY_COMPILE(
[
#include <sys/types.h>
#include <sys/socket.h>
],
[
socklen_t addrlen = (socklen_t)5;
(void)getsockname(0, 0L, &addrlen);
return 0;
],
[ac_have_socklen_t="yes"],
[ac_have_socklen_t="no"]
)
if test "x$ac_have_socklen_t" = "xyes" ; then
AC_DEFINE(HAVE_SOCKLEN_T, 1, [Define to 1 if you have the socklen_t type])
fi
AC_MSG_RESULT([$ac_have_socklen_t])
])
# AC_VOMS_FIND_FUNC
# -------------------------------------------------------------------
AC_DEFUN([AC_VOMS_FIND_FUNC],
[
AC_MSG_CHECKING([for function name discovery])
AC_TRY_COMPILE(
[],
[char *str = __func__],
[ac_have_func="__func__"],
[ac_have_func="no"]
)
if test "x$ac_have_func" = "xno" ; then
AC_TRY_COMPILE(
[],
[char *str = __PRETTY_FUNCTION__],
[ac_have_func="__PRETTY_FUNCTION__"],
[ac_have_func="no"]
)
fi
if test "x$ac_have_func" = "xno" ; then
AC_TRY_COMPILE(
[],
[char *str = ___FUNCTION__],
[ac_have_func="__FUNCTION__"],
[ac_have_func="NULL"]
)
fi
AC_DEFINE_UNQUOTED(FUNC_NAME, [$ac_have_func], FUNC_NAME)
AC_MSG_RESULT([$ac_have_func])
])
AC_DEFUN([NEW_ISSUES],
[
AC_MSG_CHECKING([for string dependency on cerr])
AC_LANG_PUSH(C++)
cat > conftest.cpp <<HERE
#include <string>
int main(int argc, char *argv[]) {
std::string g;
return 0;
}
HERE
if ( ($CXX -c -o conftest.o conftest.cpp > /dev/null 2>&1) ); then
if ( (nm -C conftest.o | grep cerr > /dev/null 2>&1) ); then
AH_BOTTOM([#ifdef __cplusplus
#include <new>
#endif])
AC_DEFINE(__THROW_BAD_ALLOC, return 0L, __THROW_BAD_ALLOC)
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
fi
else
AC_MSG_RESULT([cannot test])
fi
rm -rf conftest*
AC_LANG_POP(C++)
])
AC_DEFUN([PUT_PRIVATES],
[
AH_BOTTOM([#if defined(__GNUC__)
#if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
#define UNUSED(z) z __attribute__ ((unused))
#else
#define UNUSED(z) z
#endif
#define PRIVATE __attribute__ ((visibility ("hidden")))
#define PUBLIC __attribute__ ((visibility ("default")))
#else
#define UNUSED(z) z
#define PRIVATE
#define PUBLIC
#endif])])
AC_DEFUN([TEST_USE_BSD],
[
AC_MSG_CHECKING([whether _BSD_SOURCE must be defined])
AC_LANG_PUSH(C)
cat >conftest.c <<HERE
#include <strings.h>
char *f(void)
{
return strdup("try");
}
int main(int argc, char **argv) {
(void)f();
return 0;
}
HERE
if ( ($CC -c -o conftest.o -Wall -ansi -pedantic-errors -Werror conftest.c >/dev/null 2>&1) ); then
AC_MSG_RESULT([no])
else
cat >conftest.c <<HERE
#define _BSD_SOURCE
#include <strings.h>
char *f(void)
{
return strdup("try");
}
int main(int argc, char **argv) {
(void)f();
return 0;
}
HERE
if ( ($CC -c -o conftest.o -Wall -ansi -pedantic-errors -Werror conftest.c >/dev/null 2>&1) ); then
AC_MSG_RESULT([Needs something else. Let's try and hope])
else
AC_MSG_RESULT([yes])
AC_DEFINE(_BSD_SOURCE, 1, [needed to get ansi functions definitions])
fi
fi
rm -rf conftest*
AC_LANG_POP(C)
])
AC_DEFUN([TEST_USE_POSIX],
[
AC_MSG_CHECKING([wether _POSIX_SOURCE must be defined])
AC_LANG_PUSH(C)
cat >conftest.c <<HERE
#include <stdio.h>
int f(void)
{
return fileno(stderr);
}
int main(int argc, char **argv) {
(void)f();
return 0;
}
HERE
if ( ($CC -c -o conftest.o -Wall -ansi -pedantic-errors -Werror conftest.c >/dev/null 2>&1) ); then
AC_MSG_RESULT([no])
else
cat >conftest.c <<HERE
#define _POSIX_SOURCE
#include <strings.h>
int f(void)
{
return fileno(stderr);
}
int main(int argc, char **argv) {
(void)f();
return 0;
}
HERE
if ( ($CC -c -o conftest.o -Wall -ansi -pedantic-errors -Werror conftest.c >/dev/null 2>&1) ); then
AC_MSG_RESULT([Needs something else. Let's try and hope])
else
AC_MSG_RESULT([yes])
AC_DEFINE(_POSIX_SOURCE, 1, [needed to get ansi functions definitions])
fi
fi
rm -rf conftest*
AC_LANG_POP(C)
])
AC_DEFUN([AC_TESTSUITE],
[
AC_ARG_WITH(report-dir,
[ --with-report-dir Set reportdir for testsuite],
[with_reportdir="$withval"],
[with_reportdir="$HOME/reports"])
AC_ARG_WITH(scratch-dir,
[ --with-scratch-dir Set scratchdir for testsuite],
[with_scratchdir="$withval"],
[with_scratchdir="/tmp"])
AC_ARG_WITH(dbuser,
[ --with-dbuser Set DB user for testsuite],
[with_dbuser="$withval"],
[with_dbuser="root"])
AC_ARG_WITH(dbpwd,
[ --with-dbpwd Set DB password for testsuite],
[with_dbpwd="$withval"],
[with_dbpwd=""])
AC_ARG_WITH(mysqlconf,
[ --with-mysqlconf Set DB password for testsuite],
[with_mysqlconf="$withval"],
[with_mysqlconf=""])
AC_ARG_ENABLE(oracle-tests,
[ --enable-oracle-tests Do tests against Oracle DB],
[ case "$enableval" in
yes) enable_oracletests="yes" ;;
no) enable_oracletests="no" ;;
*) AC_MSG_ERROR([bad value $(enableval) for --enable-oracle-tests]) ;;
esac
],
[ enable_oracletests="no"])
AC_ARG_ENABLE(mysql-tests,
[ --enable-mysql-tests Do tests against MySQL DB],
[ case "$enableval" in
yes) enable_mysqltests="yes" ;;
no) enable_mysqltests="no" ;;
*) AC_MSG_ERROR([bad value $(enableval) for --enable-mysql-tests]) ;;
esac
],
[ enable_mysqltests="yes"])
AC_ARG_ENABLE(coverage,
[ --enable-coverage Enable getting coverage info on the testsuite execution],
[
case "$enableval" in
yes) enable_coverage="yes" ;;
no) enabl
8
e_covera
BDC8
ge="no" ;;
*) AC_MSG_ERROR([bad value $(enableval) for --enable-coverage]) ;;
esac
],
[ enable_coverage="no" ])
if test "x$enable_coverage" = "xyes" ; then
CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
CXXFLAGS="$CXXFLAGS -fprofile-arcs -ftest-coverage"
LDFLAGS="$LDFLAGS -lgcov"
fi
AC_ARG_WITH(cobertura,
[ --with-cobertura=PFX prefix where cobertura is placed (no default)],
[with_cobertura_prefix="$withval"],
[with_cobertura_prefix="no"])
AC_ARG_WITH(valgrind,
[ --with-valgrind=PFX Also test memory leaks with valgrind],
[with_valgrind="$withval"],
[with_valgrind="no"])
AC_MSG_CHECKING(valgrind installation)
if test "x$with_valgrind" == "xno" ; then
with_valgrind="";
if test "x$with_valgrind" == "x" ; then
valgrind_path=`which valgrind 2>/dev/null`;
if test "x$valgrind_path" == "x"; then
AC_MSG_RESULT(valgrind not found.)
else
with_valgrind=$valgrind_path
AC_MSG_RESULT(valgrind found at: $with_valgrind.)
fi
fi
else
AC_MSG_RESULT($with_valgrind.)
fi
AM_CONDITIONAL(USE_COBERTURA, test ! x$with_cobertura_prefix = xno)
AC_SUBST(with_valgrind)
AC_SUBST(with_reportdir)
AC_SUBST(with_scratchdir)
AC_SUBST(with_dbuser)
AC_SUBST(with_dbpwd)
AC_SUBST(with_mysqlconf)
AC_SUBST(enable_oracletests)
AC_SUBST(enable_mysqltests)
AC_SUBST(enable_coverage)
AC_SUBST(with_cobertura_prefix)
])
dnl This macro written by:
dnl author: Gabor Gombas.
dnl
dnl
dnl GLITE_DOCBOOK_HTML
dnl
dnl Check for xsltproc and the HTML stylesheets
dnl
AC_DEFUN([GLITE_DOCBOOK_MAN], [
AC_PATH_PROG([XSLTPROC], [xsltproc], [no])
if test "$XSLTPROC" != no; then
if test -z "$XLSTPROCFLAGS"; then
XSLTPROCFLAGS="--nonet"
fi
AC_CACHE_CHECK([for DocBook XML manpage stylesheets], [glite_cv_docbook_man],
[
cat >conftest.xml <<"EOF"
<?xml version="1.0"?>
<!-- "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" @<:@ -->
<?xml-stylesheet href="http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl" type="text/xsl"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" @<:@
@:>@>
<refentry id="test">
<refmeta>
<refentrytitle>TEST</refentrytitle>
<manvolnum>test</manvolnum>
</refmeta>
</refentry>
EOF
$XSLTPROC $XSLTPROCFLAGS http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl conftest.xml >/dev/null 2>/dev/null
result=$?
if test $result = 0; then
glite_cv_docbook_man=yes
else
glite_cv_docbook_man=no
fi
])
AC_SUBST([XSLTPROCFLAGS])
fi
AM_CONDITIONAL([HAVE_DOCBOOK_MAN], [test "$glite_cv_docbook_man" = yes])
])
AC_DEFUN([AC_VOMS_LOCATIONS],
[
if test "x$prefix" = "xNONE"; then
actual_prefix=$ac_default_prefix
else
actual_prefix=$prefix
fi
loc_dir=${actual_prefix}
if test "x$exec_prefix" = "xNONE"; then
bin_dir=${actual_prefix}
else
bin_dir=${exec_prefix}
fi
if test "x"'${prefix}/etc' = "x$sysconfdir"; then
etc_dir=${actual_prefix%%/}/etc
else
etc_dir=$sysconfdir
fi
if test "x"'${prefix}/var' = "x$localstatedir"; then
var_dir=${actual_prefix%%/}/var
else
var_dir=$localstatedir
fi
AC_SUBST(LOCATION_ENV, "VOMS_LOCATION")
AC_SUBST(VAR_LOCATION_ENV, "VOMS_LOCATION_VAR")
AC_DEFINE(LOCATION_ENV, "VOMS_LOCATION", "Name of the voms location environment variable")
AC_DEFINE(VAR_LOCATION_ENV, "VOMS_LOCATION_VAR", "Name of the var voms location environment variable")
AC_DEFINE_UNQUOTED(LOCATION_DIR, "$loc_dir", "Prefix for the voms installation")
AC_DEFINE_UNQUOTED(VAR_DIR, "$var_dir", "Location of the var directory)
AC_DEFINE_UNQUOTED(BIN_DIR, "$bin_dir", "Prefix for the binaries")
AC_DEFINE_UNQUOTED(ETC_DIR, "$etc_dir", "Location of the system directory")
AC_SUBST(LOCATION_DIR, "$loc_dir")
AC_SUBST(BIN_DIR, "$bin_dir")
AC_SUBST(VAR_DIR, "$var_dir")
AC_SUBST(ETC_DIR, "$etc_dir")
AC_DEFINE(USER_DIR, ".voms", [VOMS user preferences directory])
])