configure.ac revision f353fbad
1dnl Process this file with autoconf to create configure. 2 3# Initialize Autoconf 4AC_PREREQ([2.60]) 5AC_INIT([libXaw], [1.0.9], 6 [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [libXaw]) 7AC_CONFIG_SRCDIR([Makefile.am]) 8AC_CONFIG_HEADERS([config.h]) 9 10# Initialize Automake 11AM_INIT_AUTOMAKE([foreign dist-bzip2]) 12AM_MAINTAINER_MODE 13 14# Require xorg-macros minimum of 1.10 for HAVE_STYLESHEETS in XORG_CHECK_SGML_DOCTOOLS 15m4_ifndef([XORG_MACROS_VERSION], 16 [m4_fatal([must install xorg-macros 1.10 or later before running autoconf/autogen])]) 17XORG_MACROS_VERSION(1.10) 18XORG_DEFAULT_OPTIONS 19XORG_ENABLE_SPECS 20XORG_WITH_XMLTO(0.0.20) 21XORG_WITH_FOP 22XORG_CHECK_SGML_DOCTOOLS(1.5) 23 24# Check for progs 25AC_PROG_LIBTOOL 26AC_PROG_AWK 27AM_PROG_CC_C_O 28 29# Need to call this explicitly since the first call to PKG_CHECK_MODULES 30# is in an if statement, and later calls would break if it's skipped. 31PKG_PROG_PKG_CONFIG 32 33# 34# fix libtool to set SONAME to libXaw.so.$major 35# 36AC_CONFIG_COMMANDS([libtool_hack], [ 37 cp -f libtool libtool_ 38 test -z "$SED" && SED=sed 39 $SED '1,/^soname_spec/{ 40/^soname_spec/i\ 41# X.Org hack to match monolithic Xaw SONAME\ 42xorglibxawname="libXaw" 43/^soname_spec/s/libname/xorglibxawname/ 44}' libtool_ > libtool 45 rm -f libtool_ 46]) 47 48# OSX/Win32 rules are different. 49platform_win32=no 50platform_darwin=no 51LIBEXT=so 52case $host_os in 53 cygwin*|mingw*) 54 LIBEXT=dll.a 55 platform_win32=yes 56 ;; 57 darwin*) 58 LIBEXT=dylib 59 platform_darwin=yes 60 ;; 61esac 62AC_SUBST(LIBEXT) 63AM_CONDITIONAL(PLATFORM_WIN32, test "x$platform_win32" = "xyes") 64AM_CONDITIONAL(PLATFORM_DARWIN, test "x$platform_darwin" = "xyes") 65 66# Whether to build Xaw6 67 68AC_ARG_ENABLE(xaw6, AC_HELP_STRING([--disable-xaw6], 69 [Disable building of libXaw.so.6]), 70 [build_v6=$enableval], [build_v6=yes]) 71 72if test "x$build_v6" = xyes; then 73 PKG_CHECK_MODULES(XAW6, xproto x11 xext xextproto xt xmu) 74fi 75 76 77# Whether to build Xaw7 78 79AC_ARG_ENABLE(xaw7, AC_HELP_STRING([--disable-xaw7], 80 [Disable building of libXaw.so.7]), 81 [build_v7=$enableval], [build_v7=yes]) 82 83if test "x$build_v7" = xyes; then 84 PKG_CHECK_MODULES(XAW7, xproto x11 xext xextproto xt xmu xpm) 85fi 86 87 88AM_CONDITIONAL(BUILD_XAW6, [test x$build_v6 = xyes]) 89AM_CONDITIONAL(BUILD_XAW7, [test x$build_v7 = xyes]) 90 91# Checks for header files. 92AC_HEADER_STDC 93AC_CHECK_HEADERS([wctype.h wchar.h widec.h]) 94 95# Checks for functions 96AC_CHECK_FUNCS([iswalnum getpagesize]) 97 98AC_CONFIG_FILES([Makefile 99 include/Makefile 100 man/Makefile 101 specs/Makefile 102 src/Makefile]) 103 104if test "x$build_v6" = xyes; then 105 AC_CONFIG_FILES(xaw6.pc) 106fi 107 108if test "x$build_v7" = xyes; then 109 AC_CONFIG_FILES(xaw7.pc) 110fi 111 112AC_OUTPUT 113