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