SF.net SVN: geany: [1961] trunk

eht16 at users.sourceforge.net eht16 at xxxxx
Fri Oct 19 14:48:20 UTC 2007


Revision: 1961
          http://geany.svn.sourceforge.net/geany/?rev=1961&view=rev
Author:   eht16
Date:     2007-10-19 07:48:19 -0700 (Fri, 19 Oct 2007)

Log Message:
-----------
Apply most of the patch from #1794250 (thanks):
Remove compiler specific flags.
Add configure option to specify the path to libvte.so.
Remove many unnecessary configure checks.
Stop configure if msgfmt was not found(gettext not installed).

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/configure.in
    trunk/doc/geany.html
    trunk/doc/geany.txt
    trunk/plugins/Makefile.am
    trunk/scintilla/Makefile.am
    trunk/scintilla/PlatGTK.cxx
    trunk/src/gb.c
    trunk/src/project.c
    trunk/src/vte.c
    trunk/tagmanager/Makefile.am

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2007-10-18 19:55:21 UTC (rev 1960)
+++ trunk/ChangeLog	2007-10-19 14:48:19 UTC (rev 1961)
@@ -1,3 +1,15 @@
+2007-10-19  Enrico Tröger  <enrico(dot)troeger(at)uvena(dot)de>
+
+ * configure.in, doc/geany.html, doc/geany.txt, plugins/Makefile.am,
+   scintilla/Makefile.am, scintilla/PlatGTK.cxx, src/gb.c,
+   src/project.c, src/vte.c, tagmanager/Makefile.am:
+   Apply most of the patch from #1794250 (thanks):
+   Remove compiler specific flags.
+   Add configure option to specify the path to libvte.so.
+   Remove many unnecessary configure checks.
+   Stop configure if msgfmt was not found(gettext not installed).
+
+
 2007-10-18  Enrico Tröger  <enrico(dot)troeger(at)uvena(dot)de>
 
  * src/plugindata.h, src/plugins.c:

Modified: trunk/configure.in
===================================================================
--- trunk/configure.in	2007-10-18 19:55:21 UTC (rev 1960)
+++ trunk/configure.in	2007-10-19 14:48:19 UTC (rev 1961)
@@ -11,16 +11,11 @@
 AC_MINIX
 
 AC_PROG_CC
-AM_CONDITIONAL(IS_COMPILER_GCC,test x$SSC == x)
 
-AM_PROG_CC_STDC
-AC_HEADER_STDC
 AC_PROG_CXX
-AC_PROG_CPP
 #AC_PROG_RANLIB
 AC_PROG_INSTALL
 AC_PROG_LN_S
-AC_PROG_MAKE_SET
 AC_PROG_INTLTOOL
 
 # for plugins
@@ -31,35 +26,16 @@
 # autoscan start
 
 # Checks for header files.
-AC_HEADER_DIRENT
-AC_HEADER_STDC
-AC_HEADER_SYS_WAIT
 AC_CHECK_HEADERS([fcntl.h fnmatch.h glob.h libintl.h limits.h stddef.h stdlib.h string.h sys/time.h unistd.h])
 
 # Checks for typedefs, structures, and compiler characteristics.
-AC_HEADER_STAT
-AC_HEADER_STDBOOL
-AC_C_CONST
-AC_C_INLINE
 AC_TYPE_OFF_T
 AC_TYPE_SIZE_T
 AC_HEADER_TIME
 AC_STRUCT_TM
-AC_C_VOLATILE
 
 # Checks for library functions.
