Expand PMF_FN_* macros.
[netbsd-mini2440.git] / dist / ntp / bootstrap
blob1a5aff06dcc84a6f395c28dd52be7fa5236b0305
1 #! /bin/sh
3 # This "bootstrap" script performs various pre-autoreconf actions
4 # that are required after pulling fresh sources from the repository.
6 # NOTE: THE NTP VERSION NUMBER COMES FROM packageinfo.sh
8 # all other instances of it anywhere in the source base have propagated
9 # from this one source.
11 # To use the raw sources from the repository, you must have the following
12 # tools available to you:
14 # 1. Autoconf and Automake.
16 # 2. lynx. This is used to extract the COPYRIGHT file extracted from
17 # the html documentation.
19 # *** The following are no longer needed for simple builds from the repo
20 # 3. AutoGen. The repository does *not* contain the files generated from
21 # the option definition files and it does not contain the libopts
22 # tear-off/redistributable library.
24 # Note: AutoGen needs GNU Guile.
26 # 4. gunzip. The tear-off library is a gzipped tarball.
28 set -e
30 scripts/genver
32 # autoreconf says:
33 # The environment variables AUTOCONF, AUTOHEADER, AUTOMAKE, ACLOCAL,
34 # AUTOPOINT, LIBTOOLIZE, M4 are honored.
36 AUTORECONF=${AUTORECONF:-autoreconf}
38 case `hostname` in
39 pogo.udel.edu)
40 if fgrep -q 4.2.4 version.m4; then
41 AUTOCONF=autoconf-2.59
42 AUTOHEADER=autoheader-2.59
43 AUTOMAKE=automake-1.9
44 ACLOCAL=aclocal-1.9
45 export AUTOCONF AUTOHEADER AUTOMAKE ACLOCAL
48 esac
50 # 20060629: HMS: Let's try checking in libopts and the autogen-generated files
51 ## The copy for ntp...
52 #rm -rf libopts*
53 #gunzip -c $(autoopts-config --libsrc) | (
54 # tar -xvf -
55 # mv libopts-*.*.* libopts )
57 ## The copy for sntp...
58 #rm -rf sntp/libopts*
59 #gunzip -c $(autoopts-config --libsrc) | (
60 # cd sntp
61 # tar -xvf -
62 # mv libopts-*.*.* libopts )
64 def_files=`find [B-Za-z]* -type f -name '*.def' -print | fgrep -v /SCCS/`
65 prog_opt_files=`grep -l '^prog.name' $def_files`
67 ## AutoGen stuff
69 #incdir=${PWD}/include
71 #for f in ${prog_opt_files}
72 #do
73 # ( cd $(dirname ${f})
74 # echo "Running autogen on $f..."
75 # autogen -L${incdir} $(basename ${f})
76 # ) || exit 1
77 #done
79 ## Non-AutoGen stuff
81 for i in autogen-version.def version.def
83 cmp -s include/$i sntp/$i || cp -p include/$i sntp/$i
84 done
86 # touch the stuff generated by the opt files
88 for f in ${prog_opt_files}
90 f=`echo $f | sed -e 's/-opts.def//'`
92 for i in `ls -1 $f*`
94 case "$i" in
95 *.c|*.h|*.1|*.texi|*.menu)
96 l="$l $i"
98 esac
99 done
100 case "$l" in
101 '') ;;
102 *) touch $l
104 esac
105 done
107 ## EOAutoGen stuff
109 cp bincheck.mf sntp/
111 ${AUTORECONF} -i -v
113 # HMS: 20060618: Now that we use separate copies of libopts
114 # we should only need the previous line.
116 ## HMS: 20060615: the next line seems to be needed to make sure
117 ## we get the correct srcdir path in sntp/libopts/Makefile.in
118 #rm -rf sntp/autom4te.cache
120 #(cd sntp && ${AUTORECONF} -i -v)