File: configure.in

package info (click to toggle)
iselect 1.2.0-12
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 444 kB
  • ctags: 213
  • sloc: ansic: 2,074; sh: 1,192; perl: 485; makefile: 154
file content (109 lines) | stat: -rw-r--r-- 2,804 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
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.12$)
SHTOOL="./etc/shtool"
T_MD=`$SHTOOL becho -b 2>/dev/null`
T_ME=`$SHTOOL becho -e 2>/dev/null`
echo "${T_MD}Configuring for iSelect `./etc/shtool newvers -l c -d long 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##