GCC with OpenMP stream-computing extension and BatchQueue algorithm
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

configure.ac 112KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460
  1. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
  2. # 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
  3. # Free Software Foundation, Inc.
  4. #
  5. # This file is free software; you can redistribute it and/or modify it
  6. # under the terms of the GNU General Public License as published by
  7. # the Free Software Foundation; either version 3 of the License, or
  8. # (at your option) any later version.
  9. #
  10. # This program is distributed in the hope that it will be useful, but
  11. # WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  13. # General Public License for more details.
  14. #
  15. # You should have received a copy of the GNU General Public License
  16. # along with this program; see the file COPYING3. If not see
  17. # <http://www.gnu.org/licenses/>.
  18. ##############################################################################
  19. ### WARNING: this file contains embedded tabs. Do not run untabify on this file.
  20. m4_include(config/acx.m4)
  21. m4_include(config/override.m4)
  22. m4_include(config/proginstall.m4)
  23. m4_include(config/elf.m4)
  24. m4_include([libtool.m4])
  25. m4_include([ltoptions.m4])
  26. m4_include([ltsugar.m4])
  27. m4_include([ltversion.m4])
  28. m4_include([lt~obsolete.m4])
  29. AC_INIT(move-if-change)
  30. AC_PREREQ(2.64)
  31. AC_DISABLE_OPTION_CHECKING
  32. progname=$0
  33. # if PWD already has a value, it is probably wrong.
  34. if test -n "$PWD" ; then PWD=`${PWDCMD-pwd}`; fi
  35. # Export original configure arguments for use by sub-configures.
  36. # Quote arguments with shell meta charatcers.
  37. TOPLEVEL_CONFIGURE_ARGUMENTS=
  38. set -- "$progname" "$@"
  39. for ac_arg
  40. do
  41. case "$ac_arg" in
  42. *" "*|*" "*|*[[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\']]*)
  43. ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
  44. # if the argument is of the form -foo=baz, quote the baz part only
  45. ac_arg=`echo "'$ac_arg'" | sed "s/^'\([[-a-zA-Z0-9]]*=\)/\\1'/"` ;;
  46. *) ;;
  47. esac
  48. # Add the quoted argument to the list.
  49. TOPLEVEL_CONFIGURE_ARGUMENTS="$TOPLEVEL_CONFIGURE_ARGUMENTS $ac_arg"
  50. done
  51. if test "$silent" = yes; then
  52. TOPLEVEL_CONFIGURE_ARGUMENTS="$TOPLEVEL_CONFIGURE_ARGUMENTS --silent"
  53. fi
  54. # Remove the initial space we just introduced and, as these will be
  55. # expanded by make, quote '$'.
  56. TOPLEVEL_CONFIGURE_ARGUMENTS=`echo "x$TOPLEVEL_CONFIGURE_ARGUMENTS" | sed -e 's/^x *//' -e 's,\\$,$$,g'`
  57. AC_SUBST(TOPLEVEL_CONFIGURE_ARGUMENTS)
  58. # Find the build, host, and target systems.
  59. ACX_NONCANONICAL_BUILD
  60. ACX_NONCANONICAL_HOST
  61. ACX_NONCANONICAL_TARGET
  62. dnl Autoconf 2.5x and later will set a default program prefix if
  63. dnl --target was used, even if it was the same as --host. Disable
  64. dnl that behavior. This must be done before AC_CANONICAL_SYSTEM
  65. dnl to take effect.
  66. test "$host_noncanonical" = "$target_noncanonical" &&
  67. test "$program_prefix$program_suffix$program_transform_name" = \
  68. NONENONEs,x,x, &&
  69. program_transform_name=s,y,y,
  70. AC_CANONICAL_SYSTEM
  71. AC_ARG_PROGRAM
  72. m4_pattern_allow([^AS_FOR_TARGET$])dnl
  73. m4_pattern_allow([^AS_FOR_BUILD$])dnl
  74. # Get 'install' or 'install-sh' and its variants.
  75. AC_PROG_INSTALL
  76. ACX_PROG_LN
  77. AC_PROG_LN_S
  78. AC_PROG_SED
  79. AC_PROG_AWK
  80. ### we might need to use some other shell than /bin/sh for running subshells
  81. ### If we are on Windows, search for the shell. This will permit people
  82. ### to not have /bin/sh, but to be able to see /SOME/PATH/sh configure
  83. ### without also having to set CONFIG_SHELL. This code will work when
  84. ### using bash, which sets OSTYPE.
  85. case "${OSTYPE}" in
  86. *win32*)
  87. if test x${CONFIG_SHELL} = x ; then
  88. if test ! -f /bin/sh ; then
  89. if test x${SHELL} != x && test -f ${SHELL} ; then
  90. CONFIG_SHELL=${SHELL}
  91. export CONFIG_SHELL
  92. else
  93. for prog in sh sh.exe bash bash.exe; do
  94. IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
  95. for dir in $PATH; do
  96. test -z "$dir" && dir=.
  97. if test -f $dir/$prog; then
  98. CONFIG_SHELL=$dir/$prog
  99. export CONFIG_SHELL
  100. break
  101. fi
  102. done
  103. IFS="$save_ifs"
  104. test -n "${CONFIG_SHELL}" && break
  105. done
  106. fi
  107. fi
  108. fi
  109. ;;
  110. esac
  111. config_shell=${CONFIG_SHELL-/bin/sh}
  112. moveifchange=${srcdir}/move-if-change
  113. srcpwd=`cd ${srcdir} ; ${PWDCMD-pwd}`
  114. # We pass INSTALL explicitly to sub-makes. Make sure that it is not
  115. # a relative path.
  116. if test "$INSTALL" = "${srcdir}/install-sh -c"; then
  117. INSTALL="${srcpwd}/install-sh -c"
  118. fi
  119. # Set srcdir to "." if that's what it is.
  120. # This is important for multilib support.
  121. pwd=`${PWDCMD-pwd}`
  122. if test "${pwd}" = "${srcpwd}" ; then
  123. srcdir=.
  124. fi
  125. topsrcdir=$srcpwd
  126. extra_host_args=
  127. ### To add a new directory to the tree, first choose whether it is a target
  128. ### or a host dependent tool. Then put it into the appropriate list
  129. ### (library or tools, host or target), doing a dependency sort.
  130. # Subdirs will be configured in the order listed in build_configdirs,
  131. # configdirs, or target_configdirs; see the serialization section below.
  132. # Dependency sorting is only needed when *configuration* must be done in
  133. # a particular order. In all cases a dependency should be specified in
  134. # the Makefile, whether or not it's implicitly specified here.
  135. # Double entries in build_configdirs, configdirs, or target_configdirs may
  136. # cause circular dependencies and break everything horribly.
  137. # these library is used by various programs built for the build
  138. # environment
  139. #
  140. build_libs="build-libiberty"
  141. # these tools are built for the build environment
  142. build_tools="build-texinfo build-byacc build-flex build-bison build-m4 build-fixincludes"
  143. # these libraries are used by various programs built for the host environment
  144. #
  145. host_libs="intl mmalloc libiberty opcodes bfd readline tcl tk itcl libgui zlib libcpp libdecnumber gmp mpfr mpc ppl cloog libelf libiconv"
  146. # these tools are built for the host environment
  147. # Note, the powerpc-eabi build depends on sim occurring before gdb in order to
  148. # know that we are building the simulator.
  149. # binutils, gas and ld appear in that order because it makes sense to run
  150. # "make check" in that particular order.
  151. # If --enable-gold is used, "gold" may replace "ld".
  152. host_tools="texinfo byacc flex bison binutils gas ld fixincludes gcc cgen sid sim gdb make patch prms send-pr gprof etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool diff rcs fileutils shellutils time textutils wdiff find uudecode hello tar gzip indent recode release sed utils guile perl gawk findutils gettext zip fastjar gnattools"
  153. # libgcj represents the runtime libraries only used by gcj.
  154. libgcj="target-libffi \
  155. target-zlib \
  156. target-qthreads \
  157. target-libjava"
  158. # these libraries are built for the target environment, and are built after
  159. # the host libraries and the host tools (which may be a cross compiler)
  160. #
  161. target_libraries="target-libgcc \
  162. target-libiberty \
  163. target-libgloss \
  164. target-newlib \
  165. target-libgomp \
  166. target-libstdc++-v3 \
  167. target-libmudflap \
  168. target-libssp \
  169. target-libgfortran \
  170. target-boehm-gc \
  171. ${libgcj} \
  172. target-libobjc \
  173. target-libada"
  174. # these tools are built using the target libraries, and are intended to
  175. # run only in the target environment
  176. #
  177. # note: any program that *uses* libraries that are in the "target_libraries"
  178. # list belongs in this list. those programs are also very likely
  179. # candidates for the "native_only" list which follows
  180. #
  181. target_tools="target-examples target-groff target-gperf target-rda"
  182. ################################################################################
  183. ## All tools belong in one of the four categories, and are assigned above
  184. ## We assign ${configdirs} this way to remove all embedded newlines. This
  185. ## is important because configure will choke if they ever get through.
  186. ## ${configdirs} is directories we build using the host tools.
  187. ## ${target_configdirs} is directories we build using the target tools.
  188. configdirs=`echo ${host_libs} ${host_tools}`
  189. target_configdirs=`echo ${target_libraries} ${target_tools}`
  190. build_configdirs=`echo ${build_libs} ${build_tools}`
  191. m4_divert_text([PARSE_ARGS],
  192. [ac_subdirs_all=`cd $srcdir && echo */configure | sed 's,/configure,,g'`
  193. ])
  194. ################################################################################
  195. srcname="gnu development package"
  196. # This gets set non-empty for some net releases of packages.
  197. appdirs=""
  198. # Define is_cross_compiler to save on calls to 'test'.
  199. is_cross_compiler=
  200. if test x"${host}" = x"${target}" ; then
  201. is_cross_compiler=no
  202. else
  203. is_cross_compiler=yes
  204. fi
  205. # Find the build and target subdir names.
  206. GCC_TOPLEV_SUBDIRS
  207. # Be sure to cover against remnants of an in-tree build.
  208. if test $srcdir != . && test -d $srcdir/host-${host_noncanonical}; then
  209. AC_MSG_ERROR([building out of tree but $srcdir contains host-${host_noncanonical}.
  210. Use a pristine source tree when building in a separate tree])
  211. fi
  212. # Skipdirs are removed silently.
  213. skipdirs=
  214. # Noconfigdirs are removed loudly.
  215. noconfigdirs=""
  216. use_gnu_ld=
  217. # Make sure we don't let GNU ld be added if we didn't want it.
  218. if test x$with_gnu_ld = xno ; then
  219. use_gnu_ld=no
  220. noconfigdirs="$noconfigdirs ld gold"
  221. fi
  222. use_gnu_as=
  223. # Make sure we don't let GNU as be added if we didn't want it.
  224. if test x$with_gnu_as = xno ; then
  225. use_gnu_as=no
  226. noconfigdirs="$noconfigdirs gas"
  227. fi
  228. use_included_zlib=
  229. # Make sure we don't let ZLIB be added if we didn't want it.
  230. if test x$with_system_zlib = xyes ; then
  231. use_included_zlib=no
  232. noconfigdirs="$noconfigdirs zlib"
  233. fi
  234. # some tools are so dependent upon X11 that if we're not building with X,
  235. # it's not even worth trying to configure, much less build, that tool.
  236. case ${with_x} in
  237. yes | "") ;; # the default value for this tree is that X11 is available
  238. no)
  239. skipdirs="${skipdirs} tk itcl libgui"
  240. # We won't be able to build gdbtk without X.
  241. enable_gdbtk=no
  242. ;;
  243. *) echo "*** bad value \"${with_x}\" for -with-x flag; ignored" 1>&2 ;;
  244. esac
  245. # Some tools are only suitable for building in a "native" situation.
  246. # Remove these if host!=target.
  247. native_only="autoconf automake libtool fileutils find gawk gettext gzip hello indent m4 rcs recode sed shellutils tar textutils uudecode wdiff target-groff guile perl time ash bash bzip2 prms gnuserv target-gperf"
  248. # Similarly, some are only suitable for cross toolchains.
  249. # Remove these if host=target.
  250. cross_only="target-libgloss target-newlib target-opcodes"
  251. case $is_cross_compiler in
  252. no) skipdirs="${skipdirs} ${cross_only}" ;;
  253. yes) skipdirs="${skipdirs} ${native_only}" ;;
  254. esac
  255. # If both --with-headers and --with-libs are specified, default to
  256. # --without-newlib.
  257. if test x"${with_headers}" != x && test x"${with_headers}" != xno \
  258. && test x"${with_libs}" != x && test x"${with_libs}" != xno ; then
  259. if test x"${with_newlib}" = x ; then
  260. with_newlib=no
  261. fi
  262. fi
  263. # Recognize --with-newlib/--without-newlib.
  264. case ${with_newlib} in
  265. no) skipdirs="${skipdirs} target-newlib" ;;
  266. yes) skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'` ;;
  267. esac
  268. # Handle --enable-gold.
  269. # --enable-gold Build only gold
  270. # --disable-gold [default] Build only ld
  271. # --enable-gold=both Build both gold and ld, ld is default
  272. # --enable-gold=both/ld Same
  273. # --enable-gold=both/gold Build both gold and ld, gold is default, ld is renamed ld.bfd
  274. AC_ARG_ENABLE(gold,
  275. [[ --enable-gold[=ARG] build gold [ARG={both}[/{gold,ld}]]]],
  276. ENABLE_GOLD=$enableval,
  277. ENABLE_GOLD=no)
  278. case "${ENABLE_GOLD}" in
  279. yes|both|both/gold|both/ld)
  280. # Check for ELF target.
  281. is_elf=no
  282. case "${target}" in
  283. *-*-elf* | *-*-sysv4* | *-*-unixware* | *-*-eabi* | hppa*64*-*-hpux* \
  284. | *-*-linux* | frv-*-uclinux* | *-*-irix5* | *-*-irix6* \
  285. | *-*-netbsd* | *-*-openbsd* | *-*-freebsd* | *-*-solaris2* | *-*-nto*)
  286. case "${target}" in
  287. *-*-linux*aout* | *-*-linux*oldld*)
  288. ;;
  289. *)
  290. is_elf=yes
  291. ;;
  292. esac
  293. esac
  294. if test "$is_elf" = "yes"; then
  295. # Check for target supported by gold.
  296. case "${target}" in
  297. i?86-*-* | x86_64-*-* | sparc*-*-* | powerpc*-*-* | arm*-*-*)
  298. case "${ENABLE_GOLD}" in
  299. both*)
  300. configdirs="$configdirs gold"
  301. ;;
  302. *)
  303. configdirs="`echo " ${configdirs} " | sed -e 's/ ld / gold /'`"
  304. ;;
  305. esac
  306. ENABLE_GOLD=yes
  307. ;;
  308. esac
  309. fi
  310. ;;
  311. no)
  312. ;;
  313. *)
  314. AC_MSG_ERROR([invalid --enable-gold argument])
  315. ;;
  316. esac
  317. # Configure extra directories which are host specific
  318. case "${host}" in
  319. *-cygwin*)
  320. configdirs="$configdirs libtermcap" ;;
  321. esac
  322. # A target can indicate whether a language isn't supported for some reason.
  323. # Only spaces may be used in this macro; not newlines or tabs.
  324. unsupported_languages=
  325. # Remove more programs from consideration, based on the host or
  326. # target this usually means that a port of the program doesn't
  327. # exist yet.
  328. case "${host}" in
  329. hppa*64*-*-*)
  330. noconfigdirs="$noconfigdirs byacc"
  331. ;;
  332. i[[3456789]]86-*-vsta)
  333. noconfigdirs="$noconfigdirs tcl expect dejagnu make texinfo bison patch flex byacc send-pr gprof uudecode dejagnu diff guile perl itcl gnuserv gettext"
  334. ;;
  335. i[[3456789]]86-*-go32* | i[[3456789]]86-*-msdosdjgpp*)
  336. noconfigdirs="$noconfigdirs tcl tk expect dejagnu send-pr uudecode guile itcl gnuserv libffi"
  337. ;;
  338. x86_64-*-mingw*)
  339. noconfigdirs="$noconfigdirs expect dejagnu autoconf automake send-pr rcs guile perl texinfo libtool newlib"
  340. ;;
  341. i[[3456789]]86-*-mingw32*)
  342. # noconfigdirs="tcl tk expect dejagnu make texinfo bison patch flex byacc send-pr uudecode dejagnu diff guile perl itcl gnuserv"
  343. noconfigdirs="$noconfigdirs expect dejagnu autoconf automake send-pr rcs guile perl texinfo libtool newlib"
  344. ;;
  345. i[[3456789]]86-*-beos*)
  346. noconfigdirs="$noconfigdirs tk itcl libgui gdb"
  347. ;;
  348. *-*-cygwin*)
  349. noconfigdirs="$noconfigdirs autoconf automake send-pr rcs guile perl"
  350. ;;
  351. *-*-netbsd*)
  352. noconfigdirs="$noconfigdirs rcs"
  353. ;;
  354. ppc*-*-pe)
  355. noconfigdirs="$noconfigdirs patch diff make tk tcl expect dejagnu autoconf automake texinfo bison send-pr gprof rcs guile perl itcl gnuserv"
  356. ;;
  357. powerpc-*-beos*)
  358. noconfigdirs="$noconfigdirs tk itcl libgui gdb dejagnu readline"
  359. ;;
  360. esac
  361. AC_ARG_ENABLE(libada,
  362. [ --enable-libada build libada directory],
  363. ENABLE_LIBADA=$enableval,
  364. ENABLE_LIBADA=yes)
  365. if test "${ENABLE_LIBADA}" != "yes" ; then
  366. noconfigdirs="$noconfigdirs gnattools"
  367. fi
  368. AC_ARG_ENABLE(libssp,
  369. [ --enable-libssp build libssp directory],
  370. ENABLE_LIBSSP=$enableval,
  371. ENABLE_LIBSSP=yes)
  372. # Save it here so that, even in case of --enable-libgcj, if the Java
  373. # front-end isn't enabled, we still get libgcj disabled.
  374. libgcj_saved=$libgcj
  375. case $enable_libgcj in
  376. yes)
  377. # If we reset it here, it won't get added to noconfigdirs in the
  378. # target-specific build rules, so it will be forcibly enabled
  379. # (unless the Java language itself isn't enabled).
  380. libgcj=
  381. ;;
  382. no)
  383. # Make sure we get it printed in the list of not supported target libs.
  384. noconfigdirs="$noconfigdirs ${libgcj}"
  385. ;;
  386. esac
  387. # Disable libmudflap on some systems.
  388. if test x$enable_libmudflap = x ; then
  389. case "${target}" in
  390. *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu | bfin*-*-uclinux* | *-*-kopensolaris*-gnu)
  391. # Enable libmudflap by default in GNU and friends.
  392. ;;
  393. *-*-freebsd*)
  394. # Enable libmudflap by default in FreeBSD.
  395. ;;
  396. *)
  397. # Disable it by default everywhere else.
  398. noconfigdirs="$noconfigdirs target-libmudflap"
  399. ;;
  400. esac
  401. fi
  402. # Disable libgomp on non POSIX hosted systems.
  403. if test x$enable_libgomp = x ; then
  404. # Enable libgomp by default on hosted POSIX systems.
  405. case "${target}" in
  406. *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu | *-*-kopensolaris*-gnu)
  407. ;;
  408. *-*-netbsd* | *-*-freebsd* | *-*-openbsd*)
  409. ;;
  410. *-*-solaris2* | *-*-sysv4* | *-*-irix6* | *-*-osf* | *-*-hpux11*)
  411. ;;
  412. *-*-darwin* | *-*-aix*)
  413. ;;
  414. *)
  415. noconfigdirs="$noconfigdirs target-libgomp"
  416. ;;
  417. esac
  418. fi
  419. # Default libgloss CPU subdirectory.
  420. libgloss_dir="$target_cpu"
  421. case "${target}" in
  422. *-*-chorusos)
  423. noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
  424. ;;
  425. powerpc-*-darwin*)
  426. noconfigdirs="$noconfigdirs ld gas gdb gprof"
  427. noconfigdirs="$noconfigdirs sim target-rda"
  428. ;;
  429. i[[3456789]]86-*-darwin*)
  430. noconfigdirs="$noconfigdirs ld gprof"
  431. noconfigdirs="$noconfigdirs sim target-rda"
  432. ;;
  433. x86_64-*-darwin[[912]]*)
  434. noconfigdirs="$noconfigdirs ld gas gprof"
  435. noconfigdirs="$noconfigdirs sim target-rda"
  436. ;;
  437. *-*-darwin*)
  438. noconfigdirs="$noconfigdirs ld gas gdb gprof"
  439. noconfigdirs="$noconfigdirs sim target-rda"
  440. noconfigdirs="$noconfigdirs ${libgcj}"
  441. ;;
  442. *-*-freebsd[[12]] | *-*-freebsd[[12]].* | *-*-freebsd*aout*)
  443. noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
  444. ;;
  445. *-*-freebsd*)
  446. noconfigdirs="$noconfigdirs target-newlib target-libgloss"
  447. if test "x$with_gmp" = x && test "x$with_gmp_dir" = x \
  448. && test -f /usr/local/include/gmp.h; then
  449. with_gmp=/usr/local
  450. fi
  451. # Skip some stuff that's unsupported on some FreeBSD configurations.
  452. case "${target}" in
  453. i*86-*-*) ;;
  454. alpha*-*-*) ;;
  455. x86_64-*-*) ;;
  456. *)
  457. noconfigdirs="$noconfigdirs ${libgcj}"
  458. ;;
  459. esac
  460. ;;
  461. *-*-kaos*)
  462. # Remove unsupported stuff on all kaOS configurations.
  463. skipdirs="target-libiberty ${libgcj} target-libstdc++-v3 target-librx"
  464. skipdirs="$skipdirs target-libobjc target-examples target-groff target-gperf"
  465. skipdirs="$skipdirs zlib fastjar target-libjava target-boehm-gc target-zlib"
  466. noconfigdirs="$noconfigdirs target-libgloss"
  467. ;;
  468. *-*-netbsd*)
  469. # Skip some stuff on all NetBSD configurations.
  470. noconfigdirs="$noconfigdirs target-newlib target-libiberty target-libgloss"
  471. # Skip some stuff that's unsupported on some NetBSD configurations.
  472. case "${target}" in
  473. i*86-*-netbsdelf*) ;;
  474. arm*-*-netbsdelf*) ;;
  475. *)
  476. noconfigdirs="$noconfigdirs ${libgcj}"
  477. ;;
  478. esac
  479. ;;
  480. *-*-netware*)
  481. noconfigdirs="$noconfigdirs target-newlib target-libiberty target-libgloss ${libgcj} target-libmudflap"
  482. ;;
  483. *-*-rtems*)
  484. skipdirs="${skipdirs} target-libiberty"
  485. noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
  486. ;;
  487. # The tpf target doesn't support gdb yet.
  488. *-*-tpf*)
  489. noconfigdirs="$noconfigdirs target-newlib target-libgloss target-libiberty ${libgcj} target-libmudflap gdb tcl tk libgui itcl"
  490. ;;
  491. *-*-uclinux*)
  492. noconfigdirs="$noconfigdirs target-newlib target-libgloss target-rda ${libgcj}"
  493. ;;
  494. *-*-vxworks*)
  495. noconfigdirs="$noconfigdirs target-newlib target-libgloss target-libiberty target-libstdc++-v3 ${libgcj}"
  496. ;;
  497. alpha*-dec-osf*)
  498. # ld works, but does not support shared libraries.
  499. # newlib is not 64 bit ready. I'm not sure about fileutils.
  500. # gas doesn't generate exception information.
  501. noconfigdirs="$noconfigdirs gas ld fileutils target-newlib target-libgloss"
  502. ;;
  503. alpha*-*-*vms*)
  504. noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss ${libgcj}"
  505. ;;
  506. alpha*-*-linux*)
  507. # newlib is not 64 bit ready
  508. noconfigdirs="$noconfigdirs target-newlib target-libgloss"
  509. ;;
  510. alpha*-*-*)
  511. # newlib is not 64 bit ready
  512. noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
  513. ;;
  514. am33_2.0-*-linux*)
  515. noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
  516. ;;
  517. sh-*-linux*)
  518. noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
  519. ;;
  520. sh*-*-pe|mips*-*-pe|*arm-wince-pe)
  521. noconfigdirs="$noconfigdirs ${libgcj}"
  522. noconfigdirs="$noconfigdirs target-examples"
  523. noconfigdirs="$noconfigdirs target-libiberty texinfo send-pr"
  524. noconfigdirs="$noconfigdirs tcl tk itcl libgui sim"
  525. noconfigdirs="$noconfigdirs expect dejagnu"
  526. # the C++ libraries don't build on top of CE's C libraries
  527. noconfigdirs="$noconfigdirs target-libstdc++-v3"
  528. noconfigdirs="$noconfigdirs target-newlib"
  529. case "${host}" in
  530. *-*-cygwin*) ;; # keep gdb and readline
  531. *) noconfigdirs="$noconfigdirs gdb readline"
  532. ;;
  533. esac
  534. libgloss_dir=wince
  535. ;;
  536. arc-*-*)
  537. noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
  538. ;;
  539. arm-semi-aof )
  540. ;;
  541. arm-*-coff | strongarm-*-coff | xscale-*-coff)
  542. noconfigdirs="$noconfigdirs ${libgcj}"
  543. libgloss_dir=arm
  544. ;;
  545. arm-*-elf* | strongarm-*-elf* | xscale-*-elf* | arm*-*-eabi* )
  546. noconfigdirs="$noconfigdirs target-libffi target-qthreads"
  547. libgloss_dir=arm
  548. ;;
  549. arm*-*-linux-gnueabi)
  550. noconfigdirs="$noconfigdirs target-qthreads"
  551. case ${with_newlib} in
  552. no) noconfigdirs="$noconfigdirs target-newlib target-libgloss"
  553. esac
  554. libgloss_dir=arm
  555. ;;
  556. arm*-*-symbianelf*)
  557. noconfigdirs="$noconfigdirs ${libgcj} target-libiberty"
  558. libgloss_dir=arm
  559. ;;
  560. arm-*-pe*)
  561. noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
  562. ;;
  563. thumb-*-coff)
  564. noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
  565. ;;
  566. thumb-*-elf)
  567. noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
  568. ;;
  569. thumb-*-pe)
  570. noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
  571. ;;
  572. arm-*-riscix*)
  573. noconfigdirs="$noconfigdirs ld target-libgloss ${libgcj}"
  574. ;;
  575. avr-*-*)
  576. noconfigdirs="$noconfigdirs target-libiberty target-libstdc++-v3 ${libgcj} target-libssp"
  577. ;;
  578. bfin-*-*)
  579. unsupported_languages="$unsupported_languages java"
  580. noconfigdirs="$noconfigdirs target-boehm-gc gdb"
  581. if test x${is_cross_compiler} != xno ; then
  582. target_configdirs="${target_configdirs} target-bsp target-cygmon"
  583. fi
  584. ;;
  585. c4x-*-* | tic4x-*-*)
  586. noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj}"
  587. ;;
  588. c54x*-*-* | tic54x-*-*)
  589. noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj} gcc gdb newlib"
  590. ;;
  591. cr16-*-*)
  592. noconfigdirs="$noconfigdirs ${libgcj} gdb"
  593. ;;
  594. cris-*-* | crisv32-*-*)
  595. unsupported_languages="$unsupported_languages java"
  596. case "${target}" in
  597. *-*-aout)
  598. unsupported_languages="$unsupported_languages fortran"
  599. noconfigdirs="$noconfigdirs target-libffi target-boehm-gc";;
  600. *-*-elf)
  601. noconfigdirs="$noconfigdirs target-boehm-gc";;
  602. *-*-linux*)
  603. noconfigdirs="$noconfigdirs target-newlib target-libgloss";;
  604. *)
  605. unsupported_languages="$unsupported_languages fortran"
  606. noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss";;
  607. esac
  608. libgloss_dir=cris
  609. ;;
  610. crx-*-*)
  611. noconfigdirs="$noconfigdirs target-libstdc++-v3 target-mudflap ${libgcj}"
  612. ;;
  613. d10v-*-*)
  614. noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj}"
  615. ;;
  616. d30v-*-*)
  617. noconfigdirs="$noconfigdirs ${libgcj} gdb"
  618. ;;
  619. ep9312-*-elf | ep9312-*-coff)
  620. libgloss_dir=arm
  621. ;;
  622. fr30-*-elf*)
  623. noconfigdirs="$noconfigdirs ${libgcj} gdb"
  624. ;;
  625. frv-*-*)
  626. noconfigdirs="$noconfigdirs ${libgcj}"
  627. ;;
  628. moxie-*-*)
  629. noconfigdirs="$noconfigdirs ${libgcj}"
  630. noconfigdirs="$noconfigdirs gprof"
  631. ;;
  632. h8300*-*-*)
  633. noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
  634. ;;
  635. h8500-*-*)
  636. noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj}"
  637. ;;
  638. hppa1.1-*-osf* | hppa1.1-*-bsd* )
  639. ;;
  640. hppa*64*-*-linux* | parisc*64*-*-linux*)
  641. # In this case, it's because the hppa64-linux target is for
  642. # the kernel only at this point and has no libc, and thus no
  643. # headers, crt*.o, etc., all of which are needed by these.
  644. noconfigdirs="$noconfigdirs target-zlib"
  645. ;;
  646. parisc*-*-linux* | hppa*-*-linux*)
  647. ;;
  648. hppa*-*-*elf* | \
  649. hppa*-*-lites* | \
  650. hppa*-*-openbsd* | \
  651. hppa*64*-*-*)
  652. noconfigdirs="$noconfigdirs ${libgcj}"
  653. ;;
  654. hppa*-hp-hpux11*)
  655. noconfigdirs="$noconfigdirs ld shellutils"
  656. ;;
  657. hppa*-*-pro*)
  658. libgloss_dir=pa
  659. ;;
  660. hppa*-*-*)
  661. # According to Alexandre Oliva <aoliva@redhat.com>, libjava won't
  662. # build on HP-UX 10.20.
  663. noconfigdirs="$noconfigdirs ld shellutils ${libgcj}"
  664. ;;
  665. i960-*-*)
  666. noconfigdirs="$noconfigdirs ${libgcj} gdb"
  667. ;;
  668. ia64*-*-elf*)
  669. # No gdb support yet.
  670. noconfigdirs="$noconfigdirs readline mmalloc libgui itcl gdb"
  671. ;;
  672. ia64*-**-hpux*)
  673. # No gdb or ld support yet.
  674. noconfigdirs="$noconfigdirs ${libgcj} readline mmalloc libgui itcl gdb ld"
  675. ;;
  676. ia64*-*-*vms*)
  677. # No gdb or ld support yet.
  678. noconfigdirs="$noconfigdirs ${libgcj} tix readline mmalloc libgui itcl gdb ld"
  679. ;;
  680. i370-*-opened*)
  681. ;;
  682. i[[3456789]]86-*-coff | i[[3456789]]86-*-elf)
  683. noconfigdirs="$noconfigdirs ${libgcj}"
  684. libgloss_dir=i386
  685. ;;
  686. i[[3456789]]86-*-linux*)
  687. # The GCC port for glibc1 has no MD_FALLBACK_FRAME_STATE_FOR, so let's
  688. # not build java stuff by default.
  689. case "${target}" in
  690. *-*-*libc1*)
  691. noconfigdirs="$noconfigdirs ${libgcj}";;
  692. esac
  693. # This section makes it possible to build newlib natively on linux.
  694. # If we are using a cross compiler then don't configure newlib.
  695. if test x${is_cross_compiler} != xno ; then
  696. noconfigdirs="$noconfigdirs target-newlib"
  697. fi
  698. noconfigdirs="$noconfigdirs target-libgloss"
  699. # If we are not using a cross compiler, do configure newlib.
  700. # Note however, that newlib will only be configured in this situation
  701. # if the --with-newlib option has been given, because otherwise
  702. # 'target-newlib' will appear in skipdirs.
  703. ;;
  704. i[[3456789]]86-w64-mingw*)
  705. noconfigdirs="$noconfigdirs expect target-libgloss target-newlib ${libgcj}"
  706. ;;
  707. i[[3456789]]86-*-mingw*)
  708. target_configdirs="$target_configdirs target-winsup"
  709. noconfigdirs="$noconfigdirs expect target-libgloss target-newlib ${libgcj}"
  710. ;;
  711. x86_64-*-mingw*)
  712. noconfigdirs="$noconfigdirs expect target-libgloss target-newlib ${libgcj}"
  713. ;;
  714. *-*-cygwin*)
  715. target_configdirs="$target_configdirs target-libtermcap target-winsup"
  716. noconfigdirs="$noconfigdirs target-gperf target-libgloss"
  717. # always build newlib if winsup directory is present.
  718. if test -d "$srcdir/winsup/cygwin"; then
  719. skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'`
  720. elif test -d "$srcdir/newlib"; then
  721. echo "Warning: winsup/cygwin is missing so newlib can't be built."
  722. fi
  723. ;;
  724. i[[3456789]]86-moss-msdos | i[[3456789]]86-*-moss* | \
  725. i[[3456789]]86-*-uwin* | i[[3456789]]86-*-interix* )
  726. ;;
  727. i[[3456789]]86-*-pe)
  728. noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj}"
  729. ;;
  730. i[[3456789]]86-*-sco3.2v5*)
  731. # The linker does not yet know about weak symbols in COFF,
  732. # and is not configured to handle mixed ELF and COFF.
  733. noconfigdirs="$noconfigdirs ld target-libgloss ${libgcj}"
  734. ;;
  735. i[[3456789]]86-*-sco*)
  736. noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
  737. ;;
  738. i[[3456789]]86-*-solaris2*)
  739. noconfigdirs="$noconfigdirs target-libgloss"
  740. ;;
  741. i[[3456789]]86-*-sysv4*)
  742. noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
  743. ;;
  744. i[[3456789]]86-*-beos*)
  745. noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss ${libgcj}"
  746. ;;
  747. i[[3456789]]86-*-rdos*)
  748. noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss"
  749. ;;
  750. m32r-*-*)
  751. noconfigdirs="$noconfigdirs ${libgcj}"
  752. ;;
  753. m68hc11-*-*|m6811-*-*|m68hc12-*-*|m6812-*-*)
  754. noconfigdirs="$noconfigdirs target-libiberty target-libstdc++-v3 ${libgcj}"
  755. libgloss_dir=m68hc11
  756. ;;
  757. m68k-*-elf*)
  758. noconfigdirs="$noconfigdirs ${libgcj}"
  759. ;;
  760. m68k-*-coff*)
  761. noconfigdirs="$noconfigdirs ${libgcj}"
  762. ;;
  763. m68*-*-* | fido-*-*)
  764. libgloss_dir=m68k
  765. ;;
  766. mcore-*-pe*)
  767. # The EPOC C++ environment does not support exceptions or rtti,
  768. # and so building libstdc++-v3 tends not to always work.
  769. noconfigdirs="$noconfigdirs target-libstdc++-v3"
  770. ;;
  771. mmix-*-*)
  772. noconfigdirs="$noconfigdirs target-libffi target-boehm-gc gdb libgloss"
  773. unsupported_languages="$unsupported_languages fortran java"
  774. ;;
  775. mn10200-*-*)
  776. noconfigdirs="$noconfigdirs ${libgcj}"
  777. ;;
  778. mn10300-*-*)
  779. noconfigdirs="$noconfigdirs ${libgcj}"
  780. ;;
  781. mt-*-*)
  782. noconfigdirs="$noconfigdirs sim"
  783. ;;
  784. powerpc-*-aix*)
  785. # copied from rs6000-*-* entry
  786. noconfigdirs="$noconfigdirs gprof target-libgloss target-libssp target-newlib ${libgcj}"
  787. ;;
  788. powerpc*-*-winnt* | powerpc*-*-pe* | ppc*-*-pe)
  789. target_configdirs="$target_configdirs target-winsup"
  790. noconfigdirs="$noconfigdirs gdb tcl tk make expect target-libgloss itcl gnuserv ${libgcj}"
  791. # always build newlib.
  792. skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'`
  793. ;;
  794. # This is temporary until we can link against shared libraries
  795. powerpcle-*-solaris*)
  796. noconfigdirs="$noconfigdirs gdb sim make tcl tk expect itcl gnuserv ${libgcj}"
  797. libgloss_dir=rs6000
  798. ;;
  799. powerpc-*-beos*)
  800. noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss ${libgcj}"
  801. ;;
  802. powerpc-*-eabi)
  803. noconfigdirs="$noconfigdirs ${libgcj}"
  804. libgloss_dir=rs6000
  805. ;;
  806. powerpc-*-eabi* | powerpcle-*-eabi* | powerpc-*-rtems* )
  807. libgloss_dir=rs6000
  808. ;;
  809. rs6000-*-lynxos*)
  810. noconfigdirs="$noconfigdirs target-newlib gprof ${libgcj}"
  811. ;;
  812. rs6000-*-aix*)
  813. noconfigdirs="$noconfigdirs gprof target-libgloss target-libssp target-newlib ${libgcj}"
  814. ;;
  815. rs6000-*-*)
  816. noconfigdirs="$noconfigdirs gprof ${libgcj}"
  817. ;;
  818. m68k-apollo-*)
  819. noconfigdirs="$noconfigdirs ld binutils gprof target-libgloss ${libgcj}"
  820. ;;
  821. microblaze*)
  822. noconfigdirs="$noconfigdirs gprof ${libgcj}"
  823. ;;
  824. mips*-sde-elf*)
  825. skipdirs="$skipdirs target-libiberty"
  826. noconfigdirs="$noconfigdirs ${libgcj}"
  827. if test x$with_newlib = xyes; then
  828. noconfigdirs="$noconfigdirs gprof"
  829. fi
  830. libgloss_dir=mips
  831. ;;
  832. mips*-*-irix5*)
  833. noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
  834. ;;
  835. mips*-*-irix6*)
  836. # Linking libjava exceeds command-line length limits on at least
  837. # IRIX 6.2, but not on IRIX 6.5.
  838. # Also, boehm-gc won't build on IRIX 6.5, according to Jeffrey Oldham
  839. # <oldham@codesourcery.com>
  840. noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
  841. ;;
  842. mips*-*-bsd*)
  843. noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
  844. ;;
  845. mips*-*-linux*)
  846. noconfigdirs="$noconfigdirs target-newlib target-libgloss"
  847. ;;
  848. mips*-*-*)
  849. noconfigdirs="$noconfigdirs gprof ${libgcj}"
  850. libgloss_dir=mips
  851. ;;
  852. romp-*-*)
  853. noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}"
  854. ;;
  855. sh-*-* | sh64-*-*)
  856. case "${host}" in
  857. i[[3456789]]86-*-vsta) ;; # don't add gprof back in
  858. i[[3456789]]86-*-go32*) ;; # don't add gprof back in
  859. i[[3456789]]86-*-msdosdjgpp*) ;; # don't add gprof back in
  860. *) skipdirs=`echo " ${skipdirs} " | sed -e 's/ gprof / /'` ;;
  861. esac
  862. case "${target}" in
  863. sh*-*-elf)
  864. noconfigdirs="$noconfigdirs ${libgcj}" ;;
  865. *)
  866. noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" ;;
  867. esac
  868. ;;
  869. sparclet-*-aout* | sparc86x-*-*)
  870. libgloss_dir=sparc
  871. ;;
  872. sparc-*-elf*)
  873. noconfigdirs="$noconfigdirs ${libgcj}"
  874. ;;
  875. sparc64-*-elf*)
  876. noconfigdirs="$noconfigdirs ${libgcj}"
  877. libgloss_dir=sparc
  878. ;;
  879. sparclite-*-*)
  880. noconfigdirs="$noconfigdirs ${libgcj}"
  881. libgloss_dir=sparc
  882. ;;
  883. sparc-*-sunos4*)
  884. noconfigdirs="$noconfigdirs ${libgcj}"
  885. if test x${is_cross_compiler} != xno ; then
  886. noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss"
  887. else
  888. use_gnu_ld=no
  889. fi
  890. ;;
  891. sparc-*-solaris2.[[0-6]] | sparc-*-solaris2.[[0-6]].*)
  892. noconfigdirs="$noconfigdirs ${libgcj}"
  893. ;;
  894. sparc-*-solaris* | sparc64-*-solaris* | sparcv9-*-solaris*)
  895. ;;
  896. tic6x-*-*)
  897. noconfigdirs="$noconfigdirs gdb sim ${libgcj}"
  898. ;;
  899. v810-*-*)
  900. noconfigdirs="$noconfigdirs bfd binutils gas gcc gdb ld target-libstdc++-v3 opcodes target-libgloss ${libgcj}"
  901. ;;
  902. v850-*-*)
  903. noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
  904. ;;
  905. v850e-*-*)
  906. noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
  907. ;;
  908. v850ea-*-*)
  909. noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
  910. ;;
  911. vax-*-vms)
  912. noconfigdirs="$noconfigdirs bfd binutils gdb ld target-newlib opcodes target-libgloss ${libgcj}"
  913. ;;
  914. vax-*-*)
  915. noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
  916. ;;
  917. xtensa*-*-*)
  918. noconfigdirs="$noconfigdirs ${libgcj}"
  919. ;;
  920. ip2k-*-*)
  921. noconfigdirs="$noconfigdirs target-libiberty target-libstdc++-v3 ${libgcj}"
  922. ;;
  923. *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu | *-*-kopensolaris*-gnu)
  924. noconfigdirs="$noconfigdirs target-newlib target-libgloss"
  925. ;;
  926. *-*-lynxos*)
  927. noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
  928. ;;
  929. *-*-*)
  930. noconfigdirs="$noconfigdirs ${libgcj}"
  931. ;;
  932. esac
  933. # If we aren't building newlib, then don't build libgloss, since libgloss
  934. # depends upon some newlib header files.
  935. case "${noconfigdirs}" in
  936. *target-libgloss*) ;;
  937. *target-newlib*) noconfigdirs="$noconfigdirs target-libgloss" ;;
  938. esac
  939. # Work in distributions that contain no compiler tools, like Autoconf.
  940. tentative_cc=""
  941. host_makefile_frag=/dev/null
  942. if test -d ${srcdir}/config ; then
  943. case "${host}" in
  944. m68k-hp-hpux*)
  945. # Avoid "too much defining" errors from HPUX compiler.
  946. tentative_cc="cc -Wp,-H256000"
  947. # If "ar" in $PATH is GNU ar, the symbol table may need rebuilding.
  948. # If it's HP/UX ar, this should be harmless.
  949. RANLIB="ar ts"
  950. ;;
  951. m68k-apollo-sysv*)
  952. tentative_cc="cc -A ansi -A runtype,any -A systype,any -U__STDC__ -DUSG"
  953. ;;
  954. m68k-apollo-bsd*)
  955. #None of the Apollo compilers can compile gas or binutils. The preprocessor
  956. # chokes on bfd, the compiler won't let you assign integers to enums, and
  957. # other problems. Defining CC to gcc is a questionable way to say "don't use
  958. # the apollo compiler" (the preferred version of GCC could be called cc,
  959. # or whatever), but I'm not sure leaving CC as cc is any better...
  960. #CC=cc -A ansi -A runtype,any -A systype,any -U__STDC__ -DNO_STDARG
  961. # Used to have BISON=yacc.
  962. tentative_cc=gcc
  963. ;;
  964. m88k-dg-dgux*)
  965. tentative_cc="gcc -Wall -ansi -D__using_DGUX"
  966. ;;
  967. m88k-harris-cxux*)
  968. # Under CX/UX, we want to tell the compiler to use ANSI mode.
  969. tentative_cc="cc -Xa"
  970. host_makefile_frag="config/mh-cxux"
  971. ;;
  972. m88k-motorola-sysv*)
  973. ;;
  974. mips*-dec-ultrix*)
  975. tentative_cc="cc -Wf,-XNg1000"
  976. host_makefile_frag="config/mh-decstation"
  977. ;;
  978. mips*-nec-sysv4*)
  979. # The C compiler on NEC MIPS SVR4 needs bigger tables.
  980. tentative_cc="cc -ZXNd=5000 -ZXNg=1000"
  981. host_makefile_frag="config/mh-necv4"
  982. ;;
  983. mips*-sgi-irix4*)
  984. # Tell compiler to use K&R C. We can't compile under the SGI Ansi
  985. # environment. Also bump switch table size so that cp-parse will
  986. # compile. Bump string length limit so linker builds.
  987. tentative_cc="cc -cckr -Wf,-XNg1500 -Wf,-XNk1000 -Wf,-XNh2000 -Wf,-XNl8192"
  988. ;;
  989. mips*-*-sysv4*)
  990. host_makefile_frag="config/mh-sysv4"
  991. ;;
  992. mips*-*-sysv*)
  993. # This is for a MIPS running RISC/os 4.52C.
  994. # This is needed for GDB, but needs to be in the top-level make because
  995. # if a library is compiled with the bsd headers and gets linked with the
  996. # sysv system libraries all hell can break loose (e.g. a jmp_buf might be
  997. # a different size).
  998. # ptrace(2) apparently has problems in the BSD environment. No workaround is
  999. # known except to select the sysv environment. Could we use /proc instead?
  1000. # These "sysv environments" and "bsd environments" often end up being a pain.
  1001. #
  1002. # This is not part of CFLAGS because perhaps not all C compilers have this
  1003. # option.
  1004. tentative_cc="cc -systype sysv"
  1005. ;;
  1006. i370-ibm-opened*)
  1007. tentative_cc="c89"
  1008. ;;
  1009. i[[3456789]]86-*-sysv5*)
  1010. host_makefile_frag="config/mh-sysv5"
  1011. ;;
  1012. i[[3456789]]86-*-dgux*)
  1013. tentative_cc="gcc -Wall -ansi -D__using_DGUX"
  1014. host_makefile_frag="config/mh-dgux386"
  1015. ;;
  1016. i[[3456789]]86-ncr-sysv4.3*)
  1017. # The MetaWare compiler will generate a copyright message unless you
  1018. # turn it off by adding the -Hnocopyr flag.
  1019. tentative_cc="cc -Hnocopyr"
  1020. ;;
  1021. i[[3456789]]86-ncr-sysv4*)
  1022. # for an NCR 3000 (i486/SVR4) system.
  1023. # The NCR 3000 ships with a MetaWare compiler installed as /bin/cc.
  1024. # This compiler not only emits obnoxious copyright messages every time
  1025. # you run it, but it chokes and dies on a whole bunch of GNU source
  1026. # files. Default to using the AT&T compiler installed in /usr/ccs/ATT/cc.
  1027. tentative_cc="/usr/ccs/ATT/cc"
  1028. host_makefile_frag="config/mh-ncr3000"
  1029. ;;
  1030. i[[3456789]]86-*-sco3.2v5*)
  1031. ;;
  1032. i[[3456789]]86-*-sco*)
  1033. # The native C compiler botches some simple uses of const. Unfortunately,
  1034. # it doesn't defined anything like "__sco__" for us to test for in ansidecl.h.
  1035. tentative_cc="cc -Dconst="
  1036. host_makefile_frag="config/mh-sco"
  1037. ;;
  1038. i[[3456789]]86-*-udk*)
  1039. host_makefile_frag="config/mh-sysv5"
  1040. ;;
  1041. i[[3456789]]86-*-solaris2*)
  1042. host_makefile_frag="config/mh-sysv4"
  1043. ;;
  1044. i[[3456789]]86-*-msdosdjgpp*)
  1045. host_makefile_frag="config/mh-djgpp"
  1046. ;;
  1047. *-cygwin*)
  1048. ACX_CHECK_CYGWIN_CAT_WORKS
  1049. host_makefile_frag="config/mh-cygwin"
  1050. ;;
  1051. *-mingw*)
  1052. host_makefile_frag="config/mh-mingw"
  1053. ;;
  1054. *-interix*)
  1055. host_makefile_frag="config/mh-interix"
  1056. ;;
  1057. vax-*-ultrix2*)
  1058. # The old BSD pcc isn't up to compiling parts of gdb so use gcc
  1059. tentative_cc=gcc
  1060. ;;
  1061. *-*-solaris2*)
  1062. host_makefile_frag="config/mh-solaris"
  1063. ;;
  1064. m68k-sun-sunos*)
  1065. # Sun's C compiler needs the -J flag to be able to compile cp-parse.c
  1066. # without overflowing the jump tables (-J says to use a 32 bit table)
  1067. tentative_cc="cc -J"
  1068. ;;
  1069. hppa*-hp-hpux10*)
  1070. tentative_cc="cc -Wp,-H256000"
  1071. host_makefile_frag="config/mh-pa-hpux10"
  1072. ;;
  1073. hppa*-hp-hpux* | hppa*-*-hiux*)
  1074. tentative_cc="cc -Wp,-H256000"
  1075. host_makefile_frag="config/mh-pa"
  1076. ;;
  1077. hppa*-*)
  1078. host_makefile_frag="config/mh-pa"
  1079. ;;
  1080. *-hp-hpux* | *-*-hiux*)
  1081. tentative_cc="cc -Wp,-H256000"
  1082. ;;
  1083. rs6000-*-lynxos*)
  1084. # /bin/cc is less than useful for our purposes. Always use GCC
  1085. tentative_cc="/usr/cygnus/progressive/bin/gcc"
  1086. host_makefile_frag="config/mh-lynxrs6k"
  1087. ;;
  1088. powerpc-*-darwin*)
  1089. host_makefile_frag="config/mh-ppc-darwin"
  1090. ;;
  1091. powerpc-*-aix*)
  1092. host_makefile_frag="config/mh-ppc-aix"
  1093. ;;
  1094. rs6000-*-aix*)
  1095. host_makefile_frag="config/mh-ppc-aix"
  1096. ;;
  1097. *-*-lynxos*)
  1098. # /bin/cc is less than useful for our purposes. Always use GCC
  1099. tentative_cc="/bin/gcc"
  1100. ;;
  1101. *-*-sysv4*)
  1102. host_makefile_frag="config/mh-sysv4"
  1103. ;;
  1104. # This is placed last to prevent interfering with the cases above.
  1105. i[[3456789]]86-*-*)
  1106. # Build the stage2 and stage3 compilers with -fomit-frame-pointer.
  1107. host_makefile_frag="config/mh-x86omitfp"
  1108. ;;
  1109. esac
  1110. fi
  1111. # If we aren't going to be using gcc, see if we can extract a definition
  1112. # of CC from the fragment.
  1113. # Actually, use the 'pre-extracted' version above.
  1114. if test -z "${CC}" && test "${build}" = "${host}" ; then
  1115. IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
  1116. found=
  1117. for dir in $PATH; do
  1118. test -z "$dir" && dir=.
  1119. if test -f $dir/gcc; then
  1120. found=yes
  1121. break
  1122. fi
  1123. done
  1124. IFS="$save_ifs"
  1125. if test -z "${found}" && test -n "${tentative_cc}" ; then
  1126. CC=$tentative_cc
  1127. fi
  1128. fi
  1129. if test "${build}" != "${host}" ; then
  1130. AR_FOR_BUILD=${AR_FOR_BUILD-ar}
  1131. AS_FOR_BUILD=${AS_FOR_BUILD-as}
  1132. CC_FOR_BUILD=${CC_FOR_BUILD-gcc}
  1133. CXX_FOR_BUILD=${CXX_FOR_BUILD-g++}
  1134. GCJ_FOR_BUILD=${GCJ_FOR_BUILD-gcj}
  1135. GFORTRAN_FOR_BUILD=${GFORTRAN_FOR_BUILD-gfortran}
  1136. DLLTOOL_FOR_BUILD=${DLLTOOL_FOR_BUILD-dlltool}
  1137. LD_FOR_BUILD=${LD_FOR_BUILD-ld}
  1138. NM_FOR_BUILD=${NM_FOR_BUILD-nm}
  1139. RANLIB_FOR_BUILD=${RANLIB_FOR_BUILD-ranlib}
  1140. WINDRES_FOR_BUILD=${WINDRES_FOR_BUILD-windres}
  1141. WINDMC_FOR_BUILD=${WINDMC_FOR_BUILD-windmc}
  1142. else
  1143. AR_FOR_BUILD="\$(AR)"
  1144. AS_FOR_BUILD="\$(AS)"
  1145. CC_FOR_BUILD="\$(CC)"
  1146. CXX_FOR_BUILD="\$(CXX)"
  1147. GCJ_FOR_BUILD="\$(GCJ)"
  1148. GFORTRAN_FOR_BUILD="\$(GFORTRAN)"
  1149. DLLTOOL_FOR_BUILD="\$(DLLTOOL)"
  1150. LD_FOR_BUILD="\$(LD)"
  1151. NM_FOR_BUILD="\$(NM)"
  1152. RANLIB_FOR_BUILD="\$(RANLIB)"
  1153. WINDRES_FOR_BUILD="\$(WINDRES)"
  1154. WINDMC_FOR_BUILD="\$(WINDMC)"
  1155. fi
  1156. AC_PROG_CC
  1157. AC_PROG_CXX
  1158. # We must set the default linker to the linker used by gcc for the correct
  1159. # operation of libtool. If LD is not defined and we are using gcc, try to
  1160. # set the LD default to the ld used by gcc.
  1161. if test -z "$LD"; then
  1162. if test "$GCC" = yes; then
  1163. case $build in
  1164. *-*-mingw*)
  1165. gcc_prog_ld=`$CC -print-prog-name=ld 2>&1 | tr -d '\015'` ;;
  1166. *)
  1167. gcc_prog_ld=`$CC -print-prog-name=ld 2>&1` ;;
  1168. esac
  1169. case $gcc_prog_ld in
  1170. # Accept absolute paths.
  1171. [[\\/]* | [A-Za-z]:[\\/]*)]
  1172. LD="$gcc_prog_ld" ;;
  1173. esac
  1174. fi
  1175. fi
  1176. ACX_PROG_GNAT
  1177. ACX_PROG_CMP_IGNORE_INITIAL
  1178. # See if we are building gcc with C++.
  1179. AC_ARG_ENABLE(build-with-cxx,
  1180. [ --enable-build-with-cxx build with C++ compiler instead of C compiler],
  1181. ENABLE_BUILD_WITH_CXX=$enableval,
  1182. ENABLE_BUILD_WITH_CXX=no)
  1183. # Used for setting $lt_cv_objdir
  1184. _LT_CHECK_OBJDIR
  1185. # Check for GMP, MPFR and MPC
  1186. gmplibs="-lmpc -lmpfr -lgmp"
  1187. gmpinc=
  1188. have_gmp=no
  1189. # Specify a location for mpc
  1190. # check for this first so it ends up on the link line before mpfr.
  1191. AC_ARG_WITH(mpc, [ --with-mpc=PATH specify prefix directory for installed MPC package.
  1192. Equivalent to --with-mpc-include=PATH/include
  1193. plus --with-mpc-lib=PATH/lib])
  1194. AC_ARG_WITH(mpc_include, [ --with-mpc-include=PATH
  1195. specify directory for installed MPC include files])
  1196. AC_ARG_WITH(mpc_lib, [ --with-mpc-lib=PATH specify directory for the installed MPC library])
  1197. if test "x$with_mpc" != x; then
  1198. gmplibs="-L$with_mpc/lib $gmplibs"
  1199. gmpinc="-I$with_mpc/include $gmpinc"
  1200. fi
  1201. if test "x$with_mpc_include" != x; then
  1202. gmpinc="-I$with_mpc_include $gmpinc"
  1203. fi
  1204. if test "x$with_mpc_lib" != x; then
  1205. gmplibs="-L$with_mpc_lib $gmplibs"
  1206. fi
  1207. if test "x$with_mpc$with_mpc_include$with_mpc_lib" = x && test -d ${srcdir}/mpc; then
  1208. gmplibs='-L$$r/$(HOST_SUBDIR)/mpc/src/'"$lt_cv_objdir $gmplibs"
  1209. gmpinc='-I$$s/mpc/src '"$gmpinc"
  1210. # Do not test the mpc version. Assume that it is sufficient, since
  1211. # it is in the source tree, and the library has not been built yet
  1212. # but it would be included on the link line in the version check below
  1213. # hence making the test fail.
  1214. have_gmp=yes
  1215. fi
  1216. # Specify a location for mpfr
  1217. # check for this first so it ends up on the link line before gmp.
  1218. AC_ARG_WITH(mpfr-dir, [ --with-mpfr-dir=PATH this option has been REMOVED],
  1219. AC_MSG_ERROR([The --with-mpfr-dir=PATH option has been removed.
  1220. Use --with-mpfr=PATH or --with-mpfr-include=PATH plus --with-mpfr-lib=PATH]))
  1221. AC_ARG_WITH(mpfr, [ --with-mpfr=PATH specify prefix directory for installed MPFR package.
  1222. Equivalent to --with-mpfr-include=PATH/include
  1223. plus --with-mpfr-lib=PATH/lib])
  1224. AC_ARG_WITH(mpfr_include, [ --with-mpfr-include=PATH
  1225. specify directory for installed MPFR include files])
  1226. AC_ARG_WITH(mpfr_lib, [ --with-mpfr-lib=PATH specify directory for the installed MPFR library])
  1227. if test "x$with_mpfr" != x; then
  1228. gmplibs="-L$with_mpfr/lib $gmplibs"
  1229. gmpinc="-I$with_mpfr/include $gmpinc"
  1230. fi
  1231. if test "x$with_mpfr_include" != x; then
  1232. gmpinc="-I$with_mpfr_include $gmpinc"
  1233. fi
  1234. if test "x$with_mpfr_lib" != x; then
  1235. gmplibs="-L$with_mpfr_lib $gmplibs"
  1236. fi
  1237. if test "x$with_mpfr$with_mpfr_include$with_mpfr_lib" = x && test -d ${srcdir}/mpfr; then
  1238. gmplibs='-L$$r/$(HOST_SUBDIR)/mpfr/'"$lt_cv_objdir $gmplibs"
  1239. gmpinc='-I$$r/$(HOST_SUBDIR)/mpfr -I$$s/mpfr '"$gmpinc"
  1240. extra_mpc_mpfr_configure_flags='--with-mpfr-include=$$s/mpfr --with-mpfr-lib=$$r/$(HOST_SUBDIR)/mpfr/'"$lt_cv_objdir"
  1241. # Do not test the mpfr version. Assume that it is sufficient, since
  1242. # it is in the source tree, and the library has not been built yet
  1243. # but it would be included on the link line in the version check below
  1244. # hence making the test fail.
  1245. have_gmp=yes
  1246. fi
  1247. # Specify a location for gmp
  1248. AC_ARG_WITH(gmp-dir, [ --with-gmp-dir=PATH this option has been REMOVED],
  1249. AC_MSG_ERROR([The --with-gmp-dir=PATH option has been removed.
  1250. Use --with-gmp=PATH or --with-gmp-include=PATH plus --with-gmp-lib=PATH]))
  1251. AC_ARG_WITH(gmp, [ --with-gmp=PATH specify prefix directory for the installed GMP package.
  1252. Equivalent to --with-gmp-include=PATH/include
  1253. plus --with-gmp-lib=PATH/lib])
  1254. AC_ARG_WITH(gmp_include, [ --with-gmp-include=PATH specify directory for installed GMP include files])
  1255. AC_ARG_WITH(gmp_lib, [ --with-gmp-lib=PATH specify directory for the installed GMP library])
  1256. if test "x$with_gmp" != x; then
  1257. gmplibs="-L$with_gmp/lib $gmplibs"
  1258. gmpinc="-I$with_gmp/include $gmpinc"
  1259. fi
  1260. if test "x$with_gmp_include" != x; then
  1261. gmpinc="-I$with_gmp_include $gmpinc"
  1262. fi
  1263. if test "x$with_gmp_lib" != x; then
  1264. gmplibs="-L$with_gmp_lib $gmplibs"
  1265. fi
  1266. if test "x$with_gmp$with_gmp_include$with_gmp_lib" = x && test -d ${srcdir}/gmp; then
  1267. gmplibs='-L$$r/$(HOST_SUBDIR)/gmp/'"$lt_cv_objdir $gmplibs"
  1268. gmpinc='-I$$r/$(HOST_SUBDIR)/gmp -I$$s/gmp '"$gmpinc"
  1269. extra_mpfr_configure_flags='--with-gmp-build=$$r/$(HOST_SUBDIR)/gmp'
  1270. extra_mpc_gmp_configure_flags='--with-gmp-include=$$r/$(HOST_SUBDIR)/gmp --with-gmp-lib=$$r/$(HOST_SUBDIR)/gmp/'"$lt_cv_objdir"
  1271. # Do not test the gmp version. Assume that it is sufficient, since
  1272. # it is in the source tree, and the library has not been built yet
  1273. # but it would be included on the link line in the version check below
  1274. # hence making the test fail.
  1275. have_gmp=yes
  1276. fi
  1277. if test -d ${srcdir}/gcc && test "x$have_gmp" = xno; then
  1278. have_gmp=yes
  1279. saved_CFLAGS="$CFLAGS"
  1280. CFLAGS="$CFLAGS $gmpinc"
  1281. # Check for the recommended and required versions of GMP.
  1282. AC_MSG_CHECKING([for the correct version of gmp.h])
  1283. AC_TRY_COMPILE([#include "gmp.h"],[
  1284. #define GCC_GMP_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
  1285. #define GCC_GMP_VERSION GCC_GMP_VERSION_NUM(__GNU_MP_VERSION,__GNU_MP_VERSION_MINOR,__GNU_MP_VERSION_PATCHLEVEL)
  1286. #if GCC_GMP_VERSION < GCC_GMP_VERSION_NUM(4,2,0)
  1287. choke me
  1288. #endif
  1289. ], [AC_TRY_COMPILE([#include <gmp.h>],[
  1290. #define GCC_GMP_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
  1291. #define GCC_GMP_VERSION GCC_GMP_VERSION_NUM(__GNU_MP_VERSION,__GNU_MP_VERSION_MINOR,__GNU_MP_VERSION_PATCHLEVEL)
  1292. #if GCC_GMP_VERSION < GCC_GMP_VERSION_NUM(4,3,2)
  1293. choke me
  1294. #endif
  1295. ], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([buggy but acceptable])])],
  1296. [AC_MSG_RESULT([no]); have_gmp=no])
  1297. # If we have GMP, check the MPFR version.
  1298. if test x"$have_gmp" = xyes; then
  1299. # Check for the recommended and required versions of MPFR.
  1300. AC_MSG_CHECKING([for the correct version of mpfr.h])
  1301. AC_TRY_COMPILE([#include <gmp.h>
  1302. #include <mpfr.h>],[
  1303. #if MPFR_VERSION < MPFR_VERSION_NUM(2,3,1)
  1304. choke me
  1305. #endif
  1306. ], [AC_TRY_COMPILE([#include <gmp.h>
  1307. #include <mpfr.h>],[
  1308. #if MPFR_VERSION < MPFR_VERSION_NUM(2,4,2)
  1309. choke me
  1310. #endif
  1311. ], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([buggy but acceptable])])],
  1312. [AC_MSG_RESULT([no]); have_gmp=no])
  1313. fi
  1314. # Check for the MPC header version.
  1315. if test x"$have_gmp" = xyes ; then
  1316. # Check for the recommended and required versions of MPC.
  1317. AC_MSG_CHECKING([for the correct version of mpc.h])
  1318. AC_TRY_COMPILE([#include <mpc.h>],[
  1319. #if MPC_VERSION < MPC_VERSION_NUM(0,8,0)
  1320. choke me
  1321. #endif
  1322. ], [AC_TRY_COMPILE([#include <mpc.h>],[
  1323. #if MPC_VERSION < MPC_VERSION_NUM(0,8,1)
  1324. choke me
  1325. #endif
  1326. ], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([buggy but acceptable])])],
  1327. [AC_MSG_RESULT([no]); have_gmp=no])
  1328. fi
  1329. # Now check the MPFR library.
  1330. if test x"$have_gmp" = xyes; then
  1331. saved_LIBS="$LIBS"
  1332. LIBS="$LIBS $gmplibs"
  1333. AC_MSG_CHECKING([for the correct version of the gmp/mpfr/mpc libraries])
  1334. AC_TRY_LINK([#include <mpc.h>],[
  1335. mpfr_t n;
  1336. mpfr_t x;
  1337. mpc_t c;
  1338. int t;
  1339. mpfr_init (n);
  1340. mpfr_init (x);
  1341. mpfr_atan2 (n, n, x, GMP_RNDN);
  1342. mpfr_erfc (n, x, GMP_RNDN);
  1343. mpfr_subnormalize (x, t, GMP_RNDN);
  1344. mpfr_clear(n);
  1345. mpfr_clear(x);
  1346. mpc_init2 (c, 53);
  1347. mpc_set_ui_ui (c, 1, 1, MPC_RNDNN);
  1348. mpc_cosh (c, c, MPC_RNDNN);
  1349. mpc_pow (c, c, c, MPC_RNDNN);
  1350. mpc_acosh (c, c, MPC_RNDNN);
  1351. mpc_clear (c);
  1352. ], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); have_gmp=no])
  1353. LIBS="$saved_LIBS"
  1354. fi
  1355. CFLAGS="$saved_CFLAGS"
  1356. # The library versions listed in the error message below should match
  1357. # the HARD-minimums enforced above.
  1358. if test x$have_gmp != xyes; then
  1359. AC_MSG_ERROR([Building GCC requires GMP 4.2+, MPFR 2.3.1+ and MPC 0.8.0+.
  1360. Try the --with-gmp, --with-mpfr and/or --with-mpc options to specify
  1361. their locations. Source code for these libraries can be found at
  1362. their respective hosting sites as well as at
  1363. ftp://gcc.gnu.org/pub/gcc/infrastructure/. See also
  1364. http://gcc.gnu.org/install/prerequisites.html for additional info. If
  1365. you obtained GMP, MPFR and/or MPC from a vendor distribution package,
  1366. make sure that you have installed both the libraries and the header
  1367. files. They may be located in separate packages.])
  1368. fi
  1369. fi
  1370. # Flags needed for both GMP, MPFR and/or MPC.
  1371. AC_SUBST(gmplibs)
  1372. AC_SUBST(gmpinc)
  1373. AC_SUBST(extra_mpfr_configure_flags)
  1374. AC_SUBST(extra_mpc_gmp_configure_flags)
  1375. AC_SUBST(extra_mpc_mpfr_configure_flags)
  1376. # Allow host libstdc++ to be specified for static linking with PPL.
  1377. AC_ARG_WITH(host-libstdcxx, [ --with-host-libstdcxx=L Use linker arguments L to link with libstdc++
  1378. when linking with PPL])
  1379. case $with_host_libstdcxx in
  1380. no|yes)
  1381. AC_MSG_ERROR([-with-host-libstdcxx needs an argument])
  1382. ;;
  1383. esac
  1384. # Linker flags to use for stage1 or when not boostrapping.
  1385. AC_ARG_WITH(stage1-ldflags,
  1386. [ --with-stage1-ldflags=FLAGS Linker flags for stage1],
  1387. [if test "$withval" = "no" -o "$withval" = "yes"; then
  1388. stage1_ldflags=
  1389. else
  1390. stage1_ldflags=$withval
  1391. fi],
  1392. [stage1_ldflags=])
  1393. AC_SUBST(stage1_ldflags)
  1394. # Libraries to use for stage1 or when not bootstrapping.
  1395. AC_ARG_WITH(stage1-libs,
  1396. [ -with-stage1-libs=LIBS Libraries for stage1],
  1397. [if test "$withval" = "no" -o "$withval" = "yes"; then
  1398. stage1_libs=
  1399. else
  1400. stage1_libs=$withval
  1401. fi],
  1402. [stage1_libs=$with_host_libstdcxx])
  1403. AC_SUBST(stage1_libs)
  1404. # Libraries to use for stage2 and later builds. This defaults to the
  1405. # argument passed to --with-host-libstdcxx.
  1406. AC_ARG_WITH(boot-libs,
  1407. [ --with-boot-libs=LIBS Libraries for stage2 and later],
  1408. [if test "$withval" = "no" -o "$withval" = "yes"; then
  1409. poststage1_libs=
  1410. else
  1411. poststage1_libs=$withval
  1412. fi],
  1413. [poststage1_libs=$with_host_libstdcxx])
  1414. AC_SUBST(poststage1_libs)
  1415. # Linker flags to use for stage2 and later builds.
  1416. AC_ARG_WITH(boot-ldflags,
  1417. [ --with-boot-ldflags=FLAGS Linker flags for stage2 and later],
  1418. [if test "$withval" = "no" -o "$withval" = "yes"; then
  1419. poststage1_ldflags=
  1420. else
  1421. poststage1_ldflags=$withval
  1422. fi],
  1423. [poststage1_ldflags=
  1424. # With --enable-build-with-cxx, default to linking libstdc++ and
  1425. # libgcc statically. But if the user explicitly specified the
  1426. # libraries to use, trust that they are doing what they want.
  1427. if test "$ENABLE_BUILD_WITH_CXX" = "yes" -a "$poststage1_libs" = ""; then
  1428. poststage1_ldflags="-static-libstdc++ -static-libgcc"
  1429. fi])
  1430. AC_SUBST(poststage1_ldflags)
  1431. # Check for PPL
  1432. ppllibs=" -lppl_c -lppl -lgmpxx"
  1433. pplinc=
  1434. AC_ARG_WITH(ppl, [ --with-ppl=PATH Specify prefix directory for the installed PPL package
  1435. Equivalent to --with-ppl-include=PATH/include
  1436. plus --with-ppl-lib=PATH/lib])
  1437. AC_ARG_WITH(ppl_include, [ --with-ppl-include=PATH Specify directory for installed PPL include files])
  1438. AC_ARG_WITH(ppl_lib, [ --with-ppl-lib=PATH Specify the directory for the installed PPL library])
  1439. case $with_ppl in
  1440. no)
  1441. ppllibs=
  1442. ;;
  1443. "" | yes)
  1444. ;;
  1445. *)
  1446. ppllibs="-L$with_ppl/lib -lppl_c -lppl -lgmpxx"
  1447. pplinc="-I$with_ppl/include $pplinc"
  1448. ;;
  1449. esac
  1450. if test "x$with_ppl_include" != x; then
  1451. pplinc="-I$with_ppl_include $pplinc"
  1452. fi
  1453. if test "x$with_ppl_lib" != x; then
  1454. ppllibs="-L$with_ppl_lib -lppl_c -lppl -lgmpxx"
  1455. fi
  1456. if test "x$with_ppl$with_ppl_include$with_ppl_lib" = x && test -d ${srcdir}/ppl; then
  1457. ppllibs='-L$$r/$(HOST_SUBDIR)/ppl/interfaces/C/'"$lt_cv_objdir"' -L$$r/$(HOST_SUBDIR)/ppl/src/'"$lt_cv_objdir"' -lppl_c -lppl -lgmpxx '
  1458. pplinc='-I$$r/$(HOST_SUBDIR)/ppl/src -I$$r/$(HOST_SUBDIR)/ppl/interfaces/C '
  1459. enable_ppl_version_check=no
  1460. fi
  1461. AC_ARG_ENABLE(ppl-version-check,
  1462. [ --disable-ppl-version-check disable check for PPL version],
  1463. ENABLE_PPL_CHECK=$enableval,
  1464. ENABLE_PPL_CHECK=yes)
  1465. if test "x$with_ppl" != "xno" -a "${ENABLE_PPL_CHECK}" = "yes"; then
  1466. saved_CFLAGS="$CFLAGS"
  1467. CFLAGS="$CFLAGS $pplinc $gmpinc"
  1468. AC_MSG_CHECKING([for version 0.10 (or later revision) of PPL])
  1469. AC_TRY_COMPILE([#include "ppl_c.h"],[
  1470. #if PPL_VERSION_MAJOR != 0 || PPL_VERSION_MINOR < 10
  1471. choke me
  1472. #endif
  1473. ], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); ppllibs= ; pplinc= ; with_ppl=no ])
  1474. CFLAGS="$saved_CFLAGS"
  1475. fi
  1476. # Flags needed for PPL
  1477. AC_SUBST(ppllibs)
  1478. AC_SUBST(pplinc)
  1479. # Check for CLOOG
  1480. clooglibs=" -lcloog "
  1481. clooginc=" -DCLOOG_PPL_BACKEND "
  1482. AC_ARG_WITH(cloog, [ --with-cloog=PATH Specify prefix directory for the installed CLooG-PPL package
  1483. Equivalent to --with-cloog-include=PATH/include
  1484. plus --with-cloog-lib=PATH/lib])
  1485. AC_ARG_WITH(cloog_include, [ --with-cloog-include=PATH Specify directory for installed CLooG include files])
  1486. AC_ARG_WITH(cloog_lib, [ --with-cloog-lib=PATH Specify the directory for the installed CLooG library])
  1487. if test "x$with_ppl" = "xno"; then
  1488. with_cloog=no
  1489. fi
  1490. case $with_cloog in
  1491. no)
  1492. clooglibs=
  1493. clooginc=
  1494. ;;
  1495. "" | yes)
  1496. ;;
  1497. *)
  1498. clooglibs="-L$with_cloog/lib -lcloog"
  1499. clooginc="-I$with_cloog/include -DCLOOG_PPL_BACKEND "
  1500. ;;
  1501. esac
  1502. if test "x$with_cloog_include" != x; then
  1503. clooginc="-I$with_cloog_include -DCLOOG_PPL_BACKEND "
  1504. fi
  1505. if test "x$with_cloog_lib" != x; then
  1506. clooglibs="-L$with_cloog_lib -lcloog"
  1507. fi
  1508. if test "x$with_cloog$with_cloog_include$with_cloog_lib" = x && test -d ${srcdir}/cloog; then
  1509. clooglibs='-L$$r/$(HOST_SUBDIR)/cloog/'"$lt_cv_objdir"' -lcloog '
  1510. clooginc='-I$$r/$(HOST_SUBDIR)/cloog/include -I$$s/cloog/include -DCLOOG_PPL_BACKEND '
  1511. enable_cloog_version_check=no
  1512. fi
  1513. AC_ARG_ENABLE(cloog-version-check,
  1514. [ --disable-cloog-version-check disable check for CLooG version],
  1515. ENABLE_CLOOG_CHECK=$enableval,
  1516. ENABLE_CLOOG_CHECK=yes)
  1517. if test "x$with_cloog" != "xno" -a "${ENABLE_CLOOG_CHECK}" = "yes"; then
  1518. saved_CFLAGS="$CFLAGS"
  1519. CFLAGS="$CFLAGS $clooginc $gmpinc $pplinc"
  1520. AC_MSG_CHECKING([for version 0.15.5 (or later revision) of CLooG])
  1521. AC_TRY_COMPILE([#include "cloog/cloog.h"],[
  1522. #if CLOOG_VERSION_MAJOR != 0 || CLOOG_VERSION_MINOR != 15 || CLOOG_VERSION_REVISION < 5
  1523. choke me
  1524. #endif
  1525. ], [AC_TRY_COMPILE([#include "cloog/cloog.h"],[
  1526. #if CLOOG_VERSION_MAJOR != 0 || CLOOG_VERSION_MINOR != 15 || CLOOG_VERSION_REVISION < 9
  1527. choke me
  1528. #endif
  1529. ], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([buggy but acceptable])])],
  1530. [AC_MSG_RESULT([no]); clooglibs= ; clooginc= ])
  1531. CFLAGS="$saved_CFLAGS"
  1532. fi
  1533. # Flags needed for CLOOG
  1534. AC_SUBST(clooglibs)
  1535. AC_SUBST(clooginc)
  1536. # Check for LTO support.
  1537. AC_ARG_ENABLE(lto,
  1538. [ --enable-lto enable link time optimization support],
  1539. enable_lto=$enableval,
  1540. enable_lto=yes; default_enable_lto=yes)
  1541. ACX_ELF_TARGET_IFELSE([if test x"$enable_lto" = x"yes" ; then
  1542. # Make sure that libelf.h and gelf.h are available.
  1543. AC_ARG_WITH(libelf, [ --with-libelf=PATH Specify prefix directory for the installed libelf package
  1544. Equivalent to --with-libelf-include=PATH/include
  1545. plus --with-libelf-lib=PATH/lib])
  1546. AC_ARG_WITH(libelf_include, [ --with-libelf-include=PATH Specify directory for installed libelf include files])
  1547. AC_ARG_WITH(libelf_lib, [ --with-libelf-lib=PATH Specify the directory for the installed libelf library])
  1548. saved_CFLAGS="$CFLAGS"
  1549. saved_CPPFLAGS="$CPPFLAGS"
  1550. saved_LIBS="$LIBS"
  1551. case $with_libelf in
  1552. "")
  1553. libelflibs="-lelf"
  1554. libelfinc="-I/usr/include/libelf"
  1555. ;;
  1556. *)
  1557. libelflibs="-L$with_libelf/lib -lelf"
  1558. libelfinc="-I$with_libelf/include -I$with_libelf/include/libelf"
  1559. LIBS="$libelflibs $LIBS"
  1560. ;;
  1561. esac
  1562. if test "x$with_libelf_include" != x; then
  1563. libelfinc="-I$with_libelf_include"
  1564. fi
  1565. if test "x$with_libelf_lib" != x; then
  1566. libelflibs="-L$with_libelf_lib -lelf"
  1567. LIBS="$libelflibs $LIBS"
  1568. fi
  1569. if test "x$with_libelf$with_libelf_include$with_libelf_lib" = x \
  1570. && test -d ${srcdir}/libelf; then
  1571. libelflibs='-L$$r/$(HOST_SUBDIR)/libelf/lib -lelf '
  1572. libelfinc='-D__LIBELF_INTERNAL__ -I$$r/$(HOST_SUBDIR)/libelf/lib -I$$s/libelf/lib'
  1573. LIBS="$libelflibs $LIBS"
  1574. else
  1575. CFLAGS="$CFLAGS $libelfinc"
  1576. CPPFLAGS="$CPPFLAGS $libelfinc"
  1577. LIBS="$LIBS $libelflibs"
  1578. AC_CHECK_HEADERS(libelf.h, [have_libelf_h=yes])
  1579. AC_CHECK_HEADERS(gelf.h, [have_gelf_h=yes])
  1580. AC_CHECK_HEADERS(libelf/libelf.h, [have_libelf_libelf_h=yes])
  1581. AC_CHECK_HEADERS(libelf/gelf.h, [have_libelf_gelf_h=yes])
  1582. # If we couldn't find libelf.h and the user forced it, emit an error.
  1583. if test x"$have_libelf_h" != x"yes" \
  1584. && test x"$have_libelf_libelf_h" != x"yes" ; then
  1585. if test x"$default_enable_lto" != x"yes" ; then
  1586. AC_MSG_ERROR([LTO support requires libelf.h or libelf/libelf.h.])
  1587. else
  1588. enable_lto=no
  1589. libelflibs=
  1590. libelfinc=
  1591. fi
  1592. fi
  1593. # If we couldn't find gelf.h and the user forced it, emit an error.
  1594. if test x"$have_gelf_h" != x"yes" \
  1595. && test x"$have_libelf_gelf_h" != x"yes" ; then
  1596. if test x"$default_enable_lto" != x"yes" ; then
  1597. AC_MSG_ERROR([LTO support requires gelf.h or libelf/gelf.h.])
  1598. else
  1599. enable_lto=no
  1600. libelflibs=
  1601. libelfinc=
  1602. fi
  1603. fi
  1604. # Check that the detected libelf has the functions we need. We cannot
  1605. # rely on just detecting the headers since they do not include
  1606. # versioning information. Add functions, if needed.
  1607. if test x"$enable_lto" = x"yes" ; then
  1608. AC_MSG_CHECKING([for the correct version of libelf])
  1609. AC_TRY_LINK(
  1610. [#include <libelf.h>],[
  1611. elf_errmsg (0);
  1612. elf_getscn (0, 0);
  1613. elf_nextscn (0, 0);
  1614. elf_strptr (0, 0, 0);
  1615. elf_getident (0, 0);
  1616. elf_begin (0, 0, 0);
  1617. elf_ndxscn (0);
  1618. elf_end (0);
  1619. ],
  1620. [AC_MSG_RESULT([yes]);],
  1621. [AC_MSG_RESULT([no]); enable_lto=no; libelflibs= ; libelfinc= ]
  1622. )
  1623. # Check for elf_getshdrstrndx or elf_getshstrndx. The latter's flavor
  1624. # is determined in gcc/configure.ac.
  1625. if test x"$enable_lto" = x"yes" ; then
  1626. AC_MSG_CHECKING([for elf_getshdrstrndx])
  1627. AC_TRY_LINK(
  1628. [#include <libelf.h>],[
  1629. elf_getshdrstrndx (0, 0);
  1630. ],
  1631. [AC_MSG_RESULT([yes]);],
  1632. [AC_MSG_RESULT([no]);
  1633. AC_MSG_CHECKING([for elf_getshstrndx])
  1634. AC_TRY_LINK(
  1635. [#include <libelf.h>],[
  1636. elf_getshstrndx (0, 0);
  1637. ],
  1638. [AC_MSG_RESULT([yes]);],
  1639. [AC_MSG_RESULT([no]); enable_lto=no; libelflibs= ; libelfinc= ]
  1640. )]
  1641. )
  1642. fi
  1643. # If we couldn't enable LTO and the user forced it, emit an error.
  1644. if test x"$enable_lto" = x"no" \
  1645. && test x"$default_enable_lto" != x"yes" ; then
  1646. AC_MSG_ERROR([To enable LTO, GCC requires libelf v0.8.12+.
  1647. Try the --with-libelf, --with-libelf-include and --with-libelf-lib options
  1648. to specify its location.])
  1649. fi
  1650. fi
  1651. CFLAGS="$saved_CFLAGS"
  1652. CPPFLAGS="$saved_CPPFLAGS"
  1653. LIBS="$saved_LIBS"
  1654. fi
  1655. # Flags needed for libelf.
  1656. AC_SUBST(libelflibs)
  1657. AC_SUBST(libelfinc)
  1658. fi],[if test x"$default_enable_lto" = x"yes" ; then
  1659. # On non-ELF platforms, LTO must be explicitly enabled.
  1660. enable_lto=no
  1661. else
  1662. # Apart from ELF platforms, only Windows supports LTO so far. It
  1663. # would also be nice to check the binutils support, but we don't
  1664. # have gcc_GAS_CHECK_FEATURE available here. For now, we'll just
  1665. # warn during gcc/ subconfigure; unless you're bootstrapping with
  1666. # -flto it won't be needed until after installation anyway.
  1667. case $target in
  1668. *-cygwin*|*-mingw*) ;;
  1669. x86_64-apple-darwin*) ;;
  1670. *) if test x"$enable_lto" = x"yes"; then
  1671. AC_MSG_ERROR([LTO support is not enabled for this target.])
  1672. fi
  1673. ;;
  1674. esac
  1675. fi
  1676. default_enable_lto=no])
  1677. # By default, C is the only stage 1 language.
  1678. stage1_languages=,c,
  1679. # Target libraries that we bootstrap.
  1680. bootstrap_target_libs=,target-libgcc,
  1681. # Figure out what language subdirectories are present.
  1682. # Look if the user specified --enable-languages="..."; if not, use
  1683. # the environment variable $LANGUAGES if defined. $LANGUAGES might
  1684. # go away some day.
  1685. # NB: embedded tabs in this IF block -- do not untabify
  1686. if test -d ${srcdir}/gcc; then
  1687. if test x"${enable_languages+set}" != xset; then
  1688. if test x"${LANGUAGES+set}" = xset; then
  1689. enable_languages="${LANGUAGES}"
  1690. echo configure.in: warning: setting LANGUAGES is deprecated, use --enable-languages instead 1>&2
  1691. else
  1692. enable_languages=all
  1693. fi
  1694. else
  1695. if test x"${enable_languages}" = x ||
  1696. test x"${enable_languages}" = xyes;
  1697. then
  1698. echo configure.in: --enable-languages needs at least one language argument 1>&2
  1699. exit 1
  1700. fi
  1701. fi
  1702. enable_languages=`echo "${enable_languages}" | sed -e 's/[[ ,]][[ ,]]*/,/g' -e 's/,$//'`
  1703. # 'f95' is the old name for the 'fortran' language. We issue a warning
  1704. # and make the substitution.
  1705. case ,${enable_languages}, in
  1706. *,f95,*)
  1707. echo configure.in: warning: 'f95' as language name is deprecated, use 'fortran' instead 1>&2
  1708. enable_languages=`echo "${enable_languages}" | sed -e 's/f95/fortran/g'`
  1709. ;;
  1710. esac
  1711. # First scan to see if an enabled language requires some other language.
  1712. # We assume that a given config-lang.in will list all the language
  1713. # front ends it requires, even if some are required indirectly.
  1714. for lang_frag in ${srcdir}/gcc/*/config-lang.in .. ; do
  1715. case ${lang_frag} in
  1716. ..) ;;
  1717. # The odd quoting in the next line works around
  1718. # an apparent bug in bash 1.12 on linux.
  1719. ${srcdir}/gcc/[[*]]/config-lang.in) ;;
  1720. *)
  1721. # From the config-lang.in, get $language, $lang_requires
  1722. language=
  1723. lang_requires=
  1724. . ${lang_frag}
  1725. for other in ${lang_requires} ; do
  1726. case ,${enable_languages}, in
  1727. *,$other,*) ;;
  1728. *,all,*) ;;
  1729. *,$language,*)
  1730. echo " \`$other' language required by \`$language'; enabling" 1>&2
  1731. enable_languages="${enable_languages},${other}"
  1732. ;;
  1733. esac
  1734. done
  1735. ;;
  1736. esac
  1737. done
  1738. new_enable_languages=,c,
  1739. # If LTO is enabled, add the LTO front end.
  1740. extra_host_libiberty_configure_flags=
  1741. if test "$enable_lto" = "yes" ; then
  1742. case ,${enable_languages}, in
  1743. *,lto,*) ;;
  1744. *) enable_languages="${enable_languages},lto" ;;
  1745. esac
  1746. if test "${ENABLE_GOLD}" = "yes" ; then
  1747. configdirs="$configdirs lto-plugin"
  1748. extra_host_libiberty_configure_flags=--enable-shared
  1749. fi
  1750. fi
  1751. AC_SUBST(extra_host_libiberty_configure_flags)
  1752. missing_languages=`echo ",$enable_languages," | sed -e s/,all,/,/ -e s/,c,/,/ `
  1753. potential_languages=,c,
  1754. for lang_frag in ${srcdir}/gcc/*/config-lang.in .. ; do
  1755. case ${lang_frag} in
  1756. ..) ;;
  1757. # The odd quoting in the next line works around
  1758. # an apparent bug in bash 1.12 on linux.
  1759. ${srcdir}/gcc/[[*]]/config-lang.in) ;;
  1760. *)
  1761. # From the config-lang.in, get $language, $target_libs,
  1762. # $lang_dirs, $boot_language, and $build_by_default
  1763. language=
  1764. target_libs=
  1765. lang_dirs=
  1766. subdir_requires=
  1767. boot_language=no
  1768. build_by_default=yes
  1769. . ${lang_frag}
  1770. if test x${language} = x; then
  1771. echo "${lang_frag} doesn't set \$language." 1>&2
  1772. exit 1
  1773. fi
  1774. if test "$language" = "c++" \
  1775. && test "$ENABLE_BUILD_WITH_CXX" = "yes"; then
  1776. boot_language=yes
  1777. fi
  1778. case ,${enable_languages}, in
  1779. *,${language},*)
  1780. # Language was explicitly selected; include it.
  1781. add_this_lang=yes
  1782. ;;
  1783. *,all,*)
  1784. # 'all' was selected, select it if it is a default language
  1785. add_this_lang=${build_by_default}
  1786. ;;
  1787. *)
  1788. add_this_lang=no
  1789. ;;
  1790. esac
  1791. # Disable languages that need other directories if these aren't available.
  1792. for i in $subdir_requires; do
  1793. test -f "$srcdir/gcc/$i/config-lang.in" && continue
  1794. case ,${enable_languages}, in
  1795. *,${language},*)
  1796. # Specifically requested language; tell them.
  1797. AC_MSG_ERROR([The gcc/$i directory contains parts of $language but is missing])
  1798. ;;
  1799. *)
  1800. # Silently disable.
  1801. add_this_lang=unsupported
  1802. ;;
  1803. esac
  1804. done
  1805. # Disable Ada if no preexisting GNAT is available.
  1806. case ,${enable_languages},:${language}:${have_gnat} in
  1807. *,${language},*:ada:no)
  1808. # Specifically requested language; tell them.
  1809. AC_MSG_ERROR([GNAT is required to build $language])
  1810. ;;
  1811. *:ada:no)
  1812. # Silently disable.
  1813. add_this_lang=unsupported
  1814. ;;
  1815. esac
  1816. # Disable a language that is unsupported by the target.
  1817. case " $unsupported_languages " in
  1818. *" $language "*)
  1819. add_this_lang=unsupported
  1820. ;;
  1821. esac
  1822. case $add_this_lang in
  1823. unsupported)
  1824. # Remove language-dependent dirs.
  1825. eval noconfigdirs='"$noconfigdirs "'\"$target_libs $lang_dirs\"
  1826. ;;
  1827. no)
  1828. # Remove language-dependent dirs; still show language as supported.
  1829. eval noconfigdirs='"$noconfigdirs "'\"$target_libs $lang_dirs\"
  1830. potential_languages="${potential_languages}${language},"
  1831. ;;
  1832. yes)
  1833. new_enable_languages="${new_enable_languages}${language},"
  1834. potential_languages="${potential_languages}${language},"
  1835. missing_languages=`echo "$missing_languages" | sed "s/,$language,/,/"`
  1836. case "${boot_language}:,$enable_stage1_languages," in
  1837. yes:* | *:*,$language,* | *:*,yes, | *:*,all,)
  1838. # Add to (comma-separated) list of stage 1 languages.
  1839. case ",$stage1_languages," in
  1840. *,$language,* | ,yes, | ,all,) ;;
  1841. *) stage1_languages="${stage1_languages}${language}," ;;
  1842. esac
  1843. # We need to bootstrap any supporting libraries.
  1844. bootstrap_target_libs="${bootstrap_target_libs}${target_libs},"
  1845. ;;
  1846. esac
  1847. ;;
  1848. esac
  1849. ;;
  1850. esac
  1851. done
  1852. AC_ARG_ENABLE(stage1-languages,
  1853. [ --enable-stage1-languages@<:@=all@:>@ choose additional languages to build during
  1854. stage1. Mostly useful for compiler development.],
  1855. [case ,${enable_stage1_languages}, in
  1856. ,no,|,,)
  1857. # Set it to something that will have no effect in the loop below
  1858. enable_stage1_languages=c ;;
  1859. ,yes,)
  1860. enable_stage1_languages=`echo $new_enable_languages | \
  1861. sed -e "s/^,//" -e "s/,$//" ` ;;
  1862. *,all,*)
  1863. enable_stage1_languages=`echo ,$enable_stage1_languages, | \
  1864. sed -e "s/,all,/$new_enable_languages/" -e "s/^,//" -e "s/,$//" ` ;;
  1865. esac
  1866. # Add "good" languages from enable_stage1_languages to stage1_languages,
  1867. # while "bad" languages go in missing_languages. Leave no duplicates.
  1868. for i in `echo $enable_stage1_languages | sed 's/,/ /g' `; do
  1869. case $potential_languages in
  1870. *,$i,*)
  1871. case $stage1_languages in
  1872. *,$i,*) ;;
  1873. *) stage1_languages="$stage1_languages$i," ;;
  1874. esac ;;
  1875. *)
  1876. case $missing_languages in
  1877. *,$i,*) ;;
  1878. *) missing_languages="$missing_languages$i," ;;
  1879. esac ;;
  1880. esac
  1881. done])
  1882. # Remove leading/trailing commas that were added for simplicity
  1883. potential_languages=`echo "$potential_languages" | sed -e "s/^,//" -e "s/,$//"`
  1884. missing_languages=`echo "$missing_languages" | sed -e "s/^,//" -e "s/,$//"`
  1885. stage1_languages=`echo "$stage1_languages" | sed -e "s/^,//" -e "s/,$//"`
  1886. new_enable_languages=`echo "$new_enable_languages" | sed -e "s/^,//" -e "s/,$//"`
  1887. if test "x$missing_languages" != x; then
  1888. AC_MSG_ERROR([
  1889. The following requested languages could not be built: ${missing_languages}
  1890. Supported languages are: ${potential_languages}])
  1891. fi
  1892. if test "x$new_enable_languages" != "x$enable_languages"; then
  1893. echo The following languages will be built: ${new_enable_languages}
  1894. enable_languages="$new_enable_languages"
  1895. fi
  1896. AC_SUBST(stage1_languages)
  1897. ac_configure_args=`echo " $ac_configure_args" | sed -e "s/ '--enable-languages=[[^ ]]*'//g" -e "s/$/ '--enable-languages="$enable_languages"'/" `
  1898. fi
  1899. # Handle --disable-<component> generically.
  1900. for dir in $configdirs $build_configdirs $target_configdirs ; do
  1901. dirname=`echo $dir | sed -e s/target-//g -e s/build-//g -e s/-/_/g`
  1902. varname=`echo $dirname | sed -e s/+/_/g`
  1903. if eval test x\${enable_${varname}} "=" xno ; then
  1904. noconfigdirs="$noconfigdirs $dir"
  1905. fi
  1906. done
  1907. # Check for Boehm's garbage collector
  1908. AC_ARG_ENABLE(objc-gc,
  1909. [ --enable-objc-gc enable use of Boehm's garbage collector with the
  1910. GNU Objective-C runtime],
  1911. [case ,${enable_languages},:${enable_objc_gc}:${noconfigdirs} in
  1912. *,objc,*:*:yes:*target-boehm-gc*)
  1913. AC_MSG_ERROR([Boehm's garbage collector was requested yet not supported in this configuration])
  1914. ;;
  1915. esac])
  1916. # Make sure we only build Boehm's garbage collector if required.
  1917. case ,${enable_languages},:${enable_objc_gc} in
  1918. *,objc,*:yes)
  1919. # Keep target-boehm-gc if requested for Objective-C.
  1920. ;;
  1921. *)
  1922. # Otherwise remove target-boehm-gc depending on target-libjava.
  1923. if echo " ${noconfigdirs} " | grep "target-libjava" >/dev/null 2>&1; then
  1924. noconfigdirs="$noconfigdirs target-boehm-gc"
  1925. fi
  1926. ;;
  1927. esac
  1928. # Remove the entries in $skipdirs and $noconfigdirs from $configdirs,
  1929. # $build_configdirs and $target_configdirs.
  1930. # If we have the source for $noconfigdirs entries, add them to $notsupp.
  1931. notsupp=""
  1932. for dir in . $skipdirs $noconfigdirs ; do
  1933. dirname=`echo $dir | sed -e s/target-//g -e s/build-//g`
  1934. if test $dir != . && echo " ${configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
  1935. configdirs=`echo " ${configdirs} " | sed -e "s/ ${dir} / /"`
  1936. if test -r $srcdir/$dirname/configure ; then
  1937. if echo " ${skipdirs} " | grep " ${dir} " >/dev/null 2>&1; then
  1938. true
  1939. else
  1940. notsupp="$notsupp $dir"
  1941. fi
  1942. fi
  1943. fi
  1944. if test $dir != . && echo " ${build_configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
  1945. build_configdirs=`echo " ${build_configdirs} " | sed -e "s/ ${dir} / /"`
  1946. if test -r $srcdir/$dirname/configure ; then
  1947. if echo " ${skipdirs} " | grep " ${dir} " >/dev/null 2>&1; then
  1948. true
  1949. else
  1950. notsupp="$notsupp $dir"
  1951. fi
  1952. fi
  1953. fi
  1954. if test $dir != . && echo " ${target_configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
  1955. target_configdirs=`echo " ${target_configdirs} " | sed -e "s/ ${dir} / /"`
  1956. if test -r $srcdir/$dirname/configure ; then
  1957. if echo " ${skipdirs} " | grep " ${dir} " >/dev/null 2>&1; then
  1958. true
  1959. else
  1960. notsupp="$notsupp $dir"
  1961. fi
  1962. fi
  1963. fi
  1964. done
  1965. # Sometimes the tools are distributed with libiberty but with no other
  1966. # libraries. In that case, we don't want to build target-libiberty.
  1967. # Don't let libgcc imply libiberty either.
  1968. if test -n "${target_configdirs}" ; then
  1969. libgcc=
  1970. others=
  1971. for i in `echo ${target_configdirs} | sed -e s/target-//g` ; do
  1972. if test "$i" = "libgcc"; then
  1973. libgcc=target-libgcc
  1974. elif test "$i" != "libiberty" ; then
  1975. if test -r $srcdir/$i/configure ; then
  1976. others=yes;
  1977. break;
  1978. fi
  1979. fi
  1980. done
  1981. if test -z "${others}" ; then
  1982. target_configdirs=$libgcc
  1983. fi
  1984. fi
  1985. # Quietly strip out all directories which aren't configurable in this tree.
  1986. # This relies on all configurable subdirectories being autoconfiscated, which
  1987. # is now the case.
  1988. build_configdirs_all="$build_configdirs"
  1989. build_configdirs=
  1990. for i in ${build_configdirs_all} ; do
  1991. j=`echo $i | sed -e s/build-//g`
  1992. if test -f ${srcdir}/$j/configure ; then
  1993. build_configdirs="${build_configdirs} $i"
  1994. fi
  1995. done
  1996. configdirs_all="$configdirs"
  1997. configdirs=
  1998. for i in ${configdirs_all} ; do
  1999. if test -f ${srcdir}/$i/configure ; then
  2000. configdirs="${configdirs} $i"
  2001. fi
  2002. done
  2003. target_configdirs_all="$target_configdirs"
  2004. target_configdirs=
  2005. for i in ${target_configdirs_all} ; do
  2006. j=`echo $i | sed -e s/target-//g`
  2007. if test -f ${srcdir}/$j/configure ; then
  2008. target_configdirs="${target_configdirs} $i"
  2009. fi
  2010. done
  2011. # Produce a warning message for the subdirs we can't configure.
  2012. # This isn't especially interesting in the Cygnus tree, but in the individual
  2013. # FSF releases, it's important to let people know when their machine isn't
  2014. # supported by the one or two programs in a package.
  2015. if test -n "${notsupp}" && test -z "${norecursion}" ; then
  2016. # If $appdirs is non-empty, at least one of those directories must still
  2017. # be configured, or we error out. (E.g., if the gas release supports a
  2018. # specified target in some subdirs but not the gas subdir, we shouldn't
  2019. # pretend that all is well.)
  2020. if test -n "$appdirs" ; then
  2021. for dir in $appdirs ; do
  2022. if test -r $dir/Makefile.in ; then
  2023. if echo " ${configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
  2024. appdirs=""
  2025. break
  2026. fi
  2027. if echo " ${target_configdirs} " | grep " target-${dir} " >/dev/null 2>&1; then
  2028. appdirs=""
  2029. break
  2030. fi
  2031. fi
  2032. done
  2033. if test -n "$appdirs" ; then
  2034. echo "*** This configuration is not supported by this package." 1>&2
  2035. exit 1
  2036. fi
  2037. fi
  2038. # Okay, some application will build, or we don't care to check. Still
  2039. # notify of subdirs not getting built.
  2040. echo "*** This configuration is not supported in the following subdirectories:" 1>&2
  2041. echo " ${notsupp}" 1>&2
  2042. echo " (Any other directories should still work fine.)" 1>&2
  2043. fi
  2044. case "$host" in
  2045. *msdosdjgpp*)
  2046. enable_gdbtk=no ;;
  2047. esac
  2048. # To find our prefix, in gcc_cv_tool_prefix.
  2049. ACX_TOOL_DIRS
  2050. copy_dirs=
  2051. AC_ARG_WITH([build-sysroot],
  2052. [ --with-build-sysroot=SYSROOT
  2053. use sysroot as the system root during the build],
  2054. [if test x"$withval" != x ; then
  2055. SYSROOT_CFLAGS_FOR_TARGET="--sysroot=$withval"
  2056. fi],
  2057. [SYSROOT_CFLAGS_FOR_TARGET=])
  2058. AC_SUBST(SYSROOT_CFLAGS_FOR_TARGET)
  2059. AC_ARG_WITH([debug-prefix-map],
  2060. [ --with-debug-prefix-map='A=B C=D ...'
  2061. map A to B, C to D ... in debug information],
  2062. [if test x"$withval" != x; then
  2063. DEBUG_PREFIX_CFLAGS_FOR_TARGET=
  2064. for debug_map in $withval; do
  2065. DEBUG_PREFIX_CFLAGS_FOR_TARGET="$DEBUG_PREFIX_CFLAGS_FOR_TARGET -fdebug-prefix-map=$debug_map"
  2066. done
  2067. fi],
  2068. [DEBUG_PREFIX_CFLAGS_FOR_TARGET=])
  2069. AC_SUBST(DEBUG_PREFIX_CFLAGS_FOR_TARGET)
  2070. # During gcc bootstrap, if we use some random cc for stage1 then CFLAGS
  2071. # might be empty or "-g". We don't require a C++ compiler, so CXXFLAGS
  2072. # might also be empty (or "-g", if a non-GCC C++ compiler is in the path).
  2073. # We want to ensure that TARGET libraries (which we know are built with
  2074. # gcc) are built with "-O2 -g", so include those options when setting
  2075. # CFLAGS_FOR_TARGET and CXXFLAGS_FOR_TARGET.
  2076. if test "x$CFLAGS_FOR_TARGET" = x; then
  2077. CFLAGS_FOR_TARGET=$CFLAGS
  2078. case " $CFLAGS " in
  2079. *" -O2 "*) ;;
  2080. *) CFLAGS_FOR_TARGET="-O2 $CFLAGS" ;;
  2081. esac
  2082. case " $CFLAGS " in
  2083. *" -g "* | *" -g3 "*) ;;
  2084. *) CFLAGS_FOR_TARGET="-g $CFLAGS" ;;
  2085. esac
  2086. fi
  2087. AC_SUBST(CFLAGS_FOR_TARGET)
  2088. if test "x$CXXFLAGS_FOR_TARGET" = x; then
  2089. CXXFLAGS_FOR_TARGET=$CXXFLAGS
  2090. case " $CXXFLAGS " in
  2091. *" -O2 "*) ;;
  2092. *) CXXFLAGS_FOR_TARGET="-O2 $CXXFLAGS" ;;
  2093. esac
  2094. case " $CXXFLAGS " in
  2095. *" -g "* | *" -g3 "*) ;;
  2096. *) CXXFLAGS_FOR_TARGET="-g $CXXFLAGS" ;;
  2097. esac
  2098. fi
  2099. AC_SUBST(CXXFLAGS_FOR_TARGET)
  2100. # Handle --with-headers=XXX. If the value is not "yes", the contents of
  2101. # the named directory are copied to $(tooldir)/sys-include.
  2102. if test x"${with_headers}" != x && test x"${with_headers}" != xno ; then
  2103. if test x${is_cross_compiler} = xno ; then
  2104. echo 1>&2 '***' --with-headers is only supported when cross compiling
  2105. exit 1
  2106. fi
  2107. if test x"${with_headers}" != xyes ; then
  2108. x=${gcc_cv_tool_prefix}
  2109. copy_dirs="${copy_dirs} ${with_headers} $x/${target_noncanonical}/sys-include"
  2110. fi
  2111. fi
  2112. # Handle --with-libs=XXX. If the value is not "yes", the contents of
  2113. # the name directories are copied to $(tooldir)/lib. Multiple directories
  2114. # are permitted.
  2115. if test x"${with_libs}" != x && test x"${with_libs}" != xno ; then
  2116. if test x${is_cross_compiler} = xno ; then
  2117. echo 1>&2 '***' --with-libs is only supported when cross compiling
  2118. exit 1
  2119. fi
  2120. if test x"${with_libs}" != xyes ; then
  2121. # Copy the libraries in reverse order, so that files in the first named
  2122. # library override files in subsequent libraries.
  2123. x=${gcc_cv_tool_prefix}
  2124. for l in ${with_libs}; do
  2125. copy_dirs="$l $x/${target_noncanonical}/lib ${copy_dirs}"
  2126. done
  2127. fi
  2128. fi
  2129. # Set with_gnu_as, with_gnu_ld, and with_system_zlib as appropriate.
  2130. #
  2131. # This is done by determining whether or not the appropriate directory
  2132. # is available, and by checking whether or not specific configurations
  2133. # have requested that this magic not happen.
  2134. #
  2135. # The command line options always override the explicit settings in
  2136. # configure.in, and the settings in configure.in override this magic.
  2137. #
  2138. # If the default for a toolchain is to use GNU as and ld, and you don't
  2139. # want to do that, then you should use the --without-gnu-as and
  2140. # --without-gnu-ld options for the configure script. Similarly, if
  2141. # the default is to use the included zlib and you don't want to do that,
  2142. # you should use the --with-system-zlib option for the configure script.
  2143. if test x${use_gnu_as} = x &&
  2144. echo " ${configdirs} " | grep " gas " > /dev/null 2>&1 ; then
  2145. with_gnu_as=yes
  2146. extra_host_args="$extra_host_args --with-gnu-as"
  2147. fi
  2148. if test x${use_gnu_ld} = x &&
  2149. echo " ${configdirs} " | egrep " (go)?ld " > /dev/null 2>&1 ; then
  2150. with_gnu_ld=yes
  2151. extra_host_args="$extra_host_args --with-gnu-ld"
  2152. fi
  2153. if test x${use_included_zlib} = x &&
  2154. echo " ${configdirs} " | grep " zlib " > /dev/null 2>&1 ; then
  2155. :
  2156. else
  2157. with_system_zlib=yes
  2158. extra_host_args="$extra_host_args --with-system-zlib"
  2159. fi
  2160. # If using newlib, add --with-newlib to the extra_host_args so that gcc/configure
  2161. # can detect this case.
  2162. if test x${with_newlib} != xno && echo " ${target_configdirs} " | grep " target-newlib " > /dev/null 2>&1 ; then
  2163. with_newlib=yes
  2164. extra_host_args="$extra_host_args --with-newlib"
  2165. fi
  2166. # Handle ${copy_dirs}
  2167. set fnord ${copy_dirs}
  2168. shift
  2169. while test $# != 0 ; do
  2170. if test -f $2/COPIED && test x"`cat $2/COPIED`" = x"$1" ; then
  2171. :
  2172. else
  2173. echo Copying $1 to $2
  2174. # Use the install script to create the directory and all required
  2175. # parent directories.
  2176. if test -d $2 ; then
  2177. :
  2178. else
  2179. echo >config.temp
  2180. ${srcdir}/install-sh -c -m 644 config.temp $2/COPIED
  2181. fi
  2182. # Copy the directory, assuming we have tar.
  2183. # FIXME: Should we use B in the second tar? Not all systems support it.
  2184. (cd $1; tar -cf - .) | (cd $2; tar -xpf -)
  2185. # It is the responsibility of the user to correctly adjust all
  2186. # symlinks. If somebody can figure out how to handle them correctly
  2187. # here, feel free to add the code.
  2188. echo $1 > $2/COPIED
  2189. fi
  2190. shift; shift
  2191. done
  2192. # Determine a target-dependent exec_prefix that the installed
  2193. # gcc will search in. Keep this list sorted by triplet, with
  2194. # the *-*-osname triplets last.
  2195. md_exec_prefix=
  2196. case "${target}" in
  2197. alpha*-*-*vms*)
  2198. md_exec_prefix=/gnu/lib/gcc-lib
  2199. ;;
  2200. i[[34567]]86-pc-msdosdjgpp*)
  2201. md_exec_prefix=/dev/env/DJDIR/bin
  2202. ;;
  2203. i[[34567]]86-*-sco3.2v5*)
  2204. if test $with_gnu_as = yes; then
  2205. md_exec_prefix=/usr/gnu/bin
  2206. else
  2207. md_exec_prefix=/usr/ccs/bin/elf
  2208. fi
  2209. ;;
  2210. mn10300-*-* | \
  2211. powerpc-*-chorusos* | \
  2212. powerpc*-*-eabi* | \
  2213. powerpc*-*-sysv* | \
  2214. powerpc*-*-kaos* | \
  2215. s390x-ibm-tpf*)
  2216. md_exec_prefix=/usr/ccs/bin
  2217. ;;
  2218. sparc64-*-elf*)
  2219. ;;
  2220. v850*-*-*)
  2221. md_exec_prefix=/usr/ccs/bin
  2222. ;;
  2223. xtensa*-*-elf*)
  2224. ;;
  2225. *-*-beos* | \
  2226. *-*-elf* | \
  2227. *-*-hpux* | \
  2228. *-*-netware* | \
  2229. *-*-nto-qnx* | \
  2230. *-*-rtems* | \
  2231. *-*-solaris2* | \
  2232. *-*-sysv[[45]]* | \
  2233. *-*-vxworks* | \
  2234. *-wrs-windiss)
  2235. md_exec_prefix=/usr/ccs/bin
  2236. ;;
  2237. esac
  2238. extra_arflags_for_target=
  2239. extra_nmflags_for_target=
  2240. extra_ranlibflags_for_target=
  2241. target_makefile_frag=/dev/null
  2242. case "${target}" in
  2243. mep*-*-*)
  2244. target_makefile_frag="config/mt-mep"
  2245. ;;
  2246. spu-*-*)
  2247. target_makefile_frag="config/mt-spu"
  2248. ;;
  2249. mips*-sde-elf*)
  2250. target_makefile_frag="config/mt-sde"
  2251. ;;
  2252. mipsisa*-*-elfoabi*)
  2253. target_makefile_frag="config/mt-mips-elfoabi"
  2254. ;;
  2255. mips*-*-*linux* | mips*-*-gnu*)
  2256. target_makefile_frag="config/mt-mips-gnu"
  2257. ;;
  2258. *-*-netware*)
  2259. target_makefile_frag="config/mt-netware"
  2260. ;;
  2261. *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu | *-*-kopensolaris*-gnu)
  2262. target_makefile_frag="config/mt-gnu"
  2263. ;;
  2264. *-*-aix4.[[3456789]]* | *-*-aix[[56789]].*)
  2265. # nm and ar from AIX 4.3 and above require -X32_64 flag to all ar and nm
  2266. # commands to handle both 32-bit and 64-bit objects. These flags are
  2267. # harmless if we're using GNU nm or ar.
  2268. extra_arflags_for_target=" -X32_64"
  2269. extra_nmflags_for_target=" -B -X32_64"
  2270. ;;
  2271. *-*-darwin[[3-9]]*)
  2272. # ranlib before Darwin10 requires the -c flag to look at common symbols.
  2273. extra_ranlibflags_for_target=" -c"
  2274. ;;
  2275. mips*-*-pe | sh*-*-pe | *arm-wince-pe)
  2276. target_makefile_frag="config/mt-wince"
  2277. ;;
  2278. esac
  2279. alphaieee_frag=/dev/null
  2280. case $target in
  2281. alpha*-*-*)
  2282. # This just makes sure to use the -mieee option to build target libs.
  2283. # This should probably be set individually by each library.
  2284. alphaieee_frag="config/mt-alphaieee"
  2285. ;;
  2286. esac
  2287. # If --enable-target-optspace always use -Os instead of -O2 to build
  2288. # the target libraries, similarly if it is not specified, use -Os
  2289. # on selected platforms.
  2290. ospace_frag=/dev/null
  2291. case "${enable_target_optspace}:${target}" in
  2292. yes:*)
  2293. ospace_frag="config/mt-ospace"
  2294. ;;
  2295. :d30v-*)
  2296. ospace_frag="config/mt-d30v"
  2297. ;;
  2298. :m32r-* | :d10v-* | :fr30-*)
  2299. ospace_frag="config/mt-ospace"
  2300. ;;
  2301. no:* | :*)
  2302. ;;
  2303. *)
  2304. echo "*** bad value \"${enable_target_optspace}\" for --enable-target-optspace flag; ignored" 1>&2
  2305. ;;
  2306. esac
  2307. # Default to using --with-stabs for certain targets.
  2308. if test x${with_stabs} = x ; then
  2309. case "${target}" in
  2310. mips*-*-irix[[56]]*)
  2311. ;;
  2312. mips*-*-* | alpha*-*-osf*)
  2313. with_stabs=yes;
  2314. extra_host_args="${extra_host_args} --with-stabs"
  2315. ;;
  2316. esac
  2317. fi
  2318. # hpux11 in 64bit mode has libraries in a weird place. Arrange to find
  2319. # them automatically.
  2320. case "${host}" in
  2321. hppa*64*-*-hpux11*)
  2322. extra_host_args="$extra_host_args -x-libraries=/usr/lib/pa20_64 -x-includes=/usr/X11R6/include"
  2323. ;;
  2324. esac
  2325. # Some systems (e.g., one of the i386-aix systems the gas testers are
  2326. # using) don't handle "\$" correctly, so don't use it here.
  2327. tooldir='${exec_prefix}'/${target_noncanonical}
  2328. build_tooldir=${tooldir}
  2329. # Create a .gdbinit file which runs the one in srcdir
  2330. # and tells GDB to look there for source files.
  2331. if test -r ${srcdir}/.gdbinit ; then
  2332. case ${srcdir} in
  2333. .) ;;
  2334. *) cat > ./.gdbinit <<EOF
  2335. # ${NO_EDIT}
  2336. dir ${srcdir}
  2337. dir .
  2338. source ${srcdir}/.gdbinit
  2339. EOF
  2340. ;;
  2341. esac
  2342. fi
  2343. # Make sure that the compiler is able to generate an executable. If it
  2344. # can't, we are probably in trouble. We don't care whether we can run the
  2345. # executable--we might be using a cross compiler--we only care whether it
  2346. # can be created. At this point the main configure script has set CC.
  2347. we_are_ok=no
  2348. echo "int main () { return 0; }" > conftest.c
  2349. ${CC} -o conftest ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} conftest.c
  2350. if test $? = 0 ; then
  2351. if test -s conftest || test -s conftest.exe ; then
  2352. we_are_ok=yes
  2353. fi
  2354. fi
  2355. case $we_are_ok in
  2356. no)
  2357. echo 1>&2 "*** The command '${CC} -o conftest ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} conftest.c' failed."
  2358. echo 1>&2 "*** You must set the environment variable CC to a working compiler."
  2359. rm -f conftest*
  2360. exit 1
  2361. ;;
  2362. esac
  2363. rm -f conftest*
  2364. # The Solaris /usr/ucb/cc compiler does not appear to work.
  2365. case "${host}" in
  2366. sparc-sun-solaris2*)
  2367. CCBASE="`echo ${CC-cc} | sed 's/ .*$//'`"
  2368. if test "`type $CCBASE | sed 's/^[[^/]]*//'`" = "/usr/ucb/cc" ; then
  2369. could_use=
  2370. test -d /opt/SUNWspro/bin && could_use="/opt/SUNWspro/bin"
  2371. if test -d /opt/cygnus/bin ; then
  2372. if test "$could_use" = "" ; then
  2373. could_use="/opt/cygnus/bin"
  2374. else
  2375. could_use="$could_use or /opt/cygnus/bin"
  2376. fi
  2377. fi
  2378. if test "$could_use" = "" ; then
  2379. echo "Warning: compilation may fail because you're using"
  2380. echo "/usr/ucb/cc. You should change your PATH or CC "
  2381. echo "variable and rerun configure."
  2382. else
  2383. echo "Warning: compilation may fail because you're using"
  2384. echo "/usr/ucb/cc, when you should use the C compiler from"
  2385. echo "$could_use. You should change your"
  2386. echo "PATH or CC variable and rerun configure."
  2387. fi
  2388. fi
  2389. ;;
  2390. esac
  2391. # Decide which environment variable is used to find dynamic libraries.
  2392. case "${host}" in
  2393. *-*-hpux*) RPATH_ENVVAR=SHLIB_PATH ;;
  2394. *-*-darwin* | *-*-rhapsody* ) RPATH_ENVVAR=DYLD_LIBRARY_PATH ;;
  2395. *-*-mingw* | *-*-cygwin ) RPATH_ENVVAR=PATH ;;
  2396. *) RPATH_ENVVAR=LD_LIBRARY_PATH ;;
  2397. esac
  2398. # On systems where the dynamic library environment variable is PATH,
  2399. # gcc/ will put dynamic libraries into a subdirectory to avoid adding
  2400. # built executables to PATH.
  2401. if test "$RPATH_ENVVAR" = PATH; then
  2402. GCC_SHLIB_SUBDIR=/shlib
  2403. else
  2404. GCC_SHLIB_SUBDIR=
  2405. fi
  2406. # Record target_configdirs and the configure arguments for target and
  2407. # build configuration in Makefile.
  2408. target_configdirs=`echo "${target_configdirs}" | sed -e 's/target-//g'`
  2409. build_configdirs=`echo "${build_configdirs}" | sed -e 's/build-//g'`
  2410. # If we are building libgomp, bootstrap it.
  2411. if echo " ${target_configdirs} " | grep " libgomp " > /dev/null 2>&1 ; then
  2412. bootstrap_target_libs=${bootstrap_target_libs}target-libgomp,
  2413. fi
  2414. # Determine whether gdb needs tk/tcl or not.
  2415. # Use 'maybe' since enable_gdbtk might be true even if tk isn't available
  2416. # and in that case we want gdb to be built without tk. Ugh!
  2417. # In fact I believe gdb is the *only* package directly dependent on tk,
  2418. # so we should be able to put the 'maybe's in unconditionally and
  2419. # leave out the maybe dependencies when enable_gdbtk is false. I'm not
  2420. # 100% sure that that's safe though.
  2421. gdb_tk="maybe-all-tcl maybe-all-tk maybe-all-itcl maybe-all-libgui"
  2422. case "$enable_gdbtk" in
  2423. no)
  2424. GDB_TK="" ;;
  2425. yes)
  2426. GDB_TK="${gdb_tk}" ;;
  2427. *)
  2428. # Only add the dependency on gdbtk when GDBtk is part of the gdb
  2429. # distro. Eventually someone will fix this and move Insight, nee
  2430. # gdbtk to a separate directory.
  2431. if test -d ${srcdir}/gdb/gdbtk ; then
  2432. GDB_TK="${gdb_tk}"
  2433. else
  2434. GDB_TK=""
  2435. fi
  2436. ;;
  2437. esac
  2438. CONFIGURE_GDB_TK=`echo ${GDB_TK} | sed s/-all-/-configure-/g`
  2439. INSTALL_GDB_TK=`echo ${GDB_TK} | sed s/-all-/-install-/g`
  2440. # Strip out unwanted targets.
  2441. # While at that, we remove Makefiles if we were started for recursive
  2442. # configuration, so that the top-level Makefile reconfigures them,
  2443. # like we used to do when configure itself was recursive.
  2444. # Loop over modules. We used to use the "$extrasub" feature from Autoconf
  2445. # but now we're fixing up the Makefile ourselves with the additional
  2446. # commands passed to AC_CONFIG_FILES. Use separate variables
  2447. # extrasub-{build,host,target} not because there is any reason to split
  2448. # the substitutions up that way, but only to remain below the limit of
  2449. # 99 commands in a script, for HP-UX sed.
  2450. # Do not nest @if/@endif pairs, because configure will not warn you at all.
  2451. AC_ARG_ENABLE([bootstrap],
  2452. [ --enable-bootstrap enable bootstrapping @<:@yes if native build@:>@],,
  2453. enable_bootstrap=default)
  2454. # Issue errors and warnings for invalid/strange bootstrap combinations.
  2455. case "$configdirs" in
  2456. *gcc*) have_compiler=yes ;;
  2457. *) have_compiler=no ;;
  2458. esac
  2459. case "$have_compiler:$host:$target:$enable_bootstrap" in
  2460. *:*:*:no) ;;
  2461. # Default behavior. Enable bootstrap if we have a compiler
  2462. # and we are in a native configuration.
  2463. yes:$build:$build:default)
  2464. enable_bootstrap=yes ;;
  2465. *:*:*:default)
  2466. enable_bootstrap=no ;;
  2467. # We have a compiler and we are in a native configuration, bootstrap is ok
  2468. yes:$build:$build:yes)
  2469. ;;
  2470. # Other configurations, but we have a compiler. Assume the user knows
  2471. # what he's doing.
  2472. yes:*:*:yes)
  2473. AC_MSG_WARN([trying to bootstrap a cross compiler])
  2474. ;;
  2475. # No compiler: if they passed --enable-bootstrap explicitly, fail
  2476. no:*:*:yes)
  2477. AC_MSG_ERROR([cannot bootstrap without a compiler]) ;;
  2478. # Fail if wrong command line
  2479. *)
  2480. AC_MSG_ERROR([invalid option for --enable-bootstrap])
  2481. ;;
  2482. esac
  2483. case ",$enable_languages,:$ENABLE_BUILD_WITH_CXX:$enable_bootstrap" in
  2484. *,c++,*:yes:yes) ;;
  2485. *:yes:yes)
  2486. AC_MSG_ERROR([bootstrapping with --enable-build-with-cxx requires c++ in --enable-languages])
  2487. ;;
  2488. esac
  2489. case "$enable_bootstrap:$ENABLE_GOLD: $configdirs :,$stage1_languages," in
  2490. yes:yes:*\ gold\ *:*,c++,*) ;;
  2491. yes:yes:*\ gold\ *:*)
  2492. AC_MSG_ERROR([in a combined tree, bootstrapping with --enable-gold requires c++ in stage1_languages])
  2493. ;;
  2494. esac
  2495. # Adjust the toplevel makefile according to whether bootstrap was selected.
  2496. case $enable_bootstrap in
  2497. yes)
  2498. bootstrap_suffix=bootstrap
  2499. BUILD_CONFIG=bootstrap-debug
  2500. ;;
  2501. no)
  2502. bootstrap_suffix=no-bootstrap
  2503. BUILD_CONFIG=
  2504. ;;
  2505. esac
  2506. AC_MSG_CHECKING(for default BUILD_CONFIG)
  2507. AC_ARG_WITH([build-config],
  2508. [--with-build-config='NAME NAME2...'
  2509. Use config/NAME.mk build configuration],
  2510. [case $with_build_config in
  2511. yes) with_build_config= ;;
  2512. no) with_build_config= BUILD_CONFIG= ;;
  2513. esac])
  2514. if test "x${with_build_config}" != x; then
  2515. BUILD_CONFIG=$with_build_config
  2516. else
  2517. case $BUILD_CONFIG in
  2518. bootstrap-debug)
  2519. if echo "int f (void) { return 0; }" > conftest.c &&
  2520. ${CC} -c conftest.c &&
  2521. mv conftest.o conftest.o.g0 &&
  2522. ${CC} -c -g conftest.c &&
  2523. mv conftest.o conftest.o.g &&
  2524. ${srcdir}/contrib/compare-debug conftest.o.g0 conftest.o.g > /dev/null 2>&1; then
  2525. :
  2526. else
  2527. BUILD_CONFIG=
  2528. fi
  2529. rm -f conftest.c conftest.o conftest.o.g0 conftest.o.g
  2530. ;;
  2531. esac
  2532. fi
  2533. AC_MSG_RESULT($BUILD_CONFIG)
  2534. AC_SUBST(BUILD_CONFIG)
  2535. extrasub_build=
  2536. for module in ${build_configdirs} ; do
  2537. if test -z "${no_recursion}" \
  2538. && test -f ${build_subdir}/${module}/Makefile; then
  2539. echo 1>&2 "*** removing ${build_subdir}/${module}/Makefile to force reconfigure"
  2540. rm -f ${build_subdir}/${module}/Makefile
  2541. fi
  2542. extrasub_build="$extrasub_build
  2543. /^@if build-$module\$/d
  2544. /^@endif build-$module\$/d
  2545. /^@if build-$module-$bootstrap_suffix\$/d
  2546. /^@endif build-$module-$bootstrap_suffix\$/d"
  2547. done
  2548. extrasub_host=
  2549. for module in ${configdirs} ; do
  2550. if test -z "${no_recursion}"; then
  2551. for file in stage*-${module}/Makefile prev-${module}/Makefile ${module}/Makefile; do
  2552. if test -f ${file}; then
  2553. echo 1>&2 "*** removing ${file} to force reconfigure"
  2554. rm -f ${file}
  2555. fi
  2556. done
  2557. fi
  2558. extrasub_host="$extrasub_host
  2559. /^@if $module\$/d
  2560. /^@endif $module\$/d
  2561. /^@if $module-$bootstrap_suffix\$/d
  2562. /^@endif $module-$bootstrap_suffix\$/d"
  2563. done
  2564. extrasub_target=
  2565. for module in ${target_configdirs} ; do
  2566. if test -z "${no_recursion}" \
  2567. && test -f ${target_subdir}/${module}/Makefile; then
  2568. echo 1>&2 "*** removing ${target_subdir}/${module}/Makefile to force reconfigure"
  2569. rm -f ${target_subdir}/${module}/Makefile
  2570. fi
  2571. # We only bootstrap target libraries listed in bootstrap_target_libs.
  2572. case $bootstrap_target_libs in
  2573. *,target-$module,*) target_bootstrap_suffix=$bootstrap_suffix ;;
  2574. *) target_bootstrap_suffix=no-bootstrap ;;
  2575. esac
  2576. extrasub_target="$extrasub_target
  2577. /^@if target-$module\$/d
  2578. /^@endif target-$module\$/d
  2579. /^@if target-$module-$target_bootstrap_suffix\$/d
  2580. /^@endif target-$module-$target_bootstrap_suffix\$/d"
  2581. done
  2582. # Do the final fixup along with target modules.
  2583. extrasub_target="$extrasub_target
  2584. /^@if /,/^@endif /d"
  2585. # Create the serialization dependencies. This uses a temporary file.
  2586. AC_ARG_ENABLE([serial-configure],
  2587. [ --enable-serial-@<:@{host,target,build}-@:>@configure
  2588. force sequential configuration of
  2589. sub-packages for the host, target or build
  2590. machine, or all sub-packages])
  2591. case ${enable_serial_configure} in
  2592. yes)
  2593. enable_serial_build_configure=yes
  2594. enable_serial_host_configure=yes
  2595. enable_serial_target_configure=yes
  2596. ;;
  2597. esac
  2598. # These force 'configure's to be done one at a time, to avoid problems
  2599. # with contention over a shared config.cache.
  2600. rm -f serdep.tmp
  2601. echo '# serdep.tmp' > serdep.tmp
  2602. olditem=
  2603. test "x${enable_serial_build_configure}" = xyes &&
  2604. for item in ${build_configdirs} ; do
  2605. case ${olditem} in
  2606. "") ;;
  2607. *) echo "configure-build-${item}: configure-build-${olditem}" >> serdep.tmp ;;
  2608. esac
  2609. olditem=${item}
  2610. done
  2611. olditem=
  2612. test "x${enable_serial_host_configure}" = xyes &&
  2613. for item in ${configdirs} ; do
  2614. case ${olditem} in
  2615. "") ;;
  2616. *) echo "configure-${item}: configure-${olditem}" >> serdep.tmp ;;
  2617. esac
  2618. olditem=${item}
  2619. done
  2620. olditem=
  2621. test "x${enable_serial_target_configure}" = xyes &&
  2622. for item in ${target_configdirs} ; do
  2623. case ${olditem} in
  2624. "") ;;
  2625. *) echo "configure-target-${item}: configure-target-${olditem}" >> serdep.tmp ;;
  2626. esac
  2627. olditem=${item}
  2628. done
  2629. serialization_dependencies=serdep.tmp
  2630. AC_SUBST_FILE(serialization_dependencies)
  2631. # Base args. Strip norecursion, cache-file, srcdir, host, build,
  2632. # target, nonopt, and variable assignments. These are the ones we
  2633. # might not want to pass down to subconfigures. The exception being
  2634. # --cache-file=/dev/null, which is used to turn off the use of cache
  2635. # files altogether, and which should be passed on to subconfigures.
  2636. # Also strip program-prefix, program-suffix, and program-transform-name,
  2637. # so that we can pass down a consistent program-transform-name.
  2638. baseargs=
  2639. keep_next=no
  2640. skip_next=no
  2641. eval "set -- $ac_configure_args"
  2642. for ac_arg
  2643. do
  2644. if test X"$skip_next" = X"yes"; then
  2645. skip_next=no
  2646. continue
  2647. fi
  2648. if test X"$keep_next" = X"yes"; then
  2649. case $ac_arg in
  2650. *\'*)
  2651. ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
  2652. esac
  2653. baseargs="$baseargs '$ac_arg'"
  2654. keep_next=no
  2655. continue
  2656. fi
  2657. # Handle separated arguments. Based on the logic generated by
  2658. # autoconf 2.59.
  2659. case $ac_arg in
  2660. *=* | --config-cache | -C | -disable-* | --disable-* \
  2661. | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
  2662. | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
  2663. | -with-* | --with-* | -without-* | --without-* | --x)
  2664. separate_arg=no
  2665. ;;
  2666. -*)
  2667. separate_arg=yes
  2668. ;;
  2669. *)
  2670. separate_arg=no
  2671. ;;
  2672. esac
  2673. case "$ac_arg" in
  2674. --cache-file=/dev/null | \
  2675. -cache-file=/dev/null )
  2676. # Handled here to avoid the test to skip args below.
  2677. baseargs="$baseargs '$ac_arg'"
  2678. # Assert: $separate_arg should always be no.
  2679. keep_next=$separate_arg
  2680. ;;
  2681. --no*)
  2682. continue
  2683. ;;
  2684. --c* | \
  2685. --sr* | \
  2686. --ho* | \
  2687. --bu* | \
  2688. --t* | \
  2689. --program-* | \
  2690. -cache_file* | \
  2691. -srcdir* | \
  2692. -host* | \
  2693. -build* | \
  2694. -target* | \
  2695. -program-prefix* | \
  2696. -program-suffix* | \
  2697. -program-transform-name* )
  2698. skip_next=$separate_arg
  2699. continue
  2700. ;;
  2701. -*)
  2702. # An option. Add it.
  2703. case $ac_arg in
  2704. *\'*)
  2705. ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
  2706. esac
  2707. baseargs="$baseargs '$ac_arg'"
  2708. keep_next=$separate_arg
  2709. ;;
  2710. *)
  2711. # Either a variable assignment, or a nonopt (triplet). Don't
  2712. # pass it down; let the Makefile handle this.
  2713. continue
  2714. ;;
  2715. esac
  2716. done
  2717. # Remove the initial space we just introduced and, as these will be
  2718. # expanded by make, quote '$'.
  2719. baseargs=`echo "x$baseargs" | sed -e 's/^x *//' -e 's,\\$,$$,g'`
  2720. # Add in --program-transform-name, after --program-prefix and
  2721. # --program-suffix have been applied to it. Autoconf has already
  2722. # doubled dollar signs and backslashes in program_transform_name; we want
  2723. # the backslashes un-doubled, and then the entire thing wrapped in single
  2724. # quotes, because this will be expanded first by make and then by the shell.
  2725. # Also, because we want to override the logic in subdir configure scripts to
  2726. # choose program_transform_name, replace any s,x,x, with s,y,y,.
  2727. sed -e "s,\\\\\\\\,\\\\,g; s,','\\\\'',g; s/s,x,x,/s,y,y,/" <<EOF_SED > conftestsed.out
  2728. ${program_transform_name}
  2729. EOF_SED
  2730. gcc_transform_name=`cat conftestsed.out`
  2731. rm -f conftestsed.out
  2732. baseargs="$baseargs --program-transform-name='${gcc_transform_name}'"
  2733. if test "$silent" = yes; then
  2734. baseargs="$baseargs --silent"
  2735. fi
  2736. baseargs="$baseargs --disable-option-checking"
  2737. # For the build-side libraries, we just need to pretend we're native,
  2738. # and not use the same cache file. Multilibs are neither needed nor
  2739. # desired.
  2740. build_configargs="--cache-file=../config.cache ${baseargs}"
  2741. # For host modules, accept cache file option, or specification as blank.
  2742. case "${cache_file}" in
  2743. "") # empty
  2744. cache_file_option="" ;;
  2745. /* | [[A-Za-z]]:[[\\/]]* ) # absolute path
  2746. cache_file_option="--cache-file=${cache_file}" ;;
  2747. *) # relative path
  2748. cache_file_option="--cache-file=../${cache_file}" ;;
  2749. esac
  2750. # Host dirs don't like to share a cache file either, horribly enough.
  2751. # This seems to be due to autoconf 2.5x stupidity.
  2752. host_configargs="--cache-file=./config.cache ${extra_host_args} ${baseargs}"
  2753. target_configargs=${baseargs}
  2754. # Passing a --with-cross-host argument lets the target libraries know
  2755. # whether they are being built with a cross-compiler or being built
  2756. # native. However, it would be better to use other mechanisms to make the
  2757. # sorts of decisions they want to make on this basis. Please consider
  2758. # this option to be deprecated. FIXME.
  2759. if test x${is_cross_compiler} = xyes ; then
  2760. target_configargs="--with-cross-host=${host_noncanonical} ${target_configargs}"
  2761. fi
  2762. # Default to --enable-multilib.
  2763. if test x${enable_multilib} = x ; then
  2764. target_configargs="--enable-multilib ${target_configargs}"
  2765. fi
  2766. # Pass --with-newlib if appropriate. Note that target_configdirs has
  2767. # changed from the earlier setting of with_newlib.
  2768. if test x${with_newlib} != xno && echo " ${target_configdirs} " | grep " newlib " > /dev/null 2>&1 && test -d ${srcdir}/newlib ; then
  2769. target_configargs="--with-newlib ${target_configargs}"
  2770. fi
  2771. # Different target subdirs use different values of certain variables
  2772. # (notably CXX). Worse, multilibs use *lots* of different values.
  2773. # Worse yet, autoconf 2.5x makes some of these 'precious', meaning that
  2774. # it doesn't automatically accept command-line overrides of them.
  2775. # This means it's not safe for target subdirs to share a cache file,
  2776. # which is disgusting, but there you have it. Hopefully this can be
  2777. # fixed in future. It's still worthwhile to use a cache file for each
  2778. # directory. I think.
  2779. # Pass the appropriate --build, --host, --target and --cache-file arguments.
  2780. # We need to pass --target, as newer autoconf's requires consistency
  2781. # for target_alias and gcc doesn't manage it consistently.
  2782. target_configargs="--cache-file=./config.cache ${target_configargs}"
  2783. FLAGS_FOR_TARGET=
  2784. case " $target_configdirs " in
  2785. *" newlib "*)
  2786. case " $target_configargs " in
  2787. *" --with-newlib "*)
  2788. case "$target" in
  2789. *-cygwin*)
  2790. FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/$(TARGET_SUBDIR)/winsup -L$$r/$(TARGET_SUBDIR)/winsup/cygwin -L$$r/$(TARGET_SUBDIR)/winsup/w32api/lib -isystem $$s/winsup/include -isystem $$s/winsup/cygwin/include -isystem $$s/winsup/w32api/include'
  2791. ;;
  2792. esac
  2793. # If we're not building GCC, don't discard standard headers.
  2794. if test -d ${srcdir}/gcc; then
  2795. FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -nostdinc'
  2796. if test "${build}" != "${host}"; then
  2797. # On Canadian crosses, CC_FOR_TARGET will have already been set
  2798. # by `configure', so we won't have an opportunity to add -Bgcc/
  2799. # to it. This is right: we don't want to search that directory
  2800. # for binaries, but we want the header files in there, so add
  2801. # them explicitly.
  2802. FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -isystem $$r/$(HOST_SUBDIR)/gcc/include'
  2803. # Someone might think of using the pre-installed headers on
  2804. # Canadian crosses, in case the installed compiler is not fully
  2805. # compatible with the compiler being built. In this case, it
  2806. # would be better to flag an error than risking having
  2807. # incompatible object files being constructed. We can't
  2808. # guarantee that an error will be flagged, but let's hope the
  2809. # compiler will do it, when presented with incompatible header
  2810. # files.
  2811. fi
  2812. fi
  2813. case "${target}-${is_cross_compiler}" in
  2814. i[[3456789]]86-*-linux*-no)
  2815. # Here host == target, so we don't need to build gcc,
  2816. # so we don't want to discard standard headers.
  2817. FLAGS_FOR_TARGET=`echo " $FLAGS_FOR_TARGET " | sed -e 's/ -nostdinc / /'`
  2818. ;;
  2819. *)
  2820. # If we're building newlib, use its generic headers last, but search
  2821. # for any libc-related directories first (so make it the last -B
  2822. # switch).
  2823. FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$$r/$(TARGET_SUBDIR)/newlib/ -isystem $$r/$(TARGET_SUBDIR)/newlib/targ-include -isystem $$s/newlib/libc/include'
  2824. # If we're building libgloss, find the startup file, simulator library
  2825. # and linker script.
  2826. case " $target_configdirs " in
  2827. *" libgloss "*)
  2828. # Look for startup file, simulator library and maybe linker script.
  2829. FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$$r/$(TARGET_SUBDIR)/libgloss/'"$libgloss_dir"
  2830. # Look for libnosys.a in case the target needs it.
  2831. FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/$(TARGET_SUBDIR)/libgloss/libnosys'
  2832. # Most targets have the linker script in the source directory.
  2833. FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$s/libgloss/'"$libgloss_dir"
  2834. ;;
  2835. esac
  2836. ;;
  2837. esac
  2838. ;;
  2839. esac
  2840. ;;
  2841. esac
  2842. case "$target" in
  2843. x86_64-*mingw* | *-w64-mingw*)
  2844. # MinGW-w64 does not use newlib, nor does it use winsup. It may,
  2845. # however, use a symlink named 'mingw' in ${prefix} .
  2846. FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L${prefix}/${target}/lib -L${prefix}/mingw/lib -isystem ${prefix}/${target}/include -isystem ${prefix}/mingw/include'
  2847. ;;
  2848. *-mingw*)
  2849. # MinGW can't be handled as Cygwin above since it does not use newlib.
  2850. FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/$(TARGET_SUBDIR)/winsup/mingw -L$$r/$(TARGET_SUBDIR)/winsup/w32api/lib -isystem $$s/winsup/mingw/include -isystem $$s/winsup/w32api/include'
  2851. ;;
  2852. esac
  2853. # Allow the user to override the flags for
  2854. # our build compiler if desired.
  2855. if test x"${build}" = x"${host}" ; then
  2856. CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD-${CFLAGS}}
  2857. CXXFLAGS_FOR_BUILD=${CXXFLAGS_FOR_BUILD-${CXXFLAGS}}
  2858. LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-${LDFLAGS}}
  2859. fi
  2860. # On Canadian crosses, we'll be searching the right directories for
  2861. # the previously-installed cross compiler, so don't bother to add
  2862. # flags for directories within the install tree of the compiler
  2863. # being built; programs in there won't even run.
  2864. if test "${build}" = "${host}" && test -d ${srcdir}/gcc; then
  2865. # Search for pre-installed headers if nothing else fits.
  2866. FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$(build_tooldir)/bin/ -B$(build_tooldir)/lib/ -isystem $(build_tooldir)/include -isystem $(build_tooldir)/sys-include'
  2867. fi
  2868. if test "x${use_gnu_ld}" = x &&
  2869. echo " ${configdirs} " | grep " ld " > /dev/null ; then
  2870. # Arrange for us to find uninstalled linker scripts.
  2871. FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/$(HOST_SUBDIR)/ld'
  2872. fi
  2873. # Search for other target-specific linker scripts and such.
  2874. case "${target}" in
  2875. mep*)
  2876. FLAGS_FOR_TARGET="$FLAGS_FOR_TARGET -mlibrary"
  2877. ;;
  2878. esac
  2879. # Makefile fragments.
  2880. for frag in host_makefile_frag target_makefile_frag alphaieee_frag ospace_frag;
  2881. do
  2882. eval fragval=\$$frag
  2883. if test $fragval != /dev/null; then
  2884. eval $frag=${srcdir}/$fragval
  2885. fi
  2886. done
  2887. AC_SUBST_FILE(host_makefile_frag)
  2888. AC_SUBST_FILE(target_makefile_frag)
  2889. AC_SUBST_FILE(alphaieee_frag)
  2890. AC_SUBST_FILE(ospace_frag)
  2891. # Miscellanea: directories, flags, etc.
  2892. AC_SUBST(RPATH_ENVVAR)
  2893. AC_SUBST(GCC_SHLIB_SUBDIR)
  2894. AC_SUBST(tooldir)
  2895. AC_SUBST(build_tooldir)
  2896. AC_SUBST(CONFIGURE_GDB_TK)
  2897. AC_SUBST(GDB_TK)
  2898. AC_SUBST(INSTALL_GDB_TK)
  2899. # Build module lists & subconfigure args.
  2900. AC_SUBST(build_configargs)
  2901. AC_SUBST(build_configdirs)
  2902. # Host module lists & subconfigure args.
  2903. AC_SUBST(host_configargs)
  2904. AC_SUBST(configdirs)
  2905. AC_SUBST(target_configdirs)
  2906. # Target module lists & subconfigure args.
  2907. AC_SUBST(target_configargs)
  2908. # Build tools.
  2909. AC_SUBST(AR_FOR_BUILD)
  2910. AC_SUBST(AS_FOR_BUILD)
  2911. AC_SUBST(CC_FOR_BUILD)
  2912. AC_SUBST(CFLAGS_FOR_BUILD)
  2913. AC_SUBST(CXXFLAGS_FOR_BUILD)
  2914. AC_SUBST(CXX_FOR_BUILD)
  2915. AC_SUBST(DLLTOOL_FOR_BUILD)
  2916. AC_SUBST(GCJ_FOR_BUILD)
  2917. AC_SUBST(GFORTRAN_FOR_BUILD)
  2918. AC_SUBST(LDFLAGS_FOR_BUILD)
  2919. AC_SUBST(LD_FOR_BUILD)
  2920. AC_SUBST(NM_FOR_BUILD)
  2921. AC_SUBST(RANLIB_FOR_BUILD)
  2922. AC_SUBST(WINDMC_FOR_BUILD)
  2923. AC_SUBST(WINDRES_FOR_BUILD)
  2924. AC_SUBST(config_shell)
  2925. # Generate default definitions for YACC, M4, LEX and other programs that run
  2926. # on the build machine. These are used if the Makefile can't locate these
  2927. # programs in objdir.
  2928. MISSING=`cd $ac_aux_dir && ${PWDCMD-pwd}`/missing
  2929. AC_CHECK_PROGS([YACC], ['bison -y' byacc yacc], [$MISSING bison -y])
  2930. case " $build_configdirs " in
  2931. *" bison "*) YACC='$$r/$(BUILD_SUBDIR)/bison/tests/bison -y' ;;
  2932. *" byacc "*) YACC='$$r/$(BUILD_SUBDIR)/byacc/byacc' ;;
  2933. esac
  2934. AC_CHECK_PROGS([BISON], [bison], [$MISSING bison])
  2935. case " $build_configdirs " in
  2936. *" bison "*) BISON='$$r/$(BUILD_SUBDIR)/bison/tests/bison' ;;
  2937. esac
  2938. AC_CHECK_PROGS([M4], [gm4 gnum4 m4], [$MISSING m4])
  2939. case " $build_configdirs " in
  2940. *" m4 "*) M4='$$r/$(BUILD_SUBDIR)/m4/m4' ;;
  2941. esac
  2942. AC_CHECK_PROGS([LEX], [flex lex], [$MISSING flex])
  2943. case " $build_configdirs " in
  2944. *" flex "*) LEX='$$r/$(BUILD_SUBDIR)/flex/flex' ;;
  2945. *" lex "*) LEX='$$r/$(BUILD_SUBDIR)/lex/lex' ;;
  2946. esac
  2947. AC_CHECK_PROGS([FLEX], [flex], [$MISSING flex])
  2948. case " $build_configdirs " in
  2949. *" flex "*) FLEX='$$r/$(BUILD_SUBDIR)/flex/flex' ;;
  2950. esac
  2951. AC_CHECK_PROGS([MAKEINFO], makeinfo, [$MISSING makeinfo])
  2952. case " $build_configdirs " in
  2953. *" texinfo "*) MAKEINFO='$$r/$(BUILD_SUBDIR)/texinfo/makeinfo/makeinfo' ;;
  2954. *)
  2955. changequote(,)
  2956. # For an installed makeinfo, we require it to be from texinfo 4.7 or
  2957. # higher, else we use the "missing" dummy.
  2958. if ${MAKEINFO} --version \
  2959. | egrep 'texinfo[^0-9]*(4\.([7-9]|[1-9][0-9])|[5-9]|[1-9][0-9])' >/dev/null 2>&1; then
  2960. :
  2961. else
  2962. MAKEINFO="$MISSING makeinfo"
  2963. fi
  2964. ;;
  2965. changequote([,])
  2966. esac
  2967. # FIXME: expect and dejagnu may become build tools?
  2968. AC_CHECK_PROGS(EXPECT, expect, expect)
  2969. case " $configdirs " in
  2970. *" expect "*)
  2971. test $host = $build && EXPECT='$$r/$(HOST_SUBDIR)/expect/expect'
  2972. ;;
  2973. esac
  2974. AC_CHECK_PROGS(RUNTEST, runtest, runtest)
  2975. case " $configdirs " in
  2976. *" dejagnu "*)
  2977. test $host = $build && RUNTEST='$$s/$(HOST_SUBDIR)/dejagnu/runtest'
  2978. ;;
  2979. esac
  2980. # Host tools.
  2981. NCN_STRICT_CHECK_TOOLS(AR, ar)
  2982. NCN_STRICT_CHECK_TOOLS(AS, as)
  2983. NCN_STRICT_CHECK_TOOLS(DLLTOOL, dlltool)
  2984. NCN_STRICT_CHECK_TOOLS(LD, ld)
  2985. NCN_STRICT_CHECK_TOOLS(LIPO, lipo)
  2986. NCN_STRICT_CHECK_TOOLS(NM, nm)
  2987. NCN_STRICT_CHECK_TOOLS(RANLIB, ranlib, true)
  2988. NCN_STRICT_CHECK_TOOLS(STRIP, strip, true)
  2989. NCN_STRICT_CHECK_TOOLS(WINDRES, windres)
  2990. NCN_STRICT_CHECK_TOOLS(WINDMC, windmc)
  2991. NCN_STRICT_CHECK_TOOLS(OBJCOPY, objcopy)
  2992. NCN_STRICT_CHECK_TOOLS(OBJDUMP, objdump)
  2993. AC_SUBST(CC)
  2994. AC_SUBST(CXX)
  2995. AC_SUBST(CFLAGS)
  2996. AC_SUBST(CXXFLAGS)
  2997. # Target tools.
  2998. AC_ARG_WITH([build-time-tools],
  2999. [ --with-build-time-tools=PATH
  3000. use given path to find target tools during the build],
  3001. [case x"$withval" in
  3002. x/*) ;;
  3003. *)
  3004. with_build_time_tools=
  3005. AC_MSG_WARN([argument to --with-build-time-tools must be an absolute path])
  3006. ;;
  3007. esac],
  3008. [with_build_time_tools=])
  3009. NCN_STRICT_CHECK_TARGET_TOOLS(CC_FOR_TARGET, cc gcc)
  3010. NCN_STRICT_CHECK_TARGET_TOOLS(CXX_FOR_TARGET, c++ g++ cxx gxx)
  3011. NCN_STRICT_CHECK_TARGET_TOOLS(GCC_FOR_TARGET, gcc, ${CC_FOR_TARGET})
  3012. NCN_STRICT_CHECK_TARGET_TOOLS(GCJ_FOR_TARGET, gcj)
  3013. NCN_STRICT_CHECK_TARGET_TOOLS(GFORTRAN_FOR_TARGET, gfortran)
  3014. ACX_CHECK_INSTALLED_TARGET_TOOL(AR_FOR_TARGET, ar)
  3015. ACX_CHECK_INSTALLED_TARGET_TOOL(AS_FOR_TARGET, as)
  3016. ACX_CHECK_INSTALLED_TARGET_TOOL(DLLTOOL_FOR_TARGET, dlltool)
  3017. ACX_CHECK_INSTALLED_TARGET_TOOL(LD_FOR_TARGET, ld)
  3018. ACX_CHECK_INSTALLED_TARGET_TOOL(LIPO_FOR_TARGET, lipo)
  3019. ACX_CHECK_INSTALLED_TARGET_TOOL(NM_FOR_TARGET, nm)
  3020. ACX_CHECK_INSTALLED_TARGET_TOOL(OBJDUMP_FOR_TARGET, objdump)
  3021. ACX_CHECK_INSTALLED_TARGET_TOOL(RANLIB_FOR_TARGET, ranlib)
  3022. ACX_CHECK_INSTALLED_TARGET_TOOL(STRIP_FOR_TARGET, strip)
  3023. ACX_CHECK_INSTALLED_TARGET_TOOL(WINDRES_FOR_TARGET, windres)
  3024. ACX_CHECK_INSTALLED_TARGET_TOOL(WINDMC_FOR_TARGET, windmc)
  3025. RAW_CXX_FOR_TARGET="$CXX_FOR_TARGET"
  3026. GCC_TARGET_TOOL(ar, AR_FOR_TARGET, AR, [binutils/ar])
  3027. GCC_TARGET_TOOL(as, AS_FOR_TARGET, AS, [gas/as-new])
  3028. GCC_TARGET_TOOL(cc, CC_FOR_TARGET, CC, [gcc/xgcc -B$$r/$(HOST_SUBDIR)/gcc/])
  3029. GCC_TARGET_TOOL(c++, CXX_FOR_TARGET, CXX,
  3030. [gcc/g++ -B$$r/$(HOST_SUBDIR)/gcc/ -nostdinc++ `test ! -f $$r/$(TARGET_SUBDIR)/libstdc++-v3/scripts/testsuite_flags || $(SHELL) $$r/$(TARGET_SUBDIR)/libstdc++-v3/scripts/testsuite_flags --build-includes` -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs],
  3031. c++)
  3032. GCC_TARGET_TOOL(c++ for libstdc++, RAW_CXX_FOR_TARGET, CXX,
  3033. [gcc/xgcc -shared-libgcc -B$$r/$(HOST_SUBDIR)/gcc -nostdinc++ -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs],
  3034. c++)
  3035. GCC_TARGET_TOOL(dlltool, DLLTOOL_FOR_TARGET, DLLTOOL, [binutils/dlltool])
  3036. GCC_TARGET_TOOL(gcc, GCC_FOR_TARGET, , [gcc/xgcc -B$$r/$(HOST_SUBDIR)/gcc/])
  3037. GCC_TARGET_TOOL(gcj, GCJ_FOR_TARGET, GCJ,
  3038. [gcc/gcj -B$$r/$(HOST_SUBDIR)/gcc/], java)
  3039. GCC_TARGET_TOOL(gfortran, GFORTRAN_FOR_TARGET, GFORTRAN,
  3040. [gcc/gfortran -B$$r/$(HOST_SUBDIR)/gcc/], fortran)
  3041. GCC_TARGET_TOOL(ld, LD_FOR_TARGET, LD, [ld/ld-new])
  3042. GCC_TARGET_TOOL(lipo, LIPO_FOR_TARGET, LIPO)
  3043. GCC_TARGET_TOOL(nm, NM_FOR_TARGET, NM, [binutils/nm-new])
  3044. GCC_TARGET_TOOL(objdump, OBJDUMP_FOR_TARGET, OBJDUMP, [binutils/objdump])
  3045. GCC_TARGET_TOOL(ranlib, RANLIB_FOR_TARGET, RANLIB, [binutils/ranlib])
  3046. GCC_TARGET_TOOL(strip, STRIP_FOR_TARGET, STRIP, [binutils/strip])
  3047. GCC_TARGET_TOOL(windres, WINDRES_FOR_TARGET, WINDRES, [binutils/windres])
  3048. GCC_TARGET_TOOL(windmc, WINDMC_FOR_TARGET, WINDMC, [binutils/windmc])
  3049. AC_SUBST(FLAGS_FOR_TARGET)
  3050. AC_SUBST(RAW_CXX_FOR_TARGET)
  3051. # Certain tools may need extra flags.
  3052. AR_FOR_TARGET=${AR_FOR_TARGET}${extra_arflags_for_target}
  3053. RANLIB_FOR_TARGET=${RANLIB_FOR_TARGET}${extra_ranlibflags_for_target}
  3054. NM_FOR_TARGET=${NM_FOR_TARGET}${extra_nmflags_for_target}
  3055. # When building target libraries, except in a Canadian cross, we use
  3056. # the same toolchain as the compiler we just built.
  3057. COMPILER_AS_FOR_TARGET='$(AS_FOR_TARGET)'
  3058. COMPILER_LD_FOR_TARGET='$(LD_FOR_TARGET)'
  3059. COMPILER_NM_FOR_TARGET='$(NM_FOR_TARGET)'
  3060. if test $host = $build; then
  3061. case " $configdirs " in
  3062. *" gcc "*)
  3063. COMPILER_AS_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/as'
  3064. COMPILER_LD_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/collect-ld'
  3065. COMPILER_NM_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/nm'${extra_nmflags_for_target}
  3066. ;;
  3067. esac
  3068. fi
  3069. AC_SUBST(COMPILER_AS_FOR_TARGET)
  3070. AC_SUBST(COMPILER_LD_FOR_TARGET)
  3071. AC_SUBST(COMPILER_NM_FOR_TARGET)
  3072. AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
  3073. AC_ARG_ENABLE(maintainer-mode,
  3074. [ --enable-maintainer-mode enable make rules and dependencies not useful
  3075. (and sometimes confusing) to the casual installer],
  3076. USE_MAINTAINER_MODE=$enableval,
  3077. USE_MAINTAINER_MODE=no)
  3078. AC_MSG_RESULT($USE_MAINTAINER_MODE)
  3079. AC_SUBST(MAINTAINER_MODE_TRUE)
  3080. AC_SUBST(MAINTAINER_MODE_FALSE)
  3081. if test "$USE_MAINTAINER_MODE" = yes; then
  3082. MAINTAINER_MODE_TRUE=
  3083. MAINTAINER_MODE_FALSE='#'
  3084. else
  3085. MAINTAINER_MODE_TRUE='#'
  3086. MAINTAINER_MODE_FALSE=
  3087. fi
  3088. MAINT=$MAINTAINER_MODE_TRUE
  3089. AC_SUBST(MAINT)dnl
  3090. # ---------------------
  3091. # GCC bootstrap support
  3092. # ---------------------
  3093. # Stage specific cflags for build.
  3094. stage1_cflags="-g"
  3095. case $build in
  3096. vax-*-*)
  3097. case ${GCC} in
  3098. yes) stage1_cflags="-g -Wa,-J" ;;
  3099. *) stage1_cflags="-g -J" ;;
  3100. esac ;;
  3101. esac
  3102. # This is aimed to mimic bootstrap with a non-GCC compiler to catch problems.
  3103. if test "$GCC" = yes -a "$ENABLE_BUILD_WITH_CXX" != yes; then
  3104. saved_CFLAGS="$CFLAGS"
  3105. # Pass -fkeep-inline-functions for stage 1 if the GCC version supports it.
  3106. CFLAGS="$CFLAGS -fkeep-inline-functions"
  3107. AC_MSG_CHECKING([whether -fkeep-inline-functions is supported])
  3108. AC_TRY_COMPILE([
  3109. #if (__GNUC__ < 3) \
  3110. || (__GNUC__ == 3 && (__GNUC_MINOR__ < 3 \
  3111. || (__GNUC_MINOR__ == 3 && __GNUC_PATCHLEVEL__ < 1)))
  3112. #error http://gcc.gnu.org/PR29382
  3113. #endif
  3114. ],,
  3115. [AC_MSG_RESULT([yes]); stage1_cflags="$stage1_cflags -fkeep-inline-functions"],
  3116. [AC_MSG_RESULT([no])])
  3117. CFLAGS="$saved_CFLAGS"
  3118. fi
  3119. AC_SUBST(stage1_cflags)
  3120. # Enable --enable-checking in stage1 of the compiler.
  3121. AC_ARG_ENABLE(stage1-checking,
  3122. [ --enable-stage1-checking@<:@=all@:>@ choose additional checking for stage1
  3123. of the compiler],
  3124. [stage1_checking=--enable-checking=${enable_stage1_checking}],
  3125. [if test "x$enable_checking" = xno || test "x$enable_checking" = x; then
  3126. stage1_checking=--enable-checking=yes,types
  3127. else
  3128. stage1_checking=--enable-checking=$enable_checking,types
  3129. fi])
  3130. AC_SUBST(stage1_checking)
  3131. # Enable -Werror in bootstrap stage2 and later.
  3132. AC_ARG_ENABLE(werror,
  3133. [ --enable-werror enable -Werror in bootstrap stage2 and later], [],
  3134. [if test -d ${srcdir}/gcc && test x"`cat $srcdir/gcc/DEV-PHASE`" = xexperimental; then
  3135. enable_werror=yes
  3136. else
  3137. enable_werror=no
  3138. fi])
  3139. case ${enable_werror} in
  3140. yes) stage2_werror_flag="--enable-werror-always" ;;
  3141. *) stage2_werror_flag="" ;;
  3142. esac
  3143. AC_SUBST(stage2_werror_flag)
  3144. # Specify what files to not compare during bootstrap.
  3145. compare_exclusions="gcc/cc*-checksum\$(objext) | gcc/ada/*tools/*"
  3146. case "$target" in
  3147. hppa*64*-*-hpux*) ;;
  3148. hppa*-*-hpux*) compare_exclusions="gcc/cc*-checksum\$(objext) | */libgcc/lib2funcs* | gcc/ada/*tools/*" ;;
  3149. esac
  3150. case " $configdirs " in
  3151. *" ppl "*) compare_exclusions="$compare_exclusions | ppl/src/ppl-config.o" ;;
  3152. esac
  3153. AC_SUBST(compare_exclusions)
  3154. AC_CONFIG_FILES([Makefile],
  3155. [sed "$extrasub_build" Makefile |
  3156. sed "$extrasub_host" |
  3157. sed "$extrasub_target" > mf$$
  3158. mv -f mf$$ Makefile],
  3159. [extrasub_build="$extrasub_build"
  3160. extrasub_host="$extrasub_host"
  3161. extrasub_target="$extrasub_target"])
  3162. AC_OUTPUT