aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Djärv2012-09-12 22:21:39 +0200
committerJan Djärv2012-09-12 22:21:39 +0200
commitd673aedc2feb6828c7470492b254ff9cfe1f9e63 (patch)
tree3f4284d8274cf03dd784dc31be74aaa4e6ed3cdc
parentbfeae2cf098dcf5bdb4af14d896e790cbe91d60f (diff)
downloademacs-d673aedc2feb6828c7470492b254ff9cfe1f9e63.tar.gz
emacs-d673aedc2feb6828c7470492b254ff9cfe1f9e63.zip
* configure.ac: No --with-x-toolkit given: Try gtk3 toolkit first
and then gtk2 if not found. --with-x-toolkit=gtk|yes: As above, but fail if gtk2 or gt3 not found. --with-x-toolkit=gtk2: Only try gtk2, fail if not found. --with-x-toolkit=gtk3: Only try gtk3, fail if not found.
-rw-r--r--ChangeLog8
-rw-r--r--configure.ac39
2 files changed, 33 insertions, 14 deletions
diff --git a/ChangeLog b/ChangeLog
index 23fc479e124..a8a7fdc2966 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
12012-09-12 Jan Djärv <jan.h.d@swipnet.se>
2
3 * configure.ac: No --with-x-toolkit given: Try gtk3 toolkit first
4 and then gtk2 if not found.
5 --with-x-toolkit=gtk|yes: As above, but fail if gtk2 or gt3 not found.
6 --with-x-toolkit=gtk2: Only try gtk2, fail if not found.
7 --with-x-toolkit=gtk3: Only try gtk3, fail if not found.
8
12012-09-11 Glenn Morris <rgm@gnu.org> 92012-09-11 Glenn Morris <rgm@gnu.org>
2 10
3 * Makefile.in (install-arch-dep, install-arch-indep, install-doc): 11 * Makefile.in (install-arch-dep, install-arch-indep, install-doc):
diff --git a/configure.ac b/configure.ac
index 9491c1da8d5..ed1849514c1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -138,7 +138,7 @@ dnl This should be the last --with option, because --with-x is
138dnl added later on when we find the path of X, and it's best to 138dnl added later on when we find the path of X, and it's best to
139dnl keep them together visually. 139dnl keep them together visually.
140AC_ARG_WITH([x-toolkit],[AS_HELP_STRING([--with-x-toolkit=KIT], 140AC_ARG_WITH([x-toolkit],[AS_HELP_STRING([--with-x-toolkit=KIT],
141 [use an X toolkit (KIT one of: yes or gtk, gtk3, lucid or athena, motif, no)])], 141 [use an X toolkit (KIT one of: yes or gtk, gtk2, gtk3, lucid or athena, motif, no)])],
142[ case "${withval}" in 142[ case "${withval}" in
143 y | ye | yes ) val=gtk ;; 143 y | ye | yes ) val=gtk ;;
144 n | no ) val=no ;; 144 n | no ) val=no ;;
@@ -146,11 +146,13 @@ AC_ARG_WITH([x-toolkit],[AS_HELP_STRING([--with-x-toolkit=KIT],
146 a | at | ath | athe | athen | athena ) val=athena ;; 146 a | at | ath | athe | athen | athena ) val=athena ;;
147 m | mo | mot | moti | motif ) val=motif ;; 147 m | mo | mot | moti | motif ) val=motif ;;
148 g | gt | gtk ) val=gtk ;; 148 g | gt | gtk ) val=gtk ;;
149 gtk2 ) val=gtk2 ;;
149 gtk3 ) val=gtk3 ;; 150 gtk3 ) val=gtk3 ;;
150 * ) 151 * )
151AC_MSG_ERROR([`--with-x-toolkit=$withval' is invalid; 152AC_MSG_ERROR([`--with-x-toolkit=$withval' is invalid;
152this option's value should be `yes', `no', `lucid', `athena', `motif', `gtk' or 153this option's value should be `yes', `no', `lucid', `athena', `motif', `gtk',
153`gtk3'. `yes' and `gtk' are synonyms. `athena' and `lucid' are synonyms.]) 154`gtk2' or `gtk3'. `yes' and `gtk' are synonyms.
155`athena' and `lucid' are synonyms.])
154 ;; 156 ;;
155 esac 157 esac
156 with_x_toolkit=$val 158 with_x_toolkit=$val
@@ -1578,6 +1580,9 @@ case "${window_system}" in
1578dnl Don't set this for GTK. A lot of tests below assumes Xt when 1580dnl Don't set this for GTK. A lot of tests below assumes Xt when
1579dnl USE_X_TOOLKIT is set. 1581dnl USE_X_TOOLKIT is set.
1580 USE_X_TOOLKIT=none ;; 1582 USE_X_TOOLKIT=none ;;
1583 gtk2 ) with_gtk2=yes
1584 term_header=gtkutil.h
1585 USE_X_TOOLKIT=none ;;
1581 gtk3 ) with_gtk3=yes 1586 gtk3 ) with_gtk3=yes
1582 term_header=gtkutil.h 1587 term_header=gtkutil.h
1583 USE_X_TOOLKIT=none ;; 1588 USE_X_TOOLKIT=none ;;
@@ -1900,35 +1905,41 @@ fi
1900 1905
1901HAVE_GTK=no 1906HAVE_GTK=no
1902GTK_OBJ= 1907GTK_OBJ=
1903if test "${with_gtk3}" = "yes"; then 1908check_gtk2=no
1909gtk3_pkg_errors=
1910if test "${with_gtk3}" = "yes" || test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then
1904 GLIB_REQUIRED=2.28 1911 GLIB_REQUIRED=2.28
1905 GTK_REQUIRED=3.0 1912 GTK_REQUIRED=3.0
1906 GTK_MODULES="gtk+-3.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED" 1913 GTK_MODULES="gtk+-3.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
1907 1914
1908 dnl Checks for libraries. 1915 dnl Checks for libraries.
1909 PKG_CHECK_MODULES(GTK, $GTK_MODULES, pkg_check_gtk=yes, pkg_check_gtk=no) 1916 PKG_CHECK_MODULES(GTK, $GTK_MODULES, pkg_check_gtk=yes, pkg_check_gtk=no)
1910 if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then 1917 if test "$pkg_check_gtk" = "no" && test "$with_gtk3" = "yes"; then
1911 AC_MSG_ERROR($GTK_PKG_ERRORS) 1918 AC_MSG_ERROR($GTK_PKG_ERRORS)
1912 fi 1919 fi
1913 AC_DEFINE(HAVE_GTK3, 1, [Define to 1 if using GTK 3 or later.]) 1920 if test "$pkg_check_gtk" = "yes"; then
1914 GTK_OBJ=emacsgtkfixed.o 1921 AC_DEFINE(HAVE_GTK3, 1, [Define to 1 if using GTK 3 or later.])
1915 term_header=gtkutil.h 1922 GTK_OBJ=emacsgtkfixed.o
1923 term_header=gtkutil.h
1924 else
1925 check_gtk2=yes
1926 gtk3_pkg_errors="$GTK_PKG_ERRORS "
1927 fi
1916fi 1928fi
1917 1929
1918if test "$pkg_check_gtk" != "yes"; then 1930if test "${with_gtk2}" = "yes" || test "$check_gtk2" = "yes"; then
1919 HAVE_GTK=no
1920if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then
1921 GLIB_REQUIRED=2.10 1931 GLIB_REQUIRED=2.10
1922 GTK_REQUIRED=2.10 1932 GTK_REQUIRED=2.10
1923 GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED" 1933 GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
1924 1934
1925 dnl Checks for libraries. 1935 dnl Checks for libraries.
1926 PKG_CHECK_MODULES(GTK, $GTK_MODULES, pkg_check_gtk=yes, pkg_check_gtk=no) 1936 PKG_CHECK_MODULES(GTK, $GTK_MODULES, pkg_check_gtk=yes, pkg_check_gtk=no)
1927 if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then 1937 if test "$pkg_check_gtk" = "no"; then
1928 AC_MSG_ERROR($GTK_PKG_ERRORS) 1938 if test "$USE_X_TOOLKIT" = "maybe" || test "$with_gtk" = "yes" || test "$with_gtk2" = "yes"; then
1939 AC_MSG_ERROR($gtk3_pkg_errors$GTK_PKG_ERRORS)
1940 fi
1929 fi 1941 fi
1930fi 1942fi
1931fi
1932 1943
1933if test x"$pkg_check_gtk" = xyes; then 1944if test x"$pkg_check_gtk" = xyes; then
1934 1945