File: configure.in

package info (click to toggle)
kic 2.4a-2
  • links: PTS
  • area: non-free
  • in suites: bookworm, bullseye, buster, sid, stretch
  • size: 1,968 kB
  • ctags: 2,912
  • sloc: ansic: 37,413; makefile: 444; lisp: 109; sh: 21
file content (121 lines) | stat: -rw-r--r-- 2,949 bytes parent folder | download | duplicates (2)
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
110
111
112
113
114
115
116
117
118
119
120
121
dnl Configure input script for kic
dnl Process this file with autoconf to produce a configure script.
dnl Copyright (C) Whiteley Research Inc, 2002
dnl $Id$

dnl *** Initialize
AC_INIT(src/bin/kicmain.c)
VERSION="2.4a"
DATE=`/bin/date`
AC_SUBST(prefix)
AC_SUBST(VERSION)
AC_SUBST(DATE)

dnl *** Check build environment
AC_PROG_CC
dnl text for MS Windows environmnet
AC_CYGWIN
AC_MINGW32
if test x$MINGW32 = x"yes"; then
    NTSUFFIX=".exe"
    FILTER="|sed -e s/
//"
    RESOURCE="kicrc.o"
    NOCONS="-mwindows"
    INSTALL_USER="-o Administrator -g Everyone"
elif test x$CYGWIN = x"yes"; then
    NTSUFFIX=".exe"
    INSTALL_USER="-o Administrator -g Everyone"
fi
AC_SUBST(NTSUFFIX)
AC_SUBST(FILTER)
AC_SUBST(RESOURCE)
AC_SUBST(NOCONS)
AC_PROG_MAKE_SET
AC_PROG_RANLIB
if test -f /bin/arch; then
    if test "`/bin/arch`" = "sun4"; then
        SUN4=yes
    fi
fi
if test "$GCC" = yes; then
    DEPEND_PROG="gcc -MM"
    if test x$SUN4 = x"yes"; then
        dnl Solaris 8 with gcc: the ctype macros use arrays, which
        dnl cause "char subscript" warnings, so these are turned off.
        dnl The __EXTENSIONS__ macro is needed to make certain function
        dnl prototypes visible
        SUN4FLAGS="-Wno-implicit -Wno-char-subscripts -D__EXTENSIONS__"
        CFLAGS="-O -Wall $SUN4FLAGS"
    else
        CFLAGS="-O -Wall"
        CFLAGSG="-O -g -Wall"
    fi
else
    DEPEND_PROG="cc -M"
    CFLAGS="-O"
fi
if test -x /usr/ucb/install; then
    INSTALL="/usr/ucb/install"
else
    INSTALL="install"
fi
if test x"$INSTALL_USER" = x; then
    if test "`uname`" = Linux; then
        INSTALL_USER="-o root -g root"
    else
        INSTALL_USER="-o root -g bin"
    fi
fi
AC_SUBST(CFLAGS)
AC_SUBST(DEPEND_PROG)
AC_SUBST(INSTALL)
AC_SUBST(INSTALL_USER)
if test x$MINGW32 != x"yes"; then
    MFB="../xmfb.a"
fi
AC_SUBST(MFB)

dnl *** Checks for header files
AC_HEADER_STDC
AC_EGREP_HEADER(sys_errlist, stdio.h, AC_DEFINE(SYS_ERRLIST_DEF))

dnl *** Checks for typedefs, structures, and compiler characteristics
AC_C_CONST
AC_HEADER_TIME
AC_STRUCT_TM

dnl *** Check for needed libraries
dnl reverse order of link, order is important
AC_CHECK_LIB(m, main)
AC_PATH_XTRA

if test x$MINGW32 = x"yes"; then
    LIBS="-lgdi32 -lwinspool -lcomdlg32 -lole32 -loleaut32 -luuid \
 -lodbc32 -lversion -lcomctl32 -lwsock32 -lws2_32 $LIBS"
else
    LIBS="-lX11 -lXmu -lXext $LIBS"
    if test -n "$ac_x_libraries"; then
        LIBS="-L$ac_x_libraries $LIBS"
    fi
fi

CFLAGS="$CFLAGS -DUSE_OLD_MALLOC"
AC_CHECK_HEADER(sys/ioctl.h, CFLAGS="$CFLAGS -DHAVE_SYS_IOCTL_H")
AC_CHECK_FUNC(strlwr,  CFLAGS="$CFLAGS -DHAVE_STRLWR")
AC_CHECK_FUNC(stricmp,  CFLAGS="$CFLAGS -DHAVE_STRICMP")

dnl *** Perform subsitutions and create headers
if test x$MINGW32 != x"yes"; then
    xmfb="src/xmfb/Makefile"
fi
AC_OUTPUT(
    src/bin/Makefile
    src/cd/Makefile
    src/convert/Makefile
    src/ginterf/Makefile
    src/help/Makefile
    src/kic/Makefile
    $xmfb
)