configure.ac revision a5399cb1
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.3], [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
31# Require xorg-macros: XORG_DEFAULT_OPTIONS
32m4_ifndef([XORG_MACROS_VERSION],
33	  [m4_fatal([must install xorg-macros 1.4 or later before running autoconf/autogen])])
34XORG_MACROS_VERSION(1.4)
35XORG_DEFAULT_OPTIONS
36
37AC_PROG_CC
38AC_PROG_INSTALL
39
40AC_PROG_CPP
41AC_PATH_PROG(SED, sed)
42XORG_PROG_RAWCPP
43CPP_PROGRAM=${RAWCPP}
44AC_SUBST(CPP_PROGRAM)
45
46AC_CHECK_FUNC([mkstemp],
47   AC_DEFINE(HAS_MKSTEMP,1,[Define to 1 if you have the "mkstemp" function.]))
48
49AC_CHECK_PROG(HAS_PERL, perl, yes)
50AM_CONDITIONAL([HAS_PERL], [test "x$HAS_PERL" = xyes])
51
52m4_ifdef([AS_HELP_STRING], , [m4_define([AS_HELP_STRING], m4_defn([AC_HELP_STRING]))])
53
54DEFAULT_XCONFDIR="${libdir}/X11/config"
55AC_ARG_WITH(config-dir,
56	AS_HELP_STRING([--with-config-dir=<path>], [Path to config dir (default: ${libdir}/X11/config)]),
57	[XCONFDIR="$withval"],
58	[XCONFDIR="$DEFAULT_XCONFDIR"])
59AC_SUBST(XCONFDIR)
60
61DEFAULT_PREPROCESSCMD_MKDEPEND="gcc -E"
62AC_ARG_WITH(script-preproc-cmd,
63	AS_HELP_STRING([--with-script-preproc-cmd=CMD], [Preprocessor command to run on scripts (default: "gcc -E")]),
64	[PREPROCESSCMD_MKDEPEND="$withval"],
65	[PREPROCESSCMD_MKDEPEND="$DEFAULT_PREPROCESSCMD_MKDEPEND"])
66AC_SUBST(PREPROCESSCMD_MKDEPEND)
67
68DEFAULT_ARCMD="ar clq"
69AC_ARG_WITH(create-lib-cmd,
70	AS_HELP_STRING([--with-create-lib-cmd=CMD], [Command to create libraries (default: "ar clq")]),
71	[ARCMD="$withval"],
72	[ARCMD="$DEFAULT_ARCMD"])
73AC_SUBST(ARCMD)
74
75DEFAULT_RANLIB="ranlib"
76AC_ARG_WITH(clean-lib-cmd,
77	AS_HELP_STRING([--with-clean-lib-cmd=CMD], [Command to clean up libraries (default: "ranlib")]),
78	[RANLIB="$withval"],
79	[RANLIB="$DEFAULT_RANLIB"])
80AC_SUBST(RANLIB)
81
82AC_ARG_ENABLE(revpath,
83	AS_HELP_STRING([--disable-revpath], [Build revpath (default: enabled)]),
84	[BUILD_REVPATH="$enableval"],
85	[BUILD_REVPATH=yes])
86AM_CONDITIONAL([BUILD_REVPATH], [test "x$BUILD_REVPATH" = xyes])
87
88AC_ARG_ENABLE(makeg,
89	AS_HELP_STRING([--disable-makeg], [Build makeg (default: enabled)]),
90	[BUILD_MAKEG="$enableval"],
91	[BUILD_MAKEG=yes])
92AM_CONDITIONAL([BUILD_MAKEG], [test "x$BUILD_MAKEG" = xyes])
93
94AC_ARG_ENABLE(xmkmf,
95	AS_HELP_STRING([--disable-xmkmf], [Build xmkmf (default: enabled)]),
96	[BUILD_XMKMF="$enableval"],
97	[BUILD_XMKMF=yes])
98AM_CONDITIONAL([BUILD_XMKMF], [test "x$BUILD_XMKMF" = xyes])
99
100AC_ARG_ENABLE(ccmakedep,
101	AS_HELP_STRING([--disable-ccmakedep], [Build ccmakedep (default: enabled)]),
102	[BUILD_CCMAKEDEP="$enableval"],
103	[BUILD_CCMAKEDEP=yes])
104AM_CONDITIONAL([BUILD_CCMAKEDEP], [test "x$BUILD_CCMAKEDEP" = xyes])
105
106AC_ARG_ENABLE(mergelib,
107	AS_HELP_STRING([--disable-mergelib], [Build mergelib (default: enabled)]),
108	[BUILD_MERGELIB="$enableval"],
109	[BUILD_MERGELIB=yes])
110AM_CONDITIONAL([BUILD_MERGELIB], [test "x$BUILD_MERGELIB" = xyes])
111
112AC_ARG_ENABLE(mkdirhier,
113	AS_HELP_STRING([--disable-mkdirhier], [Build mkdirhier (default: enabled)]),
114	[BUILD_MKDIRHIER="$enableval"],
115	[BUILD_MKDIRHIER=yes])
116AM_CONDITIONAL([BUILD_MKDIRHIER], [test "x$BUILD_MKDIRHIER" = xyes])
117
118AC_ARG_ENABLE(cleanlinks,
119	AS_HELP_STRING([--disable-cleanlinks], [Build cleanlinks (default: enabled)]),
120	[BUILD_CLEANLINKS="$enableval"],
121	[BUILD_CLEANLINKS=yes])
122AM_CONDITIONAL([BUILD_CLEANLINKS], [test "x$BUILD_CLEANLINKS" = xyes])
123
124AC_ARG_ENABLE(mkhtmlindex,
125	AS_HELP_STRING([--disable-mkhtmlindex], [Build mkhtmlindex (default: enabled)]),
126	[BUILD_MKHTMLINDEX="$enableval"],
127	[BUILD_MKHTMLINDEX=yes])
128AM_CONDITIONAL([BUILD_MKHTMLINDEX], [test "x$BUILD_MKHTMLINDEX" = xyes])
129
130# Checks for pkg-config packages
131PKG_CHECK_MODULES(XPROTO, xproto)
132AC_SUBST(XPROTO_CFLAGS)
133
134AC_OUTPUT([Makefile])
135