~chasedouglas/ubuntu/maverick/xorg-server/multitouch

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Bazaar Package Importer
  • Author(s): Julien Cristau, Julien Cristau, Christopher James Halse Rogers
  • Date: 2010-06-07 23:22:48 UTC
  • mfrom: (0.9.4 upstream)
  • mto: This revision was merged to the branch mainline in revision 187.
  • Revision ID: james.westby@ubuntu.com-20100607232248-x9ob0sjy8bwkc2ki
Tags: 2:1.8.1.901-1
[ Julien Cristau ]
* New upstream release
* Merge changes from 2:1.7.7-2.

[ Christopher James Halse Rogers ]
* 16-xaa-fbcomposite-fix-negative-size.diff:
  - mi hunk merged upstream.  Update to keep just the fbpict.c hunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1565
1565
# See the "minimum version" comment for each macro you use to see what 
1566
1566
# version you require.
1567
1567
m4_defun([XORG_MACROS_VERSION],[
1568
 
m4_define([vers_have], [1.7.0])
 
1568
m4_define([vers_have], [1.8.0])
1569
1569
m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
1570
1570
m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
1571
1571
m4_if(m4_cmp(maj_have, maj_needed), 0,,
1633
1633
# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
1634
1634
# Not sure if there's any better way than just hardcoding by OS name.
1635
1635
# Override default settings by setting environment variables
 
1636
# Added MAN_SUBSTS in version 1.8
 
1637
# Added AC_PROG_SED in version 1.8
1636
1638
 
1637
1639
AC_DEFUN([XORG_MANPAGE_SECTIONS],[
1638
1640
AC_REQUIRE([AC_CANONICAL_HOST])
 
1641
AC_REQUIRE([AC_PROG_SED])
1639
1642
 
1640
1643
if test x$APP_MAN_SUFFIX = x    ; then
1641
1644
    APP_MAN_SUFFIX=1
1704
1707
AC_SUBST([MISC_MAN_DIR])
1705
1708
AC_SUBST([DRIVER_MAN_DIR])
1706
1709
AC_SUBST([ADMIN_MAN_DIR])
 
1710
 
 
1711
XORG_MAN_PAGE="X Version 11"
 
1712
AC_SUBST([XORG_MAN_PAGE])
 
1713
MAN_SUBSTS="\
 
1714
        -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
 
1715
        -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
 
1716
        -e 's|__xservername__|Xorg|g' \
 
1717
        -e 's|__xconfigfile__|xorg.conf|g' \
 
1718
        -e 's|__projectroot__|\$(prefix)|g' \
 
1719
        -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \
 
1720
        -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \
 
1721
        -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \
 
1722
        -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \
 
1723
        -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \
 
1724
        -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'"
 
1725
AC_SUBST([MAN_SUBSTS])
 
1726
 
1707
1727
]) # XORG_MANPAGE_SECTIONS
1708
1728
 
1709
 
# XORG_CHECK_SGML_DOCTOOLS
 
1729
# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION])
1710
1730
# ------------------------
1711
1731
# Minimum version: 1.7.0
1712
1732
#
1713
1733
# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent
1714
1734
# provided by xorg-sgml-doctools, if installed.
1715
1735
AC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[
1716
 
AC_MSG_CHECKING([for X.Org SGML entities])
 
1736
AC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])])
1717
1737
XORG_SGML_PATH=
1718
 
