-
Notifications
You must be signed in to change notification settings - Fork 4
/
autogen.sh
executable file
·77 lines (67 loc) · 2.07 KB
/
autogen.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#!/bin/sh
# $Id: autogen.sh,v 1.00 2009/12/22 12:25:59 sbajic Exp $
PROG=`basename $0`
KEYFILE=src/libdspam.c
# Some OS's have multiple versions (autoconf259, etc.) and don't have an
# autoconf binary
AUTOCONF=`which autoconf`
LIBTOOLIZE=`which libtoolize`
if test x"${AUTOCONF}" != x -a -f ${AUTOCONF}
then
AUTOCONF=autoconf
AUTOMAKE=automake
ACLOCAL=aclocal
if test x"${LIBTOOLIZE}" != x -a -f "${LIBTOOLIZE}"
then
LIBTOOLIZE=libtoolize
else
LIBTOOLIZE=glibtoolize
fi
AUTOHEADER=autoheader
else
FINDPATH=`echo ${PATH}|sed -e 's,:, ,g'`
AUTOCONF=`find ${FINDPATH} -name "autoconf*"|sort -r|head -1`
AUTOMAKE=`find ${FINDPATH} -name "automake*"|sort -r|head -1`
ACLOCAL=`find ${FINDPATH} -name "aclocal*"|sort -r|head -1`
LIBTOOLIZE=`find ${FINDPATH} -name "libtoolize*"|sort -r|head -1`
AUTOHEADER=`find /usr/bin /usr/local/bin -name "autoheader*"|sort -r|head -1`
echo "$0: autoconf: using ${AUTOCONF}"
echo "$0: automake: using ${AUTOMAKE}"
echo "$0: aclocal: using ${ACLOCAL}"
echo "$0: libtoolize: using ${LIBTOOLIZE}"
echo "$0: autoheader: using ${AUTOHEADER}"
fi
GETTEXTIZE_FLAGS=--no-changelog
AUTOPOINT_FLAGS=
LIBTOOLIZE_FLAGS=
# Some OS's require /usr/local/share/aclocal
if test ! -d /usr/local/share/aclocal
then
ACLOCAL_FLAGS='-I m4'
else
ACLOCAL_FLAGS='-I m4 -I /usr/local/share/aclocal'
fi
AUTOHEADER_FLAGS=
AUTOMAKE_FLAGS='--add-missing'
AUTOCONF_FLAGS=-Wno-obsolete
die()
{
err=$?
echo "$PROG: exited by previous error(s), return code was $err" >&2
exit 1
}
if [ ! -f $KEYFILE ]
then
echo "$PROG: key-file \`$KEYFILE' not found, exiting." >&2
echo "$PROG: hint: you should run $PROG from top-level sourse directory." >&2
exit 1
fi
# gettextize ${GETTEXTIZE_FLAGS}
# autopoint ${AUTOPOINT_FLAGS}
# xml-i18n-toolize || die
# intltoolize || die
${LIBTOOLIZE} ${LIBTOOLIZE_FLAGS} --force || die
${ACLOCAL} ${ACLOCAL_FLAGS} || die
${AUTOHEADER} ${AUTOHEADER_FLAGS} || die
${AUTOMAKE} ${AUTOMAKE_FLAGS} || die
${AUTOCONF} ${AUTOCONF_FLAGS} || die