-
Notifications
You must be signed in to change notification settings - Fork 2
/
configure
executable file
·3724 lines (3680 loc) · 107 KB
/
configure
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
#!/bin/sh
#
# Do not edit!
# This file was generated from configure.in by BSDBuild 3.2.
#
# To regenerate this file, get the latest BSDBuild release from
# http://bsdbuild.hypertriton.com/, and use the command:
#
# $ cat configure.in | mkconfigure > configure
#
echo 'BSDBuild 3.2 <http://bsdbuild.hypertriton.com/>'
echo '# BSDBuild 3.2 <http://bsdbuild.hypertriton.com/>' > config.log
echo '# ex:syn=sh' >> config.log
echo '#!/bin/sh' >config.status
echo >>config.status
PACKAGE='Untitled'
VERSION=
RELEASE=
PROG_PREFIX=
PROG_SUFFIX=
PROG_TRANSFORM=s,x,x,
case "test" in
*)
bb_sed_test=`echo foo-.bar |sed 's/[-.]/_/g'`
if [ "$bb_sed_test" != "foo__bar" ]; then
echo "sed or $SHELL is not working correctly."
exit 1
fi
esac
bb_cr_letters='abcdefghijklmnopqrstuvwxyz'
bb_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
bb_cr_Letters=$bb_cr_letters$bb_cr_LETTERS
bb_cr_digits='0123456789'
bb_cr_alnum=$bb_cr_Letters$bb_cr_digits
optarg=
for arg
do
case "$arg" in
*=*)
optarg=`expr "X$arg" : '[^=]*=\(.*\)'`
;;
*)
optarg=
;;
esac
case "$arg" in
--build=*)
build_arg=$optarg
;;
--host=*)
host_arg=$optarg
;;
--target=*)
target=$optarg
;;
--emul-os=*)
PROJ_TARGET=$optarg
;;
--byte-order=*)
byte_order=$optarg
;;
--prefix=*)
prefix=$optarg
;;
--exec-prefix=*)
exec_prefix=$optarg
;;
--sysconfdir=*)
sysconfdir=$optarg
;;
--bindir=*)
bindir=$optarg
;;
--libdir=*)
libdir=$optarg
;;
--moduledir=*)
moduledir=$optarg
;;
--libexecdir=*)
libexecdir=$optarg
;;
--datadir=*)
datadir=$optarg
;;
--statedir=* | --localstatedir=*)
statedir=$optarg
;;
--localedir=*)
localedir=$optarg
;;
--mandir=*)
mandir=$optarg
;;
--infodir=* | --datarootdir=* | --docdir=* | --htmldir=* | --dvidir=* | --pdfdir=* | --psdir=* | --sharedstatedir=* | --sbindir=*)
;;
--enable-*)
option=`expr "x$arg" : 'x-*enable-\([^=]*\)'`
expr "x$option" : ".*[^-._$bb_cr_alnum]" >/dev/null &&
{ echo "Invalid option name: $option" >&2
{ (exit 1); exit 1; }; }
option=`echo $option | sed 's/[-.]/_/g'`
case "$arg" in
*=*)
eval "enable_${option}='$optarg'"
eval "prefix_${option}='$optarg'"
;;
*)
eval "enable_${option}=yes"
;;
esac
;;
--disable-*)
option=`expr "x$arg" : 'x-*disable-\([^=]*\)'`
expr "x$option" : ".*[^-._$bb_cr_alnum]" >/dev/null &&
{ echo "Invalid option name: $option" >&2
{ (exit 1); exit 1; }; }
option=`echo $option | sed 's/[-.]/_/g'`
eval "enable_${option}=no"
;;
--with-*)
option=`expr "x$arg" : 'x-*with-\([^=]*\)'`
expr "x$option" : ".*[^-._$bb_cr_alnum]" >/dev/null &&
{ echo "Invalid option name: $option" >&2
{ (exit 1); exit 1; }; }
option=`echo $option | sed 's/[-.]/_/g'`
case "$arg" in
*=*)
eval "with_${option}='$optarg'"
eval "prefix_${option}='$optarg'"
;;
*)
eval "with_${option}=yes"
;;
esac
;;
--without-*)
option=`expr "x$arg" : 'x-*without-\([^=]*\)'`
expr "x$option" : ".*[^-._$bb_cr_alnum]" >/dev/null &&
{ echo "Invalid option name: $option" >&2
{ (exit 1); exit 1; }; }
option=`echo $option | sed 's/-/_/g'`
eval "with_${option}=no"
;;
--x-includes=*)
with_x_includes=$optarg
;;
--x-libraries=*)
with_x_libraries=$optarg
;;
--program-prefix=*)
PROG_PREFIX=$optarg
;;
--program-suffix=*)
PROG_SUFFIX=$optarg
;;
--program-transform-name=*)
PROG_TRANSFORM=$optarg
;;
--help)
show_help=yes
;;
--version)
show_version=yes
;;
--srcdir=*)
srcdir=$optarg
;;
--testdir=*)
testdir=$optarg
;;
--cache=*)
cache=$optarg
;;
--includes=*)
includes=$optarg
;;
--keep-conftest)
keep_conftest=yes
;;
--cache-file=*)
;;
--config-cache | -C)
;;
*)
echo "Invalid argument: $arg, see ./configure --help"
exit 1
;;
esac
done
if [ -e "/bin/echo" ]; then
/bin/echo -n ""
if [ $? = 0 ]; then
ECHO_N='/bin/echo -n'
else
ECHO_N='echo -n'
fi
else
ECHO_N='echo -n'
fi
if [ "${PATH_SEPARATOR+set}" != set ]; then
echo '#!/bin/sh' > conftest$$.sh
echo 'exit 0' >> conftest$$.sh
chmod +x conftest$$.sh
if (PATH="/nonexistent;."; conftest$$.sh) >/dev/null 2>&1; then
PATH_SEPARATOR=';'
else
PATH_SEPARATOR=:
fi
rm -f conftest$$.sh
fi
bb_save_IFS=$IFS
IFS=$PATH_SEPARATOR
SH='sh'
for path in $PATH; do
if [ -x "${path}/sh" ]; then
SH="${path}/sh"
break
elif [ -e "${path}/sh.exe" ]; then
SH="${path}/sh.exe"
break
fi
done
PERL=''
for path in $PATH; do
if [ -x "${path}/perl" ]; then
PERL="${path}/perl"
break
elif [ -e "${path}/perl.exe" ]; then
PERL="${path}/perl.exe"
break
fi
done
PKGCONFIG=''
for path in $PATH; do
if [ -x "${path}/pkg-config" ]; then
PKGCONFIG="${path}/pkg-config"
break
elif [ -e "${path}/pkg-config.exe" ]; then
PKGCONFIG="${path}/pkg-config.exe"
break
fi
done
IFS=$bb_save_IFS
if [ "${prefix}" != '' ]; then
PREFIX="$prefix"
else
PREFIX='/usr/local'
fi
if [ "${exec_prefix}" != '' ]; then
EXEC_PREFIX="$exec_prefix"
else
EXEC_PREFIX="${PREFIX}"
fi
if [ "${srcdir}" != '' ]; then
if [ "${PERL}" = '' ]; then
echo '*'
echo '* Separate build --srcdir requires perl, but there is'
echo '* no perl interpreter to be found in your PATH.'
echo '*'
exit 1
fi
SRC=${srcdir}
else
SRC=`pwd`
fi
BLD=`pwd`
SRCDIR="${SRC}"
BLDDIR="${BLD}"
if [ "${testdir}" != '' ]; then
echo "Configure tests will be executed in ${testdir}"
if [ ! -e "${testdir}" ]; then
echo "Creating ${testdir}"
mkdir ${testdir}
fi
else
testdir='.'
fi
if [ "${includes}" = '' ]; then
includes='yes'
fi
case "${includes}" in
yes|no)
;;
link)
if [ "${with_proj_generation}" ]; then
echo 'Cannot use --includes=link with --with-proj-generation'
exit 1
fi
;;
*)
echo 'Usage: --includes (yes|no|link)'
exit 1
;;
esac
if [ "${srcdir}" = '' ]; then
cat << EOT > configure.dep.pl
#!/usr/bin/env perl
# Public domain.
# Scan Makefiles for "include .depend" and generate empty ".depend" files,
# such that make can be run prior to an initial "make depend".
#
my %V = ();
sub MakefileIncludesDepend (\$\$)
{
my \$path = shift;
my \$cwd = shift;
if (!open(MF, \$path)) {
return (0);
}
my @lines = ();
foreach \$_ (<MF>) {
chop;
if (/^(.+)\\\\\$/) { # Expansion
\$line .= \$1;
} else { # New line
if (\$line) {
push @lines, \$line . \$_;
\$line = '';
} else {
push @lines, \$_;
}
}
}
foreach \$_ (@lines) {
if (/^\\s*#/) { next; }
if (/^\\t/) { next; }
s/\\\$\\{(\\w+)\\}/\$V{\$1}/g;
if (/^\\s*(\\w+)\\s*=\\s*"(.+)"\$/ ||
/^\\s*(\\w+)\\s*=\\s*(.+)\$/) {
\$V{\$1} = \$2;
} elsif (/^\\s*(\\w+)\\s*\\+=\\s*"(.+)"\$/ ||
/^\\s*(\\w+)\\s*\\+=\\s*(.+)\$/) {
if (exists(\$V{\$1}) && \$V{\$1} ne '') {
\$V{\$1} .= ' '.\$2;
} else {
\$V{\$1} = \$2;
}
}
if (/^\\s*include\\s+(.+)\$/) {
if (\$1 eq '.depend' ||
MakefileIncludesDepend(\$cwd.'/'.\$1, \$cwd)) {
return (1);
}
}
}
close(MF);
return (0);
}
sub Scan (\$)
{
my \$dir = shift;
unless (opendir(CWD, \$dir)) {
print STDERR "\$dir: opendir: \$!; ignoring\\n";
return;
}
%V = ();
if (-e \$dir.'/Makefile' &&
MakefileIncludesDepend("\$dir/Makefile", \$dir)) {
if (open(OUT, ">\$dir/.depend")) {
close(OUT);
} else {
print STDERR "\$dir/.depend: \$!; ignoring\\n";
}
}
foreach my \$ent (readdir(CWD)) {
my \$file = \$dir.'/'.\$ent;
if (\$ent =~ /^\\./) {
next;
}
if (-d \$file) {
Scan(\$file);
next;
}
}
closedir(CWD);
}
if (@ARGV < 1) {
print STDERR "Usage: gen-dotdepend.pl [directory]\\n";
exit(1);
}
Scan(\$ARGV[0]);
EOT
if [ "${PERL}" != '' ]; then
${PERL} configure.dep.pl .
rm -f configure.dep.pl
else
echo '*'
echo '* Warning: No perl was found. Perl is required for automatic'
echo '* generation of .depend files. You may need to create empty'
echo '* .depend files where it is required.'
echo '*'
fi
fi
bb_incdir="$BLD/include/edacious/config"
if [ "${show_help}" = "yes" ]; then
echo ''
echo 'Usage: ./configure [options]'
echo ''
echo 'Standard build options:'
echo ' --bindir=DIR Executables for common users [PREFIX/bin]'
echo ' --build=STRING Host environment for build [auto-detect]'
echo ' --byte-order=STRING Byte order for build [LE|BE] [auto-detect]'
echo ' --datadir=DIR|NONE Data files for program use [PREFIX/share]'
echo ' --enable-nls Multi-language support [no]'
echo ' --exec-prefix=DIR Machine-dependent installation base [PREFIX]'
echo ' --host=STRING Cross-compile for target environment [BUILD]'
echo ' --includes=STRING Preprocess C headers [yes|no|link] [yes]'
echo ' --keep-conftest Preserve output files from last test'
echo ' --libdir=DIR System libraries [PREFIX/lib]'
echo ' --libexecdir=DIR Executables for program use [PREFIX/libexec]'
echo ' --localedir=DIR Multi-language support locales [DATADIR/locale]'
echo ' --mandir=DIR Manual page documentation [PREFIX/man]'
echo ' --moduledir=DIR|NONE Dynamically loaded modules [PREFIX/lib]'
echo ' --prefix=DIR Installation base [/usr/local]'
echo ' --program-prefix=STRING Prepend string to program name []'
echo ' --program-suffix=STRING Append string to program name []'
echo ' --program-transform-name=S Transform program name by expression [s,x,x,]'
echo ' --srcdir=DIR Source directory for concurrent build [.]'
echo ' --statedir=DIR|NONE Modifiable single-machine data [PREFIX/var]'
echo ' --sysconfdir=DIR|NONE System configuration files [PREFIX/etc]'
echo ' --testdir=DIR Execute all tests in this directory [.]'
echo ' --with-bundles Generate application/library bundles [yes]'
echo ' --with-catman Install cat files for manual pages [auto-detect]'
echo ' --with-ctags Generate ctags tag files [no]'
echo ' --with-docs Generate printable documentation [no]'
echo ' --with-gettext Use gettext for multi-language [auto-detect]'
echo ' --with-libtool=STRING Use GNU libtool [path or "bundled"]'
echo ' --with-manlinks Add manual entries for every function [no]'
echo ' --with-manpages Generate Unix manual pages [yes]'
echo ''
echo 'Options specific to Edacious:'
echo ' --enable-debug General debugging [default: no]'
echo ' --enable-fpdebug Debug FP exceptions [default: no]'
echo ' --enable-exprdebug Debug expression parsing [default: no]'
echo ' --enable-warnings Enable compiler warnings [default: no]'
echo ' --enable-edition Enable graphical editor [default: yes]'
echo ' --with-agar[=PREFIX] Specify Agar location [default: auto]'
echo ''
echo 'Some influential environment variables:'
echo ' CC C compiler command'
echo ' CFLAGS C compiler flags'
echo ' CPP C preprocessor'
echo ' CPPFLAGS C preprocessor flags'
echo ' LDFLAGS C linker flags'
echo ' LIBS Libraries to link against'
exit 1
fi
if [ "${show_version}" = "yes" ]; then
echo 'BSDBuild 3.2'
exit 0
fi
if [ "${build_arg}" != '' ]; then
build="${build_arg}"
else
if [ "${srcdir}" != '' ]; then
build_guessed=`sh ${srcdir}/mk/config.guess`
else
build_guessed=`sh mk/config.guess`
fi
if [ $? != 0 ]; then
echo 'mk/config.guess failed, please specify --build'
exit 1
fi
build="${build_guessed}"
fi
if [ "${host_arg}" != '' ]; then
host="${host_arg}"
else
host="${build}"
fi
if [ "${host}" != "${build}" ]; then
CROSS_COMPILING='yes'
else
CROSS_COMPILING='no'
fi
if [ "${with_bundles}" != "no" ]; then
case "${host}" in
arm-apple-darwin*)
PROG_BUNDLE='iOS'
;;
*-*-darwin*)
PROG_BUNDLE='OSX'
;;
esac
fi
host_machine=`echo ${host} | cut -d- -f 1`
if [ -e "Makefile.config" ]; then
echo '* Overwriting existing Makefile.config'
fi
echo '# Generated by BSDBuild 3.2 configure script.' >Makefile.config
echo '' >> Makefile.config
echo "BUILD=${build}" >> Makefile.config
echo "HOST=${host}" >> Makefile.config
echo "CROSS_COMPILING=${CROSS_COMPILING}" >> Makefile.config
echo "SRCDIR=${SRC}" >> Makefile.config
echo "BLDDIR=${BLD}" >> Makefile.config
if [ "${SUDO}" != "" ]; then
if [ -e "${PREFIX}" ]; then
bb_test_file="${PREFIX}/bsdbuild_test_file$$"
$ECHO_N "# checking the writeability of ${PREFIX}..." >>config.log
echo "echo 'Test' > '${bb_test_file}'" > conftest$$.sh
${SH} conftest$$.sh 2>/dev/null
if [ -e "${bb_test_file}" ]; then
rm -f "${bb_test_file}"
echo "yes (ignoring SUDO)" >>config.log
echo "SUDO=" >> Makefile.config
else
echo "no (honoring ${SUDO})" >>config.log
fi
rm -f conftest$$.sh
fi
fi
$ECHO_N 'env ' >>config.log
$ECHO_N 'env ' >>config.status
if [ "$CC" != "" ]; then
$ECHO_N 'CC="' >> config.log
$ECHO_N 'CC="' >> config.status
$ECHO_N "${CC}" >> config.log
$ECHO_N "${CC}" >> config.status
$ECHO_N '" ' >> config.log
$ECHO_N '" ' >> config.status
fi
if [ "$CFLAGS" != "" ]; then
$ECHO_N 'CFLAGS="' >> config.log
$ECHO_N 'CFLAGS="' >> config.status
$ECHO_N "${CFLAGS}" >> config.log
$ECHO_N "${CFLAGS}" >> config.status
$ECHO_N '" ' >> config.log
$ECHO_N '" ' >> config.status
fi
if [ "$CPP" != "" ]; then
$ECHO_N 'CPP="' >> config.log
$ECHO_N 'CPP="' >> config.status
$ECHO_N "${CPP}" >> config.log
$ECHO_N "${CPP}" >> config.status
$ECHO_N '" ' >> config.log
$ECHO_N '" ' >> config.status
fi
if [ "$CPPFLAGS" != "" ]; then
$ECHO_N 'CPPFLAGS="' >> config.log
$ECHO_N 'CPPFLAGS="' >> config.status
$ECHO_N "${CPPFLAGS}" >> config.log
$ECHO_N "${CPPFLAGS}" >> config.status
$ECHO_N '" ' >> config.log
$ECHO_N '" ' >> config.status
fi
if [ "$LDFLAGS" != "" ]; then
$ECHO_N 'LDFLAGS="' >> config.log
$ECHO_N 'LDFLAGS="' >> config.status
$ECHO_N "${LDFLAGS}" >> config.log
$ECHO_N "${LDFLAGS}" >> config.status
$ECHO_N '" ' >> config.log
$ECHO_N '" ' >> config.status
fi
if [ "$LIBS" != "" ]; then
$ECHO_N 'LIBS="' >> config.log
$ECHO_N 'LIBS="' >> config.status
$ECHO_N "${LIBS}" >> config.log
$ECHO_N "${LIBS}" >> config.status
$ECHO_N '" ' >> config.log
$ECHO_N '" ' >> config.status
fi
$ECHO_N './configure' >>config.log
$ECHO_N './configure' >>config.status
for arg
do
$ECHO_N " $arg" >>config.log
$ECHO_N " $arg" >>config.status
done
echo '' >>config.log
echo '' >>config.status
if [ -e "$BLD/include/edacious/config" ]; then
echo '* Overwriting $BLD/include/edacious/config directory'
rm -fR "$BLD/include/edacious/config"
fi
mkdir -p "$BLD/include/edacious/config"
if [ $? != 0 ]; then
echo 'Could not create $BLD/include/edacious/config directory.'
exit 1
fi
cat << EOT > conftest.1
.\" COMMENT
.Dd
.Dd NOVEMBER 23, 2009
.Dt TEST 1
.Os
.ds vT Test
.ds oS Test 1.0
.Sh NAME
.Nm test
.Nd Test document
.Sh DESCRIPTION
EOT
HAVE_MANDOC='no'
MANDOC=''
bb_save_IFS=$IFS
IFS=$PATH_SEPARATOR
for path in $PATH; do
if [ -x "${path}/mandoc" ]; then
cat conftest.1 | ${path}/mandoc -Tascii >/dev/null
if [ "$?" = '0' ]; then
HAVE_MANDOC='yes'
MANDOC="${path}/mandoc"
break;
fi
elif [ -e "${path}/mandoc.exe" ]; then
cat conftest.1 | ${path}/mandoc.exe -Tascii >/dev/null
if [ "$?" = '0' ]; then
HAVE_MANDOC='yes'
MANDOC="${path}/mandoc.exe"
break;
fi
elif [ -x "${path}/nroff" ]; then
cat conftest.1 | ${path}/nroff -Tmandoc >/dev/null
if [ "$?" = '0' ]; then
HAVE_MANDOC='yes'
MANDOC="${path}/nroff -Tmandoc"
break;
fi
elif [ -e "${path}/nroff.exe" ]; then
cat conftest.1 | ${path}/nroff.exe -Tmandoc >/dev/null
if [ "$?" = '0' ]; then
HAVE_MANDOC='yes'
MANDOC="${path}/nroff.exe -Tmandoc"
break;
fi
fi
done
IFS=$bb_save_IFS
rm -f conftest.1
if [ "${HAVE_MANDOC}" = 'no' ]; then
if [ "${with_manpages}" = 'yes' ]; then
echo '*'
echo '* --with-manpages was requested, but either the'
echo '* nroff/mandoc utility or the mdoc macro'
echo '* package were not found.'
echo '*'
exit 1
fi
echo 'HAVE_MANDOC=no' >> Makefile.config
echo 'NOMAN=yes' >> Makefile.config
echo 'NOMANLINKS=yes' >> Makefile.config
else
echo 'HAVE_MANDOC=yes' >> Makefile.config
echo "MANDOC=${MANDOC}" >> Makefile.config
if [ "${with_catman}" = "no" ]; then
echo 'NOCATMAN=yes' >> Makefile.config
else
if [ "${with_catman}" = "yes" ]; then
echo 'NOCATMAN=no' >> Makefile.config
else
case "${host}" in
*-*-freebsd*)
echo 'NOCATMAN=yes' >> Makefile.config
;;
*)
echo 'NOCATMAN=no' >> Makefile.config
;;
esac
fi
fi
if [ "${with_manpages}" = 'no' ]; then
echo 'NOMAN=yes' >> Makefile.config
echo 'NOMANLINKS=yes' >> Makefile.config
else
if [ "${with_manlinks}" != 'yes' ]; then
echo 'NOMANLINKS=yes' >> Makefile.config
fi
fi
fi
if [ "${with_docs}" = 'no' ]; then
echo 'NODOC=yes' >> Makefile.config
fi
if [ "${enable_nls}" = "yes" ]; then
ENABLE_NLS="yes"
bb_o=$bb_incdir/enable_nls.h
echo '#ifndef ENABLE_NLS' >$bb_o
echo "#define ENABLE_NLS \"$ENABLE_NLS\"" >>$bb_o
echo '#endif' >>$bb_o
echo "hdefs[\"ENABLE_NLS\"] = \"$ENABLE_NLS\"" >>configure.lua
msgfmt=''
bb_save_IFS=$IFS
IFS=$PATH_SEPARATOR
for path in $PATH; do
if [ -x "${path}/msgfmt" ]; then
msgfmt=${path}/msgfmt
break
elif [ -e "${path}/msgfmt.exe" ]; then
msgfmt=${path}/msgfmt.exe
break
fi
done
IFS=$bb_save_IFS
if [ "${msgfmt}" != '' ]; then
HAVE_GETTEXT='yes'
else
HAVE_GETTEXT='no'
fi
bb_o=$bb_incdir/enable_nls.h
echo '#ifndef ENABLE_NLS' >$bb_o
echo "#define ENABLE_NLS \"$ENABLE_NLS\"" >>$bb_o
echo '#endif' >>$bb_o
echo "hdefs[\"ENABLE_NLS\"] = \"$ENABLE_NLS\"" >>configure.lua
else
ENABLE_NLS="no"
HAVE_GETTEXT="no"
echo '#undef ENABLE_NLS' >$bb_incdir/enable_nls.h
echo 'hdefs["ENABLE_NLS"] = nil' >>configure.lua
fi
CTAGS=''
bb_save_IFS=$IFS
IFS=$PATH_SEPARATOR
if [ "${with_ctags}" = 'yes' ]; then
for path in $PATH; do
if [ -x "${path}/ectags" ]; then
CTAGS="${path}/ectags"
break
elif [ -e "${path}/ectags.exe" ]; then
CTAGS="${path}/ectags.exe"
break
fi
done
if [ "${CTAGS}" = '' ]; then
for path in $PATH; do
if [ -x "${path}/ctags" ]; then
CTAGS="${path}/ctags"
break
elif [ -e "${path}/ctags.exe" ]; then
CTAGS="${path}/ctags.exe"
break
fi
done
fi
fi
IFS=$bb_save_IFS
echo "CTAGS=${CTAGS}" >> Makefile.config
if [ "${with_libtool}" = "yes" ]; then
if [ "${prefix_libtool}" != '' -a "${prefix_libtool}" != 'bundled' ]; then
LIBTOOL_BUNDLED='no'
LIBTOOL="${prefix_libtool}"
else
LIBTOOL_BUNDLED='yes'
LIBTOOL=\${TOP}/mk/libtool/libtool
fi
echo "USE_LIBTOOL=Yes" >> Makefile.config
echo "LIBTOOL_BUNDLED=${LIBTOOL_BUNDLED}" >> Makefile.config
echo "LIBTOOL=${LIBTOOL}" >> Makefile.config
else
echo "USE_LIBTOOL=No" >> Makefile.config
fi
echo "PREFIX?=${PREFIX}" >> Makefile.config
echo "LDFLAGS?=${LDFLAGS}" >> Makefile.config
if [ "${PKGCONFIG}" != "" ]; then
case "${host}" in
*-*-freebsd* | *-*-dragonfly*)
PKGCONFIG_LIBDIR="\${PREFIX}/libdata/pkgconfig"
;;
*)
PKGCONFIG_LIBDIR="\${PREFIX}/lib/pkgconfig"
;;
esac
fi
bb_o=$bb_incdir/prefix.h
echo '#ifndef PREFIX' >$bb_o
echo "#define PREFIX \"$PREFIX\"" >>$bb_o
echo '#endif' >>$bb_o
echo "hdefs[\"PREFIX\"] = \"$PREFIX\"" >>configure.lua
if [ "${bindir}" != '' ]; then
BINDIR="${bindir}"
BINDIR_SPECIFIED='yes'
else
BINDIR="${PREFIX}/bin"
fi
bb_o=$bb_incdir/bindir.h
echo '#ifndef BINDIR' >$bb_o
echo "#define BINDIR \"$BINDIR\"" >>$bb_o
echo '#endif' >>$bb_o
echo "hdefs[\"BINDIR\"] = \"$BINDIR\"" >>configure.lua
if [ "${libdir}" != '' ]; then
LIBDIR="${libdir}"
LIBDIR_SPECIFIED='yes'
else
LIBDIR="${PREFIX}/lib"
fi
bb_o=$bb_incdir/libdir.h
echo '#ifndef LIBDIR' >$bb_o
echo "#define LIBDIR \"$LIBDIR\"" >>$bb_o
echo '#endif' >>$bb_o
echo "hdefs[\"LIBDIR\"] = \"$LIBDIR\"" >>configure.lua
if [ "${moduledir}" != '' ]; then
MODULEDIR="${moduledir}"
MODULEDIR_SPECIFIED='yes'
else
MODULEDIR="${PREFIX}/lib"
fi
bb_o=$bb_incdir/moduledir.h
echo '#ifndef MODULEDIR' >$bb_o
echo "#define MODULEDIR \"$MODULEDIR\"" >>$bb_o
echo '#endif' >>$bb_o
echo "hdefs[\"MODULEDIR\"] = \"$MODULEDIR\"" >>configure.lua
if [ "${libexecdir}" != '' ]; then
LIBEXECDIR="${libexecdir}"
LIBEXECDIR_SPECIFIED='yes'
else
LIBEXECDIR="${PREFIX}/libexec"
fi
bb_o=$bb_incdir/libexecdir.h
echo '#ifndef LIBEXECDIR' >$bb_o
echo "#define LIBEXECDIR \"$LIBEXECDIR\"" >>$bb_o
echo '#endif' >>$bb_o
echo "hdefs[\"LIBEXECDIR\"] = \"$LIBEXECDIR\"" >>configure.lua
if [ "${datadir}" != '' ]; then
DATADIR="${datadir}"
DATADIR_SPECIFIED='yes'
else
DATADIR="${PREFIX}/share"
fi
bb_o=$bb_incdir/datadir.h
echo '#ifndef DATADIR' >$bb_o
echo "#define DATADIR \"$DATADIR\"" >>$bb_o
echo '#endif' >>$bb_o
echo "hdefs[\"DATADIR\"] = \"$DATADIR\"" >>configure.lua
if [ "${statedir}" != '' ]; then
STATEDIR="${statedir}"
STATEDIR_SPECIFIED='yes'
else
STATEDIR="${PREFIX}/var"
fi
bb_o=$bb_incdir/statedir.h
echo '#ifndef STATEDIR' >$bb_o
echo "#define STATEDIR \"$STATEDIR\"" >>$bb_o
echo '#endif' >>$bb_o
echo "hdefs[\"STATEDIR\"] = \"$STATEDIR\"" >>configure.lua
if [ "${sysconfdir}" != '' ]; then
SYSCONFDIR="${sysconfdir}"
SYSCONFDIR_SPECIFIED='yes'
else
SYSCONFDIR="${PREFIX}/etc"
fi
bb_o=$bb_incdir/sysconfdir.h
echo '#ifndef SYSCONFDIR' >$bb_o
echo "#define SYSCONFDIR \"$SYSCONFDIR\"" >>$bb_o
echo '#endif' >>$bb_o
echo "hdefs[\"SYSCONFDIR\"] = \"$SYSCONFDIR\"" >>configure.lua
if [ "${localedir}" != '' ]; then
LOCALEDIR="${localedir}"
LOCALEDIR_SPECIFIED='yes'
else
LOCALEDIR="${DATADIR}/locale"
fi
bb_o=$bb_incdir/localedir.h
echo '#ifndef LOCALEDIR' >$bb_o
echo "#define LOCALEDIR \"$LOCALEDIR\"" >>$bb_o
echo '#endif' >>$bb_o
echo "hdefs[\"LOCALEDIR\"] = \"$LOCALEDIR\"" >>configure.lua
if [ "${mandir}" != '' ]; then
MANDIR="${mandir}"
MANDIR_SPECIFIED='yes'
else
MANDIR="${PREFIX}/man"
fi
bb_o=$bb_incdir/mandir.h
echo '#ifndef MANDIR' >$bb_o
echo "#define MANDIR \"$MANDIR\"" >>$bb_o
echo '#endif' >>$bb_o
echo "hdefs[\"MANDIR\"] = \"$MANDIR\"" >>configure.lua
PACKAGE="Edacious"
bb_o=$bb_incdir/package.h
echo '#ifndef PACKAGE' >$bb_o
echo "#define PACKAGE \"$PACKAGE\"" >>$bb_o
echo '#endif' >>$bb_o
echo "hdefs[\"PACKAGE\"] = \"$PACKAGE\"" >>configure.lua
VERSION="1.0"
bb_o=$bb_incdir/version.h
echo '#ifndef VERSION' >$bb_o
echo "#define VERSION \"$VERSION\"" >>$bb_o
echo '#endif' >>$bb_o
echo "hdefs[\"VERSION\"] = \"$VERSION\"" >>configure.lua
RELEASE="Sepulchral and Frog Like"
bb_o=$bb_incdir/release.h
echo '#ifndef RELEASE' >$bb_o
echo "#define RELEASE \"$RELEASE\"" >>$bb_o
echo '#endif' >>$bb_o
echo "hdefs[\"RELEASE\"] = \"$RELEASE\"" >>configure.lua
EDACIOUS_VERSION="$VERSION"
bb_o=$bb_incdir/edacious_version.h
echo '#ifndef EDACIOUS_VERSION' >$bb_o
echo "#define EDACIOUS_VERSION \"$EDACIOUS_VERSION\"" >>$bb_o
echo '#endif' >>$bb_o
echo "hdefs[\"EDACIOUS_VERSION\"] = \"$EDACIOUS_VERSION\"" >>configure.lua
if [ "${DATADIR_SPECIFIED}" != 'yes' ]; then
DATADIR="${PREFIX}/share/edacious"
bb_o=$bb_incdir/datadir.h
echo '#ifndef DATADIR' >$bb_o
echo "#define DATADIR \"$DATADIR\"" >>$bb_o
echo '#endif' >>$bb_o
echo "hdefs[\"DATADIR\"] = \"$DATADIR\"" >>configure.lua
fi
if [ "${MODULEDIR_SPECIFIED}" != 'yes' ]; then
MODULEDIR="${LIBDIR}/edacious"
bb_o=$bb_incdir/moduledir.h
echo '#ifndef MODULEDIR' >$bb_o
echo "#define MODULEDIR \"$MODULEDIR\"" >>$bb_o
echo '#endif' >>$bb_o
echo "hdefs[\"MODULEDIR\"] = \"$MODULEDIR\"" >>configure.lua
fi
if [ "${INCLDIR_SPECIFIED}" != 'yes' ]; then
INCLDIR="${PREFIX}/include/edacious"
bb_o=$bb_incdir/incldir.h
echo '#ifndef INCLDIR' >$bb_o
echo "#define INCLDIR \"$INCLDIR\"" >>$bb_o
echo '#endif' >>$bb_o
echo "hdefs[\"INCLDIR\"] = \"$INCLDIR\"" >>configure.lua
fi
echo ' __ ------------------------------ '
echo ' / __|--+-+----+---+----+----+---+--| '
echo ' ___|_| | |_| |_ |_ |_ |_ |_ | ___ '
echo ' |---| \\ | / _ \ / _| | | / _ \ | | | ||| '
echo ' |===| |||| |_| || |_ | || |_| || |_| || === '
echo ' |___|_// ||_| |_| \ _| |_| \ _ / \___/ |____|'
echo ' \ \ \_| | | | | | | | '
echo ' \__|__|-+---+----+---+----+------+---| '
echo ' ------------------------------ '
$ECHO_N 'checking for a C compiler...'
$ECHO_N '# checking for a C compiler...' >>config.log
# BEGIN cc
if [ "$CROSS_COMPILING" = "yes" ]; then
CROSSPFX="${host}-"
else
CROSSPFX=""
fi
HAVE_CC65="no"
if [ "$CC" = "" ]; then
case "${host}" in
apple2 | apple2enh | atari | atmos | c16 | c64 | c128 | cbm510 | cbm610 | geos | lunix | lynx | nes | pet | plus4 | supervision | vic20)
bb_save_IFS=$IFS
IFS=$PATH_SEPARATOR
for i in $PATH; do
if [ -x "${i}/cc65" ]; then
CC="${i}/cc65"
HAVE_CC65="yes"
CROSS_COMPILING="yes"
break
elif [ -x "${i}/cc65.exe" ]; then
CC="${i}/cc65.exe"
HAVE_CC65="yes"
CROSS_COMPILING="yes"
break
fi
done
IFS=$bb_save_IFS
;;
*)
bb_save_IFS=$IFS
IFS=$PATH_SEPARATOR
for i in $PATH; do
if [ -x "${i}/${CROSSPFX}clang" ]; then
CC="${i}/${CROSSPFX}clang"
break
elif [ -x "${i}/${CROSSPFX}clang70" ]; then
CC="${i}/${CROSSPFX}clang70"
break
elif [ -x "${i}/${CROSSPFX}clang60" ]; then
CC="${i}/${CROSSPFX}clang60"
break
elif [ -x "${i}/${CROSSPFX}cc" ]; then
CC="${i}/${CROSSPFX}cc"
break
elif [ -x "${i}/${CROSSPFX}gcc" ]; then
CC="${i}/${CROSSPFX}gcc"
break
elif [ -x "${i}/${CROSSPFX}gcc-6" ]; then
CC="${i}/${CROSSPFX}gcc-6"
break