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