Commit 1a68b633 authored by dkirov's avatar dkirov

add --enable-gtkspell check.

check xscrnsaver's libs only when xscrnsaver.pc
is not installed
fix DESTDIR
add explicit AC_SUBST for PYTHON_INCLUDES
parent 81872c51
......@@ -96,6 +96,8 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BUILD_GTKSPELL_FALSE = @BUILD_GTKSPELL_FALSE@
BUILD_GTKSPELL_TRUE = @BUILD_GTKSPELL_TRUE@
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
CC = @CC@
......
This diff is collapsed.
......@@ -16,6 +16,7 @@ AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_MAKE_SET
AC_PROG_LIBTOOL
AC_PATH_X
GETTEXT_PACKAGE=gajim
AC_SUBST([GETTEXT_PACKAGE])
......@@ -23,8 +24,6 @@ AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"], [Gettext package])
ALL_LINGUAS="fr pt el pl es ru bg de nb cs nl pt_BR sv it eu sk no zh_CN br eo"
AM_GLIB_GNU_GETTEXT
AC_PATH_X
PKG_CHECK_MODULES([DBUS], [dbus-1 >= 0.61 dbus-glib-1 >= 0.61])
AC_SUBST(DBUS_CFLAGS)
AC_SUBST(DBUS_LIBS)
......@@ -35,21 +34,36 @@ AC_SUBST(PYGTK_LIBS)
PYGTK_DEFS=`$PKG_CONFIG --variable=defsdir pygtk-2.0`
AC_SUBST(PYGTK_DEFS)
AC_ARG_ENABLE(gtkspell,
[ --enable-gtkspell build spell checking support [default auto]],,
enable_gtkspell=auto)
PKG_CHECK_MODULES([GTKSPELL], [gtkspell-2.0])
AC_SUBST(GTKSPELL_CFLAGS)
AC_SUBST(GTKSPELL_LIBS)
PKG_CHECK_MODULES([XSCRNSAVER], xscrnsaver)
dnl AC_SUBST(XSCRNSAVER_LIBS)
# Checks for libraries.
# FIXME: Replace `main' with a function in `-lX11':
AC_CHECK_LIB([X11], [main])
# FIXME: Replace `main' with a function in `-lXext':
AC_CHECK_LIB([Xext], [main])
# FIXME: Replace `main' with a function in `-lXss':
AC_CHECK_LIB([Xss], [main])
if test "x$enable_gtkspell" = "xauto";then
PKG_CHECK_EXISTS([gtkspell-2.0], [enable_gtkspell=yes], [enable_gtkspell=no])
fi
if test "x$enable_gtkspell" = "xyes";then
PKG_CHECK_MODULES([GTKSPELL], [gtkspell-2.0])
AC_SUBST(GTKSPELL_CFLAGS)
AC_SUBST(GTKSPELL_LIBS)
have_gtkspell=true
else
have_gtkspell=false
fi
AM_CONDITIONAL(BUILD_GTKSPELL, $have_gtkspell)
PKG_CHECK_EXISTS([xscrnsaver], [have_xscrnsaver=yes], [have_xscrnsaver=no])
if test "x$have_xscrnsaver" = "xyes";then
PKG_CHECK_MODULES([XSCRNSAVER], xscrnsaver)
AC_SUBST(XSCRNSAVER_LIBS)
else
# Checks for libraries.
AC_CHECK_LIB([X11], [XOpenDisplay])
AC_CHECK_LIB([Xext], [XMissingExtension])
AC_CHECK_LIB([Xss], [XScreenSaverAllocInfo])
XSCRNSAVER_LIBS=" -lX11 -lXss -lXext"
AC_SUBST([XSCRNSAVER_LIBS])
fi
AM_PATH_PYTHON([2.4])
......@@ -58,8 +72,7 @@ if test "x$PYTHON" = "x:"; then
fi
AM_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR(could not find Python headers)])
AC_SUBST([PYTHON_INCLUDES])
AC_CONFIG_FILES([
Makefile
......
......@@ -84,6 +84,8 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BUILD_GTKSPELL_FALSE = @BUILD_GTKSPELL_FALSE@
BUILD_GTKSPELL_TRUE = @BUILD_GTKSPELL_TRUE@
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
CC = @CC@
......
......@@ -6,18 +6,18 @@ EMOTICONS_DIRS = **
EMOTICONS_FILES = **/{*.png,*.gif,emoticons.py}
# copy files recursively
install-data-local:
@for d in $(EMOTICONS_DIRS);do \
if test -d $$d;then \
echo " $(mkinstalldirs) $(pkgdatadir)/data/emoticons/$$d"; \
$(mkinstalldirs) $(pkgdatadir)/data/emoticons/$$d || exit 1; \
echo " $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/data/emoticons/$$d"; \
$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/data/emoticons/$$d || exit 1; \
fi; \
done; \
for f in $(EMOTICONS_FILES);do \
if test -f $$f; then \
echo " $(INSTALL_DATA) $$f $(pkgdatadir)/data/emoticons/$$f"; \
$(INSTALL_DATA) $$f $(pkgdatadir)/data/emoticons/$$f || exit 1; \
echo " $(INSTALL_DATA) $$f $(DESTDIR)$(pkgdatadir)/data/emoticons/$$f"; \
$(INSTALL_DATA) $$f $(DESTDIR)$(pkgdatadir)/data/emoticons/$$f || exit 1; \
fi; \
done;
......
......@@ -68,6 +68,8 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BUILD_GTKSPELL_FALSE = @BUILD_GTKSPELL_FALSE@
BUILD_GTKSPELL_TRUE = @BUILD_GTKSPELL_TRUE@
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
CC = @CC@
......@@ -415,18 +417,17 @@ uninstall-am: uninstall-emoticonsDATA uninstall-info-am
uninstall-emoticonsDATA uninstall-info-am
# copy files recursively
install-data-local:
@for d in $(EMOTICONS_DIRS);do \
if test -d $$d;then \
echo " $(mkinstalldirs) $(pkgdatadir)/data/emoticons/$$d"; \
$(mkinstalldirs) $(pkgdatadir)/data/emoticons/$$d || exit 1; \
echo " $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/data/emoticons/$$d"; \
$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/data/emoticons/$$d || exit 1; \
fi; \
done; \
for f in $(EMOTICONS_FILES);do \
if test -f $$f; then \
echo " $(INSTALL_DATA) $$f $(pkgdatadir)/data/emoticons/$$f"; \
$(INSTALL_DATA) $$f $(pkgdatadir)/data/emoticons/$$f || exit 1; \
echo " $(INSTALL_DATA) $$f $(DESTDIR)$(pkgdatadir)/data/emoticons/$$f"; \
$(INSTALL_DATA) $$f $(DESTDIR)$(pkgdatadir)/data/emoticons/$$f || exit 1; \
fi; \
done;
......
......@@ -68,6 +68,8 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BUILD_GTKSPELL_FALSE = @BUILD_GTKSPELL_FALSE@
BUILD_GTKSPELL_TRUE = @BUILD_GTKSPELL_TRUE@
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
CC = @CC@
......
......@@ -11,14 +11,14 @@ ICONSET_FILES = **/{16x16,32x32,48x48}/{*.gif,*.png} \
install-data-local:
@for d in $(ICONSET_DIRS);do \
if test -d $$d;then \
echo " $(mkinstalldirs) $(pkgdatadir)/data/iconsets/$$d"; \
$(mkinstalldirs) $(pkgdatadir)/data/iconsets/$$d || exit 1; \
echo " $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/data/iconsets/$$d"; \
$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/data/iconsets/$$d || exit 1; \
fi; \
done
for f in $(ICONSET_FILES);do \
if test -f $$f; then \
echo " $(INSTALL_DATA) $$f $(pkgdatadir)/data/iconsets/$$f"; \
$(INSTALL_DATA) $$f $(pkgdatadir)/data/iconsets/$$f || exit 1; \
echo " $(INSTALL_DATA) $$f $(DESTDIR)$(pkgdatadir)/data/iconsets/$$f"; \
$(INSTALL_DATA) $$f $(DESTDIR)$(pkgdatadir)/data/iconsets/$$f || exit 1; \
fi; \
done;
......
......@@ -68,6 +68,8 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BUILD_GTKSPELL_FALSE = @BUILD_GTKSPELL_FALSE@
BUILD_GTKSPELL_TRUE = @BUILD_GTKSPELL_TRUE@
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
CC = @CC@
......@@ -422,14 +424,14 @@ uninstall-am: uninstall-iconsetDATA uninstall-info-am
install-data-local:
@for d in $(ICONSET_DIRS);do \
if test -d $$d;then \
echo " $(mkinstalldirs) $(pkgdatadir)/data/iconsets/$$d"; \
$(mkinstalldirs) $(pkgdatadir)/data/iconsets/$$d || exit 1; \
echo " $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/data/iconsets/$$d"; \
$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/data/iconsets/$$d || exit 1; \
fi; \
done
for f in $(ICONSET_FILES);do \
if test -f $$f; then \
echo " $(INSTALL_DATA) $$f $(pkgdatadir)/data/iconsets/$$f"; \
$(INSTALL_DATA) $$f $(pkgdatadir)/data/iconsets/$$f || exit 1; \
echo " $(INSTALL_DATA) $$f $(DESTDIR)$(pkgdatadir)/data/iconsets/$$f"; \
$(INSTALL_DATA) $$f $(DESTDIR)$(pkgdatadir)/data/iconsets/$$f || exit 1; \
fi; \
done;
......
......@@ -68,6 +68,8 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BUILD_GTKSPELL_FALSE = @BUILD_GTKSPELL_FALSE@
BUILD_GTKSPELL_TRUE = @BUILD_GTKSPELL_TRUE@
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
CC = @CC@
......
......@@ -5,6 +5,7 @@ CLEANFILES = \
INCLUDES = \
$(PYTHON_INCLUDES)
if BUILD_GTKSPELL
gtkspelllib_LTLIBRARIES = gtkspell.la
gtkspelllibdir = $(libdir)/gajim
......@@ -15,9 +16,10 @@ gtkspell_la_SOURCES = \
gtkspellmodule.c
gtkspell_la_LDFLAGS = \
-module -avoid-version -no-undefined
-module -avoid-version
gtkspell_la_CFLAGS = $(GTKSPELL_CFLAGS) $(PYGTK_CFLAGS)
endif
trayiconlib_LTLIBRARIES = trayicon.la
trayiconlibdir = $(libdir)/gajim
......@@ -28,7 +30,7 @@ trayicon_la_SOURCES = \
nodist_trayicon_la_SOURCES = \
trayicon.c
trayicon_la_LDFLAGS = \
-module -avoid-version -no-undefined
-module -avoid-version
trayicon_la_CFLAGS = $(PYGTK_CFLAGS)
trayicon.c: trayicon.defs trayicon.override
......
......@@ -61,9 +61,13 @@ gtkspelllibLTLIBRARIES_INSTALL = $(INSTALL)
trayiconlibLTLIBRARIES_INSTALL = $(INSTALL)
LTLIBRARIES = $(gtkspelllib_LTLIBRARIES) $(trayiconlib_LTLIBRARIES)
am__DEPENDENCIES_1 =
gtkspell_la_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
am_gtkspell_la_OBJECTS = gtkspell_la-gtkspellmodule.lo
@BUILD_GTKSPELL_TRUE@gtkspell_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
@BUILD_GTKSPELL_TRUE@ $(am__DEPENDENCIES_1)
am__gtkspell_la_SOURCES_DIST = gtkspellmodule.c
@BUILD_GTKSPELL_TRUE@am_gtkspell_la_OBJECTS = \
@BUILD_GTKSPELL_TRUE@ gtkspell_la-gtkspellmodule.lo
gtkspell_la_OBJECTS = $(am_gtkspell_la_OBJECTS)
@BUILD_GTKSPELL_TRUE@am_gtkspell_la_rpath = -rpath $(gtkspelllibdir)
trayicon_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
am_trayicon_la_OBJECTS = trayicon_la-eggtrayicon.lo \
trayicon_la-trayiconmodule.lo
......@@ -83,7 +87,7 @@ LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
SOURCES = $(gtkspell_la_SOURCES) $(trayicon_la_SOURCES) \
$(nodist_trayicon_la_SOURCES)
DIST_SOURCES = $(gtkspell_la_SOURCES) $(trayicon_la_SOURCES)
DIST_SOURCES = $(am__gtkspell_la_SOURCES_DIST) $(trayicon_la_SOURCES)
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
html-recursive info-recursive install-data-recursive \
install-exec-recursive install-info-recursive \
......@@ -110,6 +114,8 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BUILD_GTKSPELL_FALSE = @BUILD_GTKSPELL_FALSE@
BUILD_GTKSPELL_TRUE = @BUILD_GTKSPELL_TRUE@
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
CC = @CC@
......@@ -275,18 +281,18 @@ CLEANFILES = \
INCLUDES = \
$(PYTHON_INCLUDES)
gtkspelllib_LTLIBRARIES = gtkspell.la
gtkspelllibdir = $(libdir)/gajim
gtkspell_la_LIBADD = \
$(GTKSPELL_LIBS) $(PYGTK_LIBS)
@BUILD_GTKSPELL_TRUE@gtkspelllib_LTLIBRARIES = gtkspell.la
@BUILD_GTKSPELL_TRUE@gtkspelllibdir = $(libdir)/gajim
@BUILD_GTKSPELL_TRUE@gtkspell_la_LIBADD = \
@BUILD_GTKSPELL_TRUE@ $(GTKSPELL_LIBS) $(PYGTK_LIBS)
gtkspell_la_SOURCES = \
gtkspellmodule.c
@BUILD_GTKSPELL_TRUE@gtkspell_la_SOURCES = \
@BUILD_GTKSPELL_TRUE@ gtkspellmodule.c
gtkspell_la_LDFLAGS = \
-module -avoid-version -no-undefined
@BUILD_GTKSPELL_TRUE@gtkspell_la_LDFLAGS = \
@BUILD_GTKSPELL_TRUE@ -module -avoid-version
gtkspell_la_CFLAGS = $(GTKSPELL_CFLAGS) $(PYGTK_CFLAGS)
@BUILD_GTKSPELL_TRUE@gtkspell_la_CFLAGS = $(GTKSPELL_CFLAGS) $(PYGTK_CFLAGS)
trayiconlib_LTLIBRARIES = trayicon.la
trayiconlibdir = $(libdir)/gajim
trayicon_la_LIBADD = $(PYGTK_LIBS)
......@@ -298,7 +304,7 @@ nodist_trayicon_la_SOURCES = \
trayicon.c
trayicon_la_LDFLAGS = \
-module -avoid-version -no-undefined
-module -avoid-version
trayicon_la_CFLAGS = $(PYGTK_CFLAGS)
gajimsrcdir = $(pkgdatadir)/src
......@@ -414,7 +420,7 @@ clean-trayiconlibLTLIBRARIES:
rm -f "$${dir}/so_locations"; \
done
gtkspell.la: $(gtkspell_la_OBJECTS) $(gtkspell_la_DEPENDENCIES)
$(LINK) -rpath $(gtkspelllibdir) $(gtkspell_la_LDFLAGS) $(gtkspell_la_OBJECTS) $(gtkspell_la_LIBADD) $(LIBS)
$(LINK) $(am_gtkspell_la_rpath) $(gtkspell_la_LDFLAGS) $(gtkspell_la_OBJECTS) $(gtkspell_la_LIBADD) $(LIBS)
trayicon.la: $(trayicon_la_OBJECTS) $(trayicon_la_DEPENDENCIES)
$(LINK) -rpath $(trayiconlibdir) $(trayicon_la_LDFLAGS) $(trayicon_la_OBJECTS) $(trayicon_la_LIBADD) $(LIBS)
......
#CLEANFILES = \
# trayicon.c
INCLUDES = \
$(PYTHON_INCLUDES)
idlelib_LTLIBRARIES = idle.la
idlelibdir = $(libdir)/gajim
......@@ -14,7 +10,7 @@ idle_la_LIBADD = $(XSCREENSAVER_LIBS)
idle_la_SOURCES = idle.c
idle_la_LDFLAGS = \
-module -avoid-version -no-undefined
-module -avoid-version
idle_la_CFLAGS = $(XSCREENSAVER_CFLAGS)
idle_la_CFLAGS = $(XSCREENSAVER_CFLAGS) $(PYTHON_INCLUDES)
......@@ -14,9 +14,6 @@
@SET_MAKE@
#CLEANFILES = \
# trayicon.c
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
......@@ -87,6 +84,8 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BUILD_GTKSPELL_FALSE = @BUILD_GTKSPELL_FALSE@
BUILD_GTKSPELL_TRUE = @BUILD_GTKSPELL_TRUE@
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
CC = @CC@
......@@ -253,9 +252,9 @@ idlelibdir = $(libdir)/gajim
idle_la_LIBADD = $(XSCREENSAVER_LIBS)
idle_la_SOURCES = idle.c
idle_la_LDFLAGS = \
-module -avoid-version -no-undefined
-module -avoid-version
idle_la_CFLAGS = $(XSCREENSAVER_CFLAGS)
idle_la_CFLAGS = $(XSCREENSAVER_CFLAGS) $(PYTHON_INCLUDES)
all: all-am
.SUFFIXES:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment