Logo AND Algorithmique Numérique Distribuée

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