[nautilus-share] Tidy up autotools
- From: Chow Loong Jin <ljchow src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus-share] Tidy up autotools
- Date: Sun, 4 Dec 2011 18:59:31 +0000 (UTC)
commit 019ca74dfdf5bcda0e33b88bae0cff77d98d5a1b
Author: Chow Loong Jin <hyperair ubuntu com>
Date: Mon Dec 5 02:56:46 2011 +0800
Tidy up autotools
configure.ac | 48 ++++++------------------------------------------
src/Makefile.am | 3 +--
2 files changed, 7 insertions(+), 44 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index c48c905..2b12647 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4,61 +4,31 @@ AC_CONFIG_SRCDIR([src/nautilus-share.c])
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE([foreign 1.9 -Wall])
-
AC_PROG_INTLTOOL([0.29])
NAUTILUS_REQUIRED=2.10.0
-EEL_REQUIRED=2.10.0
GLIB_REQUIRED=2.4.0
-DATADIRNAME=share
-
AC_PROG_CC
AC_PROG_LIBTOOL
-dnl ========================================================
-dnl PKG_CONFIG and required versions
-dnl ========================================================
-dnl Check for pkgconfig first
-AC_CHECK_PROG(HAVE_PKGCONFIG, pkg-config, yes, no)
-
-dnl Give error and exit if we don't have pkgconfig
-if test "x$HAVE_PKGCONFIG" = "xno"; then
- AC_MSG_ERROR(you need to have pkgconfig installed !)
-fi
-
PKG_CHECK_MODULES(NAUTILUS, libnautilus-extension >= $NAUTILUS_REQUIRED)
PKG_CHECK_MODULES(GLIB, glib-2.0 >= $GLIB_REQUIRED)
-AC_SUBST(NAUTILUS_CFLAGS)
-AC_SUBST(NAUTILUS_LIBS)
-
-AC_SUBST(GLIB_CFLAGS)
-AC_SUBST(GLIB_LIBS)
-
dnl ========================================================
dnl Get nautilus extensionsdir
dnl ========================================================
-NAUTILUS_EXTENSION_DIR=`$PKG_CONFIG --variable=extensiondir libnautilus-extension`
-AC_SUBST(NAUTILUS_EXTENSION_DIR)
+nautilus_extensiondir=`$PKG_CONFIG --variable=extensiondir libnautilus-extension`
+AC_SUBST([nautilus_extensiondir])
dnl ========================================================
-dnl Set INTERFACES_DIR
+dnl Set interfacesdir
dnl ========================================================
-
-if test "x${prefix}" = "xNONE"; then
- AC_DEFINE_UNQUOTED(INTERFACES_DIR, "${ac_default_prefix}/${DATADIRNAME}/${PACKAGE}/interfaces", [path where glade files will be installed])
- interfacesdir="${ac_default_prefix}/${DATADIRNAME}/${PACKAGE}/interfaces"
-else
- AC_DEFINE_UNQUOTED(INTERFACES_DIR, "${prefix}/${DATADIRNAME}/${PACKAGE}/interfaces", [path where glade files will be installed])
- interfacesdir="${prefix}/${DATADIRNAME}/${PACKAGE}/interfaces"
-fi
-
-AC_SUBST(interfacesdir)
+AC_SUBST([interfacesdir], ['${pkgdatadir}/interfaces'])
dnl ========================================================
-dnl Transtlations
+dnl Translations
dnl ========================================================
ALL_LINGUAS="ar as ast bn_IN ca ca valencia cs da de el en_GB eo es et de dz eu fi fr gl gu he hu id it kn ko lt lv ml mr nb oc pa pl pt pt_BR ro ru sk sl sv ta te uk vi zh_CN zh_HK zh_TW"
@@ -68,16 +38,10 @@ AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [gettext package name])
AM_GLIB_GNU_GETTEXT
AM_GLIB_DEFINE_LOCALEDIR(NAUTILUS_SHARE_LOCALEDIR)
-# AM_GNOME_GETTEXT above substs $DATADIRNAME
-# this is the directory where the *.{mo,gmo} files are installed
-gnomelocaledir='${prefix}/${DATADIRNAME}/locale'
-AC_SUBST(gnomelocaledir)
-
-
dnl ========================================================
AC_CONFIG_FILES([
- Makefile
+ Makefile
src/Makefile
interfaces/Makefile
po/Makefile.in
diff --git a/src/Makefile.am b/src/Makefile.am
index 8c7c18d..201aff7 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,6 +1,7 @@
libnautilus_share_la_CFLAGS = \
-Wall \
-DG_LOG_DOMAIN=\"Nautilus-Share\" \
+ -DINTERFACES_DIR=\"$(interfacesdir)\" \
-DDATADIR=\"$(datadir)\" \
-I$(top_srcdir) \
-I$(top_builddir) \
@@ -9,8 +10,6 @@ libnautilus_share_la_CFLAGS = \
$(NAUTILUS_CFLAGS) \
$(GLIB_CFLAGS)
-nautilus_extensiondir=$(NAUTILUS_EXTENSION_DIR)
-
nautilus_extension_LTLIBRARIES=libnautilus-share.la
libnautilus_share_la_SOURCES = \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]