-
Notifications
You must be signed in to change notification settings - Fork 3
/
configure.ac
executable file
·944 lines (892 loc) · 32.1 KB
/
configure.ac
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
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_COPYRIGHT((c) the Regents of the University of California)
AC_REVISION($Revision$)
AC_PREREQ(2.59)
AC_INIT([FastBit], [2.0.3.6], [[email protected]])
#AC_PACKAGE_URL(http://sdm.lbl.gov/fastbit/)
AC_CONFIG_MACRO_DIR([tests/m4])
AC_CONFIG_SRCDIR([src/index.cpp])
AC_CONFIG_HEADER([src/fastbit-config.h])
AM_INIT_AUTOMAKE([no-define])
AM_MAINTAINER_MODE([disable])
LIB_VERSION_INFO=1:0:0
# Checks for programs.
#AC_PROG_YACC
#AC_PROG_LEX
AC_PROG_CC
AC_PROG_CXX
AC_PROG_INSTALL
AC_PROG_MAKE_SET
AC_PROG_LIBTOOL
LT_INIT
AC_LANG(C++)
# Checks for libraries.
AC_CHECK_LIB([m], [log10])
AC_CHECK_LIB([rt], [clock_gettime])
###AC_CHECK_LIB([pthread], [pthread_self], , AC_MSG_ERROR(FastBit requires pthread support))
# Checks for header files.
#AC_HEADER_STDC
AC_HEADER_DIRENT
AC_CHECK_HEADERS([inttypes.h stdint.h sys/types.h])
# string.h strings.h sys/time.h float.h limits.h stdlib.h fcntl.h unistd.h
# Checks for typedefs, structures, and compiler characteristics.
#AC_HEADER_STDBOOL
#AC_C_CONST
#AC_C_INLINE
#AC_C_VOLATILE
#AC_TYPE_OFF_T
#AC_TYPE_SIZE_T
#AC_STRUCT_TM
#AC_HEADER_TIME
#AC_TYPE_INT16_T
#AC_TYPE_INT32_T
#AC_TYPE_INT64_T
#AC_TYPE_UINT64_T
#AC_TYPE_UINT32_T
#AC_TYPE_UINT16_T
# Checks for library functions.
#AC_FUNC_MALLOC
#AC_FUNC_MEMCMP
#AC_FUNC_MMAP
#AC_FUNC_REALLOC
#AC_FUNC_SELECT_ARGTYPES
#AC_FUNC_STRTOD
AC_FUNC_VPRINTF
#AX_FUNC_SNPRINTF
#AC_CHECK_FUNCS([getpagesize getpass gettimeofday memset mkdir] , ,)
AC_CHECK_FUNCS([gettimeofday mkdir flock strptime] , ,)
# ----- stuff not generated by autoscan
# rename some automatically defined variables
#AC_DEFINE_UNQUOTED(FASTBIT_BUGREPORT, ${PACKAGE_BUGREPORT}, [Define to the address where bug reports for this package should be sent.])
#AC_DEFINE_UNQUOTED(FASTBIT_VERSION, ${PACKAGE_VERSION}, [Define to the version of this package.])
#AC_DEFINE_UNQUOTED(FASTBIT_STRING, ${PACKAGE_STRING}, [Define to the full name and version of this package.])
#AC_DEFINE_UNQUOTED(FASTBIT_NAME, ${PACKAGE_NAME}, [Define to the full name of this package.])
AC_ARG_ENABLE(static-pic,
[AS_HELP_STRING([--enable-static-pic],[add '-static -fPIC' for some systems such as compute node linux (default: no)])],
[if test "$enableval" = "yes" ; then
CFLAGS="${CFLAGS} -static -fPIC"
CXXFLAGS="${CXXFLAGS} -static -fPIC"
fi])
AC_ARG_WITH(debug,
[AS_HELP_STRING([--with-debug=d], [add -DDEBUG=d to CFLAGS and CXXFLAGS (default: not define DEBUG)])],
[if "x$with_debug" != "xno" ; then
if "x$with_debug" == "x" ; then
CFLAGS="$CFLAGS -DDEBUG"
CXXFLAGS="$CXXFLAGS -DDEBUG"
else
CFLAGS="$CFLAGS -DDEBUG=$with_debug"
CXXFLAGS="$CXXFLAGS -DDEBUG=$with_debug"
fi
fi], [])
AC_MSG_CHECKING(whether to enable debugging (-g))
AC_ARG_ENABLE(debug,
[AS_HELP_STRING([--enable-debug],[turn on debugging (default: set by autoconf)])],
[if test "$enableval" = "yes" ; then debug="yes" ; else debug="no" ; fi],[debug=""])
AC_MSG_RESULT($debug)
AC_MSG_CHECKING(whether to enable extra optimization)
AC_ARG_ENABLE(xopt,
[AS_HELP_STRING([--enable-xopt],[turn on extra optimization (default: no, leave the default CXXFLAGS alone)])],
[if test "$enableval" = "yes" ; then xopt="yes" ; else xopt="no" ; fi],[xopt="no"])
AC_MSG_RESULT($xopt)
if test "x$debug" = "xyes" ; then
if test "x$xopt" = "xno" ; then
if test `echo $CFLAGS | fgrep -- '-O' | wc -l` -gt 0 ; then
OIFS=$IFS
IFS=' '
newflags=""
for g in $CFLAGS ; do if test "x$g" != "x-O" -a "x$g" != "x-O2" -a "x$g" != "x-O3" ; then newflags="$newflags $g"; fi; done
CFLAGS=$newflags
IFS=$OIFS
fi
if test `echo $CXXFLAGS | fgrep -- '-O' | wc -l` -gt 0 ; then
OIFS=$IFS
IFS=' '
newflags=""
for g in $CXXFLAGS ; do if test "x$g" != "x-O" -a "x$g" != "x-O2" -a "x$g" != "x-O3" ; then newflags="$newflags $g"; fi; done
CXXFLAGS=$newflags
IFS=$OIFS
fi
fi
if test `echo $CFLAGS | fgrep -- '-g' | wc -l` -eq 0 ; then
CFLAGS="$CFLAGS -g"
fi
if test `echo $CXXFLAGS | fgrep -- '-g' | wc -l` -eq 0 ; then
CXXFLAGS="$CXXFLAGS -g"
fi
elif test "x$debug" = "xno" ; then
if test `echo $CFLAGS | fgrep -- '-g' | wc -l` -gt 0 ; then
OIFS=$IFS
IFS=' '
newflags=""
for g in $CFLAGS ; do if test "x$g" != "x-g" -a "x$g" != "x-g1" -a "x$g" != "x-g2" -a "x$g" != "x-g3" ; then newflags="$newflags $g"; fi; done
CFLAGS=$newflags
IFS=$OIFS
fi
if test `echo $CXXFLAGS | fgrep -- '-g' | wc -l` -gt 0 ; then
OIFS=$IFS
IFS=' '
newflags=""
for g in $CXXFLAGS ; do if test "x$g" != "x-g" -a "x$g" != "x-g1" -a "x$g" != "x-g2" -a "x$g" != "x-g3" ; then newflags="$newflags $g"; fi; done
CXXFLAGS=$newflags
IFS=$OIFS
fi
fi
if test "x$xopt" = "xyes" ; then
# add -O5 if the compiler accepts it, otherwise -O3
OLDCXXFLAGS=$CXXFLAGS;
CXXFLAGS="$CXXFLAGS -O5";
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
#include <cmath>
]], [[
return (1 == static_cast<int>(std::sqrt(2.0)));
]])], [], [CXXFLAGS="$OLDCXXFLAGS -O3"])
fi
AC_ARG_WITH(extracflags,
AS_HELP_STRING([--with-extracflags=extra-cflags],
[specify additional C compilation flags if needed]),
[if test "x$with_extracflags" != "xno" ; then
CFLAGS="$CFLAGS $with_extracflags"
fi], [])
AC_ARG_WITH(extracxxflags,
AS_HELP_STRING([--with-extracxxflags=extra-cflags],
[specify additional C++ compilation flags if needed]),
[if test "x$with_extracxxflags" != "xno" ; then
CXXFLAGS="$CXXFLAGS $with_extracxxflags"
EXTRA_CXXFLAGS="$with_extracxxflags"
fi], [])
# test to determine if any known flags are needed for unordered_map
AC_MSG_CHECKING([for unordered_map])
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
#include <unordered_map>
]], [[
std::unordered_map<const char*, unsigned, std::hash<const char*>,
std::equal_to<const char*> > myhashmap;
return (myhashmap.size() == 0);
]])], [AC_DEFINE(HAVE_UNORDERED_MAP, 1, [Compiler support std::unordered_map])], [
ac_save_CFLAGS="$CFLAGS"
ac_save_CXXFLAGS="$CXXFLAGS"
ac_save_XCXXFLAGS="$EXTRA_CXXFLAGS"
CFLAGS="$CFLAGS -std=c99";
EXTRA_CXXFLAGS="-std=c++11";
CXXFLAGS="$CXXFLAGS -std=c++11";
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
#include <unordered_map>
]], [[
std::unordered_map<const char*, unsigned,
std::hash<const char*>,
std::equal_to<const char*> > myhashmap;
return (myhashmap.size() == 0);
]])], [AC_MSG_RESULT([yes, c++11])
AC_DEFINE(HAVE_UNORDERED_MAP, 2, [Compiler support std::unordered_map])],[
# c++11 not found, trying c++0x
#AC_MSG_CHECKING([for c++0x])
EXTRA_CXXFLAGS=$(echo "$EXTRA_CXXFLAGS" | sed 's/c++11/c++0x/')
CXXFLAGS=$(echo "$CXXFLAGS" | sed 's/c++11/c++0x/')
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
#include <unordered_map>
]], [[
std::unordered_map<const char*, unsigned,
std::hash<const char*>,
std::equal_to<const char*> > myhashmap;
return (myhashmap.size() == 0);
]])], [AC_MSG_RESULT([yes])
AC_DEFINE(HAVE_UNORDERED_MAP, 3, [Compiler support std::unordered_map])], [
# c++0x not found, trying gnu++0x
AC_MSG_CHECKING([for gnu++0x])
EXTRA_CXXFLAGS=$(echo "$EXTRA_CXXFLAGS" | sed 's/c++0x/gnu++0x/')
CXXFLAGS=$(echo "$CXXFLAGS" | sed 's/c++0x/gnu++0x/')
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
#include <unordered_map>
]], [[
std::unordered_map<const char*, unsigned,
std::hash<const char*>,
std::equal_to<const char*> > myhashmap;
return (myhashmap.size() == 0);
]])], [AC_MSG_RESULT([yes. c++0x])
AC_DEFINE(HAVE_UNORDERED_MAP, 4, [Compiler support std::unordered_map])], [
CXXFLAGS="$ac_save_CXXFLAGS -Werror"
AC_TRY_COMPILE([[
#include <ext/hash_map>
]], [[
using __gnu_cxx::hash_map;
]],
[CFLAGS="$ac_save_CFLAGS"
CXXFLAGS="$ac_save_CXXFLAGS"
EXTRA_CXXFLAGS="ac_save_X$CXXFLAGS"],
[AC_MSG_ERROR([$CXX not able to compile a sample code with std::unordered_map using c++11 or c++0x. Consider using GCC 4.8 or newer])])
])
AC_MSG_RESULT([no])])
AC_MSG_RESULT([no])])])
AC_ARG_WITH(getpwuid,
AS_HELP_STRING([--with-getpwuid],[specify --without-getpwuid to disable the attempt to use getpwuid to determine the user name]),
[if test "x$with_getpwuid" != "xno" ; then
AC_DEFINE(HAVE_GETPWUID, 1, [Set to 1 based on --with-getpwuid])
fi],
[AC_MSG_CHECKING([for the presence of getpwuid])
AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h>
#include<sys/types.h>
#include <pwd.h>
]],
[[uid_t id = getuid();
struct passwd* pw = getpwuid(id);
if (pw == 0) return -1;
]])],
[AC_DEFINE(HAVE_GETPWUID, 1, [Set to 1 if getpwuid compiles and runs correctly])
AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)])
AC_MSG_CHECKING([for the presence of getpwuid_r])
AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h>
#include<sys/types.h>
#include <pwd.h>
]],
[[uid_t id = getuid();
struct passwd pw;
struct passwd *ptr;
size_t nbuf = sysconf(_SC_GETPW_R_SIZE_MAX);
char *buf = new char[nbuf];
if (getpwuid_r(id, &pw, buf, nbuf, &ptr) == 0) return 0;
else return -1;
]])],
[AC_DEFINE(HAVE_GETPWUID_R, 1, [Set to 1 if getpwuid_r compiles and runs correctly])
AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)])])
AC_ARG_WITH(quiet-nan,
AS_HELP_STRING([--enable-quiet-nan], [attempt use std::numeric_limits<T>::quiet_NaN() as the null value, if not possible, use std::nueric_limits<T>::max() instead]),
[if test "$enableval" = "no"; then try_quiet_nan=0;
else try_quiet_nan=1; fi],
[try_quiet_nan=2])
AC_MSG_CHECKING([for quiet_NaN])
if test ${try_quiet_nan} -ne 0 ; then
AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include <stdlib.h>
#include <limits>]],
[[try {
double tmp = std::numeric_limits<double>::quiet_NaN();
tmp *= 1.0 + rand();
return(tmp == tmp);
}
catch (...) {
return -1;
}]])],
[AC_MSG_RESULT([yes, use quiet_NaN() as null values])
AC_DEFINE(FASTBIT_FLOAT_NULL, std::numeric_limits<float>::quiet_NaN(), [define the null values used])
AC_DEFINE(FASTBIT_DOUBLE_NULL, std::numeric_limits<double>::quiet_NaN(), [define the null values used])],
[AC_MSG_RESULT([no, use max() as null values])
AC_DEFINE(FASTBIT_FLOAT_NULL, std::numeric_limits<float>::max(), [define the null values used])
AC_DEFINE(FASTBIT_DOUBLE_NULL, std::numeric_limits<double>::max(), [define the null values used])])
else
AC_MSG_RESULT([use max() as null values based the user supplied option])
AC_DEFINE(FASTBIT_FLOAT_NULL, std::numeric_limits<float>::max(), [define the null values used])
AC_DEFINE(FASTBIT_DOUBLE_NULL, std::numeric_limits<double>::max(), [define the null values used])
fi
# check the option about threading
AC_ARG_WITH(pthread,
AS_HELP_STRING([--with-pthread=dir],[use dir as pthread root directory]),
[if test "x$with_pthread" == "x" ; then
with_pthread="win/pthreads-w32-2-8-0-release"
fi
if test -x $with_pthread/pthread-config; then
CFLAGS="$CFLAGS `$with_pthread/pthread-config --cflags"
CXXFLAGS="$CXXFLAGS `$with_pthread/pthread-config --cflags"
LIBS="$LIBS `pthread-config --ldflags` `pthread-config --libs`"
elif test -d $with_pthread; then
if test -f $with_pthread/pthread.h; then
CFLAGS="$CFLAGS -I$with_pthread";
CPPFLAGS="$CPPFLAGS -I$with_pthread";
CXXCPP="$CXXCPP -I$with_pthread";
CXXFLAGS="$CXXFLAGS -I$with_pthread";
elif test -f $with_pthread/include/pthread.h; then
CFLAGS="$CFLAGS -I$with_pthread/include";
CPPFLAGS="$CPPFLAGS -I$with_pthread/include";
CXXCPP="$CXXCPP -I$with_pthread/include";
CXXFLAGS="$CXXFLAGS -I$with_pthread/include";
else
AC_MSG_WARN([Can not find $with_pthread/pthread.h or $with_pthread/include/pthread.h])
fi;
if test -f $with_pthread/libpthread.a; then
LIBS="$LIBS $with_pthread/libpthread.a"
elif test -f $with_pthread/libpthreadGC2.a; then
LIBS="$LIBS $with_pthread/libpthreadGC2.a"
elif test -f $with_pthread/lib/libpthread.a; then
LIBS="$LIBS $with_pthread/lib/libpthread.a"
elif test -f $with_pthread/lib/libpthreadGC2.a; then
LIBS="$LIBS $with_pthread/lib/libpthreadGC2.a"
else
AC_MSG_WARN([Can not find $with_pthread/libpthread.a, $with_pthread/libpthreadGC2.a, $with_pthread/lib/libpthread.a, or $with_pthread/lib/libpthreadGC2.a])
fi;
fi])
# function to check for pthread library
AC_DEFUN([Z_CHECK_PTHREAD], [
AC_REQUIRE([AC_CANONICAL_HOST])
AC_LANG_PUSH(C++)
AC_LANG([C])
z_check_pthread_ok=no
# check if the user has set any of the PTHREAD_LIBS, etcetera
# environment variables, and if threads linking works using them
if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
save_LIBS="$LIBS"
LIBS="$PTHREAD_LIBS $LIBS"
AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS])
AC_TRY_LINK_FUNC(pthread_join, z_check_pthread_ok=yes)
AC_MSG_RESULT($z_check_pthread_ok)
if test x"$z_check_pthread_ok" = xno; then
PTHREAD_LIBS=""
PTHREAD_CFLAGS=""
fi
LIBS="$save_LIBS"
CFLAGS="$save_CFLAGS"
fi
z_check_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
# pthreads: AIX (must check this before -lpthread)
# none: in case threads are in libc; should be tried before -Kthread and
# other compiler flags to prevent continual compiler warnings
# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
# -pthreads: Solaris/gcc
# -mthreads: Mingw32/gcc, Lynx/gcc
# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
# doesn't hurt to check since this sometimes defines pthreads too;
# also defines -D_REENTRANT)
# ... -mt is also the pthreads flag for HP/aCC
# pthread: Linux, etcetera
# --thread-safe: KAI C++
# pthread-config: use pthread-config program (for GNU Pth library)
case "${host_cpu}-${host_os}" in
*solaris*)
# On Solaris, look for -pthreads and -lpthread first:
z_check_pthread_flags="-pthreads pthread -mt -pthread $z_check_pthread_flags"
;;
esac
if test x"$z_check_pthread_ok" = xno; then
for flag in $z_check_pthread_flags; do
case $flag in
none)
AC_MSG_CHECKING([whether pthreads work without any flags])
;;
-*)
AC_MSG_CHECKING([whether pthreads work with $flag])
PTHREAD_CFLAGS="$flag"
;;
pthread-config)
AC_CHECK_PROG(z_check_pthread_config, pthread-config, yes, no)
if test x"$z_check_pthread_config" = xno; then continue; fi
PTHREAD_CFLAGS="`pthread-config --cflags`"
PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
;;
*)
AC_MSG_CHECKING([for the pthreads library -l$flag])
PTHREAD_LIBS="-l$flag"
;;
esac
save_LIBS="$LIBS"
save_CFLAGS="$CFLAGS"
LIBS="$PTHREAD_LIBS $LIBS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
# Check for pthread_join because it is in -lpthread on IRIX
# while pthread_create is in libc. Check for pthread_attr_init
# due to DEC craziness with -lpthreads. Check for
# pthread_cleanup_push because it is one of the few pthread
# functions on Solaris that doesn't have a non-functional libc stub.
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <pthread.h>]], [[pthread_t th; pthread_join(th, 0);
pthread_attr_init(0); pthread_cleanup_push(0, 0);
pthread_create(0,0,0,0); pthread_cleanup_pop(0); ]])],[z_check_pthread_ok=yes],[])
LIBS="$save_LIBS"
CFLAGS="$save_CFLAGS"
AC_MSG_RESULT($z_check_pthread_ok)
if test "x$z_check_pthread_ok" = xyes; then
break;
fi
PTHREAD_LIBS=""
PTHREAD_CFLAGS=""
done
fi
# Various other checks:
if test "x$z_check_pthread_ok" = xyes; then
LIBS="$PTHREAD_LIBS $LIBS"
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
AC_MSG_CHECKING([if more special flags are required for pthreads])
flag=no
case "${host_cpu}-${host_os}" in
*-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
*solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
esac
AC_MSG_RESULT(${flag})
if test "x$flag" != xno; then
PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
fi
CFLAGS="$save_CFLAGS"
fi
AC_SUBST(PTHREAD_CFLAGS)
# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
if test x"$z_check_pthread_ok" = xyes; then
ifelse([$1],,AC_DEFINE(HAVE_PTHREAD, 1, [Define if you have POSIX threads libraries and header files.]),[$1])
:
else
z_check_pthread_ok=no
$2
fi
AC_LANG_POP([])
])
#end AC_DEFUN Z_CHECK_PTHREAD
Z_CHECK_PTHREAD(, [AC_MSG_ERROR(FastBit requires pthread support)])
AC_MSG_CHECKING([if math.h defines nextafter])
AC_TRY_LINK([
#include <math.h>
],[
double pi=3.141592654;
return (nextafter(pi, 4.0) > pi) ? 0 : -1;
],[
AC_MSG_RESULT([yes])
AC_DEFINE(HAVE_NEXTAFTER, 1, [Define to 1 if nextafter is defined in math.h and is in libm.])
],[
AC_MSG_RESULT([no])
])
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([[#include <stdlib.h>]],
[[char *s=0; long long tmp = strtoll("1", &s, 0);]])],
[AC_DEFINE(HAVE_STRTOLL, 1, [Set to 1 if strtoll is defined in stdlib.h])],
[])
# check for the presence of <atomic> template and
# test for the usability of atomic<uint32_t> and atomic<uint64_t>
AC_MSG_CHECKING([for atomic template])
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([[
#include <atomic>
]], [[
std::atomic<uint32_t> ai32(0);
std::atomic<uint64_t> ai64(1);
ai32++;
ai64--;
if (ai32.load() == 1 && ai64.load() == 0)
return 0;
else
return -1;
]])],
[AC_MSG_RESULT([yes])
AC_DEFINE(HAVE_ATOMIC_TEMPLATE, 1, [Compiler support <atomic> template])],
[ac_save_CXXFLAGS="$CXXFLAGS"
ac_save_XCXXFLAGS="$EXTRA_CXXFLAGS"
EXTRA_CXXFLAGS="-std=c++11";
CXXFLAGS="$CXXFLAGS -std=c++11";
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([[
#include <atomic>
]], [[
std::atomic<uint32_t> ai32(0);
std::atomic<uint64_t> ai64(1);
ai32++;
ai64--;
if (ai32.load() == 1 && ai64.load() == 0)
return 0;
else
return -1;
]])],
[AC_MSG_RESULT([yes])
AC_DEFINE(HAVE_ATOMIC_TEMPLATE, 2, [Compiler support <atomic> template])],
[AC_MSG_RESULT([no])
EXTRA_CXXFLAGS="$ac_save_XCXXFLAGS";
CXXFLAGS="$ac_save_CXXFLAGS";
])])
# Does this compiler have built-in functions for atomic memory access?
AC_MSG_CHECKING([if compiler supports __sync_add_and_fetch for 32-bit integers])
AC_TRY_LINK([
#include <stdint.h>
],[
int32_t variable=5;
return (__sync_add_and_fetch(&variable, 3)
&& __sync_sub_and_fetch(&variable, 3)) ? 0 : -1;
],[
AC_MSG_RESULT([yes])
AC_DEFINE(HAVE_GCC_ATOMIC32, 1, [Define to 1 if support of __sync_add_and_fetch() on 32-bit integers])
],[
# Retry with -march set for x86.
old_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -march=i686"
AC_TRY_LINK([
#include <stdint.h>
],[
int32_t variable=3;
return (__sync_add_and_fetch(&variable, 2)
&& __sync_sub_and_fetch(&variable, 2)) ? 0 : -1;
],[
AC_MSG_RESULT([yes])
AC_DEFINE(HAVE_GCC_ATOMIC32, 1, [Define to 1 if support __sync_add_and_fetch() on 32-bit integers])
],[
AC_MSG_RESULT([no])
CFLAGS="$old_CFLAGS"
])
])
AC_MSG_CHECKING([if compiler supports __sync_add_and_fetch for 64-bit integers])
AC_TRY_LINK([
#include <stdint.h>
],[
int64_t variable=7;
return (__sync_add_and_fetch(&variable, 4)
&& __sync_sub_and_fetch(&variable, 4)) ? 0 : -1;
],[
AC_MSG_RESULT([yes])
AC_DEFINE(HAVE_GCC_ATOMIC64, 1, [Define to 1 if support __sync_add_and_fetch() on 64-bit integers])
],[
# Retry with -march set for x86.
old_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -march=i686"
AC_TRY_LINK([
#include <stdint.h>
],[
int64_t variable=6;
return (__sync_add_and_fetch(&variable, 2)
&& __sync_sub_and_fetch(&variable, 2)) ? 0 : -1;
],[
AC_MSG_RESULT([yes])
AC_DEFINE(HAVE_GCC_ATOMIC64, 1, [Define to 1 if support __sync_add_and_fetch() on 64-bit integers])
],[
AC_MSG_RESULT([no])
CFLAGS="$old_CFLAGS"
])
])
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS"
AC_MSG_CHECKING([whether necessary to undefine __STRICT_ANSI__ for use of popen/pclose])
if AC_TRY_COMMAND($CXX $CXXFLAGS -DFASTBIT_RMDIR_USE_RM -DWITHOUT_FASTBIT_CONFIG_H -c src/util.cpp) && test -s util.o; then
AC_MSG_RESULT([no])
else
CXXCPP="$CXXCPP -U__STRICT_ANSI__ -DHAVE_STRUCT_TIMESPEC"
CXXFLAGS="$CXXFLAGS -U__STRICT_ANSI__ -DHAVE_STRUCT_TIMESPEC"
EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -U__STRICT_ANSI__ -DHAVE_STRUCT_TIMESPEC"
if AC_TRY_COMMAND($CXX $CXXFLAGS -DFASTBIT_RMDIR_USE_RM -DWITHOUT_FASTBIT_CONFIG_H -c src/util.cpp) && test -s util.o; then
AC_MSG_RESULT([undefining __STRICT_ANSI__ works])
else
AC_MSG_ERROR([undefining __STRICT_ANSI__ did not work, src/util.cpp can not be compiled with $CXX $CXXFLAGS -DFASTBIT_RMDIR_USE_RM -DWITHOUT_FASTBIT_CONFIG_H -c src/util.cpp])
fi
fi
rm -f util.o
if test -s src/whereLexer.cc; then
# make sure FlexLexer.h defines yywrap
#AC_CHECK_HEADER([FlexLexer.h], [], [AC_MSG_ERROR([unable to find FlexLexer.h])])
AC_MSG_CHECKING([if the default FlexLexer.h defines yywrap])
if AC_TRY_COMMAND($CXX $CXXFLAGS -DWITHOUT_FASTBIT_CONFIG_H -c src/whereLexer.cc) && test -s whereLexer.o; then
AC_MSG_RESULT([yes])
else
T=`which flex`
if test ${#T} -gt 9 ; then
FLDIR="-I `echo $T | cut -c 1-$((${#T} - 8))`include"
if AC_TRY_COMMAND($CXX $CXXFLAGS $FLDIR -DWITHOUT_FASTBIT_CONFIG_H -c src/whereLexer.cc) && test -s whereLexer.o; then
AC_MSG_RESULT([yes, use ${FLDIR}])
AM_CPPFLAGS="${AM_CPPFLAGS} ${FLDIR}"
else
if AC_TRY_COMMAND($CXX $CXXFLAGS -I ${PWD}/win -DWITHOUT_FASTBIT_CONFIG_H -c src/whereLexer.cc) && test -s whereLexer.o; then
AC_MSG_RESULT([no, use ${PWD}/win/FlexLexer.h])
AM_CPPFLAGS="${AM_CPPFLAGS} -I ${PWD}/win"
else
AC_MSG_ERROR([no, must have FlexLexer.h to continue])
fi
fi
else
if AC_TRY_COMMAND($CXX $CXXFLAGS -I ${PWD}/win -DWITHOUT_FASTBIT_CONFIG_H -c src/whereLexer.cc) && test -s whereLexer.o; then
AC_MSG_RESULT([no, use ${PWD}/win/FlexLexer.h])
AM_CPPFLAGS="${AM_CPPFLAGS} -I ${PWD}/win"
else
AC_MSG_ERROR([no, must have FlexLexer.h to continue])
fi
fi
fi
rm -f whereLexer.o
fi
# check for java include directory
AC_DEFUN([AC_JNI_INCLUDE_DIR],[
JNI_INCLUDE_DIRS=""
dnl case "$host_os" in
dnl darwin*) _JTOPDIR=`echo "$JAVA_HOME" | sed -e 's:/[[^/]]*$::'`
dnl _JINC="$_JTOPDIR/Headers";;
dnl *) _JINC="$JAVA_HOME/include";;
dnl esac
if test -f "$JAVA_HOME/include/jni.h"; then
JNI_INCLUDE_DIRS="$JNI_INCLUDE_DIRS $JAVA_HOME/include"
elif test -f "$JAVA_HOME/Headers/jni.h"; then
JNI_INCLUDE_DIRS="$JNI_INCLUDE_DIRS $JAVA_HOME/Headers"
else
AC_MSG_WARN([cannot find jni.h in $JAVA_HOME/Headers or $JAVA_HOME/include, try one directory up])
JAVA_HOME=`echo "$JAVA_HOME" | sed -e 's:/[[^/]]*$::'`
if test -f "$JAVA_HOME/include/jni.h"; then
JNI_INCLUDE_DIRS="$JNI_INCLUDE_DIRS $JAVA_HOME/include"
elif test -f "$JAVA_HOME/Headers/jni.h"; then
JNI_INCLUDE_DIRS="$JNI_INCLUDE_DIRS $JAVA_HOME/Headers"
else
AC_MSG_WARN([cannot find jni.h in $JAVA_HOME/Headers or $JAVA_HOME/include])
JNI_INCLUDE_DIRS=""
fi
fi
# system specific java includes
case "$host_os" in
bsdi*) _JNI_INC_SUBDIRS="bsdos";;
cygwin*) _JNI_INC_SUBDIRS="win32";;
darwin*) _JNI_INC_SUBDIRS="darwin";;
linux*) _JNI_INC_SUBDIRS="linux genunix";;
mingw*) _JNI_INC_SUBDIRS="win32";;
osf*) _JNI_INC_SUBDIRS="alpha";;
solaris*) _JNI_INC_SUBDIRS="solaris";;
*) _JNI_INC_SUBDIRS="genunix";;
esac
# add all subdirectories
for JINCSUBDIR in $_JNI_INC_SUBDIRS
do
if test -d "$JAVA_HOME/include/$JINCSUBDIR"; then
JNI_INCLUDE_DIRS="$JNI_INCLUDE_DIRS $JAVA_HOME/include/$JINCSUBDIR"
fi
done
])
# does command java work
AC_DEFUN([AC_PROG_JAVA_WORKS], [
AC_CHECK_PROG(uudecode, uudecode$EXEEXT, yes)
if test "x$uudecode" = xyes; then
AC_CACHE_CHECK([if uudecode can decode base 64 file], ac_cv_prog_uudecode_base64, [
dnl /**
dnl * Test.java: used to test if java compiler works.
dnl */
dnl public class Test
dnl {
dnl
dnl public static void
dnl main( String[] argv )
dnl {
dnl System.exit (0);
dnl }
dnl
dnl }
cat << \EOF > Test.uue
begin-base64 644 Test.class
yv66vgADAC0AFQcAAgEABFRlc3QHAAQBABBqYXZhL2xhbmcvT2JqZWN0AQAE
bWFpbgEAFihbTGphdmEvbGFuZy9TdHJpbmc7KVYBAARDb2RlAQAPTGluZU51
bWJlclRhYmxlDAAKAAsBAARleGl0AQAEKEkpVgoADQAJBwAOAQAQamF2YS9s
YW5nL1N5c3RlbQEABjxpbml0PgEAAygpVgwADwAQCgADABEBAApTb3VyY2VG
aWxlAQAJVGVzdC5qYXZhACEAAQADAAAAAAACAAkABQAGAAEABwAAACEAAQAB
AAAABQO4AAyxAAAAAQAIAAAACgACAAAACgAEAAsAAQAPABAAAQAHAAAAIQAB
AAEAAAAFKrcAErEAAAABAAgAAAAKAAIAAAAEAAQABAABABMAAAACABQ=
====
EOF
if uudecode$EXEEXT Test.uue; then
ac_cv_prog_uudecode_base64=yes
else
echo "configure: __oline__: uudecode had trouble decoding base 64 file 'Test.uue'" >&AS_MESSAGE_LOG_FD
echo "configure: failed file was:" >&AS_MESSAGE_LOG_FD
cat Test.uue >&AS_MESSAGE_LOG_FD
ac_cv_prog_uudecode_base64=no
fi
rm -f Test.uue])
fi
if test "x$ac_cv_prog_uudecode_base64" != xyes; then
rm -f Test.class
#AC_MSG_WARN([I have to compile Test.class from scratch])
if test "x$ac_cv_prog_javac_works" = xno; then
AC_MSG_WARN([Cannot compile java source. $JAVAC does not work properly])
fi
if test "x$ac_cv_prog_javac_works" = x; then
AC_PROG_JAVAC
fi
fi
AC_CACHE_CHECK(if $JAVA works, ac_cv_prog_java_works, [
JAVA_TEST=Test.java
CLASS_TEST=Test.class
TEST=Test
changequote(, )dnl
cat << \EOF > $JAVA_TEST
/* [#]line __oline__ "configure" */
public class Test {
public static void main (String args[]) {
System.exit (0);
} }
EOF
changequote([, ])dnl
if test "x$ac_cv_prog_uudecode_base64" != xyes; then
if AC_TRY_COMMAND($JAVAC $JAVACFLAGS $JAVA_TEST) && test -s $CLASS_TEST; then
:
else
echo "configure: failed program was:" >&AS_MESSAGE_LOG_FD
cat $JAVA_TEST >&AS_MESSAGE_LOG_FD
AC_MSG_WARN(The Java compiler $JAVAC failed (see config.log, check the CLASSPATH?))
JAVAC="no" # reset to empty string
fi
fi
if AC_TRY_COMMAND($JAVA $JAVAFLAGS $TEST) >/dev/null 2>&1; then
ac_cv_prog_java_works=yes
else
echo "configure: failed program was:" >&AS_MESSAGE_LOG_FD
cat $JAVA_TEST >&AS_MESSAGE_LOG_FD
AC_MSG_WARN(The Java VM $JAVA failed (see config.log, check the CLASSPATH?))
JAVA="no"
fi
rm -fr $JAVA_TEST $CLASS_TEST Test.uue
])
AC_PROVIDE([$0])dnl
]
)
# JAVAC
AC_DEFUN([AC_PROG_JAVAC_WORKS],[
AC_CACHE_CHECK([if $JAVAC works], ac_cv_prog_javac_works, [
JAVA_TEST=Test.java
CLASS_TEST=Test.class
cat << \EOF > $JAVA_TEST
/* [#]line __oline__ "configure" */
public class Test {
}
EOF
if AC_TRY_COMMAND($JAVAC $JAVACFLAGS $JAVA_TEST) >/dev/null 2>&1; then
ac_cv_prog_javac_works=yes
else
AC_MSG_ERROR([The Java compiler $JAVAC failed (see config.log, check the CLASSPATH?)])
echo "configure: failed program was:" >&AS_MESSAGE_LOG_FD
cat $JAVA_TEST >&AS_MESSAGE_LOG_FD
fi
rm -f $JAVA_TEST $CLASS_TEST
])
AC_PROVIDE([$0])dnl
])
AC_DEFUN([AC_PROG_JAVAC],[
AC_REQUIRE([AC_EXEEXT])dnl
if test "x$JAVAPREFIX" = x; then
test "x$JAVAC"=x && AC_CHECK_PROGS(JAVAC, "gcj$EXEEXT -C" guavac$EXEEXT jikes$EXEEXT javac$EXEEXT)
else
#test "x$JAVAC" = x && AC_CHECK_PROGS(JAVAC, "gcj$EXEEXT -C" guavac$EXEEXT jikes$EXEEXT javac$EXEEXT, $JAVAPREFIX/javac$EXEEXT)
JAVAC=$JAVAPREFIX/javac$EXEEXT
fi
test "x$JAVAC" = x && AC_MSG_ERROR([no acceptable Java compiler found in \$PATH])
AC_PROG_JAVAC_WORKS
AC_PROVIDE([$0])dnl
])
AC_DEFUN([AC_PROG_JAVA],[
AC_REQUIRE([AC_EXEEXT])dnl
if test "x$JAVAPREFIX" = x; then
test "x$JAVA" = x && AC_CHECK_PROGS(JAVA, kaffe$EXEEXT java$EXEEXT)
else
#test "x$JAVA" = x && AC_CHECK_PROGS(JAVA, kaffe$EXEEXT java$EXEEXT, $JAVAPREFIX/java$EXEEXT)
JAVA=$JAVAPREFIX/java$EXEEXT
fi
test x$JAVA = x && AC_MSG_ERROR([no acceptable Java virtual machine found in \$PATH])
AC_PROG_JAVA_WORKS
AC_PROVIDE([$0])dnl
])
# Set the optional Java SDK directory.
AC_ARG_WITH(java,
AS_HELP_STRING([--with-java=dir],[use dir as Java SDK root directory]),
[if test -d $with_java -a -f $with_java/bin/javac$EXEEXT; then JAVA_HOME=$with_java; fi])
#AC_MSG_RESULT([with_java=$with_java])
if test "x$with_java" = "xno" ; then
JAVA_HOME="" # don't use JAVA
elif test "x$JAVA_HOME" != "x" ; then
if ! test -d "$JAVA_HOME" -a -f "$JAVA_HOME/bin/javac$EXEEXT" ; then
AC_MSG_WARN([Can not find $JAVA_HOME/bin/javac$EXEEXT])
JAVA_HOME="" # don't use JAVA
fi
elif test "x$JAVA_PATH" != "x" ; then
if test -x "$JAVA_PATH"/javac$EXEEXT ; then
JAVA_HOME=`basename "$JAVA_PATH"`
elif test -x "$JAVA_PATH"/bin/javac$EXEEXT ; then
JAVA_HOME="$JAVA_PATH"
fi
elif test -x /usr/libexec/java_home ; then
JAVA_HOME=`/usr/libexec/java_home`
else
case "${host_os}" in
# On Darwin the JDK, if present, is installed in /Library/Java/Home .
darwin*)
if test -x "/Library/Java/Home/bin/javac" ; then
JAVA_HOME="/Library/Java/Home"
elif test -x "/usr/bin/javac" ; then
JAVA_HOME="/usr"
else # don't use java
JAVA_HOME=""
fi
;;
# On Fedora Core systems the JDK is usually in /usr/java/default , others use /usr
linux*)
if test -x "/usr/java/default/bin/javac" ; then
JAVA_HOME="/usr/java/default"
elif test -x "/usr/bin/javac" ; then
JAVA_HOME="/usr"
else # don't use java
JAVA_HOME=""
fi
;;
*)
;;
esac
fi
#AC_MSG_RESULT([JAVA_HOME=$JAVA_HOME])
if test "x$JAVA_HOME" != "x" -a -d "$JAVA_HOME"
then
JAVAPREFIX="${JAVA_HOME}/bin"
# Check for Java programs. Order here is important: check first
# for the compiler.
AC_PROG_JAVAC
AC_PROG_JAVA
if test ! "x$JAVAC" = "xno"
then
AC_JNI_INCLUDE_DIR
for JNI_INCLUDE_DIR in $JNI_INCLUDE_DIRS
do
CFLAGS="$CFLAGS -I$JNI_INCLUDE_DIR"
CPPFLAGS="$CPPFLAGS -I$JNI_INCLUDE_DIR"
CXXCPP="$CXXCPP -I$JNI_INCLUDE_DIR"
CXXFLAGS="$CXXFLAGS -I$JNI_INCLUDE_DIR"
if test -d $JNI_INCLUDE_DIR/darwin; then
CFLAGS="$CFLAGS -I$JNI_INCLUDE_DIR/darwin"
CPPFLAGS="$CPPFLAGS -I$JNI_INCLUDE_DIR/darwin"
CXXCPP="$CXXCPP -I$JNI_INCLUDE_DIR/darwin"
CXXFLAGS="$CXXFLAGS -I$JNI_INCLUDE_DIR/darwin"
fi
done
AC_CHECK_HEADER(jni.h, [HAS_JNI=yes], [HAS_JNI=no])
fi
fi
# build java test program if java and javac exist
AM_CONDITIONAL(BUILD_JAVA_TEST, test ! "x$JAVA" = "xno" && test ! "x$ac_cv_javac_supports_enums" = "xno")
AM_CONDITIONAL(BUILD_JAVA_INTERFACE, test ! "x$JAVAC" = "xno" && test "x$HAS_JNI" = "xyes")
AC_MSG_CHECKING([whether to build java native interface])
if test ! "x$JAVAC" = "xno" && test "x$HAS_JNI" = "xyes"; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
fi
AC_MSG_CHECKING(whether to configure Makefiles in contrib)
AC_ARG_ENABLE(contrib,
[AS_HELP_STRING([--enable-contrib],[build contributed code in contrib directory (default: no)])],
[if test "$enableval" = "yes" ; then contrib="yes" ; else contrib="no" ; fi],[contrib="no"])
AC_MSG_RESULT(${contrib})
AM_CONDITIONAL(BUILD_CONTRIB, test "$contrib" = "yes")
AC_SUBST(BUILD_CONTRIB)
AC_DEFINE_UNQUOTED(FASTBIT_IBIS_INT_VERSION,
`echo $PACKAGE_VERSION | awk 'BEGIN { FS="." } { printf("%d%.2d%.2d%.2d\n", $1, $2, $3, $4); }'`,
[Define an integer version of FastBit IBIS version number])
OBJDIR=$objdir
AC_SUBST(BUILD_JAVA_INTERFACE)
AC_SUBST(LIB_VERSION_INFO)
AC_SUBST(PTHREAD_CFLAGS)
AC_SUBST(PTHREAD_LIBS)
AC_SUBST(AM_CPPFLAGS)
AC_SUBST(EXTRA_CXXFLAGS)
AC_SUBST(CXXFLAGS)
AC_SUBST(CFLAGS)
AC_SUBST(OBJDIR)
#end stuff not generated by autoscan
AC_CONFIG_FILES([Makefile src/Makefile examples/Makefile tests/Makefile
java/Makefile contrib/Makefile contrib/fbmerge/Makefile])
AC_CONFIG_FILES([tests/scripts/fastbit-config],
[chmod a+x tests/scripts/fastbit-config])
AC_CONFIG_COMMANDS([FastBit-prefix],
[rm -f src/stamp-h1;
mv src/fastbit-config.h src/stamp-h1;
sed -e 's/ PACKAGE_/ FASTBIT_/' src/stamp-h1 > src/fastbit-config.h;
if test ! src/fastbit-config.h -nt src/stamp-h1; then sleep 1; touch src/fastbit-config.h; else :; fi
])
#
AC_OUTPUT