diff options
author | Bram Moolenaar <Bram@vim.org> | 2010-06-25 05:37:59 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2010-06-25 05:37:59 +0200 |
commit | 182c5be111889643294083c830080cfbaa3dd154 (patch) | |
tree | 4c393150480418e953031c93453cedc10738185f /src/configure.in | |
parent | ba52cde53d8eeb0bd8949ab0acc47a56f87e7963 (diff) |
Remove the old and not well supported GTK 1 code. (James Vega)
Diffstat (limited to 'src/configure.in')
-rw-r--r-- | src/configure.in | 219 |
1 files changed, 37 insertions, 182 deletions
diff --git a/src/configure.in b/src/configure.in index f44cf0f765..043eb329e3 100644 --- a/src/configure.in +++ b/src/configure.in @@ -183,7 +183,7 @@ if test "`(uname) 2>/dev/null`" = Darwin; then dnl or Motif, Athena or GTK GUI is used. AC_CHECK_HEADER(Carbon/Carbon.h, CARBON=yes) if test "x$CARBON" = "xyes"; then - if test -z "$with_x" -a "X$enable_gui" != Xmotif -a "X$enable_gui" != Xathena -a "X$enable_gui" != Xgtk -a "X$enable_gui" != Xgtk2; then + if test -z "$with_x" -a "X$enable_gui" != Xmotif -a "X$enable_gui" != Xathena -a "X$enable_gui" != Xgtk2; then with_x=no fi fi @@ -1156,7 +1156,6 @@ AC_ARG_ENABLE(xim, [ --enable-xim Include XIM input support.], AC_MSG_RESULT($enable_xim), [enable_xim="auto"; AC_MSG_RESULT(defaulting to auto)]) -dnl defining FEAT_XIM is delayed, so that it can be disabled for older GTK AC_MSG_CHECKING(--enable-fontset argument) AC_ARG_ENABLE(fontset, @@ -1296,7 +1295,7 @@ test "x$with_x" = xno -a "x$MACOSX" != "xyes" -a "x$QNX" != "xyes" && enable_gui AC_MSG_CHECKING(--enable-gui argument) AC_ARG_ENABLE(gui, - [ --enable-gui[=OPTS] X11 GUI [default=auto] [OPTS=auto/no/gtk/gtk2/gnome/gnome2/motif/athena/neXtaw/photon/carbon]], , enable_gui="auto") + [ --enable-gui[=OPTS] X11 GUI [default=auto] [OPTS=auto/no/gtk2/gnome2/motif/athena/neXtaw/photon/carbon]], , enable_gui="auto") dnl Canonicalize the --enable-gui= argument so that it can be easily compared. dnl Do not use character classes for portability with old tools. @@ -1304,7 +1303,6 @@ enable_gui_canon=`echo "_$enable_gui" | \ sed 's/[[ _+-]]//g;y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` dnl Skip everything by default. -SKIP_GTK=YES SKIP_GTK2=YES SKIP_GNOME=YES SKIP_MOTIF=YES @@ -1343,24 +1341,16 @@ else case "$enable_gui_canon" in no|none) AC_MSG_RESULT(no GUI support) ;; yes|""|auto) AC_MSG_RESULT(yes/auto - automatic GUI support) - SKIP_GTK= SKIP_GTK2= SKIP_GNOME= SKIP_MOTIF= SKIP_ATHENA= SKIP_NEXTAW= SKIP_CARBON=;; - gtk) AC_MSG_RESULT(GTK+ 1.x GUI support) - SKIP_GTK=;; gtk2) AC_MSG_RESULT(GTK+ 2.x GUI support) - SKIP_GTK= SKIP_GTK2=;; - gnome) AC_MSG_RESULT(GNOME 1.x GUI support) - SKIP_GNOME= - SKIP_GTK=;; gnome2) AC_MSG_RESULT(GNOME 2.x GUI support) SKIP_GNOME= - SKIP_GTK= SKIP_GTK2=;; motif) AC_MSG_RESULT(Motif GUI support) SKIP_MOTIF=;; @@ -1373,32 +1363,20 @@ else fi -if test "x$SKIP_GTK" != "xYES" -a "$enable_gui_canon" != "gtk" -a "$enable_gui_canon" != "gtk2"; then - AC_MSG_CHECKING(whether or not to look for GTK) - AC_ARG_ENABLE(gtk-check, - [ --enable-gtk-check If auto-select GUI, check for GTK [default=yes]], - , enable_gtk_check="yes") - AC_MSG_RESULT($enable_gtk_check) - if test "x$enable_gtk_check" = "xno"; then - SKIP_GTK=YES - SKIP_GNOME=YES - fi -fi - if test "x$SKIP_GTK2" != "xYES" -a "$enable_gui_canon" != "gtk2" \ -a "$enable_gui_canon" != "gnome2"; then AC_MSG_CHECKING(whether or not to look for GTK+ 2) AC_ARG_ENABLE(gtk2-check, - [ --enable-gtk2-check If GTK GUI, check for GTK+ 2 [default=yes]], + [ --enable-gtk2-check If auto-select GUI, check for GTK+ 2 [default=yes]], , enable_gtk2_check="yes") AC_MSG_RESULT($enable_gtk2_check) if test "x$enable_gtk2_check" = "xno"; then SKIP_GTK2=YES + SKIP_GNOME=YES fi fi -if test "x$SKIP_GNOME" != "xYES" -a "$enable_gui_canon" != "gnome" \ - -a "$enable_gui_canon" != "gnome2"; then +if test "x$SKIP_GNOME" != "xYES" -a "$enable_gui_canon" != "gnome2"; then AC_MSG_CHECKING(whether or not to look for GNOME) AC_ARG_ENABLE(gnome-check, [ --enable-gnome-check If GTK GUI, check for GNOME [default=no]], @@ -1472,7 +1450,6 @@ if test "x$MACOSX" = "xyes" -a -z "$SKIP_CARBON" -a "x$CARBON" = "xyes"; then datadir='${prefix}/Vim.app/Contents/Resources' dnl skip everything else - SKIP_GTK=YES; SKIP_GTK2=YES; SKIP_GNOME=YES; SKIP_MOTIF=YES; @@ -1482,12 +1459,8 @@ if test "x$MACOSX" = "xyes" -a -z "$SKIP_CARBON" -a "x$CARBON" = "xyes"; then SKIP_CARBON=YES fi -dnl -dnl Get the cflags and libraries from the gtk-config script -dnl - dnl define an autoconf function to check for a specified version of GTK, and -dnl try to compile/link a GTK program. this gets used once for GTK 1.1.16. +dnl try to compile/link a GTK program. dnl dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) dnl Test for GTK, and define GTK_CFLAGS, GTK_LIBDIR and GTK_LIBS @@ -1496,7 +1469,7 @@ AC_DEFUN(AM_PATH_GTK, [ if test "X$GTK_CONFIG" != "Xno" -o "X$PKG_CONFIG" != "Xno"; then { - min_gtk_version=ifelse([$1], ,0.99.7,$1) + min_gtk_version=ifelse([$1], ,2.2.0,$1) AC_MSG_CHECKING(for GTK - version >= $min_gtk_version) no_gtk="" if (test "X$SKIP_GTK2" != "XYES" -a "X$PKG_CONFIG" != "Xno") \ @@ -1515,18 +1488,6 @@ AC_DEFUN(AM_PATH_GTK, gtk_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'` } - elif test "X$GTK_CONFIG" != "Xno"; then - { - GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags` - GTK_LIBDIR= - GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs` - gtk_major_version=`$GTK_CONFIG $gtk_config_args --version | \ - sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'` - gtk_minor_version=`$GTK_CONFIG $gtk_config_args --version | \ - sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'` - gtk_micro_version=`$GTK_CONFIG $gtk_config_args --version | \ - sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'` - } else no_gtk=yes fi @@ -1539,8 +1500,7 @@ AC_DEFUN(AM_PATH_GTK, LIBS="$LIBS $GTK_LIBS" dnl - dnl Now check if the installed GTK is sufficiently new. (Also sanity - dnl checks the results of gtk-config to some extent + dnl Now check if the installed GTK is sufficiently new. dnl rm -f conf.gtktest AC_TRY_RUN([ @@ -1642,7 +1602,7 @@ AC_DEFUN([GNOME_INIT_HOOK], fi, want_gnome=yes) - if test "x$want_gnome" = xyes -a "0$gtk_major_version" -ge 2; then + if test "x$want_gnome" = xyes; then { AC_MSG_CHECKING(for libgnomeui-2.0) if $PKG_CONFIG --exists libgnomeui-2.0; then @@ -1669,51 +1629,6 @@ AC_DEFUN([GNOME_INIT_HOOK], fi fi } - elif test "x$want_gnome" = xyes; then - { - AC_PATH_PROG(GNOME_CONFIG,gnome-config,no) - if test "$GNOME_CONFIG" = "no"; then - no_gnome_config="yes" - else - AC_MSG_CHECKING(if $GNOME_CONFIG works) - if $GNOME_CONFIG --libs-only-l gnome >/dev/null 2>&1; then - AC_MSG_RESULT(yes) - GNOME_LIBS="`$GNOME_CONFIG --libs-only-l gnome gnomeui`" - GNOME_LIBDIR="`$GNOME_CONFIG --libs-only-L gnorba gnomeui`" - GNOME_INCLUDEDIR="`$GNOME_CONFIG --cflags gnorba gnomeui`" - $1 - else - AC_MSG_RESULT(no) - no_gnome_config="yes" - fi - fi - - if test x$exec_prefix = xNONE; then - if test x$prefix = xNONE; then - gnome_prefix=$ac_default_prefix/lib - else - gnome_prefix=$prefix/lib - fi - else - gnome_prefix=`eval echo \`echo $libdir\`` - fi - - if test "$no_gnome_config" = "yes"; then - AC_MSG_CHECKING(for gnomeConf.sh file in $gnome_prefix) - if test -f $gnome_prefix/gnomeConf.sh; then - AC_MSG_RESULT(found) - echo "loading gnome configuration from" \ - "$gnome_prefix/gnomeConf.sh" - . $gnome_prefix/gnomeConf.sh - $1 - else - AC_MSG_RESULT(not found) - if test x$2 = xfail; then - AC_MSG_ERROR(Could not find the gnomeConf.sh file that is generated by gnome-libs install) - fi - fi - fi - } fi ]) @@ -1723,21 +1638,9 @@ AC_DEFUN([GNOME_INIT],[ dnl --------------------------------------------------------------------------- -dnl Check for GTK. First checks for gtk-config, cause it needs that to get the -dnl correct compiler flags. Then checks for GTK 1.1.16. If that fails, then -dnl it checks for 1.0.6. If both fail, then continue on for Motif as before... +dnl Check for GTK2. If it fails, then continue on for Motif as before... dnl --------------------------------------------------------------------------- -if test -z "$SKIP_GTK"; then - - AC_MSG_CHECKING(--with-gtk-prefix argument) - AC_ARG_WITH(gtk-prefix,[ --with-gtk-prefix=PFX Prefix where GTK is installed (optional)], - gtk_config_prefix="$withval"; AC_MSG_RESULT($gtk_config_prefix), - gtk_config_prefix=""; AC_MSG_RESULT(no)) - - AC_MSG_CHECKING(--with-gtk-exec-prefix argument) - AC_ARG_WITH(gtk-exec-prefix,[ --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)], - gtk_config_exec_prefix="$withval"; AC_MSG_RESULT($gtk_config_prefix), - gtk_config_exec_prefix=""; AC_MSG_RESULT(no)) +if test -z "$SKIP_GTK2"; then AC_MSG_CHECKING(--disable-gtktest argument) AC_ARG_ENABLE(gtktest, [ --disable-gtktest Do not try to compile and run a test GTK program], @@ -1748,89 +1651,41 @@ if test -z "$SKIP_GTK"; then AC_MSG_RESULT(gtk test disabled) fi - if test "x$gtk_config_prefix" != "x" ; then - gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix" - GTK_CONFIG=$gtk_config_prefix/bin/gtk-config - fi - if test "x$gtk_config_exec_prefix" != "x" ; then - gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix" - GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config - fi - if test "X$GTK_CONFIG" = "X"; then - AC_PATH_PROG(GTK_CONFIG, gtk-config, no) - if test "X$GTK_CONFIG" = "Xno"; then - dnl Some distributions call it gtk12-config, annoying! - AC_PATH_PROG(GTK12_CONFIG, gtk12-config, no) - GTK_CONFIG="$GTK12_CONFIG" - fi - else - AC_MSG_RESULT(Using GTK configuration program $GTK_CONFIG) - fi if test "X$PKG_CONFIG" = "X"; then AC_PATH_PROG(PKG_CONFIG, pkg-config, no) fi - if test "x$GTK_CONFIG:$PKG_CONFIG" != "xno:no"; then + if test "x$PKG_CONFIG" != "xno"; then dnl First try finding version 2.2.0 or later. The 2.0.x series has dnl problems (bold fonts, --remote doesn't work). - if test "X$SKIP_GTK2" != "XYES"; then - AM_PATH_GTK(2.2.0, - [GUI_LIB_LOC="$GTK_LIBDIR" - GTK_LIBNAME="$GTK_LIBS" - GUI_INC_LOC="$GTK_CFLAGS"], ) - if test "x$GTK_CFLAGS" != "x"; then - SKIP_ATHENA=YES - SKIP_NEXTAW=YES - SKIP_MOTIF=YES - GUITYPE=GTK - AC_SUBST(GTK_LIBNAME) - fi - fi - - dnl If there is no 2.2.0 or later try the 1.x.x series. We require at - dnl least GTK 1.1.16. 1.0.6 doesn't work. 1.1.1 to 1.1.15 - dnl were test versions. - if test "x$GUITYPE" != "xGTK"; then - SKIP_GTK2=YES - AM_PATH_GTK(1.1.16, - [GTK_LIBNAME="$GTK_LIBS" - GUI_INC_LOC="$GTK_CFLAGS"], ) - if test "x$GTK_CFLAGS" != "x"; then - SKIP_ATHENA=YES - SKIP_NEXTAW=YES - SKIP_MOTIF=YES - GUITYPE=GTK - AC_SUBST(GTK_LIBNAME) - fi + AM_PATH_GTK(2.2.0, + [GUI_LIB_LOC="$GTK_LIBDIR" + GTK_LIBNAME="$GTK_LIBS" + GUI_INC_LOC="$GTK_CFLAGS"], ) + if test "x$GTK_CFLAGS" != "x"; then + SKIP_ATHENA=YES + SKIP_NEXTAW=YES + SKIP_MOTIF=YES + GUITYPE=GTK + AC_SUBST(GTK_LIBNAME) fi fi - dnl Give a warning if GTK is older than 1.2.3 if test "x$GUITYPE" = "xGTK"; then - if test "$gtk_major_version" = 1 -a "0$gtk_minor_version" -lt 2 \ - -o "$gtk_major_version" = 1 -a "$gtk_minor_version" = 2 -a "0$gtk_micro_version" -lt 3; then - AC_MSG_RESULT(this GTK version is old; version 1.2.3 or later is recommended) - else + AC_DEFINE(HAVE_GTK2) + if test "$gtk_minor_version" = 1 -a "0$gtk_micro_version" -ge 1 \ + || test "0$gtk_minor_version" -ge 2; then + AC_DEFINE(HAVE_GTK_MULTIHEAD) + fi + dnl + dnl if GTK exists, then check for GNOME. + dnl + if test -z "$SKIP_GNOME"; then { - if test "0$gtk_major_version" -ge 2; then - AC_DEFINE(HAVE_GTK2) - if test "$gtk_minor_version" = 1 -a "0$gtk_micro_version" -ge 1 \ - || test "0$gtk_minor_version" -ge 2 \ - || test "0$gtk_major_version" -gt 2; then - AC_DEFINE(HAVE_GTK_MULTIHEAD) - fi - fi - dnl - dnl if GTK exists, and it's not the 1.0.x series, then check for GNOME. - dnl - if test -z "$SKIP_GNOME"; then - { - GNOME_INIT_HOOK([have_gnome=yes]) - if test x$have_gnome = xyes ; then - AC_DEFINE(FEAT_GUI_GNOME) - GUI_INC_LOC="$GUI_INC_LOC $GNOME_INCLUDEDIR" - GTK_LIBNAME="$GTK_LIBNAME $GNOME_LIBDIR $GNOME_LIBS" - fi - } + GNOME_INIT_HOOK([have_gnome=yes]) + if test "x$have_gnome" = xyes ; then + AC_DEFINE(FEAT_GUI_GNOME) + GUI_INC_LOC="$GUI_INC_LOC $GNOME_INCLUDEDIR" + GTK_LIBNAME="$GTK_LIBNAME $GNOME_LIBDIR $GNOME_LIBS" fi } fi @@ -2088,7 +1943,7 @@ if test "x$GUITYPE" = "xNONE" -a "$enable_fontset" = "yes"; then AC_MSG_RESULT(no GUI selected; fontset has been disabled) enable_fontset="no" fi -if test "x$GUITYPE:$enable_fontset" = "xGTK:yes" -a "0$gtk_major_version" -ge 2; then +if test "x$GUITYPE:$enable_fontset" = "xGTK:yes"; then AC_MSG_RESULT(GTK+ 2 GUI selected; fontset has been disabled) enable_fontset="no" fi |