update dev300-m58
[ooovba.git] / dmake / autogen.sh
blob4a51f63b636252bd10e06fd82efa3d4c7b95f2a4
1 #!/bin/sh
2 # Run this to generate all the initial makefiles, etc.
4 srcdir=`dirname $0`
5 test -z "$srcdir" && srcdir=.
7 ORIGDIR=`pwd`
8 cd $srcdir
9 PROJECT=dmake
10 TEST_TYPE=-f
11 FILE=make.c
13 DIE=0
15 # cvs may leave some files unwritable
16 (chmod -Rf u+rw $srcdir) < /dev/null > /dev/null 2>&1 || {
17 echo
18 echo "You must have owner permissions for all files and subdirectories"
19 echo "in $srcdir"
20 DIE=1
23 (autoconf --version ) < /dev/null > /dev/null 2>&1 || {
24 echo
25 echo "You must have autoconf installed to compile $PROJECT."
26 DIE=1
29 (automake --version ) < /dev/null > /dev/null 2>&1 || {
30 echo
31 echo "You must have automake installed to compile $PROJECT."
32 DIE=1
35 if test "$DIE" -eq 1; then
36 exit 1
39 test $TEST_TYPE $FILE || {
40 echo "You must run this script in the top-level $PROJECT directory"
41 exit 1
44 if test -z "$*"; then
45 echo "I am going to run ./configure with no arguments - if you wish "
46 echo "to pass any to it, please specify them on the $0 command line."
49 # needed when autotools version changed
50 aclocal
52 # After the first run of autoconf a configure file exists.
53 # 'configure --enable-maintainer-mode' will start all other needed autotool helpers.
54 autoconf
56 #automake -a -c -f
58 cd $ORIGDIR
60 $srcdir/configure --enable-maintainer-mode --prefix=/usr/local "$@"
62 echo
63 echo "Now execute GNU make to compile $PROJECT."