File: db.m4

package info (click to toggle)
bacula 7.4.4+dfsg-6
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 17,084 kB
  • sloc: ansic: 120,922; sh: 22,583; cpp: 15,341; perl: 3,224; makefile: 2,819; sql: 315; awk: 128; xml: 57; python: 43; sed: 16
file content (1004 lines) | stat: -rw-r--r-- 37,849 bytes parent folder | download | duplicates (2)
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
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
#
# Copyright (C) 2000-2016 Kern Sibbald
# License: BSD 2-Clause; see file LICENSE-FOSS
#
AC_DEFUN([BA_CHECK_DBI_DB],
[
AC_MSG_CHECKING(for DBI support)
AC_ARG_WITH(dbi,
AC_HELP_STRING([--with-dbi@<:@=DIR@:>@], [Include DBI support. DIR is the DBD base install directory, default is to search through a number of common places for the DBI files.]),
[
  if test "$withval" != "no"; then
     if test "$withval" = "yes"; then
        if test -f /usr/local/include/dbi/dbi.h; then
           DBI_INCDIR=/usr/local/dbi/include
           if test -d /usr/local/lib64; then
              DBI_LIBDIR=/usr/local/lib64
           else
              DBI_LIBDIR=/usr/local/lib
           fi
           DBI_BINDIR=/usr/local/bin
        elif test -f /usr/include/dbi/dbi.h; then
           DBI_INCDIR=/usr/include
           if test -d /usr/lib64; then
              DBI_LIBDIR=/usr/lib64
           else
              DBI_LIBDIR=/usr/lib
           fi
           DBI_BINDIR=/usr/bin
        elif test -f $prefix/include/dbi/dbi.h; then
           DBI_INCDIR=$prefix/include
           if test -d $prefix/lib64; then
              DBI_LIBDIR=$prefix/lib64
           else
              DBI_LIBDIR=$prefix/lib
           fi
           DBI_BINDIR=$prefix/bin
        else
           AC_MSG_RESULT(no)
           AC_MSG_ERROR(Unable to find dbi.h in standard locations)
        fi
        if test -d /usr/local/lib/dbd; then
           DRIVERDIR=/usr/local/lib/dbd
           if test -d /usr/local/lib64/dbd; then
              DRIVERDIR=/usr/local/lib64/dbd
           else
              DRIVERDIR=/usr/local/lib/dbd
           fi
        elif test -d /usr/lib/dbd; then
           DRIVERDIR=/usr/lib/dbd
           if test -d /usr/lib64/dbd; then
              DRIVERDIR=/usr/lib64/dbd
           else
              DRIVERDIR=/usr/lib/dbd
           fi
        elif test -d $prefix/lib/dbd; then
           if test -d $prefix/lib64/dbd; then
              DRIVERDIR=$prefix/lib64/dbd
           else
              DRIVERDIR=$prefix/lib/dbd
           fi
        elif test -d /usr/local/lib64/dbd; then
           DRIVERDIR=/usr/local/lib64/dbd
        elif test -d /usr/lib64/dbd; then
           DRIVERDIR=/usr/lib64/dbd
        elif test -d $prefix/lib64/dbd; then
           DRIVERDIR=$prefix/lib64/dbd
        else
           AC_MSG_RESULT(no)
           AC_MSG_ERROR(Unable to find DBD drivers in standard locations)
        fi
     else
        if test -f $withval/dbi.h; then
           DBI_INCDIR=$withval
           DBI_LIBDIR=$withval
           DBI_BINDIR=$withval
        elif test -f $withval/include/dbi/dbi.h; then
           DBI_INCDIR=$withval/include
           if test -d $withval/lib64; then
              DBI_LIBDIR=$withval/lib64
           else
              DBI_LIBDIR=$withval/lib
           fi
           DBI_BINDIR=$withval/bin
        else
           AC_MSG_RESULT(no)
           AC_MSG_ERROR(Invalid DBI directory $withval - unable to find dbi.h under $withval)
        fi
        if test -d $withval/dbd; then
           DRIVERDIR=$withval/dbd
        elif test -d $withval/lib/; then
           if test -d $withval/lib64/dbd; then
              DRIVERDIR=$withval/lib64/dbd
           else
              DRIVERDIR=$withval/lib/dbd
           fi
        elif test -d $withval/lib64/dbd; then
           DRIVERDIR=$withval/lib64/dbd
        else
           AC_MSG_RESULT(no)
           AC_MSG_ERROR(Invalid DBD driver directory $withval - unable to find DBD drivers under $withval)
        fi
     fi
     DBI_INCLUDE=-I$DBI_INCDIR
     if test x$use_libtool != xno; then
        DBI_LIBS="-L$DBI_LIBDIR -ldbi"
     else
        DBI_LIBS="-L$DBI_LIBDIR -ldbi"
     fi
     DBI_LIB=$DBI_LIBDIR/libdbi.a
     DBI_DBD_DRIVERDIR="-D DBI_DRIVER_DIR=\\\"$DRIVERDIR\\\""
     DB_LIBS="${DB_LIBS} ${DBI_LIBS}"

     AC_DEFINE(HAVE_DBI, 1, [Set if you have the DBI driver])
     AC_MSG_RESULT(yes)

     if test -z "${db_backends}"; then
         db_backends="DBI"
     else
         db_backends="${db_backends} DBI"
     fi
     if test -z "${DB_BACKENDS}" ; then
        DB_BACKENDS="dbi"
     else
        DB_BACKENDS="${DB_BACKENDS} dbi"
     fi
     uncomment_dbi=" "

     dnl -------------------------------------------
     dnl Push the DB_PROG onto the stack of supported database backends for DBI
     dnl -------------------------------------------
     DB_BACKENDS="${DB_BACKENDS} ${DB_PROG}"

     dnl -------------------------------------------
     dnl Check if dbi supports batch mode
     dnl -------------------------------------------
     if test "x$support_batch_insert" = "xyes"; then
         if test $DB_PROG = postgresql; then
             AC_CHECK_LIB(pq, PQisthreadsafe, AC_DEFINE(HAVE_PQISTHREADSAFE))
             AC_CHECK_LIB(pq, PQputCopyData, AC_DEFINE(HAVE_PQ_COPY))
             test "x$ac_cv_lib_pq_PQputCopyData" = "xyes"
             pkg=$?
             if test $pkg = 0; then
                 AC_DEFINE(HAVE_DBI_BATCH_FILE_INSERT, 1, [Set if DBI DB batch insert code enabled])
             fi
         fi
     fi
  else
     AC_MSG_RESULT(no)
  fi
],[
  AC_MSG_RESULT(no)
])

AC_SUBST(DBI_LIBS)
AC_SUBST(DBI_INCLUDE)
AC_SUBST(DBI_BINDIR)
AC_SUBST(DBI_DBD_DRIVERDIR)

])

