1#!/bin/sh 2# FILE: autogen.sh 3# $Id: 523038b56c206ed35b28e241c04a24cf243d2d65 $ 4# --- 5# tclreadline -- gnu readline for tcl 6# https://github.com/flightaware/tclreadline/ 7# Copyright (c) 1998 - 2014, Johannes Zellner <johannes@zellner.org> 8# This software is copyright under the BSD license. 9# --- 10 11srcdir=`dirname $0` 12test -z "$srcdir" && srcdir=. 13 14ORIGDIR=`pwd` 15cd $srcdir 16PROJECT=tclreadline 17TEST_TYPE=-f 18FILE=tclreadline.c 19 20DIE=0 21 22# optionally feature libtoolize 23(libtoolize --version) < /dev/null > /dev/null 2>&1 && libtoolize --install 24 25(autoconf --version) < /dev/null > /dev/null 2>&1 || { 26 echo 27 echo "You must have autoconf installed to compile $PROJECT." 28 echo "Download the appropriate package for your distribution," 29 echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/" 30 DIE=1 31} 32 33(automake --version) < /dev/null > /dev/null 2>&1 || { 34 echo 35 echo "You must have automake installed to compile $PROJECT." 36 echo "Get ftp://sourceware.cygnus.com/pub/automake/automake-1.4.tar.gz" 37 echo "(or a newer version if it is available)" 38 DIE=1 39} 40 41if test "$DIE" -eq 1; then 42 exit 1 43fi 44 45test $TEST_TYPE $FILE || { 46 echo "You must run this script in the top-level $PROJECT directory" 47 exit 1 48} 49 50case $CC in 51 *xlc | *xlc\ * | *lcc | *lcc\ *) 52 am_opt=--include-deps 53 ;; 54esac 55 56aclocal $ACLOCAL_FLAGS 57 58# optionally feature autoheader 59(autoheader --version) < /dev/null > /dev/null 2>&1 && autoheader 60 61automake -a $am_opt 62autoconf 63cd $ORIGDIR 64 65if test -z "$NOCONFIGURE"; then 66 if test -z "$*"; then 67 echo "I am going to run ./configure with no arguments - if you wish " 68 echo "to pass any to it, please specify them on the $0 command line." 69 fi 70 71 $srcdir/configure --enable-maintainer-mode "$@" 72fi 73 74