configure.ac revision 39f9c979
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
24# Initialize Autoconf
25AC_PREREQ([2.60])
26AC_INIT([imake], [1.0.6],
27        [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [imake])
28AC_CONFIG_SRCDIR([Makefile.am])
29AC_CONFIG_HEADERS([config.h])
30
31# Initialize Automake
32AM_INIT_AUTOMAKE([foreign dist-bzip2])
33AM_MAINTAINER_MODE
34
35# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
36m4_ifndef([XORG_MACROS_VERSION],
37	  [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])])
38XORG_MACROS_VERSION(1.8)
39XORG_DEFAULT_OPTIONS
40
41AC_PROG_CPP
42XORG_PROG_RAWCPP
43CPP_PROGRAM=${RAWCPP}
44AC_SUBST(CPP_PROGRAM)
45
46AC_CHECK_FUNCS([mkstemp])
47
48AC_CHECK_PROG(HAS_PERL, perl, yes)
49AM_CONDITIONAL([HAS_PERL], [test "x$HAS_PERL" = xyes])
50
51m4_ifdef([AS_HELP_STRING], , [m4_define([AS_HELP_STRING], m4_defn([AC_HELP_STRING]))])
52
53DEFAULT_XCONFDIR="${libdir}/X11/config"
54AC_ARG_WITH(config-dir,
55	AS_HELP_STRING([--with-config-dir=<path>], [Path to config dir (default: ${libdir}/X11/config)]),
56	[XCONFDIR="$withval"],
57	[XCONFDIR="$DEFAULT_XCONFDIR"])
58AC_SUBST(XCONFDIR)
59
60DEFAULT_PREPROCESSCMD_MKDEPEND="gcc -E"
61AC_ARG_WITH(script-preproc-cmd,
62	AS_HELP_STRING([--with-script-preproc-cmd=CMD], [Preprocessor command to run on scripts (default: "gcc -E")]),
63	[PREPROCESSCMD_MKDEPEND="$withval"],
64	[PREPROCESSCMD_MKDEPEND="$DEFAULT_PREPROCESSCMD_MKDEPEND"])
65AC_SUBST(PREPROCESSCMD_MKDEPEND)
66
67DEFAULT_ARCMD="ar clq"
68AC_ARG_WITH(create-lib-cmd,
69	AS_HELP_STRING([--with-create-lib-cmd=CMD], [Command to create libraries (default: "ar clq")]),
70	[ARCMD="$withval"],
71	[ARCMD="$DEFAULT_ARCMD"])
72AC_SUBST(ARCMD)
73
74DEFAULT_RANLIB="ranlib"
75AC_ARG_WITH(clean-lib-cmd,
76	AS_HELP_STRING([--with-clean-lib-cmd=CMD], [Command to clean up libraries (default: "ranlib")]),
77	[RANLIB="$withval"],
78	[RANLIB="$DEFAULT_RANLIB"])
79AC_SUBST(RANLIB)
80
81AC_ARG_ENABLE(revpath,
82	AS_HELP_STRING([--disable-revpath], [Build revpath (default: enabled)]),
83	[BUILD_REVPATH="$enableval"],
84	[BUILD_REVPATH=yes])
85AM_CONDITIONAL([BUILD_REVPATH], [test "x$BUILD_REVPATH" = xyes])
86
87AC_ARG_ENABLE(makeg,
88	AS_HELP_STRING([--disable-makeg], [Build makeg (default: enabled)]),
89	[BUILD_MAKEG="$enableval"],
90	[BUILD_MAKEG=yes])
91AM_CONDITIONAL([BUILD_MAKEG], [test "x$BUILD_MAKEG" = xyes])
92
93AC_ARG_ENABLE(xmkmf,
94	AS_HELP_STRING([--disable-xmkmf], [Build xmkmf (default: enabled)]),
95	[BUILD_XMKMF="$enableval"],
96	[BUILD_XMKMF=yes])
97AM_CONDITIONAL([BUILD_XMKMF], [test "x$BUILD_XMKMF" = xyes])
98
99AC_ARG_ENABLE(ccmakedep,
100	AS_HELP_STRING([--disable-ccmakedep], [Build ccmakedep (default: enabled)]),
101	[BUILD_CCMAKEDEP="$enableval"],
102	[BUILD_CCMAKEDEP=yes])
103AM_CONDITIONAL([BUILD_CCMAKEDEP], [test "x$BUILD_CCMAKEDEP" = xyes])
104
105AC_ARG_ENABLE(mergelib,
106	AS_HELP_STRING([--disable-mergelib], [Build mergelib (default: enabled)]),
107	[BUILD_MERGELIB="$enableval"],
108	[BUILD_MERGELIB=yes])
109AM_CONDITIONAL([BUILD_MERGELIB], [test "x$BUILD_MERGELIB" = xyes])
110
111AC_ARG_ENABLE(mkdirhier,
112	AS_HELP_STRING([--disable-mkdirhier], [Build mkdirhier (default: enabled)]),
113	[BUILD_MKDIRHIER="$enableval"],
114	[BUILD_MKDIRHIER=yes])
115AM_CONDITIONAL([BUILD_MKDIRHIER], [test "x$BUILD_MKDIRHIER" = xyes])
116
117AC_ARG_ENABLE(cleanlinks,
118	AS_HELP_STRING([--disable-cleanlinks], [Build cleanlinks (default: enabled)]),
119	[BUILD_CLEANLINKS="$enableval"],
120	[BUILD_CLEANLINKS=yes])
121AM_CONDITIONAL([BUILD_CLEANLINKS], [test "x$BUILD_CLEANLINKS" = xyes])
122
123AC_ARG_ENABLE(mkhtmlindex,
124	AS_HELP_STRING([--disable-mkhtmlindex], [Build mkhtmlindex (default: enabled)]),
125	[BUILD_MKHTMLINDEX="$enableval"],
126	[BUILD_MKHTMLINDEX=yes])
127AM_CONDITIONAL([BUILD_MKHTMLINDEX], [test "x$BUILD_MKHTMLINDEX" = xyes])
128
129# Checks for pkg-config packages
130PKG_CHECK_MODULES(XPROTO, xproto)
131
132AC_OUTPUT([Makefile])
133