summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Baulig <martin@home-of-linux.org>2000-11-21 17:18:11 +0000
committerMartin Baulig <martin@src.gnome.org>2000-11-21 17:18:11 +0000
commit1f8d693b87ce9132f3880809f52ede46727ef5e4 (patch)
treeb9efbc3c57f4d5c98e7beffaa45381ba6ddd64eb
parentc0a8b9ac7e2ffa3ec0199412354df7441226bbfc (diff)
downloadshared-mime-info-1f8d693b87ce9132f3880809f52ede46727ef5e4.tar.gz
Set version number to 1.2.1.
2000-11-21 Martin Baulig <martin@home-of-linux.org> * configure.in: Set version number to 1.2.1. * configure.in (--enable-platform-gnome-2): New configure command line argument to enable support for the GNOME 2.x platform. (PLATFORM_GNOME_2): New automake conditional. * Do the GNOME_SUPPORT_CHECKS here if we're on the GNOME 2.x platform. * Makefile.am (SUBDIRS): Conditionally add support for the GNOME 2.x platform. * acinclude.m4: New file. Put stuff from gnome-support.m4 and need-declaration.m4 here. svn path=/trunk/; revision=1466
-rw-r--r--.cvsignore2
-rw-r--r--ChangeLog17
-rw-r--r--Makefile.am20
-rw-r--r--acinclude.m4110
-rw-r--r--configure.in38
-rw-r--r--gnome-common-2.0.pc.in10
-rw-r--r--gnome-common.pc.in10
7 files changed, 197 insertions, 10 deletions
diff --git a/.cvsignore b/.cvsignore
index de921a26..a7285f97 100644
--- a/.cvsignore
+++ b/.cvsignore
@@ -14,3 +14,5 @@ libtool
config.status
stamp-h
stamp.h
+gnome-common.pc
+gnome-common-2.0.pc
diff --git a/ChangeLog b/ChangeLog
index 53c4a24f..e785003b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+2000-11-21 Martin Baulig <martin@home-of-linux.org>
+
+ * configure.in: Set version number to 1.2.1.
+
+ * configure.in (--enable-platform-gnome-2): New configure
+ command line argument to enable support for the GNOME 2.x
+ platform.
+ (PLATFORM_GNOME_2): New automake conditional.
+ * Do the GNOME_SUPPORT_CHECKS here if we're on the GNOME 2.x
+ platform.
+
+ * Makefile.am (SUBDIRS): Conditionally add support for the
+ GNOME 2.x platform.
+
+ * acinclude.m4: New file. Put stuff from gnome-support.m4
+ and need-declaration.m4 here.
+
2000-05-29 Martin Baulig <baulig@suse.de>
* configure.in: Set version number to 1.2.0.
diff --git a/Makefile.am b/Makefile.am
index 7484fd7d..062e33ef 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,9 +1,15 @@
-SUBDIRS = bin macros macros2 doc
+if PLATFORM_GNOME_2
+pkgconfig_file = gnome-common-2.0.pc
+support = support
+else
+pkgconfig_file =
+support =
+endif
-EXTRA_DIST = gnome-common.spec
+SUBDIRS = bin macros macros2 doc $(support)
+
+EXTRA_DIST = gnome-common.spec gnome-common-2.0.pc.in gnome-common.pc.in
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = $(pkgconfig_file) gnome-common.pc
-dist-hook:
- for subdir in intl support ; do \
- mkdir $(distdir)/$$subdir ; \
- cp -pr $(srcdir)/$$subdir $(distdir) ; \
- done
diff --git a/acinclude.m4 b/acinclude.m4
new file mode 100644
index 00000000..a4ff18ba
--- /dev/null
+++ b/acinclude.m4
@@ -0,0 +1,110 @@
+dnl GNOME_SUPPORT_CHECKS
+dnl Check for various support functions needed by the standard
+dnl Gnome libraries. Sets LIBOBJS, might define some macros.
+dnl This should only be used when building the Gnome libs;
+dnl Gnome clients should not need this macro.
+AC_DEFUN([GNOME_SUPPORT_CHECKS],[
+ # we need an `awk' to build `gnomesupport.h'
+ AC_REQUIRE([AC_PROG_AWK])
+
+ # this should go away soon
+ need_gnome_support=yes
+
+ save_LIBOBJS="$LIBOBJS"
+ LIBOBJS=
+
+ AC_CHECK_FUNCS(getopt_long,,LIBOBJS="$LIBOBJS getopt.o getopt1.o")
+
+ # for `scandir'
+ AC_HEADER_DIRENT
+
+ # copied from `configure.in' of `libiberty'
+ vars="program_invocation_short_name program_invocation_name sys_errlist"
+ for v in $vars; do
+ AC_MSG_CHECKING([for $v])
+ AC_CACHE_VAL(gnome_cv_var_$v,
+ [AC_TRY_LINK([int *p;], [extern int $v; p = &$v;],
+ [eval "gnome_cv_var_$v=yes"],
+ [eval "gnome_cv_var_$v=no"])])
+ if eval "test \"`echo '$gnome_cv_var_'$v`\" = yes"; then
+ AC_MSG_RESULT(yes)
+ n=HAVE_`echo $v | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ AC_DEFINE_UNQUOTED($n)
+ else
+ AC_MSG_RESULT(no)
+ fi
+ done
+
+ AC_REPLACE_FUNCS(memmove mkstemp scandir strcasecmp strerror strndup strnlen)
+ AC_REPLACE_FUNCS(strtok_r strtod strtol strtoul vasprintf vsnprintf)
+
+ AC_CHECK_FUNCS(realpath,,LIBOBJS="$LIBOBJS canonicalize.o")
+
+ # to include `error.c' error.c has some HAVE_* checks
+ AC_CHECK_FUNCS(vprintf doprnt strerror_r)
+ AM_FUNC_ERROR_AT_LINE
+
+ # This is required if we declare setreuid () and setregid ().
+ AC_TYPE_UID_T
+
+ # see if we need to declare some functions. Solaris is notorious for
+ # putting functions into the `libc' but not listing them in the headers
+ AC_CHECK_HEADERS(string.h strings.h stdlib.h unistd.h dirent.h)
+ GCC_NEED_DECLARATIONS(gethostname setreuid setregid getpagesize)
+ GCC_NEED_DECLARATION(scandir,[
+#ifdef HAVE_DIRENT_H
+#include <dirent.h>
+#endif
+])
+
+ # Turn our LIBOBJS into libtool objects. This is gross, but it
+ # requires changes to autoconf before it goes away.
+ LTLIBOBJS=`echo "$LIBOBJS" | sed 's/\.o/.lo/g'`
+ AC_SUBST(need_gnome_support)
+ AC_SUBST(LTLIBOBJS)
+
+ LIBOBJS="$save_LIBOBJS"
+ AM_CONDITIONAL(BUILD_GNOME_SUPPORT, test "$need_gnome_support" = yes)
+])
+dnl See whether we need a declaration for a function.
+dnl GCC_NEED_DECLARATION(FUNCTION [, EXTRA-HEADER-FILES])
+AC_DEFUN(GCC_NEED_DECLARATION,
+[AC_MSG_CHECKING([whether $1 must be declared])
+AC_CACHE_VAL(gcc_cv_decl_needed_$1,
+[AC_TRY_COMPILE([
+#include <stdio.h>
+#ifdef HAVE_STRING_H
+#include <string.h>
+#else
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+$2],
+[char *(*pfn) = (char *(*)) $1],
+eval "gcc_cv_decl_needed_$1=no", eval "gcc_cv_decl_needed_$1=yes")])
+if eval "test \"`echo '$gcc_cv_decl_needed_'$1`\" = yes"; then
+ AC_MSG_RESULT(yes)
+ gcc_need_declarations="$gcc_need_declarations $1"
+ gcc_tr_decl=NEED_DECLARATION_`echo $1 | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ AC_DEFINE_UNQUOTED($gcc_tr_decl)
+else
+ AC_MSG_RESULT(no)
+fi
+])dnl
+
+dnl Check multiple functions to see whether each needs a declaration.
+dnl GCC_NEED_DECLARATIONS(FUNCTION... [, EXTRA-HEADER-FILES])
+AC_DEFUN(GCC_NEED_DECLARATIONS,
+[for ac_func in $1
+do
+GCC_NEED_DECLARATION($ac_func, $2)
+done
+]
+)
diff --git a/configure.in b/configure.in
index 009adab9..34fd6e22 100644
--- a/configure.in
+++ b/configure.in
@@ -1,12 +1,21 @@
-AC_INIT(intl)
+AC_INIT(support/easy-vsnprintf.c)
AM_CONFIG_HEADER(config.h)
-AM_INIT_AUTOMAKE(gnome-common, 1.2.0)
+AM_INIT_AUTOMAKE(gnome-common, 1.2.1)
AM_MAINTAINER_MODE
AM_CONDITIONAL(INSIDE_GNOME_COMMON, true)
+AC_ARG_ENABLE(platform-gnome-2, [ --enable-platform-gnome-2 enable GNOME 2.x platform [default=no]],[platform_gnome_2="$enableval"],[platform_gnome_2=no])
+if test "x$platform_gnome_2" != "xyes" ; then
+ platform_gnome_2=no
+fi
+
+AM_CONDITIONAL(PLATFORM_GNOME_2, test $platform_gnome_2 = yes)
+
+AC_DEFUN([AC_FYI], [echo "FYI: " $1])
+
AC_ISC_POSIX
AC_PROG_CC
AC_PROG_CPP
@@ -14,9 +23,32 @@ AC_STDC_HEADERS
AC_ARG_PROGRAM
AM_PROG_LIBTOOL
+AC_PROG_AWK
+
+if test $platform_gnome_2 = yes; then
+ GNOME_INTERFACE_VERSION=2
+ AC_FYI(Enabling GNOME 2 Platform)
+ AC_PATH_PROG(PKG_CONFIG, pkg-config)
+ if ! test -x "$PKG_CONFIG" ; then
+ AC_MSG_ERROR([
+*** You need the latest pkg-config.
+*** Get the latest version of pkg-config from
+*** http://pkgconfig.sourceforce.net.])
+ fi
+ AC_SUBST(PKG_CONFIG)
+ GNOME_SUPPORT_CHECKS
+else
+ GNOME_INTERFACE_VERSION=1
+fi
+AC_SUBST(GNOME_INTERFACE_VERSION)
+
AC_OUTPUT([
+gnome-common.pc
+gnome-common-2.0.pc
Makefile
macros/Makefile
macros2/Makefile
bin/Makefile
-doc/Makefile])
+doc/Makefile
+support/Makefile
+support/gnome-support-2.0.pc])
diff --git a/gnome-common-2.0.pc.in b/gnome-common-2.0.pc.in
new file mode 100644
index 00000000..9d720e24
--- /dev/null
+++ b/gnome-common-2.0.pc.in
@@ -0,0 +1,10 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: gnome-common
+Description: gnome-common package
+Version: @VERSION@
+Libs: -L${libdir}
+Cflags: -I${includedir}/gnome/2
diff --git a/gnome-common.pc.in b/gnome-common.pc.in
new file mode 100644
index 00000000..9d720e24
--- /dev/null
+++ b/gnome-common.pc.in
@@ -0,0 +1,10 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: gnome-common
+Description: gnome-common package
+Version: @VERSION@
+Libs: -L${libdir}
+Cflags: -I${includedir}/gnome/2