tizen 2.4 release
[framework/uifw/xorg/lib/libxpm.git] / configure.ac
1
2 # Initialize Autoconf
3 AC_PREREQ([2.60])
4 AC_INIT([libXpm], [3.5.11],
5         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [libXpm])
6 AC_CONFIG_SRCDIR([Makefile.am])
7 AC_CONFIG_HEADERS([config.h])
8 AC_CONFIG_MACRO_DIR([m4])
9
10 # Initialize Automake
11 AM_INIT_AUTOMAKE([foreign dist-bzip2])
12
13 # Initialize libtool
14 AC_PROG_LIBTOOL
15
16 # Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
17 m4_ifndef([XORG_MACROS_VERSION],
18           [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])])
19 XORG_MACROS_VERSION(1.8)
20 XORG_DEFAULT_OPTIONS
21
22 # Checks for library functions
23 AC_CHECK_FUNCS([strlcat])
24
25 # Obtain compiler/linker options for dependencies
26 PKG_CHECK_MODULES(XPM, xproto x11)
27 PKG_CHECK_MODULES(SXPM, [x11 xt xext xextproto xproto >= 7.0.17],
28                   [build_sxpm=true], [build_sxpm=false])
29 AM_CONDITIONAL(BUILD_SXPM, test x$build_sxpm = xtrue)
30
31 # Internationalization & localization support
32 AC_SEARCH_LIBS([gettext], [intl], [USE_GETTEXT="yes"], [USE_GETTEXT="no"])
33 AC_MSG_CHECKING([where to install localized messages])
34 AC_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])
37 AX_DEFINE_DIR([LOCALEDIR], [LOCALEDIR], [Location of translated messages])
38 if test "x$LOCALEDIR" = "xno" -o "x$USE_GETTEXT" = "xno" ; then
39         AC_MSG_RESULT([nowhere])
40         USE_GETTEXT="no"
41 else
42         AC_MSG_RESULT([$LOCALEDIR])
43 fi
44
45 if test "x$USE_GETTEXT" = "xyes" ; then
46         AC_DEFINE([USE_GETTEXT], 1,
47                   [Define to 1 if you want to use the gettext() function.])
48 fi
49 AM_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
53 AC_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])
57 if test x$STAT_ZFILE = xyes ; then
58         AC_DEFINE(STAT_ZFILE, 1, [Define to 1 to automatically look for files with .Z & .gz extensions])
59 fi
60
61
62 case $host_os in
63         *mingw*)
64                 AC_DEFINE(NO_ZPIPE, 1, [Define to 1 to disable decompression via pipes])
65         ;;
66         *)
67         ;;
68 esac
69
70 AC_CONFIG_FILES([Makefile
71                  doc/Makefile
72                  include/Makefile
73                  man/Makefile
74                  src/Makefile
75                  sxpm/Makefile
76                  cxpm/Makefile
77                  xpm.pc])
78 AC_OUTPUT