AC_DEFUN([BA_CHECK_DBI_DRIVER],
[
db_prog=no
AC_MSG_CHECKING(for DBI drivers support)
AC_ARG_WITH(dbi-driver,
AC_HELP_STRING([--with-dbi-driver@<:@=DRIVER@:>@], [Suport for DBI driver. DRIVER is the one DBI driver like Mysql, Postgresql, others. Default is to not configure any driver.]),
[
  if test "$withval" != "no"; then
     case $withval in
        "mysql")
           db_prog="mysql"
           if test -f /usr/local/mysql/bin/mysql; then
              MYSQL_BINDIR=/usr/local/mysql/bin
              if test -f /usr/local/mysql/lib64/mysql/libmysqlclient_r.a \
                 -o -f /usr/local/mysql/lib64/mysql/libmysqlclient_r.so; then
                 MYSQL_LIBDIR=/usr/local/mysql/lib64/mysql
              else
                 MYSQL_LIBDIR=/usr/local/mysql/lib/mysql
              fi
           elif test -f /usr/bin/mysql; then
              MYSQL_BINDIR=/usr/bin
              if test -f /usr/lib64/mysql/libmysqlclient_r.a \
                  -o -f /usr/lib64/mysql/libmysqlclient_r.so; then
                  MYSQL_LIBDIR=/usr/lib64/mysql
              elif test -f /usr/lib/mysql/libmysqlclient_r.a \
                  -o -f /usr/lib/mysql/libmysqlclient_r.so; then
                  MYSQL_LIBDIR=/usr/lib/mysql
              else
                  MYSQL_LIBDIR=/usr/lib
              fi
           elif test -f /usr/local/bin/mysql; then
              MYSQL_BINDIR=/usr/local/bin
              if test -f /usr/local/lib64/mysql/libmysqlclient_r.a \
                  -o -f /usr/local/lib64/mysql/libmysqlclient_r.so; then
                  MYSQL_LIBDIR=/usr/local/lib64/mysql
              elif test -f /usr/local/lib/mysql/libmysqlclient_r.a \
                  -o -f /usr/local/lib/mysql/libmysqlclient_r.so; then
                  MYSQL_LIBDIR=/usr/local/lib/mysql
              else
                  MYSQL_LIBDIR=/usr/local/lib
              fi
           elif test -f $withval/bin/mysql; then
              MYSQL_BINDIR=$withval/bin
              if test -f $withval/lib64/mysql/libmysqlclient_r.a \
                  -o -f $withval/lib64/mysql/libmysqlclient_r.so; then
                  MYSQL_LIBDIR=$withval/lib64/mysql
              elif test -f $withval/lib64/libmysqlclient_r.a \
                  -o -f $withval/lib64/libmysqlclient_r.so; then
                  MYSQL_LIBDIR=$withval/lib64
              elif test -f $withval/lib/libmysqlclient_r.a \
                  -o -f $withval/lib/libmysqlclient_r.so; then
                  MYSQL_LIBDIR=$withval/lib/
              else
                  MYSQL_LIBDIR=$withval/lib/mysql
              fi
           elif test -f $prefix/lib/mysql55/bin/mysql; then
              MYSQL_BINDIR=$prefix/lib/mysql55/bin
              if test -f $prefix/lib/mysql55/mysql/libmysqlclient_r.a \
                  -o -f $prefix/lib/mysql55/mysql/libmysqlclient_r.so; then
                  MYSQL_LIBDIR=$prefix/lib/mysql55/mysql
              fi
           elif test -f $prefix/lib/mysql51/bin/mysql; then
              MYSQL_BINDIR=$prefix/lib/mysql51/bin
              if test -f $prefix/lib/mysql51/mysql/libmysqlclient_r.a \
                  -o -f $prefix/lib/mysql51/mysql/libmysqlclient_r.so; then
                  MYSQL_LIBDIR=$prefix/lib/mysql51/mysql
              fi
           else
              AC_MSG_RESULT(no)
              AC_MSG_ERROR(Unable to find mysql in standard locations)
           fi
           if test -f $SQL_LIBDIR/libmysqlclient_r.so; then
              DB_PROG_LIB=$SQL_LIBDIR/libmysqlclient_r.so
           else
              DB_PROG_LIB=$SQL_LIBDIR/libmysqlclient_r.a
           fi
        ;;
        "postgresql")
           db_prog="postgresql"
           PG_CONFIG=`which pg_config 2>/dev/null`
           if test -n "$PG_CONFIG"; then
              POSTGRESQL_BINDIR=/usr/bin
              POSTGRESQL_LIBDIR=`"$PG_CONFIG" --libdir`
           elif test -f /usr/local/bin/psql; then
              POSTGRESQL_BINDIR=/usr/local/bin
              if test -d /usr/local/lib64; then
                 POSTGRESQL_LIBDIR=/usr/local/lib64
              else
                 POSTGRESQL_LIBDIR=/usr/local/lib
              fi
           elif test -f /usr/bin/psql; then
              POSTGRESQL_BINDIR=/usr/local/bin
              if test -d /usr/lib64/postgresql; then
                 POSTGRESQL_LIBDIR=/usr/lib64/postgresql
              elif test -d /usr/lib/postgresql; then
                 POSTGRESQL_LIBDIR=/usr/lib/postgresql
              elif test -d /usr/lib64; then
                 POSTGRESQL_LIBDIR=/usr/lib64
              else
                 POSTGRESQL_LIBDIR=/usr/lib
              fi
           elif test -f $withval/bin/psql; then
              POSTGRESQL_BINDIR=$withval/bin
              if test -d $withval/lib64; then
                 POSTGRESQL_LIBDIR=$withval/lib64
              else
                 POSTGRESQL_LIBDIR=$withval/lib
              fi
           else
              AC_MSG_RESULT(no)
              AC_MSG_ERROR(Unable to find psql in standard locations)
           fi
           if test -f $POSTGRESQL_LIBDIR/libpq.so; then
              DB_PROG_LIB=$POSTGRESQL_LIBDIR/libpq.so
           else
              DB_PROG_LIB=$POSTGRESQL_LIBDIR/libpq.a
           fi
        ;;
        "sqlite3")
           db_prog="sqlite3"
           if test -f /usr/local/bin/sqlite3; then
              SQLITE_BINDIR=/usr/local/bin
              if test -d /usr/local/lib64; then
                 SQLITE_LIBDIR=/usr/local/lib64
              else
                 SQLITE_LIBDIR=/usr/local/lib
              fi
           elif test -f /usr/bin/sqlite3; then
              SQLITE_BINDIR=/usr/bin
              if test -d /usr/lib64; then
                 SQLITE_LIBDIR=/usr/lib64
              else
                 SQLITE_LIBDIR=/usr/lib
              fi
           elif test -f $withval/bin/sqlite3; then
              SQLITE_BINDIR=$withval/bin
              if test -d $withval/lib64; then
                 SQLITE_LIBDIR=$withval/lib64
              else
                 SQLITE_LIBDIR=$withval/lib
              fi
           else
              AC_MSG_RESULT(no)
              AC_MSG_ERROR(Unable to find sqlite in standard locations)
           fi
           if test -f $SQLITE_LIBDIR/libsqlite3.so; then
              DB_PROG_LIB=$SQLITE_LIBDIR/libsqlite3.so
           else
              DB_PROG_LIB=$SQLITE_LIBDIR/libsqlite3.a
           fi
        ;;
        *)
           AC_MSG_RESULT(no)
           AC_MSG_ERROR(Unable to set DBI driver. $withval is not supported)
        ;;
     esac

     AC_MSG_RESULT(yes)
     DB_PROG=$db_prog
  else
     AC_MSG_RESULT(no)
  fi
],[
  AC_MSG_RESULT(no)
])

