configure.ac revision bb2e14f3
1
2dnl  Copyright 2005 Red Hat, Inc.
3dnl 
4dnl  Permission to use, copy, modify, distribute, and sell this software and its
5dnl  documentation for any purpose is hereby granted without fee, provided that
6dnl  the above copyright notice appear in all copies and that both that
7dnl  copyright notice and this permission notice appear in supporting
8dnl  documentation, and that the name of Red Hat not be used in
9dnl  advertising or publicity pertaining to distribution of the software without
10dnl  specific, written prior permission.  Red Hat makes no
11dnl  representations about the suitability of this software for any purpose.  It
12dnl  is provided "as is" without express or implied warranty.
13dnl 
14dnl  RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
15dnl  INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
16dnl  EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
17dnl  CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
18dnl  DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
19dnl  TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
20dnl  PERFORMANCE OF THIS SOFTWARE.
21dnl
22dnl Process this file with autoconf to create configure.
23
24AC_PREREQ([2.57])
25AC_INIT(imake, [1.0.2], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg])
26AM_INIT_AUTOMAKE([foreign dist-bzip2])
27AM_MAINTAINER_MODE
28
29AM_CONFIG_HEADER(config.h)
30
31AC_PROG_CC
32AC_PROG_INSTALL
33
34AC_PROG_CPP
35AC_PATH_PROG(SED, sed)
36XORG_PROG_RAWCPP
37CPP_PROGRAM=${RAWCPP}
38AC_SUBST(CPP_PROGRAM)
39
40AC_CHECK_PROG(HAS_PERL, perl, yes)
41AM_CONDITIONAL([HAS_PERL], [test "x$HAS_PERL" = xyes])
42
43m4_ifdef([AS_HELP_STRING], , [m4_define([AS_HELP_STRING], m4_defn([AC_HELP_STRING]))])
44
45DEFAULT_XCONFDIR="${libdir}/X11/config"
46AC_ARG_WITH(config-dir,
47	AS_HELP_STRING([--with-config-dir=<path>], [Path to config dir (default: ${libdir}/X11/config)]),
48	[XCONFDIR="$withval"],
49	[XCONFDIR="$DEFAULT_XCONFDIR"])
50AC_SUBST(XCONFDIR)
51
52DEFAULT_PREPROCESSCMD_MKDEPEND="gcc -E"
53AC_ARG_WITH(script-preproc-cmd,
54	AS_HELP_STRING([--with-script-preproc-cmd=CMD], [Preprocessor command to run on scripts (default: "gcc -E")]),
55	[PREPROCESSCMD_MKDEPEND="$withval"],
56	[PREPROCESSCMD_MKDEPEND="$DEFAULT_PREPROCESSCMD_MKDEPEND"])
57AC_SUBST(PREPROCESSCMD_MKDEPEND)
58
59DEFAULT_ARCMD="ar clq"
60AC_ARG_WITH(create-lib-cmd,
61	AS_HELP_STRING([--with-create-lib-cmd=CMD], [Command to create libraries (default: "ar clq")]),
62	[ARCMD="$withval"],
63	[ARCMD="$DEFAULT_ARCMD"])
64AC_SUBST(ARCMD)
65
66DEFAULT_RANLIB="ranlib"
67AC_ARG_WITH(clean-lib-cmd,
68	AS_HELP_STRING([--with-clean-lib-cmd=CMD], [Command to clean up libraries (default: "ranlib")]),
69	[RANLIB="$withval"],
70	[RANLIB="$DEFAULT_RANLIB"])
71AC_SUBST(RANLIB)
72
73AC_ARG_ENABLE(revpath,
74	AS_HELP_STRING([--disable-revpath], [Build revpath (default: enabled)]),
75	[BUILD_REVPATH="$enableval"],
76	[BUILD_REVPATH=yes])
77AM_CONDITIONAL([BUILD_REVPATH], [test "x$BUILD_REVPATH" = xyes])
78
79AC_ARG_ENABLE(makeg,
80	AS_HELP_STRING([--disable-makeg], [Build makeg (default: enabled)]),
81	[BUILD_MAKEG="$enableval"],
82	[BUILD_MAKEG=yes])
83AM_CONDITIONAL([BUILD_MAKEG], [test "x$BUILD_MAKEG" = xyes])
84
85AC_ARG_ENABLE(xmkmf,
86	AS_HELP_STRING([--disable-xmkmf], [Build xmkmf (default: enabled)]),
87	[BUILD_XMKMF="$enableval"],
88	[BUILD_XMKMF=yes])
89AM_CONDITIONAL([BUILD_XMKMF], [test "x$BUILD_XMKMF" = xyes])
90
91AC_ARG_ENABLE(ccmakedep,
92	AS_HELP_STRING([--disable-ccmakedep], [Build ccmakedep (default: enabled)]),
93	[BUILD_CCMAKEDEP="$enableval"],
94	[BUILD_CCMAKEDEP=yes])
95AM_CONDITIONAL([BUILD_CCMAKEDEP], [test "x$BUILD_CCMAKEDEP" = xyes])
96
97AC_ARG_ENABLE(mergelib,
98	AS_HELP_STRING([--disable-mergelib], [Build mergelib (default: enabled)]),
99	[BUILD_MERGELIB="$enableval"],
100	[BUILD_MERGELIB=yes])
101AM_CONDITIONAL([BUILD_MERGELIB], [test "x$BUILD_MERGELIB" = xyes])
102
103AC_ARG_ENABLE(mkdirhier,
104	AS_HELP_STRING([--disable-mkdirhier], [Build mkdirhier (default: enabled)]),
105	[BUILD_MKDIRHIER="$enableval"],
106	[BUILD_MKDIRHIER=yes])
107AM_CONDITIONAL([BUILD_MKDIRHIER], [test "x$BUILD_MKDIRHIER" = xyes])
108
109AC_ARG_ENABLE(cleanlinks,
110	AS_HELP_STRING([--disable-cleanlinks], [Build cleanlinks (default: enabled)]),
111	[BUILD_CLEANLINKS="$enableval"],
112	[BUILD_CLEANLINKS=yes])
113AM_CONDITIONAL([BUILD_CLEANLINKS], [test "x$BUILD_CLEANLINKS" = xyes])
114
115AC_ARG_ENABLE(mkhtmlindex,
116	AS_HELP_STRING([--disable-mkhtmlindex], [Build mkhtmlindex (default: enabled)]),
117	[BUILD_MKHTMLINDEX="$enableval"],
118	[BUILD_MKHTMLINDEX=yes])
119AM_CONDITIONAL([BUILD_MKHTMLINDEX], [test "x$BUILD_MKHTMLINDEX" = xyes])
120
121# Checks for pkg-config packages
122PKG_CHECK_MODULES(XPROTO, xproto)
123AC_SUBST(XPROTO_CFLAGS)
124
125XORG_MANPAGE_SECTIONS
126XORG_RELEASE_VERSION
127
128AC_OUTPUT([Makefile])
129