OSSP CVS Repository

ossp - ossp-pkg/iselect/configure.in 1.2
Not logged in
[Honeypot]  [Browse]  [Directory]  [Home]  [Login
[Reports]  [Search]  [Ticket]  [Timeline
  [Raw

ossp-pkg/iselect/configure.in 1.2
nl ##
dnl ##  configure.in -- GNU autoconf configuration spec
dnl ##  Copyright (c) Ralf S. Engelschall, <rse@engelschall.com>
dnl ##

AC_PREREQ(2.10)dnl
AC_REVISION($Revision: 1.2 $)
SHTOOL="./etc/shtool"
T_MD=`$SHTOOL echo -e %B 2>/dev/null`
T_ME=`$SHTOOL echo -e %b 2>/dev/null`
echo "${T_MD}Configuring for iSelect `./etc/shtool version -lc -dlong iselect_version.c`${T_ME}"
echo "Copyright (c) 1996-1999 Ralf S. Engelschall, All Rights Reserved."

AC_INIT(README)
AC_CONFIG_HEADER(config_ac.h)dnl
AC_PREFIX_DEFAULT(/usr/local)

AC_CONFIGURE_PART(CHECK: Build Environment)

AC_PROG_CC
AC_PROG_CPP

AC_MSG_CHECKING(for compilation debug mode)
AC_ARG_ENABLE(debug,dnl
[  --enable-debug          to enable the debugging options for compilation],
x="enabled"
CFLAGS="-Wall -g -ggdb3"
LDFLAGS="-g -ggdb3"
debug=on
,
x=disabled
CFLAGS="-O2"
LDFLAGS=""
debug=off
)dnl
AC_SUBST(debug)
AC_MSG_RESULT([$x])

AC_SET_MAKE
AC_SUBST(SHTOOL)

AC_CONFIGURE_PART(CHECK: Curses Environment)

AC_MSG_CHECKING(for additional include dir)
AC_ARG_WITH(incdir,dnl
[  --with-incdir=DIR       add DIR to the include path],
CFLAGS="$CFLAGS -I$with_incdir"
CPPFLAGS="$CPPFLAGS -I$with_incdir"
x="$with_incdir"
,
x="none particular"
)dnl
AC_MSG_RESULT([$x])
AC_MSG_CHECKING(for additional library dir)
AC_ARG_WITH(libdir,dnl
[  --with-libdir=DIR       add DIR to the library path],
LDFLAGS="$LDFLAGS -L$with_libdir"
x="$with_libdir"
,
x="none particular"
)dnl
AC_MSG_RESULT([$x])

AC_CHECK_HEADER(ncurses.h, HAVE_NCURSES_HEADER=YES, HAVE_NCURSES_HEADER=NO)
AC_CHECK_LIB(ncurses, initscr, HAVE_NCURSES_LIB=YES, HAVE_NCURSES_LIB=NO)
AC_CHECK_HEADER(slcurses.h, HAVE_SLCURSES_HEADER=YES, HAVE_SLCURSES_HEADER=NO)
OLIBS=$LIBS
LIBS="$LIBS -ltermcap"
AC_CHECK_LIB(slang, SLcurses_initscr, HAVE_SLCURSES_LIB=YES, HAVE_SLCURSES_LIB=NO)
LIBS=$OLIBS
if test ".$HAVE_NCURSES_HEADER.$HAVE_NCURSES_LIB." = .YES.YES.; then
    USE_NCURSES=YES
    AC_DEFINE(USE_NCURSES)
    LIBS="$LIBS -lncurses"
    AC_MSG_CHECKING([which Curses to use])
    AC_MSG_RESULT([GNU NCurses])
else
    if test ".$HAVE_SLCURSES_HEADER.$HAVE_SLCURSES_LIB." = .YES.YES.; then
        USE_SLCURSES=YES
        AC_DEFINE(USE_SLCURSES)
        LIBS="$LIBS -lslang -ltermcap"
        AC_MSG_CHECKING([which Curses to use])
        AC_MSG_RESULT([S-Lang Curses])
    else
        USE_CURSES=YES
        AC_DEFINE(USE_CURSES)
        LIBS="$LIBS -lcurses"
        AC_MSG_CHECKING([which Curses to use])
        AC_MSG_RESULT([Vendor Curses])
    fi
fi

AC_CONFIGURE_PART(CHECK: System Ingredients)
AC_CONST
AC_STDC_HEADERS
AC_HAVE_HEADERS(stdio.h stddef.h string.h strings.h stdlib.h)

AC_CONFIGURE_PART(RESULT: Sourcefile Substitution)
AC_OUTPUT(dnl
Makefile dnl
config_sc.h dnl
,dnl
)dnl

echo ""
echo "Now please type 'make' to compile. Good luck."
echo ""

dnl ##EOF##

CVSTrac 2.0.1