-AC_FUNC_CLOSEDIR_VOID
-AC_FUNC_ERROR_AT_LINE
-#AC_REPLACE_FNMATCH
-AC_FUNC_LSTAT
-AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
-AC_FUNC_MALLOC
-AC_FUNC_MEMCMP
-AC_FUNC_REALLOC
-AC_TYPE_SIGNAL
-AC_FUNC_STAT
-AC_FUNC_VPRINTF
-AC_CHECK_FUNCS([gethostname ftruncate fgetpos getcwd gettimeofday isascii mblen memset mkstemp putenv realpath regcomp setenv strcasecmp strchr strdup strerror strrchr strspn strstr strtol])
+AC_CHECK_FUNCS([gethostname ftruncate fgetpos getcwd isascii mblen memset mkstemp realpath regcomp strcasecmp strchr strdup strerror strrchr strstr strtol])
 
 # autoscan end
 
@@ -77,8 +53,8 @@
 AC_DEFINE_UNQUOTED([REVISION], "$REVISION", [subversion revision number])
 
 # GTK checks
-pkg_modules="gtk+-2.0 >= 2.6.0"
-PKG_CHECK_MODULES(GTK, [$pkg_modules])
+gtk_modules="gtk+-2.0 >= 2.6.0"
+PKG_CHECK_MODULES(GTK, [$gtk_modules])
 AC_SUBST(GTK_CFLAGS)
 AC_SUBST(GTK_LIBS)
 
@@ -97,17 +73,16 @@
 fi
 
 # VTE support
