# -*- Autoconf -*- # Process this file with autoconf to produce a configure script. # $Revision: 295 $ - $Date: 2007-09-09 06:37:50 +0200 (Sun, 09 Sep 2007) $ $Author: mlampard $ AC_PREREQ(2.59) AC_INIT(g15daemon, [1.9pre], [mlampard@users.sf.net]) AC_PREFIX_DEFAULT(/usr) AC_CONFIG_AUX_DIR(config) AC_CANONICAL_TARGET() AM_INIT_AUTOMAKE() AC_CONFIG_HEADER([config.h]) # Checks for programs. AC_PROG_CC AC_PROG_LIBTOOL AC_PROG_RANLIB # Checks for libraries. AC_CHECK_LIB([g15], [initLibG15],,AC_MSG_ERROR(["libg15 (or its devel package) not found. please install it"])) AC_CHECK_LIB([g15render], [g15r_loadWbmpSplash],,AC_MSG_ERROR([">=libg15render-1.2 (or its devel package) not found. please install it"])) AC_CHECK_LIB([m], [sin]) AC_CHECK_LIB([pthread], [pthread_mutex_init]) # Checks for header files. AC_HEADER_STDC AC_HEADER_SYS_WAIT AC_CHECK_HEADERS([ linux/input.h ]) AC_CHECK_HEADERS([ linux/uinput.h arpa/inet.h fcntl.h stdlib.h string.h sys/socket.h unistd.h libg15.h], [], [], [#if HAVE_LINUX_INPUT_H #include #endif ]) #if HAVE_LINUX_UINPUT_H dnl check for uinput.h version 2.4 or 2.6 ? AC_CHECK_MEMBER([struct uinput_user_dev.id], [AC_DEFINE(HAVE_UINPUT_USER_DEV_ID, 1, [Define if struct uinput_user_dev has id member.])],, [ #include #include ] ) dnl end of uinput version checks #endif case $host_os in *linux*) AC_DEFINE([OSTYPE_LINUX], [1],[Target OS is Linux]) ;; *darwin*) AC_DEFINE([OSTYPE_DARWIN], [1],[Target OS is Darwin]) AC_SUBST(KEXT_LOCATION,["/System/Library/Extensions/"]) install_kext=true ;; *) AC_DEFINE([OSTYPE_OTHER], [1],[Target OS is unknown]) ;; esac AM_CONDITIONAL([KEXT_INSTALL], [test x$install_kext = xtrue]) CPPFLAGS=$CPPFLAGS_save CPPFLAGS="$CPPFLAGS "'-DDATADIR="\"$(datadir)\""' AC_SUBST(G15DAEMON_PLUGIN_DIR,["$libdir/g15daemon/$PACKAGE_VERSION/plugins"]) CPPFLAGS="$CPPFLAGS "'-DPLUGINDIR=\"$(G15DAEMON_PLUGIN_DIR)\"' # Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_TYPE_PID_T AC_TYPE_SIZE_T # Checks for library functions. AC_PROG_GCC_TRADITIONAL AC_FUNC_SELECT_ARGTYPES AC_FUNC_STRFTIME AC_CHECK_FUNCS([memset select socket strerror]) AC_CONFIG_FILES([Makefile g15daemon/Makefile libg15daemon_client/Makefile plugins/Makefile]) AC_OUTPUT