AC_SUBST(MYSQL_BINDIR)
AC_SUBST(POSTGRESQL_BINDIR)
AC_SUBST(SQLITE_BINDIR)
AC_SUBST(DB_PROG)
AC_SUBST(DB_PROG_LIB)

])


AC_DEFUN([BA_CHECK_MYSQL_DB],
[
AC_MSG_CHECKING(for MySQL support)
AC_ARG_WITH(mysql,
AC_HELP_STRING([--with-mysql@<:@=DIR@:>@], [Include MySQL support. DIR is the MySQL base install directory, default is to search through a number of common places for the MySQL files.]),
[
  HAVE_LIBSR="no"
  if test "$withval" != "no"; then
     if test "$withval" = "yes"; then
        MYSQL_CONFIG=`which mysql_config 2>/dev/null`
        if test "x${MYSQL_CONFIG}" != x; then
           MYSQL_BINDIR="${MYSQL_CONFIG%/*}"
           ${MYSQL_CONFIG} --libs_r >/dev/null 2>&1
           if test $? = 0; then
              MYSQL_LIBDIR=`${MYSQL_CONFIG} --libs_r`
              MYSQL_INCDIR=`${MYSQL_CONFIG} --include`
              HAVE_LIBSR="yes"
           else
              ${MYSQL_CONFIG} --variable=pkglibdir > /dev/null 2>&1
              if test $? = 0 ; then
                 MYSQL_LIBDIR=`${MYSQL_CONFIG} --variable=pkglibdir`
                 MYSQL_INCDIR=`${MYSQL_CONFIG} --variable=pkgincludedir`
              fi
           fi
        fi
        # if something wrong fall back to old method
        if test "x${MYSQL_LIBDIR}" = x -o "x${MYSQL_INCDIR}" = x ; then
           if test -f /usr/local/mysql/include/mysql/mysql.h; then
              MYSQL_INCDIR=/usr/local/mysql/include/mysql
              if test -f /usr/local/mysql/lib64/mysql/libmysqlclient_r.a \
                      -o -f /usr/local/mysql/lib64/mysql/libmysqlclient_r.so; then
                 MYSQL_LIBDIR=/usr/local/mysql/lib64/mysql
              else
                 MYSQL_LIBDIR=/usr/local/mysql/lib/mysql
              fi
              MYSQL_BINDIR=/usr/local/mysql/bin
           elif test -f /usr/include/mysql/mysql.h; then
              MYSQL_INCDIR=/usr/include/mysql
              if test -f /usr/lib64/mysql/libmysqlclient_r.a \
                      -o -f /usr/lib64/mysql/libmysqlclient_r.so; then
                 MYSQL_LIBDIR=/usr/lib64/mysql
              elif test -f /usr/lib64/libmysqlclient_r.a \
                        -o -f /usr/lib64/libmysqlclient_r.so; then
                 MYSQL_LIBDIR=/usr/lib64
              elif test -f /usr/lib/x86_64-linux-gnu/libmysqlclient_r.a \
                        -o -f /usr/lib/x86_64-linux-gnu/libmysqlclient_r.so; then
                 MYSQL_LIBDIR=/usr/lib/x86_64-linux-gnu
              elif test -f /usr/lib/mysql/libmysqlclient_r.a \
                        -o -f /usr/lib/mysql/libmysqlclient_r.so; then
                 MYSQL_LIBDIR=/usr/lib/mysql
              else
                 MYSQL_LIBDIR=/usr/lib
              fi
              MYSQL_BINDIR=/usr/bin
           elif test -f /usr/include/mysql.h; then
              MYSQL_INCDIR=/usr/include
              if test -f /usr/lib64/libmysqlclient_r.a \
                      -o -f /usr/lib64/libmysqlclient_r.so; then
                 MYSQL_LIBDIR=/usr/lib64
              else
                 MYSQL_LIBDIR=/usr/lib
              fi
              MYSQL_BINDIR=/usr/bin
           elif test -f /usr/local/include/mysql/mysql.h; then
              MYSQL_INCDIR=/usr/local/include/mysql
              if test -f /usr/local/lib64/mysql/libmysqlclient_r.a \
                      -o -f /usr/local/lib64/mysql/libmysqlclient_r.so; then
                 MYSQL_LIBDIR=/usr/local/lib64/mysql
              else
                 MYSQL_LIBDIR=/usr/local/lib/mysql
              fi
              MYSQL_BINDIR=/usr/local/bin
           elif test -f /usr/local/include/mysql.h; then
              MYSQL_INCDIR=/usr/local/include
              if test -f /usr/local/lib64/libmysqlclient_r.a \
                      -o -f /usr/local/lib64/libmysqlclient_r.so; then
                 MYSQL_LIBDIR=/usr/local/lib64
              else
                 MYSQL_LIBDIR=/usr/local/lib
              fi
              MYSQL_BINDIR=/usr/local/bin
           else
              AC_MSG_RESULT(no)
              AC_MSG_ERROR(Unable to find mysql.h in standard locations)
           fi
        fi
     else
        if test -f $withval/include/mysql/mysql.h; then
           MYSQL_INCDIR=$withval/include/mysql
           if test -f $withval/lib64/mysql/libmysqlclient_r.a \
                -o -f $withval/lib64/mysql/libmysqlclient_r.so; then
              MYSQL_LIBDIR=$withval/lib64/mysql
           elif test -f $withval/lib64/libmysqlclient_r.a \
                -o -f $withval/lib64/libmysqlclient_r.so; then
              MYSQL_LIBDIR=$withval/lib64
           elif test -f $withval/lib/libmysqlclient_r.a \
                -o -f $withval/lib/libmysqlclient_r.so; then
              MYSQL_LIBDIR=$withval/lib
           else
              MYSQL_LIBDIR=$withval/lib/mysql
           fi
           MYSQL_BINDIR=$withval/bin
        elif test -f $withval/include/mysql.h; then
           MYSQL_INCDIR=$withval/include
           if test -f $withval/lib64/libmysqlclient_r.a \
                -o -f $withval/lib64/libmysqlclient_r.so; then
              MYSQL_LIBDIR=$withval/lib64
           else
              MYSQL_LIBDIR=$withval/lib
           fi
           MYSQL_BINDIR=$withval/bin
        elif test -f $withval/mysql.h; then
           dnl MacPorts on OSX has a special MySQL Layout. See #2079
           MYSQL_INCDIR=$withval
           AC_MSG_NOTICE(Got with-mysql variable $MYSQL_INCDIR checking MySQL version)
           case $MYSQL_INCDIR in
              *mysql55*)
                  AC_MSG_NOTICE(Assuming MacPorts MySQL 5.5 variant installed)
                  dnl with-mysql given contains mysql55 - assuming OSX MacPorts MySQL55 variant
                  if test -f $prefix/lib/mysql55/mysql/libmysqlclient_r.a \
                       -o -f $prefix/lib/mysql55/mysql/libmysqlclient_r.so; then
                     AC_MSG_NOTICE(Found MySQL 5.5 library in $prefix/lib/mysql55/mysql)
                     MYSQL_LIBDIR=$prefix/lib/mysql55/mysql
                  fi
                  MYSQL_BINDIR=$prefix/lib/mysql55/bin
              ;;
              *mysql51*)
                  AC_MSG_NOTICE(Assuming MacPorts MySQL 5.1 variant installed)
                  dnl with-mysql contains mysql51 - assuming OSX MacPorts MySQL51 variant
                  if test -f $prefix/lib/mysql51/mysql/libmysqlclient_r.a \
                       -o -f $prefix/lib/mysql51/mysql/libmysqlclient_r.so; then
                     AC_MSG_NOTICE(Found MySQL 5.1 library in $prefix/lib/mysql55/mysql)
                     MYSQL_LIBDIR=$prefix/lib/mysql51/mysql
                  fi
                  MYSQL_BINDIR=$prefix/lib/mysql51/bin
              ;;
           esac
           if test -z "${MYSQL_LIBDIR}" ; then
              AC_MSG_RESULT(no)
              AC_MSG_ERROR(MySQL $withval - unable to find MySQL libraries)
           fi
        else
           AC_MSG_RESULT(no)
           AC_MSG_ERROR(Invalid MySQL directory $withval - unable to find mysql.h under $withval)
        fi
     fi
     if test "x${MYSQL_LIBDIR}" != x; then
        MYSQL_INCLUDE=-I$MYSQL_INCDIR
        if test "x$HAVE_LIBSR" = "xyes"; then
           DB_LIBS="${DB_LIBS} ${MYSQL_LIBS}"
           MYSQL_LIBS="$MYSQL_LIBDIR"
           MYSQL_INCLUDE="$MYSQL_INCDIR"
           AC_DEFINE(HAVE_MYSQL_THREAD_SAFE, 1, [Set if have mysql_thread_safe])
           if test -z "${batch_insert_db_backends}"; then
              batch_insert_db_backends="MySQL"
           else
              batch_insert_db_backends="${batch_insert_db_backends} MySQL"
           fi
        elif test -f $MYSQL_LIBDIR/libmysqlclient_r.a \
               -o -f $MYSQL_LIBDIR/libmysqlclient_r.so; then
           if test x$use_libtool != xno; then
              MYSQL_LIBS="-L$MYSQL_LIBDIR -lmysqlclient_r -lz"
           else
              MYSQL_LIBS="-L$MYSQL_LIBDIR -lmysqlclient_r -lz"
           fi
           DB_LIBS="${DB_LIBS} ${MYSQL_LIBS}"
        fi
        if test "x${MYSQL_LIBS}" = x; then
           MYSQL_LIBS=$MYSQL_LIBDIR/libmysqlclient_r.a
        fi

        AC_DEFINE(HAVE_MYSQL, 1, [Set if you have an MySQL Database])
        AC_MSG_RESULT(yes)

        if test -z "${db_backends}" ; then
            db_backends="MySQL"
        else
            db_backends="${db_backends} MySQL"
        fi
        if test -z "${DB_BACKENDS}" ; then
            DB_BACKENDS="mysql"
        else
            DB_BACKENDS="${DB_BACKENDS} mysql"
        fi

        dnl -------------------------------------------
        dnl Check if mysql supports batch mode
        dnl -------------------------------------------
        if test "x$HAVE_LIBSR" = "xno"; then
          if test "x$support_batch_insert" = "xyes"; then
            dnl For mysql checking
            saved_LDFLAGS="${LDFLAGS}"
            LDFLAGS="${saved_LDFLAGS} -L$MYSQL_LIBDIR"
            saved_LIBS="${LIBS}"
            LIBS="${saved_LIBS} -lz"

            AC_CHECK_LIB(mysqlclient_r, mysql_thread_safe, AC_DEFINE(HAVE_MYSQL_THREAD_SAFE, 1, [Set if have mysql_thread_safe]))
            if test "x$ac_cv_lib_mysqlclient_r_mysql_thread_safe" = "xyes"; then
                if test -z "${batch_insert_db_backends}"; then
                    batch_insert_db_backends="MySQL"
                else
                    batch_insert_db_backends="${batch_insert_db_backends} MySQL"
                fi
            fi

            dnl Revert after mysql checks
            LDFLAGS="${saved_LDFLAGS}"
            LIBS="${saved_LIBS}"
          fi
        fi
     else
        AC_MSG_RESULT(no)
     fi
  fi
],[
  AC_MSG_RESULT(no)
])

