diff options
author | Tim Janik <timj@gtk.org> | 1998-12-19 03:44:30 +0000 |
---|---|---|
committer | Tim Janik <timj@src.gnome.org> | 1998-12-19 03:44:30 +0000 |
commit | e0153773a69fe64b2643c0d74c40af2dee7eb38f (patch) | |
tree | 9630374e7f86fd602782d2e0ee5a03f422028d7c /acglib.m4 | |
parent | c0c488e4baa1730eb893456c52ea879f25e312e1 (diff) |
fixed up sys/poll.h and sys/types.h inclusions.
Sat Dec 19 04:27:17 1998 Tim Janik <timj@gtk.org>
* fixed up sys/poll.h and sys/types.h inclusions.
Diffstat (limited to 'acglib.m4')
-rw-r--r-- | acglib.m4 | 28 |
1 files changed, 28 insertions, 0 deletions
@@ -68,6 +68,7 @@ main() char *p = (char*) &tv; int i; FILE *f=fopen("conftestval", "w"); + if (!f) exit(1); for (i = 0; i < $4; i++) fprintf(f, "%s%d", i?",":"", *(p++)); fprintf(f, "\n"); @@ -78,3 +79,30 @@ AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME) undefine([AC_TYPE_NAME])dnl undefine([AC_CV_NAME])dnl ]) + +dnl GLIB_SYSDEFS (INCLUDES, DEFS_LIST, OFILE [, PREFIX]) +AC_DEFUN(GLIB_SYSDEFS, +[glib_sysdefso="translit($3, [-_a-zA-Z0-9 *], [-_a-zA-Z0-9])" +AC_MSG_CHECKING(system definitions for $2) +cat >confrun.c <<_______EOF +#include <stdio.h> +$1 +int main (int c, char **v) { + FILE *f = fopen ("$glib_sysdefso", "a"); + if (!f) return 1; +_______EOF +for glib_sysdef in $2 ; do + echo "#ifdef $glib_sysdef" >>confrun.c + echo " fprintf (f, \"#define GLIB_SYSDEF_%s %s%d\\n\", \"$glib_sysdef\", \"$4\", $glib_sysdef);" >>confrun.c + echo "#else" >>confrun.c + echo " fprintf (f, \"#define GLIB_SYSDEF_%s\\n\", \"$glib_sysdef\");" >>confrun.c + echo "#endif" >>confrun.c +done +echo "return 0; }" >>confrun.c +AC_TRY_RUN(`cat confrun.c`, AC_MSG_RESULT(done), + for glib_sysdef in $2 ; do + echo "#define GLIB_SYSDEF_$glib_sysdef" >>$glib_sysdefso + done + AC_MSG_RESULT(failed),) +rm -f confrun.c +]) |