~ubuntu-branches/ubuntu/trusty/xterm/trusty-proposed

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Bazaar Package Importer
  • Author(s): Michael Vogt
  • Date: 2011-06-17 10:40:36 UTC
  • mfrom: (1.4.12 upstream) (11.1.26 sid)
  • Revision ID: james.westby@ubuntu.com-20110617104036-id4ml81yetasewp9
Tags: 270-1ubuntu1
* Merge from debian unstable.  Remaining changes:
  - debian/patches/950_ubuntu_charclass_highlight.diff: Enabled URL
    highlighting
  - debian/patches/Add 951_uxterm_utf8_title.diff: Set utf8Titles to true by
    default when using uxterm, so that it displays utf8 directories in titles
    properly.  May cause issues with apps that use control sequences for
    updating the xterm titlebar - users should use xterm or set utf8Title
    to false in this case.
  - debian/gbp.conf: Use "Ubuntu" in "debian-branch" directly

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
dnl $XTermId: aclocal.m4,v 1.293 2010/11/19 10:44:13 tom Exp $
 
1
dnl $XTermId: aclocal.m4,v 1.301 2011/04/22 09:18:49 tom Exp $
2
2
dnl
3
3
dnl ---------------------------------------------------------------------------
4
4
dnl
5
 
dnl Copyright 1997-2009,2010 by Thomas E. Dickey
 
5
dnl Copyright 1997-2010,2011 by Thomas E. Dickey
6
6
dnl
7
7
dnl                         All Rights Reserved
8
8
dnl
376
376
 
377
377
])dnl
378
378
dnl ---------------------------------------------------------------------------
 
379
dnl CF_DISABLE_DESKTOP version: 2 updated: 2011/04/22 05:17:37
 
380
dnl ------------------
 
381
dnl Handle a configure option "--disable-desktop", which sets a shell
 
382
dnl variable $desktop_utils to a "#" if the feature is not wanted, or to an
 
383
dnl empty string if enabled.  The variable is used to substitute in front of
 
384
dnl corresponding makefile-rules.
 
385
dnl
 
386
dnl It also tells the configure script to substitute the environment variable
 
387
dnl $DESKTOP_FLAGS, which can be used by external scripts to customize the
 
388
dnl invocation of desktop-file-util.
 
389
dnl
 
390
dnl $1 = program name
 
391
AC_DEFUN([CF_DISABLE_DESKTOP],[
 
392
# Comment-out the install-desktop rule if the desktop-utils are not found.
 
393
AC_MSG_CHECKING(if you want to install desktop files)
 
394
CF_ARG_OPTION(desktop,
 
395
        [  --disable-desktop       disable install of $1 desktop files],
 
396
        [enable_desktop=$enableval],
 
397
        [enable_desktop=$enableval],yes)
 
398
AC_MSG_RESULT($enable_desktop)
 
399
 
 
400
desktop_utils=
 
401
if test "$enable_desktop" = yes ; then
 
402
AC_CHECK_PROG(desktop_utils,desktop-file-install,yes,no)
 
403
fi
 
404
 
 
405
test "$desktop_utils" = yes && desktop_utils= || desktop_utils="#"
 
406
AC_SUBST(DESKTOP_FLAGS)
 
407
])
 
408
dnl ---------------------------------------------------------------------------
379
409
dnl CF_DISABLE_ECHO version: 11 updated: 2009/12/13 13:16:57
380
410
dnl ---------------
381
411
dnl You can always use "make -n" to see the actual options, but it's hard to
413
443
AC_SUBST(ECHO_CC)
414
444
])dnl
415
445
dnl ---------------------------------------------------------------------------
416
 
dnl CF_DISABLE_RPATH_HACK version: 1 updated: 2010/04/11 10:54:00
 
