File: configure.in

package info (click to toggle)
curves 0.8.7
  • links: PTS
  • area: main
  • in suites: slink
  • size: 704 kB
  • ctags: 1,001
  • sloc: cpp: 6,197; ansic: 519; makefile: 270; sh: 192; fortran: 149
file content (90 lines) | stat: -rw-r--r-- 2,560 bytes parent folder | download
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
dnl Process this file with autoconf to produce a configure script.
AC_REVISION([$Id: configure.in,v 1.15 1998/07/27 05:42:34 elf Exp $])
AC_PREREQ(2.10)dnl              dnl Minimum Autoconf version required.
AC_INIT(curves.cxx)

AC_CONFIG_HEADER(config.h)

AC_LANG_CPLUSPLUS		dnl Default to c++ cause that what we done.

dnl Checks for programs.
AC_PROG_CC
AC_PROG_CXX
AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_PROG_INSTALL

CFLAGS=-g
CXXFLAGS=-g

if test "${GXX}" = "yes" ; then 
 CFLAGS_W=" -Wall -Wno-parentheses -Wno-unused" 
 CFLAGS="${CFLAGS}"
fi

dnl Checks for libraries.
dnl AC_CHECK_LIB(ncurses, initscr,, AC_MSG_ERROR("library ncurses is required"))
AC_CHECK_LIB(socket, socket)
dnl AC_CHECK_LIB(nsl, )

dnl Checks for alternative include directories
dnl if test -d /usr/include/ncurses ; then
dnl  CPPFLAGS="-I/usr/include/ncurses $CPPFLAGS"
dnl   CFLAGS="-I/usr/include/ncurses $CFLAGS"
dnl  CXXFLAGS="-I/usr/include/ncurses $CXXFLAGS"
dnl fi
dnl if test -d /usr/local/include/ncurses ; then
dnl  CPPFLAGS="-I/usr/local/include/ncurses $CPPFLAGS"
dnl   CFLAGS="-I/usr/local/include/ncurses $CFLAGS"
dnl   CXXFLAGS="-I/usr/local/include/ncurses $CXXFLAGS"
dnl fi

dnl Checks for header files.
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_CHECK_FUNCS(strncasecmp memcpy bcopy strcspn strncpy cfmakeraw)
AC_CHECK_FUNCS(vsnprintf vsprintf rindex strrchr)
dnl ncurses/curses.h ncurses.h curses.h
AC_CHECK_HEADERS(fcntl.h unistd.h gpm.h malloc.h string.h strings.h)

dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_C_INLINE
AC_TYPE_OFF_T
AC_TYPE_SIZE_T
AC_TYPE_UMODE_T
AC_STRUCT_TM
AC_STRUCT_TIMEZONE
AC_CHECK_SIZEOF(long, 4)			dnl -- Make sure to warn user
AC_CHECK_SIZEOF(int, 4)				dnl --   about these defaults.

dnl Checks for library functions.
AC_FUNC_MMAP
AC_FUNC_VPRINTF					dnl -- We use vsprintf
dnl AC_CHECK_FUNCS(mktime stime strftime)	dnl -- Include in the source

dnl -- Look for libgpm.a to be recent enough for our application.
dnl AC_CHECK_LIB(gpm, Gpm_Repeat,[
dnl 
dnl         GPMXTERM=""
dnl         LIBS="$LIBS -lgpm"],[
dnl 
dnl         GPMXTERM="gpm-xterm.o"
dnl         if test "`uname`" = Linux
dnl           then AC_MSG_WARN("libgpm.a is missing or older than 0.18")
dnl         fi
dnl         ])
dnl AC_SUBST(GPMXTERM)		dnl -- Extra object file that may be needed.

AC_SUBST(CFLAGS_W)
AC_OUTPUT(Makefile)

chmod -w Makefile
chmod -w config.h

dnl -- Create empty dependency file so that Make can include it
if test ! -f depend.m ; then touch depend.m ; fi

echo
echo "Run 'make' to build the application."
echo