[OTR-dev] Re: [OTR-announce] gaim-otr 2.0.1 is up (BUT DOESN'T DO AUTOCONF!!)

Greg Troxel gdt at ir.bbn.com
Sat Feb 26 16:49:11 EST 2005


New patch to replace old one: adds EXTRA_DIST line to put .h files in
tarball.  Sorry, should have finished pkgsrc testing before posting.

Index: AUTHORS
===================================================================
RCS file: AUTHORS
diff -N AUTHORS
Index: ChangeLog
===================================================================
RCS file: ChangeLog
diff -N ChangeLog
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ChangeLog	26 Feb 2005 21:08:20 -0000	1.2
@@ -0,0 +1,3 @@
+2005-02-26  Greg Troxel  <gdt at ir.bbn.com>
+
+	* Makefile.am, configure.ac: initial autoconf support
Index: Makefile
===================================================================
RCS file: Makefile
diff -N Makefile
--- Makefile	23 Feb 2005 14:49:10 -0000	1.1.1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,57 +0,0 @@
-# The version number to put in the plugin info
-GAIM_OTR_VERSION = 2.0.1
-
-# Replace this with the path to the GAIM headers
-GAIM_SOURCE ?= /usr/include/gaim
-
-# If you don't have pkg-config, put the appropriate -I entry on the next line
-GTK_HDRS ?= `pkg-config --cflags glib-2.0 gtk+-2.0`
-
-# The location of the libotr include files.  Note that if, for example,
-# the full path of message.h is /usr/include/libotr/message.h, you
-# should put /usr/include on the next line, not /usr/include/libotr
-LIBOTRINCDIR = /usr/include
-
-# The locataion of libotr.a.
-LIBOTRLIBDIR = /usr/lib
-
-# The target
-TARGET = gaim-otr.so
-
-ifdef WIN32
-CC = i586-mingw32msvc-gcc
-LIBOTRINCDIR = /usr/i586-mingw32msvc/include
-LIBOTRLIBDIR = /usr/i586-mingw32msvc/lib
-TARGET = gaim-otr.dll
-LDFLAGS = -Wl,--enable-auto-image-base
-LDLIBS = $(LIBOTRLIBDIR)/libotr.a -lgtk-win32-2.0-0 -latk-1.0-0 -lpango-1.0-0 \
-         -lglib-2.0-0 -lgdk-win32-2.0-0 -lgobject-2.0-0 -lgaim \
-         -lgcrypt -lgpg-error
-else
-FPIC = -fPIC
-LDFLAGS = -module -avoid-version
-LDLIBS = -lotr -lgcrypt
-endif
-
-# Install directory
-GAIMDIR = /usr/lib/gaim
-INSTALLDIR = $(DESTDIR)$(GAIMDIR)
-
-CC ?= gcc
-override CFLAGS += -g -Wall -I$(GAIM_SOURCE) $(GTK_HDRS) \
-	-I$(LIBOTRINCDIR) $(FPIC) -DUSING_GTK -DGAIM_PLUGINS \
-	-DGAIM_OTR_VERSION=\"$(GAIM_OTR_VERSION)\"
- 
-all: $(TARGET)
-
-$(TARGET): otr-plugin.o ui.o dialogs.o gtk-ui.o gtk-dialog.o
-	$(CC) -g -shared $(LDFLAGS) $^ -o $@ $(LDLIBS)
-
-install: all
-	install -d $(INSTALLDIR)
-	install -m 0755 $(TARGET) $(INSTALLDIR)
-clean:
-	rm -f *.o
-	rm -f $(TARGET)
-
-distclean: clean
Index: Makefile.am
===================================================================
RCS file: Makefile.am
diff -N Makefile.am
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ Makefile.am	26 Feb 2005 21:39:10 -0000	1.7
@@ -0,0 +1,15 @@
+AM_CFLAGS=	@LIBGCRYPT_CFLAGS@ @LIBOTR_CFLAGS@ @EXTRA_CFLAGS@
+AM_CFLAGS+=	-DUSING_GTK -DGAIM_PLUGINS \
+		-DGAIM_OTR_VERSION=\"@VERSION@\"
+
+plugindir=		${prefix}/lib/gaim
+
+plugin_LTLIBRARIES=	otr.la
+
+otr_la_SOURCES=		otr-plugin.c ui.c dialogs.c gtk-ui.c gtk-dialog.c
+otr_la_LDFLAGS=		-module -avoid-version
+otr_la_LDFLAGS+=	@LIBGCRYPT_LIBS@ @LIBOTR_LIBS@
+# These libs are already linked when plugins are loaded, so don't include them
+#otr_la_LDFLAGS+=	@EXTRA_LIBS@
+
+EXTRA_DIST=		dialogs.h gtk-dialog.h gtk-ui.h otr-plugin.h ui.h
Index: NEWS
===================================================================
RCS file: NEWS
diff -N NEWS
Index: configure.ac
===================================================================
RCS file: configure.ac
diff -N configure.ac
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ configure.ac	26 Feb 2005 21:08:20 -0000	1.5
@@ -0,0 +1,24 @@
+dnl Process this file with autoconf to produce configure.
+
+dnl XXX Check for headers, etc.
+
+dnl Not yet used.
+AC_INIT(otr-plugin.c)
+
+AM_CONFIG_HEADER(config.h)
+
+AM_INIT_AUTOMAKE(gaim-otr, 2.0.2)
+
+AC_PROG_CC
+
+dnl We do not want to create an otr.a for the plugin, so disable by default.
+AM_DISABLE_STATIC
+AM_PROG_LIBTOOL
+
+AM_PATH_LIBGCRYPT(1:1.2.0,,AC_MSG_ERROR(libgcrypt 1.2.0 or newer is required.))
+
+AM_PATH_LIBOTR(2.0.0,,AC_MSG_ERROR(libotr 2.0.0 or newer is required.))
+
+PKG_CHECK_MODULES(EXTRA, glib-2.0 >= 2.0 gtk+-2.0 > 2.6 gaim > 1.0, , AC_MSG_ERROR(glib, gtk and gaim required))
+
+AC_OUTPUT([Makefile])


-- 
        Greg Troxel <gdt at ir.bbn.com>



More information about the OTR-dev mailing list