AC_MSG_CHECKING(for MySQL embedded support)
AC_ARG_WITH(embedded-mysql,
AC_HELP_STRING([--with-embedded-mysql@<:@=DIR@:>@], [Include MySQL support. DIR is the MySQL base install directory, default is to search through a number of common places for the MySQL files.]),
[
  if test "$withval" != "no"; then
        if test "$withval" = "yes"; then
                if test -f /usr/local/mysql/include/mysql/mysql.h; then
                        MYSQL_INCDIR=/usr/local/mysql/include/mysql
                        if test -d /usr/local/mysql/lib64/mysql; then
                                MYSQL_LIBDIR=/usr/local/mysql/lib64/mysql
                        else
                                MYSQL_LIBDIR=/usr/local/mysql/lib/mysql
                        fi
                        MYSQL_BINDIR=/usr/local/mysql/bin
                elif test -f /usr/include/mysql/mysql.h; then
                        MYSQL_INCDIR=/usr/include/mysql
                        if test -d /usr/lib64/mysql; then
                                MYSQL_LIBDIR=/usr/lib64/mysql
                        else
                                MYSQL_LIBDIR=/usr/lib/mysql
                        fi
                        MYSQL_BINDIR=/usr/bin
                elif test -f /usr/include/mysql.h; then
                        MYSQL_INCDIR=/usr/include
                        if test -d /usr/lib64; then
                                MYSQL_LIBDIR=/usr/lib64
                        else
                                MYSQL_LIBDIR=/usr/lib
                        fi
                        MYSQL_BINDIR=/usr/bin
                elif test -f /usr/local/include/mysql/mysql.h; then
                        MYSQL_INCDIR=/usr/local/include/mysql
                        if test -d /usr/local/lib64/mysql; then
                                MYSQL_LIBDIR=/usr/local/lib64/mysql
                        else
                                MYSQL_LIBDIR=/usr/local/lib/mysql
                        fi
                        MYSQL_BINDIR=/usr/local/bin
                elif test -f /usr/local/include/mysql.h; then
                        MYSQL_INCDIR=/usr/local/include
                        if test -d /usr/local/lib64; then
                                MYSQL_LIBDIR=/usr/local/lib64
                        else
                                MYSQL_LIBDIR=/usr/local/lib
                        fi
                        MYSQL_BINDIR=/usr/local/bin
                else
                   AC_MSG_RESULT(no)
                   AC_MSG_ERROR(Unable to find mysql.h in standard locations)
                fi
        else
                if test -f $withval/include/mysql/mysql.h; then
                        MYSQL_INCDIR=$withval/include/mysql
                        if test -d $withval/lib64/mysql; then
                                MYSQL_LIBDIR=$withval/lib64/mysql
                        else
                                MYSQL_LIBDIR=$withval/lib/mysql
                        fi
                        MYSQL_BINDIR=$withval/bin
                elif test -f $withval/include/mysql.h; then
                        MYSQL_INCDIR=$withval/include
                        if test -d $withval/lib64; then
                                MYSQL_LIBDIR=$withval/lib64
                        else
                                MYSQL_LIBDIR=$withval/lib
                        fi
                        MYSQL_BINDIR=$withval/bin
                else
                   AC_MSG_RESULT(no)
                   AC_MSG_ERROR(Invalid MySQL directory $withval - unable to find mysql.h under $withval)
                fi
        fi
     MYSQL_INCLUDE=-I$MYSQL_INCDIR
     if test x$use_libtool != xno; then
        MYSQL_LIBS="-L$MYSQL_LIBDIR -lmysqld -lz -lm -lcrypt"
     else
        MYSQL_LIBS="-L$MYSQL_LIBDIR -lmysqld -lz -lm -lcrypt"
     fi
     MYSQL_LIB=$MYSQL_LIBDIR/libmysqld.a
     DB_LIBS="${DB_LIBS} ${MYSQL_LIBS}"

     AC_DEFINE(HAVE_MYSQL, 1, [Set if you have an MySQL Database])
     AC_DEFINE(HAVE_EMBEDDED_MYSQL, 1, [Set if you have an Embedded MySQL Database])
     AC_MSG_RESULT(yes)

     if test -z "${db_backends}"; then
         db_backends="MySQL"
     else
         db_backends="${db_backends} MySQL"
     fi
     if test -z "${DB_BACKENDS}"; then
         DB_BACKENDS="mysql"
     else
         DB_BACKENDS="${DB_BACKENDS} mysql"
     fi

     dnl -------------------------------------------
     dnl Check if mysql supports batch mode
     dnl -------------------------------------------
     if test "x$support_batch_insert" = "xyes"; then
         dnl For mysql checking
         saved_LDFLAGS="${LDFLAGS}"
         LDFLAGS="${saved_LDFLAGS} -L$MYSQL_LIBDIR"
         saved_LIBS="${LIBS}"
         LIBS="${saved_LIBS} -lz -lm -lcrypt"

         AC_CHECK_LIB(mysqlclient_r, mysql_thread_safe, AC_DEFINE(HAVE_MYSQL_THREAD_SAFE, 1, [Set if have mysql_thread_safe]))
         if test "x$ac_cv_lib_mysqlclient_r_mysql_thread_safe" = "xyes"; then
             if test -z "${batch_insert_db_backends}"; then
                 batch_insert_db_backends="MySQL"
             else
                 batch_insert_db_backends="${batch_insert_db_backends} MySQL"
             fi
         fi

         dnl Revert after mysql checks
         LDFLAGS="${saved_LDFLAGS}"
         LIBS="${saved_LIBS}"
     fi
  else
     AC_MSG_RESULT(no)
  fi
],[
  AC_MSG_RESULT(no)
])

