/autogen.sh
Shell | 109 lines | 79 code | 11 blank | 19 comment | 12 complexity | 6d616afc3349c09c811d0d32a08f8f36 MD5 | raw file
Possible License(s): GPL-2.0
1#!/bin/sh 2# 3# Copyright (C) 2004 Rizoma Tecnologia Limitada <info@rizoma.cl> 4# 5# This file is part of rizoma. 6# 7# Rizoma is free software; you can redistribute it and/or modify 8# it under the terms of the GNU General Public License as published by 9# the Free Software Foundation; either version 2 of the License, or 10# (at your option) any later version. 11# 12# This program is distributed in the hope that it will be useful, 13# but WITHOUT ANY WARRANTY; without even the implied warranty of 14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15# GNU General Public License for more details. 16# 17# You should have received a copy of the GNU General Public License 18# along with this program; if not, write to the Free Software 19# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 21if [ "$1" = "--help" ]; then 22 echo "Usage: autogen.sh [options]" 23 echo "Options:" 24 echo "--help : Display this help message" 25 echo "--with-errors : Show verbose information" 26 echo "" 27 exit; 28fi 29 30if [ "$1" = "--with-errors" ]; then 31 ERROR="YES" 32else 33 ERROR="NO" 34fi 35 36if autoconf --version > /dev/null 2>&1; then 37 38 if autoconf --version | egrep -e '2.([5670]|[123456789][0-9]+)' > /dev/null>&1; then 39 echo "autoconf ... yes" 40 else 41 echo "autoconf ... no" 42 echo "Error: You must have installed a version >= 2.5" 43 exit; 44 fi 45else 46 echo "Error: You must have autoconf installed" 47 exit; 48fi 49 50if automake --version > /dev/null 2>&1; then 51 52 if automake --version | grep '1.[567890]*' > /dev/null>&1; then 53 echo "automake ... yes" 54 else 55 echo "automake ... no" 56 echo "Error: You must have installed a version >= 1.5" 57 exit; 58 fi 59else 60 echo "Error: You must have automake installed" 61 exit; 62fi 63 64if aclocal --version > /dev/null 2>&1; then 65 66 if aclocal --version | grep '1.[567890]*' > /dev/null>&1; then 67 echo "aclocal ... yes" 68 else 69 echo "aclocal ... no" 70 echo "Error: You must have installed a version >= 1.5" 71 exit; 72 fi 73else 74 echo "Error: You must have aclocal installed" 75 exit; 76fi 77 78if autoheader --version> /dev/null 2>&1; then 79 80 if autoheader --version | egrep -e '2.([5670]|[123456789][0-9]+)' > /dev/null>&1; then 81 echo "autoheader ... yes" 82 else 83 echo "autoheader ... no" 84 echo "Error: You must have installed a version >= 2.5" 85 exit; 86 fi 87else 88 echo "Error: You must have autoheader installed" 89 exit; 90fi 91 92echo "Creating aclocal.m4" 93aclocal -I m4/ 94echo "Creating config.h.in" 95autoheader 96echo "Adding missing standards files to package" 97if [ "$ERROR" = "YES" ]; then 98 automake --add-missing --copy 99else 100 automake --add-missing --copy > /dev/null 2>&1; 101fi 102echo "Creating configure file" 103if [ "$ERROR" = "YES" ]; then 104 autoconf 105else 106 autoconf > /dev/null 2>&1; 107fi 108echo "Now we going to run the configure script" 109./configure $@