source: scripts/untested/autotools/blfs-libtool.sh@ 60454e2

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 60454e2 was d1afb9e, checked in by Jim Gifford <clfs@…>, 19 years ago

r587@server (orig r585): ryan | 2005-08-05 21:51:35 -0700
Add a sane autotools build to the mix.
Blatantly stolen from gentoo...



  • Property mode set to 100755
File size: 2.5 KB
RevLine 
[d1afb9e]1#!/bin/bash
2
3# cross-lfs native libtool build
4# ------------------------------
5# $LastChangedBy: roliver $
6# $LastChangedDate: 2005-05-21 15:22:56 +1000 (Sat, 21 May 2005) $
7# $LastChangedRevision: 528 $
8# $HeadURL: svn+ssh://roliver@be-linux.org/svn/cross-lfs/cross-lfs/trunk/scripts/native-scripts/native-libtool.sh $
9#
10
11cd ${SRC}
12LOG=libtool-native.log
13
14SELF=`basename ${0}`
15DIR=`dirname ${0}`
16PATCHES=${DIR}/patches
17export PATCHES
18
19set_buildenv
20set_libdirname
21setup_multiarch
22
23if [ ! "{libdirname}" = "lib" ]; then
24 extra_conf="--libdir=/usr/${libdirname}"
25fi
26
27### LIBTOOL ###
28unpack_tarball libtool-${LIBTOOL_VER} &&
29cd ${PKGDIR}
30
31# Gentoo fixes for libtool...
32#--------------------------------------------------
33rm -f ltmain.sh
34
35apply_patch libtool-1.4.2-multilib
36apply_patch libtool-1.4.3-lib64
37apply_patch libtool-1.4.2-archive-shared
38apply_patch libtool-1.5.6-ltmain-SED
39apply_patch libtool-1.4.2-expsym-linux
40apply_patch libtool-1.4.3-pass-thread-flags
41apply_patch libtool-1.5.14-ltmain_sh-max_cmd_len
42apply_patch libtool-1.5-filter-host-tags
43apply_patch libtool-1.5.10-locking
44apply_patch libtool-1.5.14-egrep
45
46
47rm -f ltmain.shT
48date=`./mkstamp < ./ChangeLog` && \
49eval `egrep '^[[:space:]]*PACKAGE' configure` && \
50eval `egrep '^[[:space:]]*VERSION' configure` && \
51sed -e "s/@PACKAGE@/${PACKAGE}/" -e "s/@VERSION@/${VERSION}/" \
52 -e "s%@TIMESTAMP@%$date%" ./ltmain.in > ltmain.shT
53
54mv -f ltmain.shT ltmain.sh
55
56cp libtool.m4 acinclude.m4
57
58touch acinlude.m4
59aclocal
60automake -c -a
61autoconf
62
63cd libltdl
64touch acinlude.m4
65aclocal
66automake -c -a
67autoconf
68
69cd ${SRC}/${PKGDIR}
70
71#--------------------------------------------------
72
73max_log_init Libtool ${LIBTOOL_VER} "native (shared)" ${CONFLOGS} ${LOG}
74CC="${CC-gcc} ${ARCH_CFLAGS}" \
75CFLAGS="-O2 -pipe ${TGT_CFLAGS}" \
76./configure --prefix=/usr \
77 ${extra_conf} \
78 >> ${LOGFILE} 2>&1 &&
79echo " o Configure OK" || barf
80
81min_log_init ${BUILDLOGS} &&
82make \
83 >> ${LOGFILE} 2>&1 &&
84echo " o Build OK" || barf
85
86#min_log_init ${TESTLOGS} &&
87#make check \
88# >> ${LOGFILE} 2>&1 &&
89#echo " o Test OK" || errmsg
90
91min_log_init ${INSTLOGS} &&
92make install \
93 >> ${LOGFILE} 2>&1 &&
94echo " o ALL OK" || barf
95
96rm -f /usr/share/libtool/config.{guess,sub}
97rm -f /usr/share/libtool/libltdl/config.{guess,sub}
98ln -sfn ../gnu-config-files/config.sub /usr/share/libtool/config.sub
99ln -sfn ../gnu-config-files/config.guess /usr/share/libtool/config.guess
100ln -sfn ../../gnu-config-files/config.sub \
101 /usr/share/libtool/libltdl/config.sub
102ln -sfn ../../gnu-config-files/config.guess \
103 /usr/share/libtool/libltdl/config.guess
104
105ldconfig
106
Note: See TracBrowser for help on using the repository browser.