AC_SUBST(MYSQL_LIBS)
AC_SUBST(MYSQL_INCLUDE)
AC_SUBST(MYSQL_BINDIR)

])

AC_DEFUN([BA_CHECK_INGRES_DB],
[
AC_MSG_CHECKING(for Ingres support)
AC_ARG_WITH(ingres,
AC_HELP_STRING([--with-ingres@<:@=DIR@:>@], [Include Ingres support. DIR is the Ingres base install directory, default is to search through a number of common places for the Ingres files.]),
[
  if test "$withval" != "no"; then
     if test "$withval" = "yes"; then
        if test -f ${II_SYSTEM}/files/eqdefc.h; then
           INGRES_INCDIR=${II_SYSTEM}/files
           INGRES_LIBDIR=${II_SYSTEM}/lib
           INGRES_BINDIR=${II_SYSTEM}/bin
        elif test -f ${II_SYSTEM}/ingres/files/eqdefc.h; then
           INGRES_INCDIR=${II_SYSTEM}/ingres/files
           INGRES_LIBDIR=${II_SYSTEM}/ingres/lib
           INGRES_BINDIR=${II_SYSTEM}/ingres/bin
        else
           AC_MSG_RESULT(no)
           AC_MSG_ERROR(Unable to find eqdefc.h in standard locations)
        fi
     else
        if test -f $withval/files/eqdefc.h; then
           INGRES_INCDIR=$withval/files
           INGRES_LIBDIR=$withval/lib
           INGRES_BINDIR=$withval/bin
        else
           AC_MSG_RESULT(no)
           AC_MSG_ERROR(Invalid Ingres directory $withval - unable to find Ingres headers under $withval)
        fi
     fi
     INGRES_INCLUDE=-I$INGRES_INCDIR
     if test x$use_libtool != xno; then
        INGRES_LIBS="-L$INGRES_LIBDIR -lq.1 -lcompat.1 -lframe.1"
     else
        INGRES_LIBS="-L$INGRES_LIBDIR -lq.1 -lcompat.1 -lframe.1"
     fi
     DB_LIBS="${DB_LIBS} ${INGRES_LIBS}"
     AC_DEFINE(HAVE_INGRES, 1, [Set if have Ingres Database])
     AC_MSG_RESULT(yes)

     if test -z "${db_backends}"; then
         db_backends="Ingres"
     else
         db_backends="${db_backends} Ingres"
     fi
     if test -z "${DB_BACKENDS}"; then
         DB_BACKENDS="ingres"
     else
         DB_BACKENDS="${DB_BACKENDS} ingres"
     fi
  else
     AC_MSG_RESULT(no)
  fi
],[
  AC_MSG_RESULT(no)
])

AC_SUBST(INGRES_LIBS)
AC_SUBST(INGRES_INCLUDE)
AC_SUBST(INGRES_BINDIR)
])