446
dnl CF_DISABLE_RPATH_HACK version: 2 updated: 2011/02/13 13:31:33
417
447
dnl ---------------------
418
448
dnl The rpath-hack makes it simpler to build programs, particularly with the
419
449
dnl *BSD ports which may have essential libraries in unusual places.  But it
421
451
dnl option in that case.
422
452
AC_DEFUN([CF_DISABLE_RPATH_HACK],
423
453
[
424
 
AC_MSG_CHECKING(if rpath should be not be set)
 
454
AC_MSG_CHECKING(if rpath-hack should be disabled)
425
455
CF_ARG_DISABLE(rpath-hack,
426
456
        [  --disable-rpath-hack    don't add rpath options for additional libraries],
427
457
        [cf_disable_rpath_hack=yes],
1356
1386
esac
1357
1387
])dnl
1358
1388
dnl ---------------------------------------------------------------------------
1359
 
dnl CF_PKG_CONFIG version: 3 updated: 2009/01/25 10:55:09
 
1389
dnl CF_PKG_CONFIG version: 6 updated: 2011/04/17 06:36:21
1360
1390
dnl -------------
1361
1391
dnl Check for the package-config program, unless disabled by command-line.
1362
1392
AC_DEFUN([CF_PKG_CONFIG],
1373
1403
        PKG_CONFIG=none
1374
1404
        ;;
1375
1405
yes) #(vi
1376
 
        AC_PATH_PROG(PKG_CONFIG, pkg-config, none)
 
1406
        AC_PATH_TOOL(PKG_CONFIG, pkg-config, none)
1377
1407
        ;;
1378
1408
*)
1379
1409
        PKG_CONFIG=$withval
1704
1734
                -e 's/-[[UD]]'"$3"'\(=[[^       ]]*\)\?[$]//g'`
1705
1735
])dnl
1706
1736
dnl ---------------------------------------------------------------------------
1707
 
dnl CF_RPATH_HACK version: 8 updated: 2010/04/17 15:38:58
 
1737
dnl CF_RPATH_HACK version: 9 updated: 2011/02/13 13:31:33
1708
1738
dnl -------------
1709
1739
AC_DEFUN([CF_RPATH_HACK],
1710
1740
[
1717
1747
        cf_rpath_list="/usr/lib /lib"
1718
1748
        if test "$cf_ldd_prog" != no
1719
1749
        then
 
1750
                cf_rpath_oops=
 
1751
 
1720
1752
AC_TRY_LINK([#include <stdio.h>],
1721
1753
                [printf("Hello");],
1722
 
                [cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[[     ]]/%/%' -e 's%/[[^/]][[^/]]*$%%' |sort -u`])
 
1754
                [cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort -u`
 
1755
                 cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[[     ]]/%/%' -e 's%/[[^/]][[^/]]*$%%' |sort -u`])
 
1756
 
 
1757
                # If we passed the link-test, but get a "not found" on a given library,
 
1758
                # this could be due to inept reconfiguration of gcc to make it only
 
1759
                # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
 
1760
                # is intentional, e.g., installing gcc in /usr/bin and suppressing the
 
1761
                # /usr/local libraries.
 
1762
                if test -n "$cf_rpath_oops"
 
1763
                then
 
1764
                        for cf_rpath_src in $cf_rpath_oops
 
1765
                        do
 
1766
                                for cf_rpath_dir in \
 
1767
                                        /usr/local \
 
1768
                                        /usr/pkg \
 
1769
                                        /opt/sfw
 
1770
                                do
 
1771
                                        if test -f $cf_rpath_dir/lib/$cf_rpath_src
 
1772
                                        then
 
1773
                                                CF_VERBOSE(...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src)
 
1774
                                                LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
 
1775
                                                break
 
1776
                                        fi
 
1777
                                done
 
1778
                        done
 
1779
                fi
1723
1780
        fi
1724
1781
 
1725
1782
        CF_VERBOSE(...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS)
2585
2642
CF_MSG_LOG([$1])
2586
2643
])dnl
2587
2644
dnl ---------------------------------------------------------------------------
 
2645
dnl CF_WITH_APP_DEFAULTS version: 1 updated: 2011/04/21 18:12:37
 
2646
dnl --------------------
 
2647
dnl Handle configure option "--with-app-defaults", setting these shell
 
2648
dnl variables:
 
2649
dnl $appsdir is the option value, used for installing app-defaults files.
 
2650
dnl $no_appsdir is a "#" (comment) if "--without-app-defaults" is given.
 
