Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
even more cruft ignored
[simgrid.git] / bootstrap
1 #!/bin/sh
2 # Run this to generate all the initial makefiles, etc.
3
4 amversions="${amver:-1.10}"
5
6 check_version()
7 {
8     eval $2 --version 2>/dev/null | grep -i "$1.*$3" >/dev/null
9 }
10
11 find_version()
12 {
13     tool=$1
14     found="NOT_FOUND"
15     shift
16     versions="$*"
17
18     for version in $versions ; do
19         if check_version $tool ${tool}${variant} $version; then
20             found="${version}"
21             echo ${version} >&2
22             break
23         fi
24     done
25     if [ "x$found" = "xNOT_FOUND" ]; then
26         found="-" 
27     fi
28     echo $found
29 }
30
31 amver=`find_version automake ${amversions}`
32
33 lt=`which libtoolize`
34 if [ "x$lt" = "x" ] ; then
35   echo "Libtool not found. Please install the libtool package to proceed with a CVS checkout"
36   exit 1
37 fi
38
39 am=`which automake-$amver`
40 if [ "x$am" = "x" ] ; then
41   echo "automake versions $amversions not found. Please install the relevant package to proceed with a CVS checkout"
42   exit 1
43 fi
44
45 ac=`which autoconf`
46 if [ "x$ac" = "x" ] ; then
47   echo "autoconf not found. Please install the relevant package to proceed with a CVS checkout"
48   exit 1
49 fi
50
51 set -e
52 # AUTOCONF=
53 # AUTOHEADER=
54 # AUTOPOINT=
55 # LIBTOOLIZE=
56
57 ACLOCAL="aclocal-$amver -I acmacro" \
58 AUTOMAKE="automake-$amver" \
59   autoreconf -v -i -s || exit 1
60
61 echo
62 echo "And now, please launch ./configure"
63 echo "----------------------------------"
64
65 # What to do the day we declare optional modules using ACI:
66 #  if test -e aci.conf ; then
67 #   source aci.conf
68 #   pass the content of $configure_args to configure
69
70 echo 
71 echo "Most common flags:"
72 echo "  --enable-maintainer-mode         mandatory if you use the CVS version"
73 echo "  --disable-compile-optimizations  useful if your gdb gets fooled"
74 echo
75
76 echo 
77 echo "If you want to compile for several archs from the same (nfs-mounted?) tree, do:"
78 echo "  mkdir your_arch; cd your_arch && ../configure --srcdir=.."
79
80 echo 
81 echo "(after configure, you'll naturally have to run \`make')"
82 echo 
83 echo