libgweather r301 - in trunk: . libgweather



Author: danw
Date: Mon Aug  4 14:28:03 2008
New Revision: 301
URL: http://svn.gnome.org/viewvc/libgweather?rev=301&view=rev

Log:
	* configure.in (ZONEINFO_DIR): Figure out zoneinfo directory

	* libgweather/gweather-timezone.c: Use that rather than hardcoding
	/usr/share/zoneinfo

	* libgweather/gweather.pc.in: define datarootdir, to shut up an
	autoconf warning


Modified:
   trunk/ChangeLog
   trunk/configure.in
   trunk/libgweather/gweather-timezone.c
   trunk/libgweather/gweather.pc.in

Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in	(original)
+++ trunk/configure.in	Mon Aug  4 14:28:03 2008
@@ -143,6 +143,23 @@
 fi
 
 dnl ***************************************************************************
+dnl *** Find tzdata                                                         ***
+dnl ***************************************************************************
+AC_ARG_WITH(zoneinfo-dir,
+	    [  --with-zoneinfo-dir     tzdata zoneinfo directory],
+	    ZONEINFO_DIR="$withval")
+if test -z "$zoneinfo_dir"; then
+    if test -d /usr/share/zoneinfo; then
+	ZONEINFO_DIR="/usr/share/zoneinfo"
+    elif test -d /usr/share/lib/zoneinfo/tab; then
+	ZONEINFO_DIR="/usr/share/lib/zoneinfo/tab"
+    else
+	AC_MSG_ERROR(Can't find zoneinfo directory. Use --with-zoneinfo-dir)
+    fi
+fi
+AC_DEFINE_UNQUOTED(ZONEINFO_DIR, "$ZONEINFO_DIR", [zoneinfo directory])
+
+dnl ***************************************************************************
 dnl *** Honour aclocal flags                                                ***
 dnl ***************************************************************************
 ACLOCAL_AMFLAGS="\${ACLOCAL_FLAGS}"

Modified: trunk/libgweather/gweather-timezone.c
==============================================================================
--- trunk/libgweather/gweather-timezone.c	(original)
+++ trunk/libgweather/gweather-timezone.c	Mon Aug  4 14:28:03 2008
@@ -17,6 +17,8 @@
  * USA
  */
 
+#include "config.h"
+
 #include <string.h>
 
 #define GWEATHER_I_KNOW_THIS_IS_UNSTABLE
@@ -31,8 +33,6 @@
     int ref_count;
 };
 
-#define ZONEINFO_DIR "/usr/share/zoneinfo"
-
 #define TZ_MAGIC "TZif"
 #define TZ_HEADER_SIZE 44
 #define TZ_TIMECNT_OFFSET 32

Modified: trunk/libgweather/gweather.pc.in
==============================================================================
--- trunk/libgweather/gweather.pc.in	(original)
+++ trunk/libgweather/gweather.pc.in	Mon Aug  4 14:28:03 2008
@@ -1,5 +1,6 @@
 prefix= prefix@
 exec_prefix= exec_prefix@
+datarootdir= datarootdir@
 libdir= libdir@
 includedir= includedir@
 locations_file= datadir@/libgweather/Locations.xml



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]