2651
AC_DEFUN(CF_WITH_APP_DEFAULTS,[
 
2652
AC_MSG_CHECKING(for directory to install resource files)
 
2653
CF_WITH_PATH(app-defaults,
 
2654
        [  --with-app-defaults=DIR directory in which to install resource files],
 
2655
        [appsdir],[EPREFIX/lib/X11/app-defaults],
 
2656
        ['\$(exec_prefix)/lib/X11/app-defaults'])
 
2657
AC_MSG_RESULT($appsdir)
 
2658
AC_SUBST(appsdir)
 
2659
 
 
2660
no_appsdir=
 
2661
test "$appsdir" = no && no_appsdir="#"
 
2662
AC_SUBST(no_appsdir)
 
2663
])dnl
 
2664
dnl ---------------------------------------------------------------------------
 
2665
dnl CF_WITH_DESKTOP_CATEGORY version: 1 updated: 2011/04/22 05:17:37
 
2666
dnl ------------------------
 
2667
dnl Taking into account the absence of standardization of desktop categories
 
2668
dnl take a look to see whether other applications on the current system are
 
2669
dnl assigned any/all of a set of suggested categories.
 
2670
dnl
 
2671
dnl $1 = program name
 
2672
dnl $2 = case-pattern to match comparable desktop files to obtain category
 
2673
dnl      This pattern may contain wildcards.
 
2674
dnl $3 = suggested categories, also a case-pattern but without wildcards,
 
2675
dnl      since it doubles as a default value.
 
2676
dnl
 
2677
dnl The macro tells the configure script to substitute the $DESKTOP_CATEGORY
 
2678
dnl value.
 
2679
AC_DEFUN([CF_WITH_DESKTOP_CATEGORY],[
 
2680
AC_REQUIRE([CF_DISABLE_DESKTOP])
 
2681
 
 
2682
if test -z "$desktop_utils"
 
2683
then
 
2684
        AC_MSG_CHECKING(for requested desktop-category)
 
2685
        AC_ARG_WITH(desktop-category,
 
2686
                [  --with-desktop-category=XXX  one or more desktop catgories or auto],
 
2687
                [cf_desktop_want=$withval],
 
2688
                [cf_desktop_want=auto])
 
2689
        AC_MSG_RESULT($cf_desktop_want)
 
2690
 
 
2691
        if test "$cf_desktop_want" = auto
 
2692
        then
 
2693
                rm -rf conftest*
 
2694
                cf_desktop_also=
 
2695
                for cf_desktop_dir in  \
 
2696
                        /usr/share/app-install \
 
2697
                        /usr/share/applications
 
2698
                do
 
2699
                        if test -d $cf_desktop_dir
 
2700
                        then
 
2701
                                find $cf_desktop_dir -name '*.desktop' | \
 
2702
                                while true
 
2703
                                do
 
2704
                                        read cf_desktop_path
 
2705
                                        test -z "$cf_desktop_path" && break
 
2706
                                        cf_desktop_name=`basename $cf_desktop_path .desktop`
 
2707
                                        case $cf_desktop_name in #(vi
 
2708
                                        $1|*-$1|$2)
 
2709
                                                CF_VERBOSE(inspect $cf_desktop_path)
 
2710
                                                egrep '^Categories=' $cf_desktop_path | \
 
2711
                                                        tr ';' '\n' | \
 
2712
                                                        sed -e 's%^.*=%%' -e '/^$/d' >>conftest.1
 
2713
                                                ;;
 
2714
                                        esac
 
2715
                                done
 
2716
                        fi
 
2717
                done
 
2718
                if test -s conftest.1
 
2719
                then
 
2720
                        cf_desktop_last=
 
2721
                        sort conftest.1 | \
 
2722
                        while true
 
2723
                        do
 
2724
                                read cf_desktop_this
 
2725
                                test -z "$cf_desktop_this" && break
 
2726
                                case $cf_desktop_this in #(vi
 
2727
                                Qt|GTK|KDE|GNOME) #(vi
 
2728
                                        ;;
 
2729
                                $3)
 
2730
                                        test "x$cf_desktop_last" != "x$cf_desktop_this" && echo $cf_desktop_this >>conftest.2
 
2731
                                        ;;
 
2732
                                esac
 
2733
                                cf_desktop_last=$cf_desktop_this
 
2734
                        done
 
2735
                        cf_desktop_want=`cat conftest.2 | tr '\n' ';'`
 
