File: configure.in.new

package info (click to toggle)
jwm 1.5-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 1,212 kB
  • ctags: 1,758
  • sloc: ansic: 14,975; sh: 2,704; makefile: 183
file content (210 lines) | stat: -rw-r--r-- 5,714 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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ(2.57)
AC_INIT(jwm, 1.4p1, joewing@joewing.net)
AC_CONFIG_SRCDIR([src])
AC_CONFIG_HEADER([config.h])

# Checks for libraries.

AC_PATH_X

CFLAGS="-O2 $CFLAGS -ansi"

if test ! "$no_x" = "yes" ; then
	if test ! x"$x_libraries" = x ; then
		LDFLAGS="$LDFLAGS -L$x_libraries"
	fi
	if test ! x"$x_includes" = x ; then
		CFLAGS="$CFLAGS -I$x_includes"
	fi
else
	AC_MSG_ERROR([Could not find X11])
fi

AC_MSG_CHECKING([if _XOPEN_SOURCE should be defined])
AC_TRY_COMPILE([
#define _XOPEN_SOURCE 600L
#include <unistd.h>
], , use_xopen_source="yes", use_xopen_source="no")
AC_MSG_RESULT($use_xopen_source)

if test $use_xopen_source = "yes"; then

  AC_DEFINE(_XOPEN_SOURCE, 600L, [Define for single UNIX conformance])

  # Needed for IRIX 6.2 so that struct timeval is declared.
  AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1, [Define for timeval on IRIX 6.2])

  # Needed for Solaris 2.5.1 so that struct timeval is declared.
  AC_DEFINE(__EXTENSIONS__, 1, [Define for timeval on Solaris 2.5.1])

fi

AC_CHECK_LIB([X11], XOpenDisplay,
	[ LDFLAGS="$LDFLAGS -lX11" ],
	[ AC_MSG_ERROR([libX11 not found]) ])

AC_CHECK_HEADERS([stdarg.h stdio.h stdlib.h ctype.h signal.h unistd.h \
	time.h sys/wait.h sys/time.h], [],
	[ AC_MSG_ERROR([one or more necessary header files not found]) ])

AC_CHECK_HEADERS([X11/Xlib.h], [],
	[ AC_MSG_ERROR([Xlib.h could not be found]) ])

AC_CHECK_HEADERS([X11/Xutil.h X11/cursorfont.h X11/Xproto.h \
	X11/Xatom.h X11/keysym.h], [],
	[ AC_MSG_ERROR([one or more necessary header files not found]) ],
	[
		#include <X11/Xlib.h>
	])

NEED_XEXT="false"

