File: configure.in

package info (click to toggle)
libcdk5 5.0.20050424-2
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 2,504 kB
  • ctags: 2,620
  • sloc: ansic: 29,645; sh: 4,283; makefile: 634; cpp: 42; sed: 40
file content (136 lines) | stat: -rw-r--r-- 2,206 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
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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
dnl
dnl Process this file with autoconf to produce a configure script.
dnl
AC_INIT(include/cdk.h)
AC_CONFIG_HEADER(include/cdk_config.h:include/config.hin)

CF_CHECK_CACHE
CF_VERSION_INFO(cdk)

dnl
dnl Checks for programs.
dnl
AC_PROG_CC
AC_PROG_CPP
AC_PROG_GCC_TRADITIONAL
AC_PROG_RANLIB 
AC_PROG_INSTALL

dnl needed for CF_WITH_LIBTOOL
AC_CHECK_TOOL(AR, ar, ar)

AC_PROG_MAKE_SET
CF_MAKEFLAGS
CF_MAKE_TAGS

CF_ANSI_CC_REQD
AC_C_CONST
CF_XOPEN_SOURCE

CF_DISABLE_ECHO
CF_PROG_EXT
CF_LIB_PREFIX

CF_WITH_CURSES_DIR
CF_WITH_WARNINGS
CF_WITH_LIBTOOL
if test "$with_libtool" = "yes" ; then
	OBJEXT="lo"
fi

dnl
dnl Checks for libraries.
dnl

CF_WITH_DBMALLOC
CF_WITH_DMALLOC

dnl
dnl Checks for header files.
dnl
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_CHECK_HEADERS(\
limits.h \
unistd.h \
)

dnl
dnl Checks for typedefs, structures, and compiler characteristics.
dnl
AC_TYPE_MODE_T
AC_STRUCT_TM
CF_CURSES_CHTYPE
CF_GETOPT_HEADER

dnl
dnl Checks for library functions.
dnl
AC_CHECK_FUNCS(\
getcwd \
mktime \
strdup \
strerror \
)

CF_FUNC_LSTAT
CF_LOCALE([AC_DEFINE(HAVE_SETLOCALE)])

dnl Check for curses libraries last, since XCurses has dependencies which
dnl break the checks for other functions.
use_library=curses
AC_ARG_WITH(ncurses,
	[  --with-ncurses          compile/link with ncurses library],
	[use_library=ncurses],[
AC_ARG_WITH(ncursesw,
	[  --with-ncursesw         compile/line with wide-character ncurses],
	[use_library=ncursesw],[
AC_ARG_WITH(pdcurses,
	[  --with-pdcurses         compile/link with pdcurses X11 library],
	[use_library=pdcurses])])])

LIB_ROOTNAME=cdk
case $use_library in #(vi
ncurses) #(vi
	CF_NCURSES_CPPFLAGS
	CF_NCURSES_LIBS
	;;
ncursesw)
	CF_UTF8_LIB
	CF_NCURSES_CPPFLAGS(ncursesw)
	CF_NCURSES_LIBS(ncursesw)
	LIB_ROOTNAME=cdkw
	;;
pdcurses) #(vi
	CF_PDCURSES_X11
	LIB_ROOTNAME=cdkX
	;;
*)
	CF_CURSES_CPPFLAGS
	CF_NCURSES_VERSION
	CF_CURSES_LIBS
	;;
esac
AC_SUBST(LIB_ROOTNAME)

CF_CURSES_FUNCS(\
	Xinitscr\
	getbegx \
	getbegy \
	getmaxx \
	getmaxy \
	start_color \
	\
)

CF_CURSES_SETBEGYX

dnl
dnl Set pre-processor compile time variables.
dnl
AC_OUTPUT(
	include/cdk_version.h:include/cdk_version.hin
	Makefile
	cli/Makefile
	examples/Makefile
	demos/Makefile,,,sort)