2736
                fi
 
2737
        fi
 
2738
        DESKTOP_CATEGORY=`echo "$cf_desktop_want" | sed -e 's/[[ ,]]/;/g'`
 
2739
        CF_VERBOSE(resulting category=$DESKTOP_CATEGORY)
 
2740
        AC_SUBST(DESKTOP_CATEGORY)
 
2741
fi
 
2742
])
 
2743
dnl ---------------------------------------------------------------------------
 
2744
dnl CF_WITH_ICONDIR version: 1 updated: 2011/04/21 18:12:37
 
2745
dnl ---------------
 
2746
dnl Handle configure option "--with-icondir", setting these shell
 
2747
dnl variables:
 
2748
dnl $icondir is the option value, used for installing icon/pixmap files.
 
2749
dnl $no_icondir is a "#" (comment) if "--without-icondir" is given.
 
2750
AC_DEFUN([CF_WITH_ICONDIR],[
 
2751
AC_MSG_CHECKING(for directory to install icons)
 
2752
CF_WITH_PATH(icondir,
 
2753
        [  --with-icondir=DIR      directory in which to install icons],
 
2754
        [icondir],[EPREFIX/share/pixmaps],
 
2755
        ['\$(exec_prefix)/share/pixmaps'])
 
2756
AC_MSG_RESULT($icondir)
 
2757
AC_SUBST(icondir)
 
2758
 
 
2759
no_icondir=
 
2760
test "$icondir" = no && no_icondir="#"
 
2761
AC_SUBST(no_icondir)
 
2762
])dnl
 
2763
dnl ---------------------------------------------------------------------------
2588
2764
dnl CF_WITH_IMAKE_CFLAGS version: 9 updated: 2010/05/26 05:38:42
2589
2765
dnl --------------------
2590
2766
dnl xterm and similar programs build more readily when propped up with imake's
2740
2916
test "$cf_cv_xkb_bell_ext" = yes && AC_DEFINE(HAVE_XKB_BELL_EXT)
2741
2917
])
2742
2918
dnl ---------------------------------------------------------------------------
2743
 
dnl CF_XOPEN_SOURCE version: 34 updated: 2010/05/26 05:38:42
 
2919
dnl CF_XOPEN_SOURCE version: 35 updated: 2011/02/20 20:37:37
2744
2920
dnl ---------------
2745
2921
dnl Try to get _XOPEN_SOURCE defined properly that we can use POSIX functions,
2746
2922
dnl or adapt to the vendor's definitions to get equivalent functionality,
2759
2935
aix[[456]]*) #(vi
2760
2936
        cf_xopen_source="-D_ALL_SOURCE"
2761
2937
        ;;
 
2938
cygwin) #(vi
 
2939
        cf_XOPEN_SOURCE=600
 
2940
        ;;
2762
2941
darwin[[0-8]].*) #(vi
2763
2942
        cf_xopen_source="-D_APPLE_C_SOURCE"
2764
2943
        ;;
2980
3159
fi
2981
3160
])
2982
3161
dnl ---------------------------------------------------------------------------
2983
 
dnl CF_X_ATHENA_LIBS version: 9 updated: 2010/06/02 05:03:05
 
3162
dnl CF_X_ATHENA_LIBS version: 10 updated: 2011/02/13 13:31:33
2984
3163
dnl ----------------
2985
3164
dnl Normally invoked by CF_X_ATHENA, with $1 set to the appropriate flavor of
2986
3165
dnl the Athena widgets, e.g., Xaw, Xaw3d, neXtaw.
3010
3189
                                CF_ADD_LIBS($cf_lib)
3011
3190
                                AC_MSG_CHECKING(for $cf_test in $cf_lib)
3012
3191
                        fi
3013
 
                        AC_TRY_LINK([],[$cf_test()],
 
3192
                        AC_TRY_LINK([
 
3193
#include <X11/Intrinsic.h>
 
3194
#include <X11/$cf_x_athena_root/SimpleMenu.h>
 
3195
],[
 
3196
$cf_test((XtAppContext) 0)],
3014
3197
                                [cf_result=yes],
3015
3198
                                [cf_result=no])
3016
3199
                        AC_MSG_RESULT($cf_result)