4 AM_CONFIG_HEADER(config.h)
5 AM_INIT_AUTOMAKE(eglib,0.3)
10 CFLAGS='-g -O0 -D_GNU_SOURCE'
14 BREAKPOINT="G_STMT_START { raise (SIGTRAP); } G_STMT_END"
15 if test x$GCC = xyes; then
16 GNUC_UNUSED='__attribute__((__unused__))'
17 GNUC_NORETURN='__attribute__((__noreturn__))'
18 echo target_cpu=$target_cpu
20 i*86) BREAKPOINT="G_STMT_START { __asm__ (\"int \$03\"); } G_STMT_END" ;;
25 AC_SUBST(GNUC_NORETURN)
28 AM_CONDITIONAL(CROSS_COMPILING, [test x$cross_compiling = xyes])
29 AC_C_BIGENDIAN([ORDER=G_BIG_ENDIAN],[ORDER=G_LITTLE_ENDIAN])
33 *-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*)
47 CFLAGS="$CLAFGS -U_FORTIFY_SOURCE"
54 AM_CONDITIONAL(PLATFORM_WIN32, test x$OS = xWIN32)
57 AC_CHECK_SIZEOF(void *)
58 AC_CHECK_FUNCS(strndup strlcpy getpwent_r strtok_r rewinddir)
59 AC_CHECK_LIB(iconv, libiconv_open, LIBS="$LIBS -liconv")
60 old_ldflags="${LDFLAGS}"
61 LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
62 AC_TRY_LINK(, [int i;], found_export_dynamic=yes, found_export_dynamic=no)
63 if test $found_export_dynamic = no; then
64 LDFLAGS="${old_ldflags}"
67 AC_CHECK_HEADERS(getopt.h sys/time.h sys/wait.h pwd.h langinfo.h iconv.h)
69 if test $ac_cv_sizeof_void_p != $ac_cv_sizeof_int; then
70 GPOINTER_TO_INT="((gint)(long) (ptr))"
71 GPOINTER_TO_UINT="((guint)(long) (ptr))"
72 GINT_TO_POINTER="((gpointer)(glong) (v))"
73 GUINT_TO_POINTER="((gpointer)(gulong) (v))"
76 G_GUINT64_FORMAT='"lu"'
78 GPOINTER_TO_INT="((gint) (ptr))"
79 GPOINTER_TO_UINT="((guint) (ptr))"
80 GINT_TO_POINTER="((gpointer) (v))"
81 GUINT_TO_POINTER="((gpointer) (v))"
84 G_GUINT64_FORMAT='"llu"'
87 PKG_CHECK_MODULES(GLIB, glib-2.0,
88 [AM_CONDITIONAL(HAVE_GLIB, test x = x)],
89 [AM_CONDITIONAL(HAVE_GLIB, test x = y)]
91 AC_SUBST(GPOINTER_TO_INT)
92 AC_SUBST(GPOINTER_TO_UINT)
93 AC_SUBST(GINT_TO_POINTER)
94 AC_SUBST(GUINT_TO_POINTER)
96 AC_SUBST(GSIZE_FORMAT)
97 AC_SUBST(G_GUINT64_FORMAT)