# Confirm dialogs
AC_ARG_ENABLE(confirm,
	AC_HELP_STRING([--disable-confirm], [don't enable confirm dialogs]) )
if test "$enable_confirm" = "no"; then
	AC_DEFINE(DISABLE_CONFIRM, 1, [Define to disable confirm dialogs])
fi

# Icon suport
AC_ARG_ENABLE(icons,
	AC_HELP_STRING([--disable-icons], [don't enable icon support]) )
if test "$enable_icons" != "no"; then
	AC_DEFINE(USE_ICONS, 1, [Define to enable icon support] )
fi

# PNG
AC_ARG_ENABLE(png,
	AC_HELP_STRING([--disable-png], [don't support PNG images]) )
if test "$enable_png" != "no"; then
	AC_CHECK_HEADERS([png.h], [],
		[
			enable_png="no";
			AC_MSG_WARN([unable to use png.h, PNG support disabled])
		])
fi
if test "$enable_png" != "no"; then
	AC_CHECK_LIB(png, png_read_image,
		[ LDFLAGS="$LDFLAGS -lpng"
		  AC_DEFINE(USE_PNG, 1, [Define to use libpng]) ],
		[ AC_MSG_WARN([unable to use libpng, PNG support disabled]) ])
fi

# Xpm
AC_ARG_ENABLE(xpm,
	AC_HELP_STRING([--disable-xpm], [don't support XPM images]) )
if test "$enable_xpm" != "no"; then
	AC_CHECK_HEADERS([X11/xpm.h], [],
		[
			enable_xpm="no";
			AC_MSG_WARN([unable to use X11/xpm.h, disabling XPM support])
		])
fi
if test "$enable_xpm" != "no"; then
	AC_CHECK_LIB(Xpm, XpmReadFileToImage,
		[ LDFLAGS="$LDFLAGS -lXpm"
		  AC_DEFINE(USE_XPM, 1, [Define to enable XPM support]) ],
		[ AC_MSG_WARN([unable to use libXpm, disabling XPM support]) ])
fi

# Shape extension
AC_ARG_ENABLE(shape,
	AC_HELP_STRING([--disable-shape], [don't use the X shape extension]) )
if test "$enable_shape" != "no"; then
	AC_CHECK_LIB(Xext, XShapeCombineRectangles,
		[ NEED_XEXT="true"
		  AC_DEFINE(USE_SHAPE, 1, [Define to enable the X shape extension]) ],
		[ AC_MSG_WARN([unable to use the X shape extension]) ])
fi

# Xinerama
AC_ARG_ENABLE(xinerama,
	AC_HELP_STRING([--disable-xinerama], [don't use Xinerama]) )
if test "$enable_xinerama" != "no"; then
	AC_CHECK_LIB(Xinerama, XineramaQueryExtension,
		[ LDFLAGS="$LDFLAGS -lXinerama"
		  AC_DEFINE(USE_XINERAMA, 1, [Define to enable Xinerama]) ],
		[ AC_MSG_WARN([unable to use Xinerama]) ])
fi

# Xft
AC_ARG_ENABLE(xft,
	AC_HELP_STRING([--disable-xft], [don't use Xft]) )
if test "$enable_xft" != "no"; then
	AC_CHECK_LIB(Xft, XftFontOpenName,
		[ LDFLAGS="$LDFLAGS $(xft-config --libs)"
		  CFLAGS="$CFLAGS $(xft-config --cflags)"
		  AC_DEFINE(USE_XFT, 1, [Define to enable Xft]) ],
		[ AC_MSG_WARN([unable to use Xft]) ])
fi

# XRender
AC_ARG_ENABLE(xrender,
	AC_HELP_STRING([--disable-xrender], [don't use the XRender extension]) )
if test "$enable_xrender" != "no"; then
	AC_CHECK_LIB(Xext, XRenderComposite,
		[ NEED_XEXT="true"
		  AC_DEFINE(USE_XRENDER, 1, [Define to enable the XRender extension]) ],
		[ AC_MSG_WARN([unable to use the XRender extension]) ])
fi

# See if libXext is needed.
if test "$NEED_XEXT" == "true"; then
	LDFLAGS="$LDFLAGS -lXext"
fi

# Debug
AC_ARG_ENABLE(debug,
	AC_HELP_STRING([--enable-debug], [use this to debug JWM]) )
if test "$enable_debug" = "yes"; then
	AC_DEFINE(DEBUG, 1, [Define to debug JWM])
	CFLAGS="$CFLAGS -Wall -g -DDEBUG"
	LDFLAGS="$LDFLAGS -g"
fi

if test "$prefix" = "NONE" ; then
	PREFIX="$ac_default_prefix"
	prefix="$ac_default_prefix"
else
	PREFIX="$prefix"
fi

if test "$exec_prefix" = "NONE" ; then
	exec_prefix="$PREFIX"
fi

if test "$sysconfdir" = "" ; then
	sysconfdir="$ac_default_sysconfdir"
fi

BINDIR=`eval echo \""$bindir"\"`
SYSCONF=`eval echo \"$sysconfdir\"`
MANDIR=`eval echo \"$mandir\"`

AC_DEFINE_UNQUOTED(SYSTEM_CONFIG, "$SYSCONF/system.jwmrc",
	[default system configuration path])

AC_SUBST(CFLAGS)
AC_SUBST(LDFLAGS)
AC_SUBST(VERSION, "$PACKAGE_VERSION")
AC_SUBST(INSTVERSION, `echo $PACKAGE_VERSION | tr -d .`)
AC_SUBST(BINDIR)
AC_SUBST(MANDIR)
AC_SUBST(DATE, `date "+%Y-%m-%d"`)
AC_SUBST(SYSCONF, "$SYSCONF")

AC_OUTPUT(

	Makefile src/Makefile jwm.1

	package/irix/jwm.spec package/irix/jwm.idb package/irix/Makefile

	package/solaris/Makefile package/solaris/pkginfo package/solaris/prototype

	package/slackware/Makefile package/slackware/slack-desc

)