AC_DEFUN([BA_CHECK_SQLITE3_DB],
[
AC_MSG_CHECKING(for SQLite3 support)
AC_ARG_WITH(sqlite3,
AC_HELP_STRING([--with-sqlite3@<:@=DIR@:>@], [Include SQLite3 support. DIR is the SQLite3 base install directory, default is to search through a number of common places for the SQLite3 files.]),
[
  if test "$withval" != "no"; then
     if test "$withval" = "yes"; then
        if test -f /usr/local/include/sqlite3.h; then
           SQLITE_INCDIR=/usr/local/include
           if test -d /usr/local/lib64; then
              SQLITE_LIBDIR=/usr/local/lib64
           else
              SQLITE_LIBDIR=/usr/local/lib
           fi
           SQLITE_BINDIR=/usr/local/bin
        elif test -f /usr/include/sqlite3.h; then
           SQLITE_INCDIR=/usr/include
           if test -d /usr/lib64; then
              SQLITE_LIBDIR=/usr/lib64
           else
              SQLITE_LIBDIR=/usr/lib
           fi
           SQLITE_BINDIR=/usr/bin
        elif test -f $prefix/include/sqlite3.h; then
           SQLITE_INCDIR=$prefix/include
           if test -d $prefix/lib64; then
              SQLITE_LIBDIR=$prefix/lib64
           else
              SQLITE_LIBDIR=$prefix/lib
           fi
           SQLITE_BINDIR=$prefix/bin
        else
           AC_MSG_RESULT(no)
           AC_MSG_ERROR(Unable to find sqlite3.h in standard locations)
        fi
     else
        if test -f $withval/sqlite3.h; then
           SQLITE_INCDIR=$withval
           SQLITE_LIBDIR=$withval
           SQLITE_BINDIR=$withval
        elif test -f $withval/include/sqlite3.h; then
           SQLITE_INCDIR=$withval/include
           if test -d $withval/lib64; then
              SQLITE_LIBDIR=$withval/lib64
           else
              SQLITE_LIBDIR=$withval/lib
           fi
           SQLITE_BINDIR=$withval/bin
        else
           AC_MSG_RESULT(no)
           AC_MSG_ERROR(Invalid SQLite3 directory $withval - unable to find sqlite3.h under $withval)
        fi
     fi
     SQLITE_INCLUDE=-I$SQLITE_INCDIR
     if test x$use_libtool != xno; then
        SQLITE_LIBS="-L$SQLITE_LIBDIR -lsqlite3"
     else
        SQLITE_LIBS="-L$SQLITE_LIBDIR -lsqlite3"
     fi
     SQLITE_LIB=$SQLITE_LIBDIR/libsqlite3.a
     DB_LIBS="${DB_LIBS} ${SQLITE_LIBS}"

     AC_DEFINE(HAVE_SQLITE3, 1, [Set if you have an SQLite3 Database])
     AC_MSG_RESULT(yes)

     if test -z "${db_backends}"; then
         db_backends="SQLite3"
     else
         db_backends="${db_backends} SQLite3"
     fi
     if test -z "${DB_BACKENDS}"; then
         DB_BACKENDS="sqlite3"
     else
         DB_BACKENDS="${DB_BACKENDS} sqlite3"
     fi

     dnl -------------------------------------------
     dnl Check if sqlite supports batch mode
     dnl -------------------------------------------
     if test "x$support_batch_insert" = "xyes"; then
         dnl For sqlite checking
         saved_LDFLAGS="${LDFLAGS}"
         LDFLAGS="${saved_LDFLAGS} -lpthread -L$SQLITE_LIBDIR"

         AC_CHECK_LIB(sqlite3, sqlite3_threadsafe, AC_DEFINE(HAVE_SQLITE3_THREADSAFE, 1, [Set if have sqlite3_threadsafe]))
         if test "x$ac_cv_lib_sqlite3_sqlite3_threadsafe" = "xyes"; then
             if test -z "${batch_insert_db_backends}"; then
                 batch_insert_db_backends="SQLite3"
             else
                 batch_insert_db_backends="${batch_insert_db_backends} SQLite3"
             fi
         fi

         dnl Revert after sqlite checks
         LDFLAGS="${saved_LDFLAGS}"
     fi
  else
     AC_MSG_RESULT(no)
  fi
],[
  AC_MSG_RESULT(no)
])
AC_SUBST(SQLITE_LIBS)
AC_SUBST(SQLITE_INCLUDE)
AC_SUBST(SQLITE_BINDIR)

])


