summaryrefslogtreecommitdiff
path: root/configure.ac
blob: f9118dd232892d9f628627c654981f5b53f9e5a0 (plain)
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
dnl  Copyright 2005 Red Hat, Inc.
dnl
dnl  Permission to use, copy, modify, distribute, and sell this software and its
dnl  documentation for any purpose is hereby granted without fee, provided that
dnl  the above copyright notice appear in all copies and that both that
dnl  copyright notice and this permission notice appear in supporting
dnl  documentation, and that the name of Red Hat not be used in
dnl  advertising or publicity pertaining to distribution of the software without
dnl  specific, written prior permission.  Red Hat makes no
dnl  representations about the suitability of this software for any purpose.  It
dnl  is provided "as is" without express or implied warranty.
dnl
dnl  RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
dnl  INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
dnl  EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
dnl  CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
dnl  DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
dnl  TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
dnl  PERFORMANCE OF THIS SOFTWARE.
dnl
dnl Process this file with autoconf to create configure.

# Initialize Autoconf
AC_PREREQ([2.60])
AC_INIT([imake], [1.0.10],
        [https://gitlab.freedesktop.org/xorg/util/imake/-/issues], [imake])
AC_CONFIG_SRCDIR([Makefile.am])
AC_CONFIG_HEADERS([config.h])

# Initialize Automake
AM_INIT_AUTOMAKE([foreign dist-xz])

# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
m4_ifndef([XORG_MACROS_VERSION],
	  [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])])
XORG_MACROS_VERSION(1.8)
XORG_DEFAULT_OPTIONS

AC_PROG_CPP
XORG_PROG_RAWCPP
CPP_PROGRAM=${RAWCPP}
AC_SUBST(CPP_PROGRAM)

# Checks for library functions.
AC_CHECK_FUNCS([mkstemp])

# Checks for typedefs, structures, and compiler characteristics.
AC_SYS_LARGEFILE

AC_CHECK_PROG(HAS_PERL, perl, yes)
AM_CONDITIONAL([HAS_PERL], [test "x$HAS_PERL" = xyes])

m4_ifdef([AS_HELP_STRING], , [m4_define([AS_HELP_STRING], m4_defn([AC_HELP_STRING]))])

DEFAULT_XCONFDIR="${libdir}/X11/config"
AC_ARG_WITH(config-dir,
	AS_HELP_STRING([--with-config-dir=<path>], [Path to config dir (default: ${libdir}/X11/config)]),
	[XCONFDIR="$withval"],
	[XCONFDIR="$DEFAULT_XCONFDIR"])
AC_SUBST(XCONFDIR)

DEFAULT_PREPROCESSCMD_MKDEPEND="gcc -E"
AC_ARG_WITH(script-preproc-cmd,
	AS_HELP_STRING([--with-script-preproc-cmd=CMD], [Preprocessor command to run on scripts (default: "gcc -E")]),
	[PREPROCESSCMD_MKDEPEND="$withval"],
	[PREPROCESSCMD_MKDEPEND="$DEFAULT_PREPROCESSCMD_MKDEPEND"])
AC_SUBST(PREPROCESSCMD_MKDEPEND)

DEFAULT_ARCMD="ar clq"
AC_ARG_WITH(create-lib-cmd,
	AS_HELP_STRING([--with-create-lib-cmd=CMD], [Command to create libraries (default: "ar clq")]),
	[ARCMD="$withval"],
	[ARCMD="$DEFAULT_ARCMD"])
AC_SUBST(ARCMD)

DEFAULT_RANLIB="ranlib"
AC_ARG_WITH(clean-lib-cmd,
	AS_HELP_STRING([--with-clean-lib-cmd=CMD], [Command to clean up libraries (default: "ranlib")]),
	[RANLIB="$withval"],
	[RANLIB="$DEFAULT_RANLIB"])
AC_SUBST(RANLIB)

AC_ARG_ENABLE(revpath,
	AS_HELP_STRING([--disable-revpath], [Build revpath (default: enabled)]),
	[BUILD_REVPATH="$enableval"],
	[BUILD_REVPATH=yes])
AM_CONDITIONAL([BUILD_REVPATH], [test "x$BUILD_REVPATH" = xyes])

AC_ARG_ENABLE(makeg,
	AS_HELP_STRING([--disable-makeg], [Build makeg (default: enabled)]),
	[BUILD_MAKEG="$enableval"],
	[BUILD_MAKEG=yes])
AM_CONDITIONAL([BUILD_MAKEG], [test "x$BUILD_MAKEG" = xyes])

AC_ARG_ENABLE(xmkmf,
	AS_HELP_STRING([--disable-xmkmf], [Build xmkmf (default: enabled)]),
	[BUILD_XMKMF="$enableval"],
	[BUILD_XMKMF=yes])
AM_CONDITIONAL([BUILD_XMKMF], [test "x$BUILD_XMKMF" = xyes])

AC_ARG_ENABLE(ccmakedep,
	AS_HELP_STRING([--disable-ccmakedep], [Build ccmakedep (default: enabled)]),
	[BUILD_CCMAKEDEP="$enableval"],
	[BUILD_CCMAKEDEP=yes])
AM_CONDITIONAL([BUILD_CCMAKEDEP], [test "x$BUILD_CCMAKEDEP" = xyes])

AC_ARG_ENABLE(mergelib,
	AS_HELP_STRING([--disable-mergelib], [Build mergelib (default: enabled)]),
	[BUILD_MERGELIB="$enableval"],
	[BUILD_MERGELIB=yes])
AM_CONDITIONAL([BUILD_MERGELIB], [test "x$BUILD_MERGELIB" = xyes])

AC_ARG_ENABLE(mkdirhier,
	AS_HELP_STRING([--disable-mkdirhier], [Build mkdirhier (default: enabled)]),
	[BUILD_MKDIRHIER="$enableval"],
	[BUILD_MKDIRHIER=yes])
AM_CONDITIONAL([BUILD_MKDIRHIER], [test "x$BUILD_MKDIRHIER" = xyes])

AC_ARG_ENABLE(cleanlinks,
	AS_HELP_STRING([--disable-cleanlinks], [Build cleanlinks (default: enabled)]),
	[BUILD_CLEANLINKS="$enableval"],
	[BUILD_CLEANLINKS=yes])
AM_CONDITIONAL([BUILD_CLEANLINKS], [test "x$BUILD_CLEANLINKS" = xyes])

AC_ARG_ENABLE(mkhtmlindex,
	AS_HELP_STRING([--disable-mkhtmlindex], [Build mkhtmlindex (default: enabled)]),
	[BUILD_MKHTMLINDEX="$enableval"],
	[BUILD_MKHTMLINDEX=yes])
AM_CONDITIONAL([BUILD_MKHTMLINDEX], [test "x$BUILD_MKHTMLINDEX" = xyes])

# Checks for pkg-config packages
PKG_CHECK_MODULES(XPROTO, xproto)

AC_CONFIG_FILES([Makefile])
AC_OUTPUT