| 1 | # Don't build the shared library for build. | 
|---|
| 2 | if [ -n "${with_build_subdir}" ]; then | 
|---|
| 3 | enable_shared=no | 
|---|
| 4 | fi | 
|---|
| 5 |  | 
|---|
| 6 | frag= | 
|---|
| 7 | case "${host}" in | 
|---|
| 8 | rs6000-ibm-aix3.1 | rs6000-ibm-aix) | 
|---|
| 9 | frag=mh-aix ;; | 
|---|
| 10 | *-*-cxux7*)           frag=mh-cxux7 ;; | 
|---|
| 11 | *-*-freebsd2.1.*)     frag=mh-fbsd21 ;; | 
|---|
| 12 | *-*-freebsd2.2.[012]) frag=mh-fbsd21 ;; | 
|---|
| 13 | i370-*-opened*)       frag=mh-openedition ;; | 
|---|
| 14 | i[345]86-*-windows*)  frag=mh-windows ;; | 
|---|
| 15 | *-*-*emx)             frag=mh-emx ;; | 
|---|
| 16 | esac | 
|---|
| 17 |  | 
|---|
| 18 | if [ -n "${frag}" ]; then | 
|---|
| 19 | frags=${libiberty_topdir}/libiberty/config/$frag | 
|---|
| 20 | else | 
|---|
| 21 | frags= | 
|---|
| 22 | fi | 
|---|
| 23 |  | 
|---|
| 24 | # If they didn't specify --enable-shared, don't generate shared libs. | 
|---|
| 25 | case "${enable_shared}" in | 
|---|
| 26 | yes) shared=yes ;; | 
|---|
| 27 | no) shared=no ;; | 
|---|
| 28 | "") shared=no ;; | 
|---|
| 29 | *) shared=yes ;; | 
|---|
| 30 | esac | 
|---|
| 31 | if [ "${shared}" = "yes" ]; then | 
|---|
| 32 | frag= | 
|---|
| 33 | case "${host}" in | 
|---|
| 34 | *-*-cygwin*)        ;; | 
|---|
| 35 | *-*-*emx)           ;; | 
|---|
| 36 | alpha*-*-linux*)    frag=mh-elfalphapic ;; | 
|---|
| 37 | arm*-*-*)           frag=mh-armpic ;; | 
|---|
| 38 | hppa*-*-*)          frag=mh-papic ;; | 
|---|
| 39 | i[3456]86-*-* | x86_64-*-*) | 
|---|
| 40 | frag=mh-x86pic ;; | 
|---|
| 41 | powerpc*-*-aix*)    ;; | 
|---|
| 42 | powerpc*-*-*)       frag=mh-ppcpic ;; | 
|---|
| 43 | sparc*-*-*)         frag=mh-sparcpic ;; | 
|---|
| 44 | s390*-*-*)          frag=mh-s390pic ;; | 
|---|
| 45 | *)                  frag=mh-${host_cpu}pic ;; | 
|---|
| 46 | esac | 
|---|
| 47 | if [ -n "${frag}" ]; then | 
|---|
| 48 | frags="${frags} ${libiberty_topdir}/config/${frag}" | 
|---|
| 49 | fi | 
|---|
| 50 | fi | 
|---|
| 51 |  | 
|---|
| 52 | echo "# Warning: this fragment is automatically generated" > temp-frag | 
|---|
| 53 |  | 
|---|
| 54 | for frag in ${frags}; do | 
|---|
| 55 | if [ -f ${frag} ]; then | 
|---|
| 56 | echo "Appending ${frag} to xhost-mkfrag" | 
|---|
| 57 | echo "# Following fragment copied from ${frag}" >> temp-frag | 
|---|
| 58 | cat ${frag} >> temp-frag | 
|---|
| 59 | fi | 
|---|
| 60 | done | 
|---|
| 61 |  | 
|---|
| 62 | # record if we want to build shared libs. | 
|---|
| 63 | if [ "${shared}" = "yes" ]; then | 
|---|
| 64 | echo enable_shared = yes >> temp-frag | 
|---|
| 65 | else | 
|---|
| 66 | echo enable_shared = no >> temp-frag | 
|---|
| 67 | fi | 
|---|
| 68 |  | 
|---|
| 69 | frag=xhost-mkfrag | 
|---|
| 70 | ${CONFIG_SHELL-/bin/sh} ${libiberty_topdir}/move-if-change temp-frag xhost-mkfrag | 
|---|