4 ### Set up a new project
6 ### (c) 1997 Mark Wooding
9 ###----- Licensing notice ---------------------------------------------------
11 ### This file is part of the Common Files Distribution (`common').
13 ### `Common' is free software; you can redistribute it and/or modify
14 ### it under the terms of the GNU General Public License as published by
15 ### the Free Software Foundation; either version 2 of the License, or
16 ### (at your option) any later version.
18 ### `Common' is distributed in the hope that it will be useful,
19 ### but WITHOUT ANY WARRANTY; without even the implied warranty of
20 ### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 ### GNU General Public License for more details.
23 ### You should have received a copy of the GNU General Public License
24 ### along with `common'; if not, write to the Free Software Foundation,
25 ### Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
29 ###--------------------------------------------------------------------------
30 ### Basic setup stuff.
32 ego
=$
(echo "$0" |
sed 's:^.*[/\\]::; s:\.*$::')
35 ###--------------------------------------------------------------------------
36 ### Parse command line arguments.
38 while [ $# -gt
0 ]; do
40 --help |
-h |
--usage |
-u
)
49 echo >&2 "$ego: unknown option \`$1'"
61 ###--------------------------------------------------------------------------
62 ### Link any strange common files we need.
64 [ -f .links
] && mklinks
66 ###--------------------------------------------------------------------------
67 ### Do any initial local stuff.
69 if [ -x build-setup
]; then .
/build-setup start
; fi
71 ###--------------------------------------------------------------------------
72 ### Grind through the Autoconf machinery.
75 for i
in configure.ac configure.
in; do
76 [ -f
$i ] && configure
=$i
78 if [ "$configure" ]; then
79 grep >/dev
/null AM_PROG_LIBTOOL
$configure && libtoolize
-f
80 find .
-name Makefile.
m4 -print |
while read m4; do
81 dir
=$
(echo $m4 |
sed 's:/[^/]*$::')
83 m4 Makefile.
m4 >Makefile.am.new
&&
84 mv Makefile.am.new Makefile.am
)
87 for i
in config
m4; do [ -d
$i ] && aclocalargs
="$aclocalargs -I $i"; done
90 if grep >/dev
/null
'AC_CONFIG_AUX_DIR' $configure; then
92 sed -n
's:^.*AC_CONFIG_AUX_DIR(\[\?\([^])]*\)\]\?).*$:\1:p' $configure)
95 grep >/dev
/null
'A[MC]_CONFIG_HEADER' $configure && autoheader
96 [ -f Makefile.am
] && automake
-a
99 ###--------------------------------------------------------------------------
100 ### Do any final local stuff.
102 if [ -x build-setup
]; then .
/build-setup end
; fi
104 ###------ That's all, folks -------------------------------------------------