-AC_ARG_ENABLE(vte, AC_HELP_STRING([--enable-vte],[enable if you want virtual termninal support [[default=yes]]]),
+AC_ARG_ENABLE(vte, AC_HELP_STRING([--enable-vte],
+ [enable if you want virtual termninal support [[default=yes]]]),
  [want_vte="$enableval"], [want_vte="yes"])
+if test "x$want_vte" = "xyes"; then
+	AC_DEFINE(HAVE_VTE, 1, [Define if you want VTE support])
+fi
+AC_ARG_WITH(vte-module-path, AC_HELP_STRING([--with-vte-module-path=PATH],
+ [Path to a loadable libvte [[default=None]]]), [AC_DEFINE_UNQUOTED([VTE_MODULE_PATH],
+ ["$withval"], [Path to a loadable libvte])])
 
-# if test "$want_vte" = "yes"; then
-#   PKG_CHECK_MODULES(VTE, [vte],
-#                     [AC_DEFINE(HAVE_VTE, 1, [Define if you want VTE support])],
-#                     [AC_MSG_ERROR([VTE support enabled, but VTE not found])])
-#	  AC_CHECK_LIB(vte, vte_terminal_new,
-#					[AC_DEFINE(HAVE_VTE, 1, [Define if you want VTE support])],
-#					[AC_MSG_ERROR([VTE support enabled, but VTE not found])], [])
-# fi
 
 # Plugins support
 AC_ARG_ENABLE(plugins, [AC_HELP_STRING([--disable-plugins], [compile without plugin support])], , enable_plugins=yes)
@@ -120,17 +95,17 @@
 fi
 
 # Check for random number paths (skip when cross compiling)
-if test "x$build" = "x$target"; then
+if test "x$build" = "x$host"; then
 	AC_CHECK_FILE([/dev/urandom], AC_DEFINE([HAVE_DEVURANDOM], [1], [Define that you found /dev/urandom]))
 	AC_CHECK_FILE([/dev/random], AC_DEFINE([HAVE_DEVRANDOM], [1], [Define that you found /dev/random]))
 fi
 
-if test "x$target" = "xi386-mingw32msvc"; then
+if test "x$host" = "xi386-mingw32msvc"; then
 	AC_DEFINE_UNQUOTED([WIN32], 1, [we are cross compiling for WIN32])
 	want_vte="no"
 	AC_EXEEXT
 fi
-AM_CONDITIONAL(MINGW, test "x$target" = "xi386-mingw32msvc")
+AM_CONDITIONAL(MINGW, test "x$host" = "xi386-mingw32msvc")
 
 
 GTK_VERSION=`$PKG_CONFIG --modversion gtk+-2.0`
@@ -153,6 +128,9 @@
 ALL_LINGUAS="`sed -e '/^#/d' $srcdir/po/LINGUAS`" # take all languages found in file po/LINGUAS
 
 AM_GLIB_GNU_GETTEXT
+if test "x$MSGFMT" = "xno"; then
+	AC_MSG_ERROR([msgfmt not found. Please install the gettext package.])
+fi
 
 
 # Set ${datadir}
@@ -161,15 +139,7 @@
 		prefix=${ac_default_prefix}
 	fi
 fi
-# check for datarootdir (autoconf >= 2.60), if not set(autoconf < 2.60), define it
-if test "x${datarootdir}" = "x"; then
-	datarootdir=${datadir}
-fi
 
-if test "x$want_vte" = "xyes"; then
-	AC_DEFINE(HAVE_VTE, 1, [Define if you want VTE support])
-fi
-
 GEANY_PIXMAPS_DIR=`eval echo ${datarootdir}/pixmaps`
 AC_SUBST(GEANY_PIXMAPS_DIR)
 GEANY_DATA_DIR=`eval echo ${datarootdir}/geany`

Modified: trunk/doc/geany.html
===================================================================
--- trunk/doc/geany.html	2007-10-18 19:55:21 UTC (rev 1960)
+++ trunk/doc/geany.html	2007-10-19 14:48:19 UTC (rev 1961)
@@ -6,7 +6,7 @@
 <meta name="generator" content="Docutils 0.4.1: http://docutils.sourceforge.net/" />
 <title>Geany</title>
 <meta name="authors" content="Enrico Tröger  Nick Treleaven  Frank Lanitz" />
-<meta name="date" content="2007-10-02" />
+<meta name="date" content="2007-10-18" />
 <style type="text/css">
 
 /*
@@ -133,7 +133,7 @@
 <br />Nick Treleaven
 <br />Frank Lanitz</td></tr>
 <tr><th class="docinfo-name">Date:</th>
-<td>2007-10-02</td></tr>
+<td>2007-10-18</td></tr>
 <tr><th class="docinfo-name">Version:</th>
 <td>0.13</td></tr>
 </tbody>
@@ -553,8 +553,8 @@
 <p>If you have installed <tt class="docutils literal"><span class="pre">libvte.so</span></tt> in your system, it is loaded
 automatically by Geany, and you will have a terminal widget in the
 notebook at the bottom.</p>
-<p>If Geany cannot find <tt class="docutils literal"><span class="pre">libvte.so</span></tt> at startup, the terminal widget will
-not be loaded. So there is no need to install the package containing
+<p>If Geany cannot find any <tt class="docutils literal"><span class="pre">libvte.so</span></tt> at startup, the terminal widget
+will not be loaded. So there is no need to install the package containing
 this file in order to run Geany. Additionally, you can disable the use
 of the terminal widget by command line option, for more information
 see the section called <a class="reference" href="#command-line-options">Command line options</a>.</p>
@@ -575,18 +575,22 @@
 <div class="note">
 <p class="first admonition-title">Note</p>
 <p class="last">Geany tries to load <tt class="docutils literal"><span class="pre">libvte.so</span></tt>. If this fails, it tries to load
-<tt class="docutils literal"><span class="pre">libvte.so.4</span></tt>. If this fails too, you should check whether you
+some other filenames. If this fails too, you should check whether you
 installed libvte correctly. Again, Geany also runs without this
 library.</p>
 </div>
 <p>It could be, that the library is called something else than
-<tt class="docutils literal"><span class="pre">libvte.so.4</span></tt> (e.g. on FreeBSD 6.0 it is called <tt class="docutils literal"><span class="pre">libvte.so.8</span></tt>). So
+<tt class="docutils literal"><span class="pre">libvte.so</span></tt> (e.g. on FreeBSD 6.0 it is called <tt class="docutils literal"><span class="pre">libvte.so.8</span></tt>). So
 please set a link to the correct file (as root):</p>
 <pre class="literal-block">
-# ln -s /usr/lib/libvte.so.X /usr/lib/libvte.so.4
+# ln -s /usr/lib/libvte.so.X /usr/lib/libvte.so
 </pre>
 <p>Obviously, you have to adjust the paths and set X to the number of your
 <tt class="docutils literal"><span class="pre">libvte.so</span></tt>.</p>
+<p>You can also specify the filename of the VTE library to use on the command
+line (see the section called <a class="reference" href="#command-line-options">Command line options</a>) or at compile time
+by specifying the command line option <tt class="docutils literal"><span class="pre">--with-vte-module-path</span></tt> to
+./configure.</p>
 </div>
 <div class="section">
 <h3><a class="toc-backref" href="#id18" id="defining-own-widget-styles-using-gtkrc-2-0" name="defining-own-widget-styles-using-gtkrc-2-0">Defining own widget styles using .gtkrc-2.0</a></h3>
@@ -3092,7 +3096,7 @@
 <div class="footer">
 <hr class="footer" />
 <a class="reference" href="geany.txt">View document source</a>.
-Generated on: 2007-10-18 19:44 UTC.
+Generated on: 2007-10-19 14:35 UTC.
 Generated by <a class="reference" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source.
 
 </div>

Modified: trunk/doc/geany.txt
===================================================================
--- trunk/doc/geany.txt	2007-10-18 19:55:21 UTC (rev 1960)
+++ trunk/doc/geany.txt	2007-10-19 14:48:19 UTC (rev 1961)
@@ -276,8 +276,8 @@
 automatically by Geany, and you will have a terminal widget in the
 notebook at the bottom.
 
-If Geany cannot find ``libvte.so`` at startup, the terminal widget will
-not be loaded. So there is no need to install the package containing
+If Geany cannot find any ``libvte.so`` at startup, the terminal widget
+will not be loaded. So there is no need to install the package containing
 this file in order to run Geany. Additionally, you can disable the use
 of the terminal widget by command line option, for more information
 see the section called `Command line options`_.
@@ -300,20 +300,25 @@
 
 .. note::
     Geany tries to load ``libvte.so``. If this fails, it tries to load
-    ``libvte.so.4``. If this fails too, you should check whether you
+    some other filenames. If this fails too, you should check whether you
     installed libvte correctly. Again, Geany also runs without this
     library.
 
 It could be, that the library is called something else than
-``libvte.so.4`` (e.g. on FreeBSD 6.0 it is called ``libvte.so.8``). So
+``libvte.so`` (e.g. on FreeBSD 6.0 it is called ``libvte.so.8``). So
 please set a link to the correct file (as root)::
 
-    # ln -s /usr/lib/libvte.so.X /usr/lib/libvte.so.4
+    # ln -s /usr/lib/libvte.so.X /usr/lib/libvte.so
 
 Obviously, you have to adjust the paths and set X to the number of your
 ``libvte.so``.
 
+You can also specify the filename of the VTE library to use on the command
+line (see the section called `Command line options`_) or at compile time
+by specifying the command line option ``--with-vte-module-path`` to
+./configure.
 
+
 Defining own widget styles using .gtkrc-2.0
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 

Modified: trunk/plugins/Makefile.am
===================================================================
--- trunk/plugins/Makefile.am	2007-10-18 19:55:21 UTC (rev 1960)
+++ trunk/plugins/Makefile.am	2007-10-19 14:48:19 UTC (rev 1961)
@@ -3,12 +3,6 @@
 EXTRA_DIST = \
 	makefile.win32
 
-if IS_COMPILER_GCC
-    AM_CFLAGS = -Wall -pipe
-else
-    AM_CFLAGS =
-endif
-
 plugindir = $(libdir)/geany
 
 demoplugin_la_LDFLAGS    = -module -avoid-version

Modified: trunk/scintilla/Makefile.am
===================================================================
--- trunk/scintilla/Makefile.am	2007-10-18 19:55:21 UTC (rev 1960)
+++ trunk/scintilla/Makefile.am	2007-10-19 14:48:19 UTC (rev 1961)
@@ -3,8 +3,6 @@
 
 noinst_LIBRARIES=libscintilla.a
 
-CC = @CC@
-
 AM_CXXFLAGS = -DNDEBUG -Os -DGTK -DGTK2 -DSCI_LEXER -DG_THREADS_IMPL_NONE
 
 LEXER_SRCS= \
@@ -86,6 +84,7 @@
 UniConversion.h \
 ViewStyle.h \
 XPM.h \
+scintilla-marshal.c \
 $(LEXER_SRCS)
 
 libscintilla_a_SOURCES = $(SRCS)
@@ -96,11 +95,6 @@
 INCLUDES=-I$(top_srcdir) -I$(srcdir)/include @GTK_CFLAGS@
 endif
 
-libscintilla_a_LIBADD = scintilla-marshal.o
-
-scintilla-marshal.o: scintilla-marshal.c
-	$(CC) @GTK_CFLAGS@ -c $(srcdir)/scintilla-marshal.c
-
 marshallers: scintilla-marshal.list
 	glib-genmarshal --prefix scintilla_marshal scintilla-marshal.list --header > scintilla-marshal.h
 	glib-genmarshal --prefix scintilla_marshal scintilla-marshal.list --body > scintilla-marshal.c

Modified: trunk/scintilla/PlatGTK.cxx
===================================================================
--- trunk/scintilla/PlatGTK.cxx	2007-10-18 19:55:21 UTC (rev 1960)
+++ trunk/scintilla/PlatGTK.cxx	2007-10-19 14:48:19 UTC (rev 1961)
@@ -31,10 +31,6 @@
    with gdk_string_extents. */
 #define FAST_WAY
 
-#ifdef G_OS_WIN32
-#define snprintf _snprintf
-#endif
-
 #if GTK_MAJOR_VERSION >= 2
 #define USE_PANGO 1
 #include "Converter.h"
@@ -572,7 +568,7 @@
 			                        faceName, sizeof(faceName),
 			                        charset, sizeof(charset));
 
