aboutsummaryrefslogtreecommitdiffstats
path: root/macros/gnome-x-checks.m4
diff options
context:
space:
mode:
Diffstat (limited to 'macros/gnome-x-checks.m4')
-rw-r--r--macros/gnome-x-checks.m480
1 files changed, 80 insertions, 0 deletions
diff --git a/macros/gnome-x-checks.m4 b/macros/gnome-x-checks.m4
new file mode 100644
index 0000000000..1e397ef8e3
--- /dev/null
+++ b/macros/gnome-x-checks.m4
@@ -0,0 +1,80 @@
+dnl GNOME_X_CHECKS
+dnl
+dnl Basic X11 related checks for X11. At the end, the following will be
+dnl defined/changed:
+dnl GTK_{CFLAGS,LIBS} From AM_PATH_GTK
+dnl CPPFLAGS Will include $X_CFLAGS
+dnl GNOME_HAVE_SM `true' or `false' depending on whether session
+dnl management is available. It is available if
+dnl both -lSM and X11/SM/SMlib.h exist. (Some
+dnl Solaris boxes have the library but not the header)
+dnl XPM_LIBS -lXpm if Xpm library is present, otherwise ""
+dnl
+dnl The following configure cache variables are defined (but not used):
+dnl gnome_cv_passdown_{x_libs,X_LIBS,X_CFLAGS}
+dnl
+AC_DEFUN([GNOME_X_CHECKS],
+[
+ AM_PATH_GTK(1.2.0,,AC_MSG_ERROR(GTK not installed, or gtk-config not in path))
+ dnl Hope that GTK_CFLAGS have only -I and -D. Otherwise, we could
+ dnl test -z "$x_includes" || CPPFLAGS="$CPPFLAGS -I$x_includes"
+ dnl
+ dnl Use CPPFLAGS instead of CFLAGS because AC_CHECK_HEADERS uses
+ dnl CPPFLAGS, not CFLAGS
+ CPPFLAGS="$CPPFLAGS $GTK_CFLAGS"
+
+ saved_ldflags="$LDFLAGS"
+ LDFLAGS="$LDFLAGS $GTK_LIBS"
+
+ gnome_cv_passdown_x_libs="$GTK_LIBS"
+ gnome_cv_passdown_X_LIBS="$GTK_LIBS"
+ gnome_cv_passdown_X_CFLAGS="$GTK_CFLAGS"
+ gnome_cv_passdown_GTK_LIBS="$GTK_LIBS"
+
+ LDFLAGS="$saved_ldflags $GTK_LIBS"
+
+dnl We are requiring GTK >= 1.1.1, which means this will be fine anyhow.
+ USE_DEVGTK=true
+
+dnl AC_MSG_CHECKING([whether to use features from (unstable) GTK+ 1.1.x])
+dnl AC_EGREP_CPP(answer_affirmatively,
+dnl [#include <gtk/gtkfeatures.h>
+dnl #ifdef GTK_HAVE_FEATURES_1_1_0
+dnl answer_affirmatively
+dnl #endif
+dnl ], dev_gtk=yes, dev_gtk=no)
+dnl if test "$dev_gtk" = "yes"; then
+dnl USE_DEVGTK=true
+dnl fi
+dnl AC_MSG_RESULT("$dev_gtk")
+
+ GNOME_HAVE_SM=true
+ case "$GTK_LIBS" in
+ *-lSM*)
+ dnl Already found it.
+ ;;
+ *)
+ dnl Assume that if we have -lSM then we also have -lICE.
+ AC_CHECK_LIB(SM, SmcSaveYourselfDone,
+ [GTK_LIBS="-lSM -lICE $GTK_LIBS"],GNOME_HAVE_SM=false,
+ $x_libs -lICE)
+ ;;
+ esac
+
+ if test "$GNOME_HAVE_SM" = true; then
+ AC_CHECK_HEADERS(X11/SM/SMlib.h,,GNOME_HAVE_SM=false)
+ fi
+
+ if test "$GNOME_HAVE_SM" = true; then
+ AC_DEFINE(HAVE_LIBSM)
+ fi
+
+ XPM_LIBS=""
+ AC_CHECK_LIB(Xpm, XpmFreeXpmImage, [XPM_LIBS="-lXpm"], , $x_libs)
+ AC_SUBST(XPM_LIBS)
+
+ AC_REQUIRE([GNOME_PTHREAD_CHECK])
+ LDFLAGS="$saved_ldflags"
+
+ AC_PROVIDE([GNOME_X_CHECKS])
+])
ss='deletions'>-0/+1 * Also report the previous line when going backwards in time.mat2018-07-031-1/+3 * Remove an extra dot messing up copy and paste.mat2018-06-141-1/+1 * Return Tools/scripts/portsvar.sh to the pool.rene2018-06-021-1/+1 * Tools: add LEGALlinteadler2018-05-272-0/+23 * - Do not download obsolete attachmentssbz2018-05-221-2/+16 * Detect flavored dependencies in Tools/scripts/rmport and add myself to the co...rene2018-03-271-1/+2 * Show errors for duplicate source entries.bdrewery2018-01-261-0/+7 * Run Tools/scripts/mfh through devel/hs-ShellCheck.mat2018-01-231-17/+17 * Follow up on last commit and actually allow editingmat2017-12-291-0/+1 * Generic FLAVORS work.mat2017-11-301-1/+30 * Commit the actual patch I testedmat2017-11-101-1/+1 * Cleanup resurrected processing.mat2017-11-101-7/+1 * Don't blame the person that removed a resurrected.mat2017-11-101-1/+0 * Add braces around all if/else.mat2017-11-101-2/+3 * Re-enable blame (was annotate) with svn and git support.mat2017-10-301-2/+24 * The final sort was missing from some places.mat2017-10-301-2/+2 * Do not add $FreeBSD$ to the patch files.mat2017-08-231-3/+0 * Fix resurrected ports not being warned about if they have a new dest entry.bdrewery2017-08-081-3/+4 * Allow editing commit message on failure and save it somewhere if declined.bdrewery2017-06-131-1/+8 * Fix some FreeBSD.org case of bad case.mat2017-05-041-1/+1 * Add some usage instructions to the top of the mfh script. In particular,adamw2017-05-011-0/+6 * Update Tools/scripts/rmport to ignore commented out EXPIRATION_DATE linesler2017-05-011-1/+1 * Fix shebang. If /usr/bin/env is used the -w flag can't be passed after perl.ehaupt2017-04-254-138/+5 * Reset pgollucci@ as maintainer after 19 months of inactivityrene2017-03-302-2/+2 * Set maintainer of these scripts to portmgr as the previous maintainers retired.rene2017-02-134-4/+4 * - Remove inclusion of bsd.default-versions.mk from ftp/curl/Makefile sotijl2017-02-061-1/+0 * Make sure the merge is done on the latest branch.mat2017-01-041-11/+24 * Use make(1) to extract variables from a Makefile, not grep.mat2016-09-081-2/+2 * Fix the '-a' option to ${PORTSDIR}/Tools/scripts/addportmatthew2016-08-171-1/+1 * Echo where the merge was done, so one can go and have a look.mat2016-08-151-0/+1 * fixup last updates, and try to be better with slave ports.mat2016-08-031-4/+14 * MFportsindexbuild:antoine2016-07-171-21/+10 * Refactor a bit.mat2016-06-171-4/+11 * - Update to last versionsbz2016-06-132-36/+63 * Add a script to indent make(1)'s .if/.for blocks.mat2016-06-021-0/+42 * Remove a stale comment in Tools/scripts/rmportrene2016-05-181-1/+0 * As a frequent user of the rmport script, it was time for some improvements:rene2016-05-181-21/+10 * MFportsindexbuild: build INDEX-9 with fmakeantoine2016-05-011-1/+6 * Remove USE_SQLITE from bsd.databases.mk, replaced by USES=sqlite.mat2016-04-261-1/+1 * Revert escaped un-approved commit.mandree2016-04-121-134/+72 * Drop maintainership.mandree2016-04-121-72/+134 * redundant-opt-files script: Fix deleted port outputmarino2016-03-251-1/+1 * redundant-opt-files script: Handle cache for deleted portsmarino2016-03-251-0/+5 * redundant-opt-files.sh script: validate PORTSDIR valuemarino2016-03-171-0/+6 * - add Approved by: lineohauer2016-03-161-0/+2 * Add new tool script: redundant-opt-files.shmarino2016-02-141-0/+51 * Remove spurious quotation mark.erwin2015-12-221-1/+1 * Allow running this with a negative revision number, to backout a commit.mat2015-12-181-2/+2 * Let addport script to use svnlite if availablerm2015-09-261-18/+20 * Default to repo.FreeBSD.org for commits, as urged by our repo meister.naddy2015-09-211-5/+4 * Default to repo.FreeBSD.org for commits, as urged by our repo meister.naddy2015-09-152-3/+3 * Actually allow only one revision to be merged.mat2015-09-071-1/+1 * Support merging multiple revisions in one go with mfh.mat2015-09-071-18/+38 * Remove UNIQUENAME and LATEST_LINK.mat2015-08-172-82/+0 * Drop building 8.xerwin2015-08-011-6/+2 * Invoke perl with /usr/bin/envehaupt2015-07-091-1/+2 * Tools/scripts: Add size offenders report generatormarino2015-05-211-0/+46 * - Remove a few more scripts from Tools/scripts:ak2015-04-1012-1572/+0 * - Obsolete and made unusable by changes in the Ports Collectionak2015-04-097-867/+0 * Add getpatch.sh, a shell script only tool to download patch attachments on bu...rodrigo2015-03-313-0/+220 * This scripts is not useful anymorebapt2015-03-191-100/+0 * Tools/scripts/bump-revision.sh: fix regression introduced in r380431robak2015-03-051-20/+29 * Tools/scripts/bump-revision.sh: various fixesrobak2015-03-041-23/+31 * Support non default ports path.pawel2015-02-211-1/+4 * Don't add ports/ to the PR line.mat2015-01-271-1/+1 * - Remove vestiges of cvs annotate supportak2014-12-081-10/+0 * - Doesn't support Bugzilla bugtrackerak2014-11-251-96/+0 * Make this work with any amount of tabulations between the = and the value of ...mat2014-11-191-1/+1 * Fix if PORTREVISION is not already there.mat2014-11-191-1/+1 * Reset miwi's maintainership per his demandbapt2014-11-181-1/+1 * Catch and report substitution failure on lines such as PORTREVISION=${SOME_VAR}.mandree2014-08-221-9/+22 * - Eat excess newline at the end of the commit log.bdrewery2014-08-221-1/+2 * Add a BerkeleyDB upgrade helper script in preparation of 4...4.7 removal.mandree2014-08-211-0/+77 * - Better handling when custom encoding is specified in detailssbz2014-07-231-24/+23 * New script: Tools/scripts/bump-revision.shrobak2014-06-271-0/+66 * ports/Tools/scripts/mfh revision:mandree2014-06-261-25/+36 * Remove consistency-check since it relies on MD5 and only works for old pkg_ t...eadler2014-06-252-186/+12 * Clean up READMEeadler2014-06-251-2/+0 * add missing Mt to Aqeadler2014-06-251-1/+1 * To my knoledge (and grep) the close-pr script in Tools/scripts is not used an...eadler2014-06-252-364/+0 * Invoke perl with /usr/bin/env, as perl is not guaranteed to exist inadamw2014-06-237-7/+7 * * Default to name search (-n) if no flags are specified.adamw2014-06-232-69/+91 * - Switch to bugzilla as default value for the modesbz2014-06-192-7/+7 * - Correct the bugzilla urlmiwi2014-06-021-1/+1 * - Move security-check.awk to Mk/Scripts where it is more proper these days.bdrewery2014-05-101-100/+0 * - Use https in URL_BASEsbz2014-04-221-2/+2 * Replace edwin's contact address with mine in the help, too. Andgerald2014-04-191-1/+1 * Only show the final instructions on how to do the actual commit whengerald2014-04-061-6/+8 * Fix cdiffcrees2014-03-251-2/+2 * Make MOVEDLint output more consistenteadler2014-01-241-1/+1 * Give proper reason why we reject replaced files.mandree2014-01-211-1/+2 * - Allow a leading "r" in the svn revisionlme2014-01-091-16/+28