1 # Process this file with autoconf to produce a configure script.
3 AM_CONFIG_HEADER(config.h)
4 AM_INIT_AUTOMAKE(wmweather+, 2.12)
6 # We need GNU sources for certain features
7 AH_VERBATIM([_GNU_SOURCE],
8 [/* Enable GNU extensions on systems that have them */
13 DATE=`date '+%B %e, %Y'`
18 WMGENERAL_GUI="libwmgeneral-x11.a"
19 AC_SUBST(WMGENERAL_GUI)
21 # Checks for programs.
28 # Checks for libraries.
29 AC_CHECK_LIB([m],[cos])
30 CHECK_LIBPCRE(, AC_MSG_ERROR(libpcre is required))
31 LIBCURL_CHECK_CONFIG(yes,,,AC_MSG_ERROR(libcurl is required))
33 # Checks for header files.
36 if test "$LINK_XPM" = ""; then
37 AC_MSG_ERROR(cannot find libxpm)
39 CHECK_LIBWRASTER(, AC_MSG_ERROR(libwraster is required))
41 if test "$ac_cv_header_stdc" != "yes"; then AC_MSG_WARN(standard C headers not found); fi
43 if test "$ac_cv_header_sys_wait_h" != "yes"; then AC_MSG_WARN(sys/wait.h not found); fi
44 AC_CHECK_HEADERS([fcntl.h limits.h stdlib.h string.h unistd.h sys/time.h],, AC_MSG_WARN($ac_header not found))
47 # Checks for typedefs, structures, and compiler characteristics.
52 AC_CHECK_TYPES([ssize_t])
55 typedef signed ssize_t;
59 # Checks for library functions.
61 if test "$ac_cv_func_fork_works" != "yes"; then AC_MSG_WARN(fork() doesn't seem to work); fi
63 if test "$ac_cv_func_malloc_0_nonnull" != "yes"; then AC_MSG_WARN(malloc() doesn't seem to work); fi
70 if test "$ac_cv_func_vprintf" != "yes"; then AC_MSG_WARN(vprintf() doesn't seem to exist); fi
71 AC_CHECK_FUNCS([atexit dup2 mkdir pow select strchr strcspn strdup strerror strrchr strspn strstr strtol],, AC_MSG_WARN($ac_func doesn't seem to be available))
75 CFLAGS="$CFLAGS \$(X_CFLAGS) \$(LIBCURL_CPPFLAGS)"
76 LIBS="$LIBS \$(LIBCURL)"
77 XLIBS="\$(X_PRE_LIBS) \$(X_LIBS) \$(LINK_XPM) -lX11 -lXext \$(X_EXTRA_LIBS)"
80 AC_CONFIG_FILES([Makefile wmweather+.1])
81 AC_CONFIG_FILES([b0rken/Makefile])
82 AC_CONFIG_FILES([m4/Makefile])
83 AC_CONFIG_FILES([wmgeneral/Makefile])