Logo AND Algorithmique Numérique Distribuée

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