15
15
--enable-multilib build many library versions (default)"
17
--enable-usegnu use alternative libc functions from GNU libc"
17
--enable-doc build all doc formats (disabled is default)"
19
--enable-html-doc build HTML documentation (default)"
21
--enable-ps-doc build Postscript documentation (default)"
23
--enable-pdf-doc build PDF documentation (default)"
25
--enable-versioned-doc install docs in directory with version name (default)"
19
27
# Initialize some variables set by options.
20
28
# The variables have the same names as the options, with
541
# Check whether --enable-usegnu or --disable-usegnu was given.
542
if test "${enable_usegnu+set}" = set; then
543
enableval="$enable_usegnu"
544
case "${enableval}" in
547
*) { echo "configure: error: bad value ${enableval} for gnu option" 1>&2; exit 1; } ;;
551
# Check whether --enable-doc or --disable-doc was given.
552
if test "${enable_doc+set}" = set; then
553
enableval="$enable_doc"
554
case "${enableval}" in
555
yes) enable_doc=yes ;;
557
*) { echo "configure: error: bad value ${enableval} for global doc option" 1>&2; exit 1; } ;;
563
# Check whether --enable-html-doc or --disable-html-doc was given.
564
if test "${enable_html_doc+set}" = set; then
565
enableval="$enable_html_doc"
566
case "${enableval}" in
569
*) { echo "configure: error: bad value ${enableval} for html-doc option" 1>&2; exit 1; } ;;
575
# Check whether --enable-ps-doc or --disable-ps-doc was given.
576
if test "${enable_ps_doc+set}" = set; then
577
enableval="$enable_ps_doc"
578
case "${enableval}" in
581
*) { echo "configure: error: bad value ${enableval} for ps-doc option" 1>&2; exit 1; } ;;
587
# Check whether --enable-pdf-doc or --disable-pdf-doc was given.
588
if test "${enable_pdf_doc+set}" = set; then
589
enableval="$enable_pdf_doc"
590
case "${enableval}" in
593
*) { echo "configure: error: bad value ${enableval} for pdf-doc option" 1>&2; exit 1; } ;;
600
# Check whether --enable-versioned-doc or --disable-versioned-doc was given.
601
if test "${enable_versioned_doc+set}" = set; then
602
enableval="$enable_versioned_doc"
603
case "${enableval}" in
604
yes) versioned_doc=yes ;;
605
no) versioned_doc=no ;;
606
*) { echo "configure: error: bad value ${enableval} for versioned-doc option" 1>&2; exit 1; } ;;
612
if test "${target}" = "NONE"; then
554
616
case "${target}" in
556
*) { echo "configure: error: This is libc for avr only!" 1>&2; exit 1; } ;;
618
*) { echo "configure: error: This is libc for the avr target only!" 1>&2; exit 1; } ;;
621
if test "${host}" = "NONE"; then
625
if test "${build}" = "NONE"; then
626
build=`${srcdir}/config.guess`
560
630
test -z "${with_target_subdir}" && with_target_subdir=.
692
763
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
693
764
# ./install, which can be erroneously created by make from ./install.sh.
694
765
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
695
echo "configure:696: checking for a BSD compatible install" >&5
766
echo "configure:767: checking for a BSD compatible install" >&5
696
767
if test -z "$INSTALL"; then
697
768
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
698
769
echo $ac_n "(cached) $ac_c" 1>&6
745
816
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
747
818
echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
748
echo "configure:749: checking whether build environment is sane" >&5
819
echo "configure:820: checking whether build environment is sane" >&5
751
822
echo timestamp > conftestfile
802
873
test "$program_transform_name" = "" && program_transform_name="s,x,x,"
804
875
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
805
echo "configure:806: checking whether ${MAKE-make} sets \${MAKE}" >&5
876
echo "configure:877: checking whether ${MAKE-make} sets \${MAKE}" >&5
806
877
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
807
878
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
808
879
echo $ac_n "(cached) $ac_c" 1>&6
849
920
missing_dir=`cd $ac_aux_dir && pwd`
850
echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
851
echo "configure:852: checking for working aclocal" >&5
921
echo $ac_n "checking for working aclocal-${am__api_version}""... $ac_c" 1>&6
922
echo "configure:923: checking for working aclocal-${am__api_version}" >&5
852
923
# Run test in a subshell; some versions of sh will print an error if
853
924
# an executable is not found, even if stderr is redirected.
854
925
# Redirect stdin to placate older versions of autoconf. Sigh.
855
if (aclocal --version) < /dev/null > /dev/null 2>&1; then
926
if (aclocal-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
927
ACLOCAL=aclocal-${am__api_version}
857
928
echo "$ac_t""found" 1>&6
859
ACLOCAL="$missing_dir/missing aclocal"
930
ACLOCAL="$missing_dir/missing aclocal-${am__api_version}"
860
931
echo "$ac_t""missing" 1>&6
863
934
echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
864
echo "configure:865: checking for working autoconf" >&5
935
echo "configure:936: checking for working autoconf" >&5
865
936
# Run test in a subshell; some versions of sh will print an error if
866
937
# an executable is not found, even if stderr is redirected.
867
938
# Redirect stdin to placate older versions of autoconf. Sigh.
873
944
echo "$ac_t""missing" 1>&6
876
echo $ac_n "checking for working automake""... $ac_c" 1>&6
877
echo "configure:878: checking for working automake" >&5
947
echo $ac_n "checking for working automake-${am__api_version}""... $ac_c" 1>&6
948
echo "configure:949: checking for working automake-${am__api_version}" >&5
878
949
# Run test in a subshell; some versions of sh will print an error if
879
950
# an executable is not found, even if stderr is redirected.
880
951
# Redirect stdin to placate older versions of autoconf. Sigh.
881
if (automake --version) < /dev/null > /dev/null 2>&1; then
952
if (automake-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
953
AUTOMAKE=automake-${am__api_version}
883
954
echo "$ac_t""found" 1>&6
885
AUTOMAKE="$missing_dir/missing automake"
956
AUTOMAKE="$missing_dir/missing automake-${am__api_version}"
886
957
echo "$ac_t""missing" 1>&6
889
960
echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
890
echo "configure:891: checking for working autoheader" >&5
961
echo "configure:962: checking for working autoheader" >&5
891
962
# Run test in a subshell; some versions of sh will print an error if
892
963
# an executable is not found, even if stderr is redirected.
893
964
# Redirect stdin to placate older versions of autoconf. Sigh.
902
973
echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
903
echo "configure:904: checking for working makeinfo" >&5
974
echo "configure:975: checking for working makeinfo" >&5
904
975
# Run test in a subshell; some versions of sh will print an error if
905
976
# an executable is not found, even if stderr is redirected.
906
977
# Redirect stdin to placate older versions of autoconf. Sigh.
923
994
# Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
924
995
set dummy ${ac_tool_prefix}as; ac_word=$2
925
996
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
926
echo "configure:927: checking for $ac_word" >&5
997
echo "configure:998: checking for $ac_word" >&5
927
998
if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
928
999
echo $ac_n "(cached) $ac_c" 1>&6
955
1026
# Extract the first word of "as", so it can be a program name with args.
956
1027
set dummy as; ac_word=$2
957
1028
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
958
echo "configure:959: checking for $ac_word" >&5
1029
echo "configure:1030: checking for $ac_word" >&5
959
1030
if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
960
1031
echo $ac_n "(cached) $ac_c" 1>&6
990
1061
# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
991
1062
set dummy ${ac_tool_prefix}ar; ac_word=$2
992
1063
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
993
echo "configure:994: checking for $ac_word" >&5
1064
echo "configure:1065: checking for $ac_word" >&5
994
1065
if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
995
1066
echo $ac_n "(cached) $ac_c" 1>&6
1022
1093
# Extract the first word of "ar", so it can be a program name with args.
1023
1094
set dummy ar; ac_word=$2
1024
1095
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1025
echo "configure:1026: checking for $ac_word" >&5
1096
echo "configure:1097: checking for $ac_word" >&5
1026
1097
if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
1027
1098
echo $ac_n "(cached) $ac_c" 1>&6
1057
1128
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
1058
1129
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1059
1130
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1060
echo "configure:1061: checking for $ac_word" >&5
1131
echo "configure:1132: checking for $ac_word" >&5
1061
1132
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1062
1133
echo $ac_n "(cached) $ac_c" 1>&6
1089
1160
# Extract the first word of "ranlib", so it can be a program name with args.
1090
1161
set dummy ranlib; ac_word=$2
1091
1162
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1092
echo "configure:1093: checking for $ac_word" >&5
1163
echo "configure:1164: checking for $ac_word" >&5
1093
1164
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1094
1165
echo $ac_n "(cached) $ac_c" 1>&6
1124
1195
# Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1125
1196
set dummy ${ac_tool_prefix}gcc; ac_word=$2
1126
1197
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1127
echo "configure:1128: checking for $ac_word" >&5
1198
echo "configure:1199: checking for $ac_word" >&5
1128
1199
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1129
1200
echo $ac_n "(cached) $ac_c" 1>&6
1156
1227
# Extract the first word of "gcc", so it can be a program name with args.
1157
1228
set dummy gcc; ac_word=$2
1158
1229
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1159
echo "configure:1160: checking for $ac_word" >&5
1230
echo "configure:1231: checking for $ac_word" >&5
1160
1231
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1161
1232
echo $ac_n "(cached) $ac_c" 1>&6
1218
1289
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1219
1290
# ./install, which can be erroneously created by make from ./install.sh.
1220
1291
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1221
echo "configure:1222: checking for a BSD compatible install" >&5
1292
echo "configure:1293: checking for a BSD compatible install" >&5
1222
1293
if test -z "$INSTALL"; then
1223
1294
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1224
1295
echo $ac_n "(cached) $ac_c" 1>&6
1347
echo $ac_n "checking for doxygen""... $ac_c" 1>&6
1348
echo "configure:1349: checking for doxygen" >&5
1349
dox_ver=`doxygen --version 2>/dev/null`
1350
if test "x$dox_ver" = "x"; then
1351
echo "$ac_t""no" 1>&6
1353
# FIXME: should also check for dox_ver >= 1.2.16
1354
echo "$ac_t""yes" 1>&6
1355
if test "$ps_doc" = "yes"; then
1356
TARGET_DOX_PS=dox-ps
1357
INSTALL_DOX_PS=install-dox-ps
1359
if test "$pdf_doc" = "yes"; then
1360
TARGET_DOX_PDF=dox-pdf
1361
INSTALL_DOX_PDF=install-dox-pdf
1363
if test "$html_doc" = "yes"; then
1364
TARGET_DOX_HTML=dox-html
1365
INSTALL_DOX_HTML=install-dox-html
1377
echo $ac_n "checking for pngtopnm""... $ac_c" 1>&6
1378
echo "configure:1379: checking for pngtopnm" >&5
1379
has_pngtopnm=`pngtopnm --version 2>&1 | grep -c Version`
1380
if test "$has_pngtopnm" = "1"; then
1381
echo "$ac_t""yes" 1>&6
1384
echo "$ac_t""no" 1>&6
1387
echo $ac_n "checking for pngtopnm""... $ac_c" 1>&6
1388
echo "configure:1389: checking for pngtopnm" >&5
1389
has_pnmtopng=`pnmtopng --version 2>&1 | grep -c Version`
1390
if test "$has_pnmtopng" = "1"; then
1391
echo "$ac_t""yes" 1>&6
1394
echo "$ac_t""no" 1>&6
1397
if test "$PNMTOPNG" = "cat"; then
1404
if test "$versioned_doc" = "yes"; then
1405
DOC_INST_DIR='$(DESTDIR)$(datadir)/doc/avr-libc-$(VERSION)'
1407
DOC_INST_DIR='$(DESTDIR)$(datadir)/doc/avr-libc'
1276
1414
avrlib_opt_space='-mcall-prologues -Os'
1277
1415
avrlib_opt_speed='-O3'
1280
1418
AVR_CRT_TINY=''
1281
1419
AVR_CRT_MEGA=''
1282
1420
AVR_CRT_OTHER=''
1421
avrlib_defines='-D__COMPILING_AVR_LIBC__'
1283
1422
avrlib_cflags=''
1284
1423
avrlib_asflags=''
1285
1425
if test -z "${with_multisubdir}"; then
1286
1426
avrlib_cflags="-mmcu=avr2 ${avrlib_opt_space}"
1287
avrlib_asflags='-mmcu=at90s8515'
1427
avrlib_asflags='-mmcu=avr2'
1288
1428
AVR_CRT_AT90='crts1200.o crts2313.o crts2323.o crts2333.o crts2343.o \\\
1289
1429
crts4414.o crts4433.o crts4434.o crts8515.o crts8535.o \\\
1291
AVR_CRT_TINY='crttn11.o crttn12.o crttn15.o crttn28.o crttn22.o'
1431
AVR_CRT_TINY='crttn11.o crttn12.o crttn15.o crttn28.o crttn22.o crttn26.o'
1432
AVR_CRT_OTHER='crt86401.o'
1434
if test "$enable_doc" = "yes"; then
1293
1438
case $with_multisubdir in
1294
1439
avr3) avrlib_cflags=${avrlib_opt_speed}
1295
avrlib_asflags='-mmcu=atmega103'
1296
AVR_CRT_MEGA='crtm103.o crtm603.o'
1440
avrlib_asflags='-mmcu=avr3'
1441
AVR_CRT_MEGA='crtm103.o'
1442
AVR_CRT_OTHER='crt43320.o crt43355.o crt76711.o'
1298
1444
avr4) avrlib_cflags=${avrlib_opt_space}
1299
avrlib_asflags='-mmcu=atmega83'
1300
AVR_CRT_MEGA='crtm83.o # crtm8.o crtm85.o'
1445
avrlib_asflags='-mmcu=avr4'
1446
AVR_CRT_MEGA='crtm8.o crtm8515.o crtm8535.o # crtm83.o crtm85.o'
1302
1448
avr5) avrlib_cflags=${avrlib_opt_speed}
1303
avrlib_asflags='-mmcu=atmega161'
1304
AVR_CRT_MEGA='crtm161.o crtm163.o crtm32.o # crtm128.o'
1449
avrlib_asflags='-mmcu=avr5'
1450
AVR_CRT_MEGA='crtm161.o crtm162.o crtm163.o crtm169.o crtm323.o crtm128.o crtm16.o crtm32.o crtm64.o'
1305
1451
AVR_CRT_OTHER='crtat94k.o'
1307
1453
*) { echo "configure: error: unexpected value '${with_multisubdir}' for with_multisubdir" 1>&2; exit 1; }
1312
AVRLIB_CFLAGS="-g -Wall -W -Wstrict-prototypes ${avrlib_cflags}"
1458
AVRLIB_CFLAGS="-g -Wall -W -Wstrict-prototypes ${avrlib_defines} ${avrlib_cflags}"
1314
AVRLIB_ASFLAGS="-x assembler-with-cpp -Wa,-gstabs ${avrlib_asflags}"
1460
AVRLIB_ASFLAGS="-x assembler-with-cpp -Wa,-gstabs ${avrlib_defines} ${avrlib_asflags}"
1316
1462
AVR_CRT_ASFLAGS='-x assembler-with-cpp -Wa,-gstabs'
1402
1546
# Transform confdefs.h into DEFS.
1403
1547
# Protect against shell expansion while executing Makefile rules.
1404
1548
# Protect against Makefile macro expansion.
1405
cat > conftest.defs <<\EOF
1406
s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
1407
s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
1412
DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
1550
# If the first sed substitution is executed (which looks for macros that
1551
# take arguments), then we branch to the quote section. Otherwise,
1552
# look for a macro that doesn't take arguments.
1553
cat >confdef2opt.sed <<\_ACEOF
1556
s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g
1558
s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g
1562
s,[ `~#$^&*(){}\\|;'"<>?],\\&,g
1568
# We use echo to avoid assuming a particular line-breaking character.
1569
# The extra dot is to prevent the shell from consuming trailing
1570
# line-breaks from the sub-command output. A line-break within
1571
# single-quotes doesn't work because, if this script is created in a
1572
# platform that uses two characters for line-breaks (e.g., DOS), tr
1574
ac_LF_and_DOT=`echo; echo .`
1575
DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'`
1576
rm -f confdef2opt.sed
1416
1579
# Without the "./", some shells look in PATH for config.status.
1449
1612
ac_given_srcdir=$srcdir
1450
1613
ac_given_INSTALL="$INSTALL"
1452
trap 'rm -fr `echo "libc/Makefile libc/stdlib/Makefile libc/pmstring/Makefile
1453
libc/string/Makefile libc/misc/Makefile libc/bsd/Makefile
1455
libm/Makefile libm/fplib/Makefile
1615
trap 'rm -fr `echo "crt1/Makefile libc/Makefile libc/stdlib/Makefile
1616
libc/pmstring/Makefile libc/string/Makefile libc/misc/Makefile
1618
libm/Makefile libm/fplib/Makefile avr-libc.spec
1619
doc/Makefile doc/examples/Makefile
1620
doc/api/Makefile doc/api/doxygen.config
1456
1621
Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
1458
1623
cat >> $CONFIG_STATUS <<EOF
1518
1682
s%@RANLIB@%$RANLIB%g
1684
s%@TARGET_DOX_PS@%$TARGET_DOX_PS%g
1685
s%@TARGET_DOX_PDF@%$TARGET_DOX_PDF%g
1686
s%@TARGET_DOX_HTML@%$TARGET_DOX_HTML%g
1687
s%@INSTALL_DOX_PS@%$INSTALL_DOX_PS%g
1688
s%@INSTALL_DOX_PDF@%$INSTALL_DOX_PDF%g
1689
s%@INSTALL_DOX_HTML@%$INSTALL_DOX_HTML%g
1690
s%@PNGTOPNM@%$PNGTOPNM%g
1691
s%@PNMTOPNG@%$PNMTOPNG%g
1692
s%@DOC_INST_DIR@%$DOC_INST_DIR%g
1520
1693
s%@AVRLIB_CFLAGS@%$AVRLIB_CFLAGS%g
1521
1694
s%@AVRLIB_ASFLAGS@%$AVRLIB_ASFLAGS%g
1522
1695
s%@AVR_CRT_ASFLAGS@%$AVR_CRT_ASFLAGS%g
1524
1697
s%@AVR_CRT_TINY@%$AVR_CRT_TINY%g
1525
1698
s%@AVR_CRT_MEGA@%$AVR_CRT_MEGA%g
1526
1699
s%@AVR_CRT_OTHER@%$AVR_CRT_OTHER%g
1700
s%@AVR_LIBC_USER_MANUAL@%$AVR_LIBC_USER_MANUAL%g
1527
1701
s%@INCLUDES@%$INCLUDES%g
1528
s%@LIB_QSORT_DIR@%$LIB_QSORT_DIR%g
1702
s%@DOCSDIR@%$DOCSDIR%g
1568
1742
cat >> $CONFIG_STATUS <<EOF
1570
CONFIG_FILES=\${CONFIG_FILES-"libc/Makefile libc/stdlib/Makefile libc/pmstring/Makefile
1571
libc/string/Makefile libc/misc/Makefile libc/bsd/Makefile
1573
libm/Makefile libm/fplib/Makefile
1744
CONFIG_FILES=\${CONFIG_FILES-"crt1/Makefile libc/Makefile libc/stdlib/Makefile
1745
libc/pmstring/Makefile libc/string/Makefile libc/misc/Makefile
1747
libm/Makefile libm/fplib/Makefile avr-libc.spec
1748
doc/Makefile doc/examples/Makefile
1749
doc/api/Makefile doc/api/doxygen.config
1576
1752
cat >> $CONFIG_STATUS <<\EOF