AC_DEFUN([BA_CHECK_POSTGRESQL_DB],
[
AC_MSG_CHECKING(for PostgreSQL support)
AC_ARG_WITH(postgresql,
AC_HELP_STRING([--with-postgresql@<:@=DIR@:>@], [Include PostgreSQL support. DIR is the PostgreSQL base install directory, @<:@default=/usr/local/pgsql@:>@]),
[
  if test "$withval" != "no"; then
      if test "$withval" = "yes"; then
          PG_CONFIG=`which pg_config 2>/dev/null`
          if test -n "$PG_CONFIG"; then
              POSTGRESQL_INCDIR=`"$PG_CONFIG" --includedir`
              POSTGRESQL_LIBDIR=`"$PG_CONFIG" --libdir`
              POSTGRESQL_BINDIR=/usr/bin
          elif test -f /usr/local/include/libpq-fe.h; then
              POSTGRESQL_INCDIR=/usr/local/include
              if test -d /usr/local/lib64; then
                 POSTGRESQL_LIBDIR=/usr/local/lib64
              else
                 POSTGRESQL_LIBDIR=/usr/local/lib
              fi
              POSTGRESQL_BINDIR=/usr/local/bin
          elif test -f /usr/include/libpq-fe.h; then
              POSTGRESQL_INCDIR=/usr/include
              if test -d /usr/lib64; then
                 POSTGRESQL_LIBDIR=/usr/lib64
              else
                 POSTGRESQL_LIBDIR=/usr/lib
              fi
              POSTGRESQL_BINDIR=/usr/bin
          elif test -f /usr/include/pgsql/libpq-fe.h; then
              POSTGRESQL_INCDIR=/usr/include/pgsql
              if test -d /usr/lib64/pgsql; then
                 POSTGRESQL_LIBDIR=/usr/lib64/pgsql
              else
                 POSTGRESQL_LIBDIR=/usr/lib/pgsql
              fi
              POSTGRESQL_BINDIR=/usr/bin
          elif test -f /usr/include/postgresql/libpq-fe.h; then
              POSTGRESQL_INCDIR=/usr/include/postgresql
              if test -d /usr/lib64/postgresql; then
                 POSTGRESQL_LIBDIR=/usr/lib64/postgresql
              else
                 POSTGRESQL_LIBDIR=/usr/lib/postgresql
              fi
              POSTGRESQL_BINDIR=/usr/bin
          else
              AC_MSG_RESULT(no)
              AC_MSG_ERROR(Unable to find libpq-fe.h in standard locations)
          fi
      elif test -f $withval/include/libpq-fe.h; then
          POSTGRESQL_INCDIR=$withval/include
          POSTGRESQL_LIBDIR=$withval/lib
          POSTGRESQL_BINDIR=$withval/bin
      elif test -f $withval/include/postgresql/libpq-fe.h; then
          POSTGRESQL_INCDIR=$withval/include/postgresql
          if test -d $withval/lib64; then
              POSTGRESQL_LIBDIR=$withval/lib64
          else
              POSTGRESQL_LIBDIR=$withval/lib
          fi
          POSTGRESQL_BINDIR=$withval/bin
      else
          AC_MSG_RESULT(no)
          AC_MSG_ERROR(Invalid PostgreSQL directory $withval - unable to find libpq-fe.h under $withval)
      fi
     AC_DEFINE(HAVE_POSTGRESQL, 1, [Set if you have an PostgreSQL Database])
     AC_MSG_RESULT(yes)

     POSTGRESQL_INCLUDE=-I$POSTGRESQL_INCDIR
     if test x$use_libtool != xno; then
        POSTGRESQL_LIBS="-L$POSTGRESQL_LIBDIR -lpq"
     else
        POSTGRESQL_LIBS="-L$POSTGRESQL_LIBDIR -lpq"
     fi
     AC_CHECK_FUNC(crypt, , AC_CHECK_LIB(crypt, crypt, [POSTGRESQL_LIBS="$POSTGRESQL_LIBS -lcrypt"]))
     POSTGRESQL_LIB=$POSTGRESQL_LIBDIR/libpq.a
     DB_LIBS="${DB_LIBS} ${POSTGRESQL_LIBS}"

     if test -z "${db_backends}"; then
         db_backends="PostgreSQL"
     else
         db_backends="${db_backends} PostgreSQL"
     fi
     if test -z "${DB_BACKENDS}"; then
         DB_BACKENDS="postgresql"
     else
         DB_BACKENDS="${DB_BACKENDS} postgresql"
     fi

     dnl -------------------------------------------
     dnl Check if postgresql supports batch mode
     dnl -------------------------------------------
     if test "x$support_batch_insert" = "xyes"; then
         dnl For postgresql checking
         saved_LDFLAGS="${LDFLAGS}"
         LDFLAGS="${saved_LDFLAGS} -L$POSTGRESQL_LIBDIR"
         saved_LIBS="${LIBS}"
         if test "x$ac_cv_lib_crypt_crypt" = "xyes" ; then
            LIBS="${saved_LIBS} -lcrypt"
         fi

         AC_CHECK_LIB(pq, PQisthreadsafe, AC_DEFINE(HAVE_PQISTHREADSAFE, 1, [Set if have PQisthreadsafe]))
         AC_CHECK_LIB(pq, PQputCopyData, AC_DEFINE(HAVE_PQ_COPY, 1, [Set if have PQputCopyData]))
         if test "x$ac_cv_lib_pq_PQputCopyData" = "xyes"; then
             if test $support_batch_insert = yes ; then
                 AC_DEFINE(HAVE_POSTGRESQL_BATCH_FILE_INSERT, 1, [Set if PostgreSQL DB batch insert code enabled])
                 if test -z "${batch_insert_db_backends}"; then
                     batch_insert_db_backends="PostgreSQL"
                 else
                     batch_insert_db_backends="${batch_insert_db_backends} PostgreSQL"
                 fi
             fi
         fi

         if test x$ac_cv_lib_pq_PQisthreadsafe != xyes -a x$support_batch_insert = xyes
         then
             echo "WARNING: Your PostgreSQL client library is too old to detect "
             echo "if it was compiled with --enable-thread-safety, consider to "
             echo "upgrade it in order to avoid problems with Batch insert mode"
         fi

         dnl Revert after postgresql checks
         LDFLAGS="${saved_LDFLAGS}"
         LIBS="${saved_LIBS}"
     fi
  else
     AC_MSG_RESULT(no)
  fi
],[
  AC_MSG_RESULT(no)
])
AC_SUBST(POSTGRESQL_LIBS)
AC_SUBST(POSTGRESQL_INCLUDE)
AC_SUBST(POSTGRESQL_BINDIR)

])

AC_DEFUN([AM_CONDITIONAL],
[AC_SUBST($1_TRUE)
AC_SUBST($1_FALSE)
if $2; then
  $1_TRUE=
  $1_FALSE='#'
else
  $1_TRUE='#'
  $1_FALSE=
fi])