/configure.ac
text | 69 lines | 59 code | 10 blank | 0 comment | 0 complexity | 7f91b5e892bbfdd802320e6fafdbcdb7 MD5 | raw file
1 2# Initialize Autoconf 3AC_PREREQ([2.60]) 4AC_INIT([libXpm], [3.5.9], 5 [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [libXpm]) 6AC_CONFIG_SRCDIR([Makefile.am]) 7AC_CONFIG_HEADERS([config.h]) 8AC_CONFIG_MACRO_DIR([m4]) 9 10# Initialize Automake 11AM_INIT_AUTOMAKE([foreign dist-bzip2]) 12AM_MAINTAINER_MODE 13 14# Initialize libtool 15AC_PROG_LIBTOOL 16 17# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS 18m4_ifndef([XORG_MACROS_VERSION], 19 [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])]) 20XORG_MACROS_VERSION(1.8) 21XORG_DEFAULT_OPTIONS 22 23# Checks for library functions 24AC_CHECK_FUNCS([strlcat]) 25 26# Obtain compiler/linker options for dependencies 27PKG_CHECK_MODULES(XPM, xproto x11) 28PKG_CHECK_MODULES(SXPM, x11 xt xext xextproto, build_sxpm=true, build_sxpm=false) 29AM_CONDITIONAL(BUILD_SXPM, test x$build_sxpm = xtrue) 30 31# Internationalization & localization support 32AC_SEARCH_LIBS([gettext], [intl], [USE_GETTEXT="yes"], [USE_GETTEXT="no"]) 33AC_MSG_CHECKING([where to install localized messages]) 34AC_ARG_WITH([localedir], AS_HELP_STRING([--with-localedir=<path>], 35 [Path to install message files in (default: datadir/locale)]), 36 [LOCALEDIR=${withval}], [LOCALEDIR=${datadir}/locale]) 37AX_DEFINE_DIR([LOCALEDIR], [LOCALEDIR], [Location of translated messages]) 38if test "x$LOCALEDIR" = "xno" -o "x$USE_GETTEXT" = "xno" ; then 39 AC_MSG_RESULT([nowhere]) 40 USE_GETTEXT="no" 41else 42 AC_MSG_RESULT([$LOCALEDIR]) 43fi 44 45if test "x$USE_GETTEXT" = "xyes" ; then 46 AC_DEFINE([USE_GETTEXT], 1, 47 [Define to 1 if you want to use the gettext() function.]) 48fi 49AM_CONDITIONAL(USE_GETTEXT, test "x$USE_GETTEXT" = "xyes") 50 51# Optional feature: When ___.xpm is requested, also look for ___.xpm.Z & .gz 52# Replaces ZFILEDEF = -DSTAT_ZFILE in old Imakefile 53AC_ARG_ENABLE(stat-zfile, 54 AS_HELP_STRING([--enable-stat-zfile], 55 [Search for files with .Z & .gz extensions automatically @<:@default=yes@:>@]), 56 [STAT_ZFILE=$enableval], [STAT_ZFILE=yes]) 57if test x$STAT_ZFILE = xyes ; then 58 AC_DEFINE(STAT_ZFILE, 1, [Define to 1 to automatically look for files with .Z & .gz extensions]) 59fi 60 61AC_CONFIG_FILES([Makefile 62 doc/Makefile 63 include/Makefile 64 man/Makefile 65 src/Makefile 66 sxpm/Makefile 67 cxpm/Makefile 68 xpm.pc]) 69AC_OUTPUT