"Fossies" - the Fresh Open Source Software Archive

Member "bc-1.06.95/configure.in" (14 Jun 2006, 3741 Bytes) of package /linux/misc/old/bc-1.06.95.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "configure.in": 20131209_vs_1.06.95.

    1 dnl Process this file with autoconf to produce a configure script.
    2 
    3 dnl Copyright (C) 2006 Free Software Foundation, Inc.
    4 dnl
    5 dnl This program is free software; you can redistribute it and/or modify
    6 dnl it under the terms of the GNU General Public License as published by
    7 dnl the Free Software Foundation; either version 2, or (at your option)
    8 dnl any later version.
    9 dnl
   10 dnl This program is distributed in the hope that it will be useful,
   11 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
   12 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   13 dnl GNU General Public License for more details.
   14 dnl
   15 dnl You should have received a copy of the GNU General Public License
   16 dnl along with this program; if not, write to the Free Software Foundation,
   17 dnl Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
   18 
   19 m4_define([bc_version], 1.06.95)
   20 m4_define([dc_version], 1.3.95)
   21 
   22 AC_INIT(bc, bc_version)
   23 AC_CONFIG_SRCDIR(doc/bc.1)
   24 AM_INIT_AUTOMAKE([dist-bzip2])
   25 AM_CONFIG_HEADER(config.h)
   26 
   27 AC_DEFINE([DC_VERSION], "dc_version",
   28 	  [Define the dc version number.])
   29 
   30 AC_DEFINE([BC_COPYRIGHT],
   31 	  ["Copyright 1991-1994, 1997, 1998, 2000, 2004, 2006 Free Software Foundation, Inc."],
   32 	  [Define the bc copyright line.])
   33 
   34 AC_DEFINE([DC_COPYRIGHT], 
   35           ["Copyright 1994, 1997, 1998, 2000, 2001, 2004, 2005, 2006 Free Software Foundation, Inc."],
   36 	  [Define the dc copyright line.])
   37 
   38 AC_PROG_CC
   39 AC_MINIX
   40 
   41 AM_PROG_LEX
   42 AC_PROG_YACC
   43 AC_PROG_INSTALL
   44 AC_PROG_RANLIB
   45 AC_PROG_MAKE_SET
   46 
   47 AC_CHECK_HEADERS(stdarg.h stddef.h stdlib.h string.h errno.h limits.h unistd.h lib.h)
   48 AC_C_CONST
   49 AC_TYPE_SIZE_T
   50 AC_CHECK_TYPE(ptrdiff_t, size_t)
   51 
   52 AC_FUNC_VPRINTF
   53 AC_CHECK_FUNCS(isgraph setvbuf fstat strtol)
   54 
   55 AC_ARG_WITH(pkg,
   56    AC_HELP_STRING([--with-pkg],
   57       [use software installed in /usr/pkg tree]),
   58    [case $withval in no) ;;
   59       *) CPPFLAGS="$CPPFLAGS -I/usr/pkg/include"
   60 	 LDFLAGS="$LDFLAGS -L/usr/pkg/lib"
   61 	 echo Using /usr/pkg/include and /usr/pkg/lib ;;
   62     esac])
   63 
   64 bcle=n
   65 AC_ARG_WITH(libedit,
   66    AC_HELP_STRING([--with-libedit],
   67       [support fancy BSD command input editing]),
   68    [case $withval in no) ;;
   69       *) LDSAVE=$LDFLAGS
   70 	 AC_CHECK_LIB(termcap,tgetent,TERMLIB=-ltermcap)
   71 	 LDFLAGS="$LDFLAGS $TERMLIB"
   72 	 AC_CHECK_LIB(edit,el_gets,
   73 	    [AC_CHECK_HEADER(histedit.h,
   74 	     READLINELIB="-ledit $TERMLIB";bcle=y)],
   75 	    READLINELIB="")
   76 	 case $bcle in
   77 	   y) AC_DEFINE(LIBEDIT,1, [Define if libedit is used])
   78 	      echo Using the libedit library. ;;
   79 	 esac
   80 	 LDFLAGS=$LDSAVE
   81 	 ;;
   82     esac])
   83  
   84 bcrl=n
   85 AC_ARG_WITH(readline,
   86    AC_HELP_STRING([--with-readline],
   87       [support fancy command input editing]),
   88    [case $withval in no) ;;
   89       *) LDSAVE=$LDFLAGS
   90 	 AC_CHECK_LIB(ncurses,tparm,TERMLIB=-lncurses,
   91 	    AC_CHECK_LIB(termcap,tgetent,TERMLIB=-ltermcap))
   92 	 LDFLAGS="$LDFLAGS $TERMLIB"
   93 	 AC_CHECK_LIB(readline,readline,
   94 	    [AC_CHECK_HEADER(readline/readline.h,
   95 	     READLINELIB="-lreadline $TERMLIB";bcrl=y)],
   96 	    READLINELIB="")
   97 	 case $bcrl in
   98 	   y) AC_DEFINE(READLINE,1, [Define if readline is used])
   99 	      echo Using the readline library. ;;
  100 	 esac
  101 	 LDFLAGS=$LDSAVE
  102 	 ;;
  103     esac])
  104 
  105 case $bcle-$bcrl-$LEX in
  106    y-y-*)
  107 	AC_MSG_ERROR(Can not use both readline and libedit.  Aborting.) ;;
  108    ?-?-flex)
  109 	LEX="flex -I -8"
  110 	case $bcrl in
  111 	  n) AC_MSG_WARN(readline works only with flex.) ;;
  112 	esac ;;
  113 esac
  114 
  115 case $LEX-`uname -s` in
  116   lex-SunOS) LEXLIB=""; echo "SunOS using lex does not have a -ll." ;;
  117 esac
  118 
  119 case $GCC in
  120   yes) CFLAGS="$CFLAGS -Wall -funsigned-char"
  121        echo "Adding GCC specific compile flags." ;;
  122 esac
  123 
  124 AC_SUBST(READLINELIB)
  125 AC_SUBST(BC_VERSION, bc_version)
  126 AC_SUBST(DC_VERSION, dc_version)
  127 AC_OUTPUT(Makefile bc/Makefile dc/Makefile doc/Makefile doc/texi-ver.incl lib/Makefile)