Removed bashism in test for the pkg-config version.

2001-04-19  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* configure.in: Removed bashism in test for the pkg-config
	version.

	* configure.in: Rewrote test for multithread flag. Now uses
	localtime_r, which hopefully has a consistent prototype across
	different platforms. Also it uses a clever double EGREP trick
	instead of compiling, which could give false positives. Thanks to
	Dan Winship <danw@ximian.com> for the hint.
This commit is contained in:
Sebastian Wilhelmi 2001-04-19 08:26:21 +00:00 committed by Sebastian Wilhelmi
parent c8c685d305
commit 4f5ea7fce3
9 changed files with 102 additions and 7 deletions

View File

@ -1,3 +1,14 @@
2001-04-19 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* configure.in: Removed bashism in test for the pkg-config
version.
* configure.in: Rewrote test for multithread flag. Now uses
localtime_r, which hopefully has a consistent prototype across
different platforms. Also it uses a clever double EGREP trick
instead of compiling, which could give false positives. Thanks to
Dan Winship <danw@ximian.com> for the hint.
Wed Apr 18 17:35:38 2001 Owen Taylor <otaylor@redhat.com>
* gutils.c (_glib_gettext): Add missing static pointed

View File

@ -1,3 +1,14 @@
2001-04-19 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* configure.in: Removed bashism in test for the pkg-config
version.
* configure.in: Rewrote test for multithread flag. Now uses
localtime_r, which hopefully has a consistent prototype across
different platforms. Also it uses a clever double EGREP trick
instead of compiling, which could give false positives. Thanks to
Dan Winship <danw@ximian.com> for the hint.
Wed Apr 18 17:35:38 2001 Owen Taylor <otaylor@redhat.com>
* gutils.c (_glib_gettext): Add missing static pointed

View File

@ -1,3 +1,14 @@
2001-04-19 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* configure.in: Removed bashism in test for the pkg-config
version.
* configure.in: Rewrote test for multithread flag. Now uses
localtime_r, which hopefully has a consistent prototype across
different platforms. Also it uses a clever double EGREP trick
instead of compiling, which could give false positives. Thanks to
Dan Winship <danw@ximian.com> for the hint.
Wed Apr 18 17:35:38 2001 Owen Taylor <otaylor@redhat.com>
* gutils.c (_glib_gettext): Add missing static pointed

View File

@ -1,3 +1,14 @@
2001-04-19 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* configure.in: Removed bashism in test for the pkg-config
version.
* configure.in: Rewrote test for multithread flag. Now uses
localtime_r, which hopefully has a consistent prototype across
different platforms. Also it uses a clever double EGREP trick
instead of compiling, which could give false positives. Thanks to
Dan Winship <danw@ximian.com> for the hint.
Wed Apr 18 17:35:38 2001 Owen Taylor <otaylor@redhat.com>
* gutils.c (_glib_gettext): Add missing static pointed

View File

@ -1,3 +1,14 @@
2001-04-19 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* configure.in: Removed bashism in test for the pkg-config
version.
* configure.in: Rewrote test for multithread flag. Now uses
localtime_r, which hopefully has a consistent prototype across
different platforms. Also it uses a clever double EGREP trick
instead of compiling, which could give false positives. Thanks to
Dan Winship <danw@ximian.com> for the hint.
Wed Apr 18 17:35:38 2001 Owen Taylor <otaylor@redhat.com>
* gutils.c (_glib_gettext): Add missing static pointed

View File

@ -1,3 +1,14 @@
2001-04-19 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* configure.in: Removed bashism in test for the pkg-config
version.
* configure.in: Rewrote test for multithread flag. Now uses
localtime_r, which hopefully has a consistent prototype across
different platforms. Also it uses a clever double EGREP trick
instead of compiling, which could give false positives. Thanks to
Dan Winship <danw@ximian.com> for the hint.
Wed Apr 18 17:35:38 2001 Owen Taylor <otaylor@redhat.com>
* gutils.c (_glib_gettext): Add missing static pointed

View File

@ -1,3 +1,14 @@
2001-04-19 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* configure.in: Removed bashism in test for the pkg-config
version.
* configure.in: Rewrote test for multithread flag. Now uses
localtime_r, which hopefully has a consistent prototype across
different platforms. Also it uses a clever double EGREP trick
instead of compiling, which could give false positives. Thanks to
Dan Winship <danw@ximian.com> for the hint.
Wed Apr 18 17:35:38 2001 Owen Taylor <otaylor@redhat.com>
* gutils.c (_glib_gettext): Add missing static pointed

View File

@ -1,3 +1,14 @@
2001-04-19 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* configure.in: Removed bashism in test for the pkg-config
version.
* configure.in: Rewrote test for multithread flag. Now uses
localtime_r, which hopefully has a consistent prototype across
different platforms. Also it uses a clever double EGREP trick
instead of compiling, which could give false positives. Thanks to
Dan Winship <danw@ximian.com> for the hint.
Wed Apr 18 17:35:38 2001 Owen Taylor <otaylor@redhat.com>
* gutils.c (_glib_gettext): Add missing static pointed

View File

@ -154,7 +154,9 @@ if test x$PKG_CONFIG = xno ; then
AC_MSG_ERROR([*** pkg-config not found. See http://pkgconfig.sourceforge.net])
fi
if ! pkg-config --atleast-pkgconfig-version 0.5 ; then
if pkg-config --atleast-pkgconfig-version 0.5 ; then
:
else
AC_MSG_ERROR([*** pkg-config too old; version 0.5 or better required.])
fi
@ -1004,17 +1006,22 @@ if test x"$have_threads" != xnone; then
G_THREAD_CFLAGS="$G_THREAD_CFLAGS -D_POSIX4A_DRAFT10_SOURCE"
esac
# if we are not finding the ctime_r function, then we probably are
# if we are not finding the localtime_r function, then we probably are
# not using the proper multithread flag
glib_save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $G_THREAD_CFLAGS"
AC_TRY_COMPILE([#include <time.h>],
[time_t t; char b[30]; ctime_r (&t, b);], ,
[AC_TRY_COMPILE([#include <time.h>],
[time_t t; char b[30]; ctime_r (&t, b, 30);], ,
AC_MSG_WARN($FLAG_DOES_NOT_WORK))])
# First we test, whether localtime_r is declared in time.h
# directly. Then we test wether a macro localtime_r exists, in
# which case localtime_r in the test program is replaced and thus
# if we still find localtime_r in the output, it is not defined as
# a macro.
AC_EGREP_CPP([[^a-zA-Z1-9_]localtime_r[^a-zA-Z1-9_]], [#include <time.h>], ,
[AC_EGREP_CPP([[^a-zA-Z1-9_]localtime_r[^a-zA-Z1-9_]], [#include <time.h>
localtime_r(a,b)],
AC_MSG_WARN($FLAG_DOES_NOT_WORK))])
CPPFLAGS="$glib_save_CPPFLAGS"