# Process this file with autoconf to produce a configure script. # which version(>=) of autoconf is required AC_PREREQ(2.59) # initialize autoconf and automake AC_INIT([gkleds],[0.8.2],[oyvinha@ifi.uio.no]) AM_INIT_AUTOMAKE # sanity check on source directory (in case of --srcdir poops) AC_CONFIG_SRCDIR([src/gkleds.c]) # name of file where preprocessor defines are located/will be inserted AC_CONFIG_HEADERS([config.h]) # generates the host variable which we use to determine OS specific checks AC_CANONICAL_HOST # Checks for programs and set their options. AC_PROG_CC AC_PROG_INSTALL # Use libtool to manage library building AC_DISABLE_STATIC AC_LIBTOOL_WIN32_DLL AC_PROG_LIBTOOL # check for large development enviroments (libraries and headers) AM_PATH_GTK_2_0([2.0.0], [], [AC_MSG_ERROR([Unable to find gtk-config. Please check your PATH variable and make sure the gtk development files are installed.])]) case $host in *-*-cygwin* | *-*-mingw32*) # windows ;; *) # assume X AC_PATH_XTRA ;; esac GKM_PATH_GKRELLM2([2.1.1]) # Checks for libraries. case $host in *-*-cygwin* | *-*-mingw32*) # windows AC_CHECK_LIB([user32], [GetKeyState], [], AC_MSG_ERROR([Unable to find the user32 library. Please check that the library is available.])) ;; *) # assume X AC_CHECK_LIB([X11], [XOpenDisplay], [], AC_MSG_ERROR([Unable to find the X11 library. Is X installed?]), [$X_LIBS]) AC_CHECK_LIB([Xtst], [XTestFakeKeyEvent], [], AC_MSG_ERROR([Unable to find the Xtst library. Is the X test extension installed?]), [$X_LIBS]) ;; esac # Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS([stdlib.h]) AC_CHECK_HEADERS([stdio.h]) case $host in *-*-cygwin* | *-*-mingw32*) # windows AC_CHECK_HEADER([windows.h], [], AC_MSG_ERROR([Unable to find windows.h. Make sure the development files are installed.])) ;; *) # assume X AC_CHECK_HEADER([X11/Xlib.h], [], AC_MSG_ERROR([Unable to find X11/Xlib.h. Make sure the development files are installed.])) AC_CHECK_HEADER([X11/XKBlib.h], [], AC_MSG_ERROR([Unable to find X11/XKBlib.h. Make sure the development files are installed.])) AC_CHECK_HEADER([X11/extensions/XTest.h], [], AC_MSG_ERROR([Unable to find X11/extensions/XTest.h. Make sure the development files are installed.])) AC_CHECK_HEADER([X11/keysym.h], [], AC_MSG_ERROR([Unable to find X11/keysym.h. Make sure the development files are installed.])) ;; esac # Checks for typedefs, structures, and compiler characteristics. AC_C_CONST # Checks for library functions. # Generate output AC_CONFIG_FILES([Makefile src/Makefile pixmaps/Makefile]) AC_OUTPUT AC_MSG_NOTICE([]) AC_MSG_NOTICE([]) AC_MSG_NOTICE([$PACKAGE_NAME will be installed in $libdir.]) AC_MSG_NOTICE([Now run make followed by make install-strip or make install.])