PKG_CHECK_EXISTS([xorg-sgml-doctools],
 
1738
PKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])],
1719
1739
    [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`],
1720
 
    [if test x"$cross_compiling" != x"yes" ; then
1721
 
        AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent],
1722
 
                      [XORG_SGML_PATH=$prefix/share/sgml])
1723
 
     fi])
 
1740
    [m4_ifval([$1],[:],
 
1741
        [if test x"$cross_compiling" != x"yes" ; then
 
1742
            AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent],
 
1743
                          [XORG_SGML_PATH=$prefix/share/sgml])
 
1744
         fi])
 
1745
    ])
1724
1746
 
1725
1747
if test "x$XORG_SGML_PATH" != "x" ; then
1726
1748
   AC_MSG_RESULT([$XORG_SGML_PATH])
1741
1763
# with the AM_CONDITIONAL "BUILD_LINUXDOC"
1742
1764
AC_DEFUN([XORG_CHECK_LINUXDOC],[
1743
1765
AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
 
1766
AC_REQUIRE([XORG_WITH_PS2PDF])
1744
1767
 
1745
1768
AC_PATH_PROG(LINUXDOC, linuxdoc)
1746
 
AC_PATH_PROG(PS2PDF, ps2pdf)
1747
1769
 
1748
1770
AC_MSG_CHECKING([whether to build documentation])
1749
1771
 
1759
1781
 
1760
1782
AC_MSG_CHECKING([whether to build pdf documentation])
1761
1783
 
1762
 
if test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then
 
1784
if test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then
1763
1785
   BUILDPDFDOC=yes
1764
1786
else
1765
1787
   BUILDPDFDOC=no
1769
1791
 
1770
1792
AC_MSG_RESULT([$BUILDPDFDOC])
1771
1793
 
1772
 
MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt"
 
1794
MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f"
1773
1795
MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
1774
1796
MAKE_PDF="$PS2PDF"
1775
1797
MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
2381
2403
# ----------------
2382
2404
# Minimum version: 1.1.0
2383
2405
#
2384
 
# Sets up flags for source checkers such as lint and sparse if --with-lint
2385
 
# is specified.   (Use --with-lint=sparse for sparse.)
2386
 
# Sets $LINT to name of source checker passed with --with-lint (default: lint)
2387
 
# Sets $LINT_FLAGS to flags to pass to source checker
2388
 
# Sets LINT automake conditional if enabled (default: disabled)
 
2406
# This macro enables the use of a tool that flags some suspicious and
 
2407
# non-portable constructs (likely to be bugs) in C language source code.
 
2408
# It will attempt to locate the tool and use appropriate options.
 
2409
# There are various lint type tools on different platforms.
 
2410
#
 
2411
# Interface to module:
 
2412
# LINT:         returns the path to the tool found on the platform
 
2413
#               or the value set to LINT on the configure cmd line
 
2414
#               also an Automake conditional
 
2415
# LINT_FLAGS:   an Automake variable with appropriate flags
 
2416
#
 
2417
# --with-lint:  'yes' user instructs the module to use lint
 
2418
#               'no' user instructs the module not to use lint (default)
 
2419
#
 
2420
# If the user sets the value of LINT, AC_PATH_PROG skips testing the path.
 
2421
# If the user sets the value of LINT_FLAGS, they are used verbatim.
2389
2422
#
2390
2423
AC_DEFUN([XORG_WITH_LINT],[
2391
2424
 
2392
 
# Allow checking code with lint, sparse, etc.
 
2425
AC_ARG_VAR([LINT], [Path to a lint-style command])
 
2426
AC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command])
2393
2427
AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint],
2394
2428
                [Use a lint-style source code checker (default: disabled)])],
2395
2429
                [use_lint=$withval], [use_lint=no])
2396
 
if test "x$use_lint" = "xyes" ; then
2397
 
        LINT="lint"
 
2430
 
 
2431
# Obtain platform specific info like program name and options
 
2432
# The lint program on FreeBSD and NetBSD is different from the one on Solaris
 
2433
case $host_os in
 
2434
  *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*)
 
2435
        lint_name=splint
 
2436
        lint_options="-badflag"
 
2437
        ;;
 
2438
  *freebsd* | *netbsd*)
 
2439
        lint_name=lint
 
2440
        lint_options="-u -b"
 
2441
        ;;
 
2442
  *solaris*)
 
2443
        lint_name=lint
 
2444
        lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
 
2445
        ;;
 
2446
esac
 
2447
 
 
2448
# Test for the presence of the program (either guessed by the code or spelled out by the user)
 
2449
if test "x$use_lint" = x"yes" ; then
 
2450
   AC_PATH_PROG([LINT], [$lint_name])
 
2451
   if test "x$LINT" = "x"; then
 
2452
        AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH])
 
2453
   fi
 
2454
elif test "x$use_lint" = x"no" ; then
 
2455
   if test "x$LINT" != "x"; then
 
2456
      AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified])
 
2457
   fi
2398
2458
else
2399
 
        LINT="$use_lint"
2400
 
fi
2401
 
if test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then
2402
 
    case $LINT in
2403
 
        lint|*/lint)
2404
 
            case $host_os in
2405
 
                solaris*)
2406
 
                        LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
2407
 
                        ;;
2408
 
            esac
2409
 
            ;;
2410
 
    esac
2411
 
fi
2412
 
 
2413
 
AC_SUBST(LINT)
2414
 
AC_SUBST(LINT_FLAGS)
2415
 
AM_CONDITIONAL(LINT, [test x$LINT != xno])
 
2459
   AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.])
 
2460
fi
 
2461
 
 
2462
# User supplied flags override default flags
 
2463
if test "x$LINT_FLAGS" != "x"; then
 
2464
   lint_options=$LINT_FLAGS
 
2465
fi
 
2466
 
 
2467
AC_SUBST([LINT_FLAGS],[$lint_options])
 
2468
AM_CONDITIONAL(LINT, [test "x$LINT" != x])
2416
2469
 
2417
2470
]) # XORG_WITH_LINT
2418
2471
 
2422
2475
#
2423
2476
# Sets up flags for building lint libraries for checking programs that call
2424
2477
# functions in the library.
2425
 
# Disabled by default, enable with --enable-lint-library
2426
 
# Sets: 
2427
 
#       @LINTLIB@               - name of lint library file to make
2428
 
#       MAKE_LINT_LIB           - automake conditional
2429
 
#
 
2478
#
 
2479
# Interface to module:
 
2480
# LINTLIB               - Automake variable with the name of lint library file to make
 
2481
# MAKE_LINT_LIB         - Automake conditional
 
2482
#
 
2483
# --enable-lint-library:  - 'yes' user instructs the module to created a lint library
 
2484
#                         - 'no' user instructs the module not to create a lint library (default)
2430
2485
 
2431
2486
AC_DEFUN([XORG_LINT_LIBRARY],[
2432
2487
AC_REQUIRE([XORG_WITH_LINT])
2433
 
# Build lint "library" for more indepth checks of programs calling this library
2434
2488
AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library],
2435
2489
        [Create lint library (default: disabled)])],
2436
2490
        [make_lint_lib=$enableval], [make_lint_lib=no])
2437
 
if test "x$make_lint_lib" != "xno" ; then
2438
 
        if test "x$LINT" = "xno" ; then
2439
 
                AC_MSG_ERROR([Cannot make lint library without --with-lint])
2440
 
        fi
2441
 
        if test "x$make_lint_lib" = "xyes" ; then
2442
 
                LINTLIB=llib-l$1.ln
2443
 
        else
2444
 
                LINTLIB=$make_lint_lib
2445
 
        fi
 
2491
 
 
2492
if test "x$make_lint_lib" = x"yes" ; then
 
2493
   LINTLIB=llib-l$1.ln
 
2494
   if test "x$LINT" = "x"; then
 
2495
        AC_MSG_ERROR([Cannot make lint library without --with-lint])
 
2496
   fi
 
2497
elif test "x$make_lint_lib" != x"no" ; then
 
2498
   AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.])
2446
2499
fi
 
2500
 
2447
2501
AC_SUBST(LINTLIB)
2448
2502
AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
2449
2503
 
2456
2510
# Defines CWARNFLAGS to enable C compiler warnings.
2457
2511
#
2458
2512
AC_DEFUN([XORG_CWARNFLAGS], [
2459
 
AC_REQUIRE([AC_PROG_CC])
 
2513
AC_REQUIRE([AC_PROG_CC_C99])
2460
2514
if  test "x$GCC" = xyes ; then
2461
2515
    CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
2462
2516
-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
2481
2535
#
2482
2536
# Add configure option to enable strict compilation
2483
2537
AC_DEFUN([XORG_STRICT_OPTION], [
2484
 
AC_REQUIRE([AC_PROG_CC])
 
2538
# If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89
2485
2539
AC_REQUIRE([AC_PROG_CC_C99])
2486
2540
AC_REQUIRE([XORG_CWARNFLAGS])
2487
2541
 
2511
2565
# Defines default options for X.Org modules.
2512
2566
#
2513
2567
AC_DEFUN([XORG_DEFAULT_OPTIONS], [
 
2568
AC_REQUIRE([AC_PROG_INSTALL])
2514
2569
XORG_CWARNFLAGS
2515
2570
XORG_STRICT_OPTION
2516
2571
XORG_RELEASE_VERSION
2564
2619
 
2565
2620
# XORG_RELEASE_VERSION
2566
2621
# --------------------
2567
 
# Adds --with/without-release-string and changes the PACKAGE and
2568
 
# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION".  If
2569
 
# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged.  Also
2570
 
# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
 
2622
# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
2571
2623
 
2572
2624
AC_DEFUN([XORG_RELEASE_VERSION],[
2573
 
        AC_ARG_WITH(release-version,
2574
 
                        AS_HELP_STRING([--with-release-version=STRING],
2575
 
                                [Use release version string in package name]),
2576
 
                        [RELEASE_VERSION="$withval"],
2577
 
                        [RELEASE_VERSION=""])
2578
 
        if test "x$RELEASE_VERSION" != "x"; then
2579
 
                PACKAGE="$PACKAGE-$RELEASE_VERSION"
2580
 
                PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
2581
 
                AC_MSG_NOTICE([Building with package name set to $PACKAGE])
2582
 
        fi
2583
2625
        AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
2584
2626
                [`echo $PACKAGE_VERSION | cut -d . -f 1`],
2585
2627
                [Major version of this package])