dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.12.2) AC_INIT(libXg/xtbinit.c) AM_INIT_AUTOMAKE(9libs, 1.0) AM_CONFIG_HEADER(include/conf9libs.h) dnl Compiler things dnl AC_ISC_POSIX seems to be required by AC_TRY_RUN AC_ISC_POSIX AM_PROG_CC_STDC AC_HEADER_STDC AC_PATH_XTRA AC_CHECK_HEADERS(malloc.h) dnl Shared libraries AM_DISABLE_SHARED AM_PROG_LIBTOOL AC_C_CONST AC_TYPE_SIZE_T AC_CHECK_HAVE_TYPE(ulong) AC_CHECK_HAVE_TYPE(uint) AC_CHECK_HAVE_TYPE(ushort) AC_CHECK_HAVE_TYPE(uchar) AC_CHECK_HAVE_TYPE(caddr_t) AC_CHECK_LIB(m, sin) AC_REPLACE_FUNCS(memmove strerror) dnl Check for broken SunOS 4 C library which core dumps on realloc(0, x) dnl AC_CACHE_CHECK(for ANSI realloc, ninelibs_cv_ansi_realloc, AC_TRY_RUN([#if STDC_HEADERS #include #else #if HAVE_MALLOC_H #include #endif #endif int main(void) { char *p = 0; p = realloc(0, 42); exit(!(p != 0)); }], ninelibs_cv_ansi_realloc=yes, ninelibs_cv_ansi_realloc=no, changequote(<<,>>)dnl dnl dnl Have to quote the case options as the `)' gets lost otherwise dnl <> changequote([,])dnl )) if test "$ninelibs_cv_ansi_realloc" = yes; then AC_DEFINE(HAVE_ANSI_REALLOC) fi dnl Check if we want Rune conversion in libplan9c. dnl AC_ARG_ENABLE(runes, [ --enable-runes allow Rune conversion in print functions [default=yes]], if test "$enableval" != no ; then AC_DEFINE(PRINT_RUNES) fi, AC_DEFINE(PRINT_RUNES)) dnl Check if we want gcov support. This needs to be done quite late dnl so we can remove any optimizer options from CFLAGS. dnl AC_ARG_ENABLE(gcov, [ --enable-gcov generate code for use with gcov [default=no]], changequote(<<,>>)dnl <>, changequote([,])dnl CFLAGS_GCOV=) AC_SUBST(CFLAGS_GCOV) MHW_MOD_CHECK(sam) MHW_MOD_CHECK(wily) MHW_MOD_CHECK(9term) MHW_MOD_CHECK(9wm) MHW_MOD_CHECK(9menu) MHW_MOD_CHECK(9x) AC_CONFIG_SUBDIRS($mod_subdirs) dnl Hack to allow autoconf version 2.12 and earlier to support LTLIBOBJS. dnl From the libtool manual. We don't need the alloca version. LTLIBOBJS=`echo "$LIBOBJS" | sed 's/\.o/.lo/g'` AC_SUBST(LTLIBOBJS) AC_OUTPUT(Makefile include/Makefile libplan9c/Makefile libregexp/Makefile libframe/Makefile libXg/Makefile doc/Makefile)