check_logfiles: 3.6.2.1
[omd.git] / configure
blobe82bb88aac130e73e18bd01ab90517eb2e2d792d
1 #!/bin/bash
2 # This is no real configure script. But it makes
3 # sure that all build dependencies are installed,
4 # if you are running on a well known distribution.
6 DISTRO=$(./distro _) || { \
7 echo "Your linux distribution is unknown. Good luck!"
8 exit 1
10 echo "You are running on $DISTRO."
11 M=distros/Makefile.$DISTRO
12 if [ ! -e "$M" ]
13 then
14 echo "This distribution is not supported. You might succeed anyway."
15 echo "Good luck!"
16 exit 1
19 if ! which make >/dev/null 2>&1; then
20 echo "Please install \"make\" before executing this script."
21 exit 1
24 BUILD_PACS=$( make -f echo.mk FILE=$M VAR=BUILD_PACKAGES )
25 PACKAGER=$( make -f echo.mk FILE=$M VAR=PACKAGE_INSTALL )
26 BECOME_ROOT=$( make -f echo.mk FILE=$M VAR=BECOME_ROOT )
28 echo "Packages needed for compilation:"
29 echo "$BUILD_PACS"
30 CMD="$PACKAGER $BUILD_PACS"
31 if [ $UID != 0 ]
32 then
33 CMD="$BECOME_ROOT '$CMD'"
35 echo "Going to run >>>$CMD<<<..."
37 if eval "$CMD" ; then
38 echo "OK - You are now ready for 'make && make pack'"
39 else
40 echo "ERROR. Some packages could not be installed. You will get "
41 echo "Problems while compiling if something is missing."
42 exit 1