+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.
--- /dev/null
+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
+]
+)
-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
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])