Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Thursday, January 20, 2022

File: [Platon] / ep / configure.in (download)

Revision 1.13, Sun Oct 13 13:35:29 2002 UTC (19 years, 3 months ago) by nepto

Changes since 1.12: +14 -2 lines

Changes to make ep compile against libcfg+ shared library.
All occurences of tag $Id changed to $Platon.

dnl $Platon: configure.in,v 1.12 2002/10/03 15:22:10 rajo Exp $

dnl Process this file with autoconf to produce a configure script.
AC_INIT(src/main.c)

PACKAGE="ep"
VERSION="1.0pre3"

AC_SUBST(PACKAGE)
AC_SUBST(VERSION)

# AC_CONFIG_HEADER {{{
AC_CONFIG_HEADER(config.h)
# }}} AC_CONFIG_HEADER

dnl Checks for programs.
# Checks for programs. {{{
AC_PROG_CC

# We don't need C++ compiler test now
# Nepto [30/5/2002]
#AC_PROG_CXX
#AC_PROG_CPP

AC_GCC_TRADITIONAL
#if test "X$CC" = "Xgcc"; then
#    CFLAGS="-Wall $CFLAGS"
#fi
AC_PROG_AWK
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_PROG_RANLIB
AC_CHECK_PROG(STRIP, strip, strip, :)
# }}} Checks for programs.

dnl Checks for library functions.
# Checks for library functions. {{{
AC_TYPE_SIGNAL
AC_FUNC_VPRINTF
AC_HAVE_FUNCS(select strstr)
# }}} Checks for library functions.

dnl Checks for libraries.
# Checks for libraries. {{{
dnl Replace `main' with a function in -lncurses:
dnl AC_CHECK_LIB(ncurses, main)
AC_CHECK_LIB(cfg+, cfg_get_context, [], AC_ERROR(libcfg+ library not found
============================================================

  extended pipelining (ep) needs libcfg+ library to run.
  libcfg+ is command line and config file parsing library.
  You can get libcfg+ sources and binary packages from

           http://platon.sk/projects/libcfg+/

============================================================))
# }}} Checks for libraries.

dnl Checks for header files.
# Checks for header files. {{{
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS(ctype.h errno.h float.h limits.h malloc.h \
                 math.h ncurses.h stdarg.h stdio.h stdlib.h \
                 string.h strings.h sys/time.h unistd.h)
AC_CHECK_HEADERS(platon/cfg+.h, [], AC_ERROR(libcfg+ library installed, but header file not found))
# }}} Checks for header files.

dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST

dnl Checks for library functions.
# Checks for library functions. {{{
AC_CHECK_FUNCS(select strstr)
# }}} Checks for library functions.

dnl User defined features.
# User defined features. {{{

MODULES=""
MODULES_FLAGS=""
MODULES_LIBS=""
MODULES_SRC=""
MODULES_HDR=""
MODULES_OBJ=""
MODULES_DEP=""

AC_MSG_CHECKING(--enable-debug argument)
AC_ARG_ENABLE(debug,
    [  --enable-debug=N        Turn on debuging.],
    debug="${enableval}"; DEBUG_FLAGS="-g -ggdb -DDEBUG=$debug";
        AC_MSG_RESULT(${enableval}) ;,
    debug="no"; AC_MSG_RESULT(no))
if test "$debug" = "yes"; then
    dnl Commented by Nepto [27/5/2002]
    dnl DEBUG_FLAGS="-Wshadow -g -ggdb -DDEBUG=1"
    DEBUG_FLAGS="-g -ggdb -DDEBUG=1"
fi
AC_SUBST(DEBUG_FLAGS)

AC_MSG_CHECKING(--enable-menu argument)
AC_ARG_ENABLE(menu,
    [  --enable-menu=N         Turn on user's menu.],
        menu="${enableval}";
        AC_MSG_RESULT(${enableval}) ;
        if test "x$menu" = "xyes"; then
            AC_CHECK_LIB(ncurses, main)

            MODULES="$MODULES MENU";
            MODULES_FLAGS="$MODULES_FLAGS -DMENU=1";
            # here don't add '-lncurses' library to the 'MODULES_LIBS',
            # because AC_CHECK_LIB(ncurses, main) add '-lncurses' to the 'LIBS'
            #MODULES_LIBS="$MODULES_LIBS -lncurses";
            MODULES_SRC="$MODULES_SRC \$(MODUL_MENU_SRC)";
            MODULES_HDR="$MODULES_HDR \$(MODUL_MENU_HDR)";
            MODULES_OBJ="$MODULES_OBJ \$(MODUL_MENU_OBJ)";
            MODULES_DEP="$MODULES_DEP \$(MODUL_MENU_DEP)";
            MODUL_MENU_DEFS="-DSELFTEST";
            MODUL_MENU_LIBS="-lncurses";
        fi
        ,
        menu="no"; AC_MSG_RESULT(no)
)
#if test "x$menu" = "xyes"; then
#    DEBUG_FLAGS="-g -ggdb -DDEBUG=1"
#fi
AC_SUBST(DEBUG_FLAGS)

AC_SUBST(MODULES)
AC_SUBST(MODULES_FLAGS)
AC_SUBST(MODULES_LIBS)
AC_SUBST(MODULES_SRC)
AC_SUBST(MODULES_HDR)
AC_SUBST(MODULES_OBJ)
AC_SUBST(MODULES_DEP)
 
# }}} User defined features.


AC_OUTPUT(config.h Makefile src/Makefile doc/Makefile)

# vim600: fdm=marker fdc=3


Platon Group <platon@platon.org> http://platon.org/
Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top