|
From: <mla...@us...> - 2007-12-29 11:42:40
|
Revision: 368
http://g15daemon.svn.sourceforge.net/g15daemon/?rev=368&view=rev
Author: mlampard
Date: 2007-12-29 03:42:45 -0800 (Sat, 29 Dec 2007)
Log Message:
-----------
Fix autoconf bugs re uinput plugin - MacOSX should now compile WIP. Add solaris detection and build modifiers (it might compile, but it won't work at the moment - in progress.)
Modified Paths:
--------------
trunk/g15daemon-wip/ChangeLog
trunk/g15daemon-wip/configure.in
Modified: trunk/g15daemon-wip/ChangeLog
===================================================================
--- trunk/g15daemon-wip/ChangeLog 2007-12-28 06:58:20 UTC (rev 367)
+++ trunk/g15daemon-wip/ChangeLog 2007-12-29 11:42:45 UTC (rev 368)
@@ -124,3 +124,8 @@
machines. REVERT.
1.9.3->SVN:
- Debug: Log warning if keyboard disappears.
+- Bugfix: Fix autoconf autodetect bugs re uinput plugin.
+- Feature: If autodetection of uinput fails, configure now has a
+ --disable-uinput override.
+- Feature: WIP should now _compile_ on Linux, MacOSX, and Solaris. Solaris
+ support is currently in progress.
Modified: trunk/g15daemon-wip/configure.in
===================================================================
--- trunk/g15daemon-wip/configure.in 2007-12-28 06:58:20 UTC (rev 367)
+++ trunk/g15daemon-wip/configure.in 2007-12-29 11:42:45 UTC (rev 368)
@@ -23,17 +23,32 @@
AC_CHECK_LIB([m], [sin])
AC_CHECK_LIB([pthread], [pthread_mutex_init])
+# 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])
+
# 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], [], [],
+AC_CHECK_HEADERS([ linux/uinput.h arpa/inet.h fcntl.h stdlib.h string.h sys/socket.h unistd.h libg15.h], [have_linux_uinput_h=yes],[],
[#if HAVE_LINUX_INPUT_H
#include <linux/input.h>
#endif
-])
+],,[])
-#if HAVE_LINUX_UINPUT_H
+AC_ARG_ENABLE([--disable-uinput],[ --disable-uinput do not build linux uinput plugin (default: autodetect)])
+
+if test "x$enable_uinput" != "xno"; then
+ if test "x$have_linux_uinput_h" == "xyes"; then
+ #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,
@@ -41,13 +56,21 @@
[
#include <linux/input.h>
#include <linux/uinput.h>
- ]
+ ]
)
uinput=true
dnl end of uinput version checks
-#endif
+ AC_MSG_NOTICE([Necessary includes exist: Compiling Uinput Plugin])
+
+ #endif
+ else
+ AC_MSG_NOTICE([Linux Specific Includes Not Found. NOT COMPILING UINPUT PLUGIN.])
+ fi
+else
+ AC_MSG_NOTICE([Linux UINPUT plugin disabled by request.])
+ uinput=false
+fi
-AM_CONDITIONAL(UINPUT_INTERFACE_PLUGIN, [test x$uinput = xtrue])
case $host_os in
*linux*)
@@ -57,12 +80,22 @@
AC_DEFINE([OSTYPE_DARWIN], [1],[Target OS is Darwin])
AC_SUBST(KEXT_LOCATION,["/System/Library/Extensions/"])
install_kext=true
+ uinput=false
;;
+ *solaris*)
+ AC_DEFINE([OSTYPE_SOLARIS], [1],[Target OS is Solaris])
+ AC_SEARCH_LIBS([connect],socket,[],[],[])
+ AC_SEARCH_LIBS([gethostent],nsl,[],[],[])
+ AC_SEARCH_LIBS([inet_aton],resolv,[],[],[])
+ uinput=false
+ ;;
*)
AC_DEFINE([OSTYPE_OTHER], [1],[Target OS is unknown])
+ uinput=false
;;
esac
AM_CONDITIONAL([KEXT_INSTALL], [test x$install_kext = xtrue])
+AM_CONDITIONAL(UINPUT_INTERFACE_PLUGIN, [test x$uinput = xtrue])
CPPFLAGS=$CPPFLAGS_save
CPPFLAGS="$CPPFLAGS "'-DDATADIR="\"$(datadir)\""'
@@ -70,17 +103,6 @@
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
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|