-			snprintf(fontspec,
+			g_snprintf(fontspec,
 			         sizeof(fontspec) - 1,
 			         spec,
 			         foundary, faceName,
@@ -588,7 +584,7 @@
 				strncat(fontset, fontspec, remaining - 1);
 				remaining -= strlen(fontset);
 
-				snprintf(fontspec,
+				g_snprintf(fontspec,
 				         sizeof(fontspec) - 1,
 				         ",%s%s%s-o-*-*-*-%0d-*-*-*-*-%s",
 				         foundary, faceName,
@@ -623,7 +619,7 @@
 	                        faceName, sizeof(faceName),
 	                        charset, sizeof(charset));
 
-	snprintf(fontspec,
+	g_snprintf(fontspec,
 	         sizeof(fontspec) - 1,
 	         "%s%s%s%s-*-*-*-%0d-*-*-*-*-%s",
 	         foundary, faceName,
@@ -634,7 +630,7 @@
 	newid = LoadFontOrSet(fontspec, characterSet);
 	if (!newid) {
 		// some fonts have oblique, not italic
-		snprintf(fontspec,
+		g_snprintf(fontspec,
 		         sizeof(fontspec) - 1,
 		         "%s%s%s%s-*-*-*-%0d-*-*-*-*-%s",
 		         foundary, faceName,
@@ -645,7 +641,7 @@
 		newid = LoadFontOrSet(fontspec, characterSet);
 	}
 	if (!newid) {
-		snprintf(fontspec,
+		g_snprintf(fontspec,
 		         sizeof(fontspec) - 1,
 		         "-*-*-*-*-*-*-*-%0d-*-*-*-*-%s",
 		         size * 10,

Modified: trunk/src/gb.c
===================================================================
--- trunk/src/gb.c	2007-10-18 19:55:21 UTC (rev 1960)
+++ trunk/src/gb.c	2007-10-19 14:48:19 UTC (rev 1961)
@@ -363,7 +363,7 @@
 	}
 	gtk_label_set_text(GTK_LABEL(label3), info_texts[won]);
 
-	snprintf(pts, 50, "Points: %4d\tRound: %2d\n", points, lap);
+	g_snprintf(pts, 50, "Points: %4d\tRound: %2d\n", points, lap);
 	gtk_label_set_text(GTK_LABEL(label1), pts);
 
 }

Modified: trunk/src/project.c
===================================================================
--- trunk/src/project.c	2007-10-18 19:55:21 UTC (rev 1960)
+++ trunk/src/project.c	2007-10-19 14:48:19 UTC (rev 1961)
@@ -76,8 +76,8 @@
 static void on_entries_changed(GtkEditable *editable, PropertyDialogElements *e);
 
 
-// avoid using __VA_ARGS__ because older gcc 2.x versions probably don't support C99
-#define SHOW_ERR(args...) dialogs_show_msgbox(GTK_MESSAGE_ERROR, args)
+#define SHOW_ERR(args) dialogs_show_msgbox(GTK_MESSAGE_ERROR, args)
+#define SHOW_ERR1(args,more) dialogs_show_msgbox(GTK_MESSAGE_ERROR, args, more)
 #define MAX_NAME_LEN 50
 // "projects" is part of the default project base path so be careful when translating
 // please avoid special characters and spaces, look at the source for details or ask Frank
@@ -199,7 +199,7 @@
 		{
 			gchar *utf8_filename = utils_get_utf8_from_locale(filename);
 
-			SHOW_ERR(_("Project file \"%s\" could not be loaded."), utf8_filename);
+			SHOW_ERR1(_("Project file \"%s\" could not be loaded."), utf8_filename);
 			gtk_widget_grab_focus(GTK_WIDGET(dialog));
 			g_free(utf8_filename);
 			g_free(filename);
@@ -521,7 +521,7 @@
 	}
 	else if (name_len > MAX_NAME_LEN)
 	{
-		SHOW_ERR(_("The specified project name is too long (max. %d characters)."), MAX_NAME_LEN);
+		SHOW_ERR1(_("The specified project name is too long (max. %d characters)."), MAX_NAME_LEN);
 		gtk_widget_grab_focus(e->name);
 		return FALSE;
 	}

Modified: trunk/src/vte.c
===================================================================
--- trunk/src/vte.c	2007-10-18 19:55:21 UTC (rev 1960)
+++ trunk/src/vte.c	2007-10-19 14:48:19 UTC (rev 1961)
@@ -141,12 +141,19 @@
 		return;
 	}
 
-	if (vte_info.lib_vte && strlen(vte_info.lib_vte))
+	if (vte_info.lib_vte && vte_info.lib_vte[0] != '\0')
 	{
 		module = g_module_open(vte_info.lib_vte, G_MODULE_BIND_LAZY);
 	}
+#ifdef VTE_MODULE_PATH
 	else
 	{
+		module = g_module_open(VTE_MODULE_PATH, G_MODULE_BIND_LAZY);
+	}
+#endif
+
+	if (module == NULL)
+	{
 		gint i;
 		const gchar *sonames[] = {  "libvte.so", "libvte.so.4",
 									"libvte.so.8", "libvte.so.9", NULL };

Modified: trunk/tagmanager/Makefile.am
===================================================================
--- trunk/tagmanager/Makefile.am	2007-10-18 19:55:21 UTC (rev 1960)
+++ trunk/tagmanager/Makefile.am	2007-10-19 14:48:19 UTC (rev 1961)
@@ -7,11 +7,6 @@
 #	-DGDK_PIXBUF_DEPRECATED \
 #	-DGTK_DISABLE_DEPRECATED -DGNOME_DISABLE_DEPRECATED
 
-if IS_COMPILER_GCC
-    AM_CFLAGS = -Wall -pipe
-else
-    AM_CFLAGS =
-endif
 
 noinst_LIBRARIES = libtagmanager.a
 libtagmanager_a_SOURCES =\


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the Commits mailing list