diff -Nru xf86-input-wacom-0.10.11/autogen.sh xf86-input-wacom-0.11.0/autogen.sh --- xf86-input-wacom-0.10.11/autogen.sh 1970-01-01 00:00:00.000000000 +0000 +++ xf86-input-wacom-0.11.0/autogen.sh 2011-08-01 04:48:52.000000000 +0000 @@ -0,0 +1,13 @@ +#! /bin/sh + +srcdir=`dirname $0` +test -z "$srcdir" && srcdir=. + +ORIGDIR=`pwd` +cd $srcdir + +autoreconf -v --install || exit 1 +rm -rf autom4te.cache m4 +cd $ORIGDIR || exit $? + +#$srcdir/configure --enable-maintainer-mode "$@" diff -Nru xf86-input-wacom-0.10.11/ChangeLog xf86-input-wacom-0.11.0/ChangeLog --- xf86-input-wacom-0.10.11/ChangeLog 2011-02-17 01:28:03.000000000 +0000 +++ xf86-input-wacom-0.11.0/ChangeLog 2011-04-19 04:07:14.000000000 +0000 @@ -1,3 +1,2231 @@ +commit 0d7790b80ded4a33b6a81ebc0f8f11ccfbd27fa9 +Author: Peter Hutterer +Date: Tue Apr 19 14:05:44 2011 +1000 + + wacom 0.11.0 + + Signed-off-by: Peter Hutterer + +commit 3081ecb428d29c639cb2874958b8f95be6978ede +Author: Ping Cheng +Date: Wed Apr 13 15:43:49 2011 -0700 + + Fake resolution for 9F and E2 + + 9F and E2 are touch only devices, for which we need to retrieve + the resolution from the kernel. So, the resolution defined in + WacomModelDesc does not count for anything. However, to avoid + future questions about the weird "394", align them with their + cousins. + + Signed-off-by: Ping Cheng + Reviewed-by: Chris Bagwell + Signed-off-by: Peter Hutterer + +commit 3beefe834692048dd04d877a05bb85e0ed7c4c80 +Author: Jason Gerecke +Date: Tue Apr 12 12:06:11 2011 -0700 + + man: Use __drivername__ instead of "wacom" + + Because hardcoding things is uncool + + Signed-off-by: Jason Gerecke + Signed-off-by: Peter Hutterer + +commit 432f3cb434d707bc516f930bd9ee1863685e2110 +Author: Jason Gerecke +Date: Tue Apr 12 12:06:10 2011 -0700 + + man: Fix __drivername__ macro + + It seems we've been having this macro dangling in our manpage since + 0862aa3d74378abbf9f23289ab864a4d07305d0d + + Signed-off-by: Jason Gerecke + Signed-off-by: Peter Hutterer + +commit e6743f3c8adc54c4a6d19e2e1fcd884091145c90 +Author: Jason Gerecke +Date: Tue Apr 12 12:06:08 2011 -0700 + + man: Update usage information + + The usage provided by '--help' is more accurate than that provided + in the man page, and some arguments to '--set' do not require a + value. + + Signed-off-by: Jason Gerecke + Signed-off-by: Peter Hutterer + +commit 52408eac9cf497a410952284046b8fed3aa32d4b +Author: Peter Hutterer +Date: Mon Apr 11 13:42:42 2011 +1000 + + isdv4-serial-debugger: return early if tcgetattr() failed. + + Fixes compiler warning + isdv4-serial-debugger.c: In function ‘set_baud_rate’: + isdv4-serial-debugger.c:127:6: warning: variable ‘rc’ set but not used + [-Wunused-but-set-variable] + + Signed-off-by: Peter Hutterer + +commit 8caa65efe358e12873ef3f8c17cd0d7a990a6419 +Author: Peter Hutterer +Date: Mon Apr 11 13:40:20 2011 +1000 + + xsetwacom: remove two unused variables + + xsetwacom.c: In function ‘keysym_to_keycode’: + xsetwacom.c:964:6: warning: variable ‘group’ set but not used + [-Wunused-but-set-variable] + + xsetwacom.c: In function ‘get_actions’: + xsetwacom.c:1747:25: warning: variable ‘last_press’ set but not used + [-Wunused-but-set-variable] + + Signed-off-by: Peter Hutterer + +commit 161bcb48340bb9ef0b694b5bd33c7e5ed5db3ce6 +Author: Peter Hutterer +Date: Mon Apr 11 12:13:00 2011 +1000 + + Fix higher button events. + + Buttons higher than sizeof(int) weren't getting sent. The mod_buttons macro + needs to test for the number of bits, not bytes. + + Introduced in 880512f84c26cddbfc1a8ff495890595424466f2 + + Reported-by: Andrzej Giniewicz + Signed-off-by: Peter Hutterer + Reviewed-by: Chris Bagwell + +commit 58a258600cb1138c160c6625816897ea18e34cf2 +Author: Peter Hutterer +Date: Fri Apr 8 11:25:01 2011 +1000 + + wacom 0.10.99.2 + + Signed-off-by: Peter Hutterer + +commit 2bbbe4546f56cd825606eff870e4817766d2e654 +Author: Peter Hutterer +Date: Tue Apr 5 15:37:04 2011 +1000 + + man: add hotplugging info to man page + + Signed-off-by: Peter Hutterer + +commit 1390685854f7eedcb6802adaba8df274e96a4177 +Author: Peter Hutterer +Date: Tue Apr 5 15:21:07 2011 +1000 + + man: remove reference about different zones - unsupported + + We ripped this out with 13a12bb852f8 Purge toolarea from device rec. + + Signed-off-by: Peter Hutterer + +commit 77b9f3cafc32adad76100f293fde6599a671f22b +Author: Peter Hutterer +Date: Tue Apr 5 15:17:45 2011 +1000 + + man: don't mention the core pointer, it doesn't exist + + Obsolete since server 1.4 + + Signed-off-by: Peter Hutterer + +commit 4d854858ca4de352546de179e1039c43921e15bf +Author: Peter Hutterer +Date: Tue Apr 5 15:16:23 2011 +1000 + + man: refer to both xorg.conf and xorg.conf.d + + Signed-off-by: Peter Hutterer + +commit 2110435235c371da647a58647535cf8e268fb603 +Author: Peter Hutterer +Date: Wed Mar 30 09:15:34 2011 +1000 + + Don't accept invalid device types. + + Signed-off-by: Peter Hutterer + +commit 6e10b33b25ac99280b387f8692e46e55d6d9ca8e +Author: Peter Hutterer +Date: Fri Apr 8 11:38:28 2011 +1000 + + xsetwacom: fix --help output formatting + + The excaping of the two quotation marks means we need extra spaces here. + + Signed-off-by: Peter Hutterer + +commit b8404011790e4b06ee46b471195eefd05fa304a0 +Author: Jason Gerecke +Date: Wed Mar 30 13:54:46 2011 -0700 + + Have wheel and strip properties be "actions" instead of "buttons" + + Continuing with removing raw button code, we create the wheel and + strip properties ready to hold actions. Prior to this, the properties + would be initialized with the raw buttons; before xsetwacom could + set them to actions they would need to be converted. + + This does away with the conversion step by following the mold already + in place for buttons. With no more need for conversion, we can also + nuke the conversion-related bits from xsetwacom. + + Signed-off-by: Jason Gerecke + Signed-off-by: Peter Hutterer + +commit f3a358796133e04dbf91e57c1bc4760002ba9b3c +Author: Jason Gerecke +Date: Wed Mar 30 13:54:45 2011 -0700 + + Decrease minimum number of args to 'set' [allow wheels/strips "reset"] + + Since the worker functions now check that they have the appropriate + number of arguments, its possible to decrease the number of arguments + required by 'set'. Since all it really needs is a device number and + a property, the minimum argc is now 2. + + A handy side-effect of this change is that its now possible to run + e.g. `xsetwacom --set $ID StripLeftDown` to reset the action to + its default. Doing the same with buttons has been supported, but + wheels and strips were out of luck because they would require too + few arguments to 'set'. + + Signed-off-by: Jason Gerecke + Signed-off-by: Peter Hutterer + +commit c78c2759a9b87db1078d760a0108b0f5dac5ed58 +Author: Jason Gerecke +Date: Wed Mar 30 13:54:44 2011 -0700 + + More strict argument-count checking + + Add/replace checks in functions to ensure that they have the right + number of arguments to do their job properly. The worst offender + here was the set() function -- providing too many arguments would + result in it walking off the end of data structures (often resulting + in a segfault) + + Signed-off-by: Jason Gerecke + Signed-off-by: Peter Hutterer + +commit d7ea18239de51d84706810b555ff3b2855b8856f +Author: Jason Gerecke +Date: Fri Apr 8 11:31:23 2011 +1000 + + Change from prop_extra to arg_count + + When setting an XInternAtom property, 'prop_extra' listed + the number of extra properties beyond the first that needed + to be set. For instance WACOM_PROP_TABLET_AREA had a total + of 4 properties, so prop_extra=3. + + To provide better argument validation though, we change this + to 'arg_count' and list the total number of arguments + expected. This doesn't really do anything for normal properties + (since arg_count = prop_extra + 1), but does let us check + for the proper number of arguments in odd cases (e.g. + ResetArea takes 0 arguments). + + Signed-off-by: Jason Gerecke + +commit c5ba63ce8e45bdecb650db78c8e2bb9dd454bfb3 +Author: Jason Gerecke +Date: Wed Mar 30 13:54:41 2011 -0700 + + Fail with warnings where possible + + For many commands, improper arguments cause a silent failure. The + user is often given no indication if their command succeeded or + failed. I've tried to find all the silent "return;" statements and + provide some kind of warning message where possible. + + In some cases I've added in new checks to ensure that we have the + correct number of arguments. I've tried to make checks as pedantic + as possible, e.g. throwing errors about number of arguments even if + the function ignores arguments. + + Signed-off-by: Jason Gerecke + Signed-off-by: Peter Hutterer + +commit 19656e837c4bd3711b033992566058be790b5095 +Author: Jason Gerecke +Date: Wed Mar 30 13:54:42 2011 -0700 + + More explicit input check for set_rotate + + Because of how atoi() works, any single non-number (other than the + expected cw,ccw,half,none) would be interpreted as being equivlent + to 'none'. Since the number of valid arguments is very small, we + explicitly check each. + + Signed-off-by: Jason Gerecke + Signed-off-by: Peter Hutterer + +commit 02f5fe64df98c963c865845e79b3a20cfddb62ca +Author: Timo Aaltonen +Date: Thu Apr 7 12:25:32 2011 +0300 + + Add support for Lenovo tablet ID 0xE6 + + Signed-off-by: Timo Aaltonen + Tested-by: Manoj Iyer + Reviewed-by: Ping Cheng + Signed-off-by: Peter Hutterer + +commit 86fa0fb17e0cd34217e07671ac8f777c3fbe731f +Author: Peter Hutterer +Date: Mon Apr 4 10:30:32 2011 +1000 + + Update all tools rotation property when rotating one of them. + + All tools on the same tablet share the rotation value, so if one of them is + rotated, all of them must be. Since the property value is stored in the + server, we need to trigger it explicitly. + + Test case: + $> xsetwacom set "device name stylus" Rotate half + $> xsetwacom get "device name eraser" Rotate + + Should print out the correct rotation value. + + Fixes #3070450 + + Signed-off-by: Peter Hutterer + Reviewed-by: Ping Cheng + +commit fd952b4e69bd2b2f39df36d1d489fecb47e2ae3a +Author: Peter Hutterer +Date: Mon Apr 4 15:33:34 2011 +1000 + + Don't rotate hotplugged devices. + + We only rotate on a per-tablet basis, not per-tool. Don't accept rotation + values on dependent devices (unless they're the same, then be quiet about + it). + + Signed-off-by: Peter Hutterer + Acked-by: Ping Cheng + +commit 5cf22a3a39799cb1c50298d73c34fd397ad717b1 +Author: Jason Gerecke +Date: Wed Apr 6 11:24:05 2011 -0700 + + Expand manpage documentation for "Button" parameter + + Include list of parameters that are supported, as well as an example + of mixing keywords in one action. + + Signed-off-by: Jason Gerecke + Signed-off-by: Peter Hutterer + +commit 1c76a5942b36844b2fee80ca28b8481744f984cf +Author: Jason Gerecke +Date: Tue Apr 5 17:49:27 2011 -0700 + + Swap range of 'RawSample' and 'Suppress' in man page + + Looks like the range of these two options was confused a while back. + Switch them so that the right option has the right range. + + Signed-off-by: Jason Gerecke + Signed-off-by: Peter Hutterer + +commit 8d57fb1693fe3a78fc6002570a9c132c067f7919 +Author: Jason Gerecke +Date: Tue Apr 5 17:49:26 2011 -0700 + + Have man page reflect per-tablet nature of 'Rotate' option + + Change documentation to indicate that rotation affects all tools + associated with the same tablet. + + Signed-off-by: Jason Gerecke + Signed-off-by: Peter Hutterer + +commit 2c30edb2b6a9542e945623fe0e215a5c04281655 +Author: Jason Gerecke +Date: Tue Apr 5 17:29:20 2011 -0700 + + Cause '-V' option to xsetwacom to exit like '--version' + + Unexpected difference in behavior between two ways of specifying + the same thing. '-V' no longer prints the version and continues + to run the rest of the program. + + Signed-off-by: Jason Gerecke + Signed-off-by: Peter Hutterer + +commit 35d14d75a0d06e32f3583733fcc987879c6e15f6 +Author: Jason Gerecke +Date: Tue Apr 5 17:29:19 2011 -0700 + + Correct order of arguments to calloc + + Not that there's much difference between 4*(256 bytes) and + 256*(4 bytes) of memory... + + Signed-off-by: Jason Gerecke + Signed-off-by: Peter Hutterer + +commit 6424d65c613ee024795b4d529c1d2473650e01f5 +Author: Peter Hutterer +Date: Mon Apr 4 15:31:50 2011 +1000 + + Factor out rotation parsing and setting. + + No functional changes, prep work only. + + Signed-off-by: Peter Hutterer + Reviewed-by: Ping Cheng + +commit da6cbaf3c8b0bb9f5d993ec0291c5919b52ebdee +Author: Peter Hutterer +Date: Tue Apr 5 13:27:33 2011 +1000 + + Rename hotplugged to is_primary in wcmParseOption. + + The parameter is true for the primary device only (i.e. the one that + _triggers_ the hotplug). It is false for any driver-hotplugged device + and false for xorg.conf devices. So "hotplugged" is a rather misleading + name. Rename to is_primary instead. + + Document this and while we're at it, change the function to use Bool instead + of int. + + Signed-off-by: Peter Hutterer + Reviewed-by: Ping Cheng + +commit 1da14469d2cdfe68ddbe4d451a7e757ad2a4705b +Author: Peter Hutterer +Date: Mon Apr 4 15:22:36 2011 +1000 + + Remove superfluous call to wcmRotateTablet(). + + This is a leftover from the times when we reconfigured the axes based on the + rotation. It doesn't do anything these days. + + Signed-off-by: Peter Hutterer + Reviewed-by: Ping Cheng + +commit e0354b9fde1e489bd0c87aa7f34b827ce3e27778 +Author: Peter Hutterer +Date: Mon Apr 4 13:34:30 2011 +1000 + + xsetwacom: add PROP_FLAG_INVERTED for Hover Click/TPCButton + + The Hover Click property is inverse to the TPCButton xsetwacom + option/xorg.conf option. + + This commit restores the original behaviour for the property as before + f1ecd11c619f1f7eb7850dd2fb514307ca1dd1ce but fixes xsetwacom that users of + xsetwacom won't notice the difference. + + Signed-off-by: Peter Hutterer + Acked-by: Ping Cheng + +commit 5984c9aecc6f80d936f8b0f81a63f31cd23f2e19 +Author: Peter Hutterer +Date: Mon Apr 4 13:29:59 2011 +1000 + + Revert "Correct TPCButton property inversion" + + "Hover Click" and "TPCButton" are not the same meaning. TPCButton behaviour + is that Hover Click is off and vice versa. Hence the property inversion is + there on purpose. + Add some documentation to make this public. + + This reverts commit f1ecd11c619f1f7eb7850dd2fb514307ca1dd1ce. + + Conflicts: + + src/wcmXCommand.c + + Reported-by: Michal Suchanek + Signed-off-by: Peter Hutterer + Acked-by: Ping Cheng + +commit d855766a53c005d12a56be23f9fcfce5d5922aa7 +Author: Peter Hutterer +Date: Mon Apr 4 14:01:46 2011 +1000 + + xsetwacom: modularise test for bool conversion. + + No functional changes, just making it easier to test for other features in + the future. Some strings to test again have changed, but we really only + need to test for sane true/false values anyway ("oFf" is not sane enough to + worry about). + + Signed-off-by: Peter Hutterer + Acked-by: Ping Cheng + +commit 8f2dce908d1a591c315b61fce4d66346d4f2213a +Author: Peter Hutterer +Date: Mon Apr 4 13:45:00 2011 +1000 + + xsetwacom: constify convert_value_to_user + + Signed-off-by: Peter Hutterer + Acked-by: Ping Cheng + +commit 493e673a2e55356b1f53bd9b9229426f171f9094 +Author: Peter Hutterer +Date: Mon Apr 4 15:45:15 2011 +1000 + + Revert "Update all tools rotation property when rotating one of them." + + This commit is incomplete, shouldn't have been pushed. + + This reverts commit 570b9d06b20e3eb4e93501594d29e3b24d46d24a. + + Signed-off-by: Peter Hutterer + +commit 4ed300dbb3002230c578681fd86eebef414dc272 +Author: Peter Hutterer +Date: Mon Apr 4 12:07:52 2011 +1000 + + Only update bottomX/bottomY if they haven't been user-configured. + + wcmInitialToolSize() would xorg-configured overwrite BottomX/Y with the max + values read from the tablet. Only set the two if they are non-zero (0 is the + default value). + + Signed-off-by: Peter Hutterer + Reviewed-by: Ping Cheng + +commit 1de7a780a392e363450967dfab8c3dd065fd0348 +Author: Ping Cheng +Date: Sun Apr 3 16:07:38 2011 -0700 + + Centralize pen and touch arbitration + + With the introduction of multi-touch, the chances of getting touch + events while pen is in prox have been increased. One obvious use + case is that the touch events could be used for gestures while pen + is in prox. However, we do not want two cursors compete on the screen. + + Link the pen and touch device once during the initialization stage + instead of every time when we receive a pen event. Then, centralize + pen and touch arbitration process so we can store the touch data in + wcmUSB.c instead of discarding them. The touch events will only be + ignored if it is a single touch event that causes a cursor movement + while pen is in prox. + + Some cleanup in wcmUSB.c is needed. It will be considered when we + make MAX_CHANNEL a dynamic value based on MAX_FINGERS. The + MAX_FINGERS is going to be the maximum of ABS_MT_SLOT that we + retrieve from the kernel. That brings us to the state to support + XInput 2.1 and devices that have dynamic number of fingers. + + Note: this patch is based on the assumption that all devices + connected to the same system have unique product IDs. That is, + no two or more identical devices are connected. Identical devices + will be properly linked when we find a decent way to distinguish + them in the driver. + + Signed-off-by: Ping Cheng + Signed-off-by: Peter Hutterer + +commit 307ad96795605fc39d2c454e4c7efde94ecbed3c +Author: Ping Cheng +Date: Sun Apr 3 16:05:42 2011 -0700 + + Add IsPen to cover both IsStylus and IsEraser + + It will be used more often when we need to compare touch events + with pen events. + + Signed-off-by: Ping Cheng + Signed-off-by: Peter Hutterer + +commit 570b9d06b20e3eb4e93501594d29e3b24d46d24a +Author: Peter Hutterer +Date: Mon Apr 4 10:30:32 2011 +1000 + + Update all tools rotation property when rotating one of them. + + All tools on the same tablet share the rotation value, so if one of them is + rotated, all of them must be. Since the property value is stored in the + server, we need to trigger it explicitly. + + Test case: + $> xsetwacom set "device name stylus" Rotate half + $> xsetwacom get "device name eraser" Rotate + + Should print out the correct rotation value. + + Fixes #3070450 + + Signed-off-by: Peter Hutterer + +commit bb29b90d29aa8ea25120c3db8b6ce9ca563cf202 +Author: Chris Bagwell +Date: Sun Apr 3 08:49:13 2011 -0500 + + fix filter issue on MT bamboos + + Init tool device type is needed for all MT devices to do correct + filtering; not just pen+MT tablets. + + Signed-off-by: Chris Bagwell + Reviewed-by: Ping Cheng + Signed-off-by: Peter Hutterer + +commit b9566151e6029f77dcf22526308dabb262400774 +Author: Peter Hutterer +Date: Fri Apr 1 14:54:05 2011 +1000 + + wacom 0.10.99.1 + + Signed-off-by: Peter Hutterer + +commit f72c358177a2b588c4915bf6fa5cd00f183c9486 +Author: Peter Hutterer +Date: Fri Apr 1 14:59:20 2011 +1000 + + test: update Makefile for include folder + + Fixes make distcheck. + + Signed-off-by: Peter Hutterer + +commit cd0738f41c875c8a2ad5444558c505b47898a7f1 +Author: Peter Hutterer +Date: Wed Mar 30 13:09:59 2011 +1000 + + Move npadkeys to fix comment. + + Fixing the comment would do too, but it really doesn't matter. + + Signed-off-by: Peter Hutterer + Reviewed-by: Ping Cheng + +commit 81f191d7ed9ec1187f37c1df36db0683f65bd4a3 +Author: Peter Hutterer +Date: Wed Mar 30 12:55:26 2011 +1000 + + Replace manual array size with ARRAY_SIZE macro. + + Signed-off-by: Peter Hutterer + Reviewed-by: Ping Cheng + +commit b522fdb493cb378af3206793e0b44d6652f7427c +Author: Ping Cheng +Date: Wed Mar 30 16:24:15 2011 -0700 + + Check predefined serial number as early as we can + + Don't wait before we can post the events. Verify the serial number + as soon as the information is accessible. + + Signed-off-by: Ping Cheng + Signed-off-by: Peter Hutterer + +commit 155a4b96ae8f03d3c07a93622d4f1f1da266d174 +Author: Jason Gerecke +Date: Wed Mar 30 10:32:15 2011 -0700 + + Revamp button/wheel/strip getters + + 'get_map' is the new getter entrypoint and attempts to determine + the mapping present on buttons, wheels, and strips. It calls on + 'get_actions' (essentially get_special_button_map) and 'get_button' + (an 8-bit XA_INTEGER version of the same) to determine this. If + both fail to find a mapping, it falls back to the method originally + used for non-actions: punt and ask XGetDeviceButtonMapping for + something. + + When raw buttons are removed from the driver, it should be possible + to replace 'get_map' with 'get_actions' (since everything will be + an action at that point). + + Signed-off-by: Jason Gerecke + Signed-off-by: Peter Hutterer + +commit 0f20c9b1d94bd8a53e5e9b6cf1b6f599457a1dca +Author: Jason Gerecke +Date: Wed Mar 30 10:31:25 2011 -0700 + + Merge 'map_wheels' and 'map_button' into a unified 'map_actions' + + These two functions are very similar, and have been merged together + to provide a single conduit for all action mappings. Button-handling + code requires a little bit of special-casing (we need to be sure to + get a button to modify, and to change the arguments appropriately), + but nothing remotely worthy of breaking into its own function. + + Signed-off-by: Jason Gerecke + Signed-off-by: Peter Hutterer + +commit 5f0b0dd0ed106a99d356e95bb4b73fadba21194d +Author: Jason Gerecke +Date: Tue Mar 29 16:18:36 2011 -0700 + + Remove 'special_map_wheels' and 'special_map_buttons' + + Since neither function actually do anything that couldn't just + be done in 'map_wheels' and 'map_button' respectively, we simply + squash them together. + + Signed-off-by: Jason Gerecke + Signed-off-by: Peter Hutterer + +commit e9e7397cd1f1bc37f27992114cebd39f4ad93e12 +Author: Jason Gerecke +Date: Tue Mar 29 16:18:35 2011 -0700 + + Remove map_button_simple + + With parse_actions now handling simple button mappings, we remove + this function which essentially duplicates its functionality. + + Note that there is a small difference in how the new parse_actions + code and the old map_button_simple code handle things. The former + Translates a single numeric argument into an action (e.g. "3" is + turned into "button +3"). The latter cleared any existing action + and used XSetDeviceButtonMapping to have X remap button events. + + To better explain the difference, consider the two following commands + run in sequence: + + xsetwacom --set $id button 2 3 + xsetwacom --set $id button 3 button 2 + + Under the old map_button_simple code, both buttons 2 and 3 would + produce a right-click event. This is because the first command has + X remap all "button 2" events into "button 3" events. Since both + button 2 (by driver's priv->button[]) and button 3 (by the explicit + action) produce a "button 2" event, X remaps both events into "button 3" + events. + + Under the new parse_actions code, things are what you'd expect: button + 2 produces a right click and button 3 produces a middle click. If the + user wants, they can use `xinput set-button-map` to remap the buttons + the same way that map_button_simple did. + + Signed-off-by: Jason Gerecke + Signed-off-by: Peter Hutterer + +commit f66bf4568c8b7005ab5611ab1b8c5c0c3819b1e3 +Author: Jason Gerecke +Date: Tue Mar 29 16:18:34 2011 -0700 + + Allow parse_actions to parse simple button maps + + If argv contains only a single numeric argument, we assume the + intent is to perform a button press. We add the necessary keywords + to make the parser happy, and then parse as normal. + + This allows map_wheels to handle the "raw button" case that it has + been missing. While map_button_simple also does the same* thing, + that's another commit :) + + *Actually, map_button_simple does /almost/ the same thing, but I + highly doubt anyone relies on the subtle difference in behavior. + + Signed-off-by: Jason Gerecke + Signed-off-by: Peter Hutterer + +commit e9dae780cb549f48aaf376af2b6382604c2760a5 +Author: Jason Gerecke +Date: Tue Mar 29 16:18:33 2011 -0700 + + Make it clearer when actions are sent + + When I first saw this, I thought somebody forgot to put an else + clause here; I completely missed that tiny return statement. This + makes the reality a little clearer. + + Signed-off-by: Jason Gerecke + Signed-off-by: Peter Hutterer + +commit 357e3c3c50d81bd57bd412d7d6bde9120d367f4b +Author: Jason Gerecke +Date: Tue Mar 29 16:18:32 2011 -0700 + + Add WACOM_PROP_WHEELBUTTONS to cursor devices + + This enables the "Wacom Wheel Buttons" property for cursor devices, + allowing xsetwacom to set (rel|abs)wheel(up|down) actions. I'm not + sure if there are non-puck cursor devices which should *not* have + this enabled, but until somebody says otherwise... :) + + Signed-off-by: Jason Gerecke + Signed-off-by: Peter Hutterer + +commit c416728a5656748075f6671805d8da3869af2522 +Author: Jason Gerecke +Date: Tue Mar 29 16:18:31 2011 -0700 + + Fix strip/wheel mapping + + Commit 2ce1c6b4 fixed a bug where X would crash after remapping + strips or wheels. It made all the "keys" arrays one-indexed so that + wcmUpdateButtonKeys would not write beyond the end of the arrays. + + This patch syncs the action lookup code with the use of one-indexed + arrays so that the proper action is returned. + + Signed-off-by: Jason Gerecke + Signed-off-by: Peter Hutterer + +commit c7058d85a913d2f2a494667a640d4a25e6ca0e34 +Author: Peter Hutterer +Date: Wed Mar 30 14:04:44 2011 +1000 + + xsetwacom: add a comment to update button actions in the right order + + Signed-off-by: Peter Hutterer + +commit db66113366af1054c625940ba38c207d15bd59c1 +Author: Jason Gerecke +Date: Tue Mar 29 16:18:30 2011 -0700 + + Fix "buttons must be set twice" bug from d650b139 + + *facepalm* I simply can't believe I didn't test this, but there's + no denying the bug exists. Looks like the change to 'btnact_prop' + *must* occur after the change to 'prop'. If it happens beforehand, + then the driver appears to be eternally one step behind xsetwacom. + + Signed-off-by: Jason Gerecke + Signed-off-by: Peter Hutterer + +commit 9e46d9776f6c57abc128ac12a9ef8c03ad242eac +Author: Peter Hutterer +Date: Wed Mar 30 08:32:25 2011 +1000 + + Add some comments for device_id and device_type handling. + + Signed-off-by: Peter Hutterer + Reviewed-by: Ping Cheng + +commit c5cbebabe796e86b94467bb7de3387e4e708f40a +Author: Peter Hutterer +Date: Thu Mar 24 20:45:22 2011 +1000 + + Remove discard_first field from DeviceStateRec + + Obsolete since the removal of old serial devices. + + Signed-off-by: Peter Hutterer + Reviewed-by: Ping Cheng + +commit 2cc298863457fe9e171cb2c7494b83f2d971ccdb +Author: Peter Hutterer +Date: Thu Mar 24 20:45:21 2011 +1000 + + usb: print invalid max value if we get one. + + Signed-off-by: Peter Hutterer + +commit 1421082661074a201ec2bd98b826ac4154cef9f0 +Author: Peter Hutterer +Date: Thu Mar 24 20:45:20 2011 +1000 + + usb: swap two checks. + + If the absbit isn't set, don't bother with the EV_ABS ioctl. + + Signed-off-by: Peter Hutterer + Reviewed-by: Ping Cheng + +commit 6e21f9c6a7abc79eb89d4c742ffd0cee6bf86552 +Author: Peter Hutterer +Date: Thu Mar 24 20:45:19 2011 +1000 + + usb: remove to superfluous linebreaks. + + Signed-off-by: Peter Hutterer + Acked-by: Ping Cheng + +commit 2d55e561956dc7beb0aa6fd2d814c0540e654e34 +Author: Jason Gerecke +Date: Mon Mar 28 10:06:56 2011 -0700 + + Change hardcoded string to already-defined constant + + WACOM_PROP_BUTTON_ACTIONS is already defined in wacom-properties.h + Lets use it instead of all those magic constants. + + Signed-off-by: Jason Gerecke + Signed-off-by: Peter Hutterer + +commit 32d14dc4a9787356024020fd25e463a90a25f349 +Author: Ping Cheng +Date: Mon Mar 28 17:51:34 2011 -0700 + + Resolve the oldHwProx puzzle + + Change oldHwProx to oldCursorHwProx to better reflect its use. + + oldCursorHwProx keeps the hardware in/out prox state so we can + set the MaxCursorDist for the next round of relative cursor + movement when tool first comes in prox. + + For Protocol 5 devices, distance is reported as the maximum + when tool is first detected. Then it is gradually reduced to 0 + when getting closer to the tablet. Protocol 4 is the opposite: + distance is 0 when tool is first in prox. The value increases + as the tool gets closer to the tablet. + + The maximum distance (wcmMaxDist) is model specific. They are + retrieved from the kernel. + + Reviewed-by: Chris Bagwell + Acked-by: Peter Hutterer + Signed-off-by: Ping Cheng + Signed-off-by: Peter Hutterer + +commit 5fec376c46e3840fe2e3f838df67cefee1c0d6c6 +Author: Peter Hutterer +Date: Thu Mar 24 10:55:58 2011 +1000 + + ISDV4: use libudev instead of manual syspath creation. + + Signed-off-by: Peter Hutterer + Acked-by: Ping Cheng + +commit 4b475087b827d143df93c2acc0017a9b79ff859a +Author: Peter Hutterer +Date: Thu Mar 24 11:37:39 2011 +1000 + + ISDV4: update a comment, we may return tablet id 0x90 on failure. + + Signed-off-by: Peter Hutterer + Reviewed-by: Ping Cheng + +commit d650b1399d37e6f2b6f151b011d72b219a5405b8 +Author: Jason Gerecke +Date: Fri Mar 25 17:32:56 2011 -0700 + + Make set/unset code easier to understand + + Between the parsing code seperating the two halves of set/unset + and the code being confusing in general, I've rewritten this + to hopefully make its operation a little clearer for the next + person. + + Signed-off-by: Jason Gerecke + Acked-by: Chris Bagwell + Signed-off-by: Peter Hutterer + +commit 5b27df4274ae59e0e279096ac46836564d22c2ea +Author: Jason Gerecke +Date: Thu Mar 24 18:02:54 2011 -0700 + + Make parse error more helpful + + When a set of arguments cannot be parsed, knowing the word that + did not make sense doesn't help if you've used it more than once. + + Signed-off-by: Jason Gerecke + Signed-off-by: Peter Hutterer + +commit d6ac23b79ccf65d30f07dbb1986ad9d6773ecd30 +Author: Jason Gerecke +Date: Thu Mar 24 18:02:55 2011 -0700 + + Don't use unset_prop + + We don't need to bother changing the device property if + we're unsetting since we're just going to be deleting it + anyway. + + Signed-off-by: Jason Gerecke + Signed-off-by: Peter Hutterer + +commit c932e062ba894e50d2dd4c2e653e86915597ee52 +Author: Jason Gerecke +Date: Thu Mar 24 18:02:53 2011 -0700 + + Return from function on parse error + + If the arguments to this function are only parseable up to a point, + the function prints a warning but still makes the (partial!) requested + change. For example, if the user runs: + + xsetwacom --set 10 Button 1 "key +a notakeyword -a" + + The program prints a warning about it not recognizing "notakeyword" and + maps Button 1 to "key +a". Instead of making partial changes, xsetwacom + should instead bail at the first sign of a problem. + + Signed-off-by: Jason Gerecke + Signed-off-by: Peter Hutterer + +commit c690302586bf352395ca7bd1299866a97cc054da +Author: Ping Cheng +Date: Thu Mar 24 15:36:03 2011 -0700 + + Add CursorProximity to xsetwacom.man + + Signed-off-by: Ping Cheng + Signed-off-by: Peter Hutterer + +commit ed668c1b768967b3bf5a6174c16c6d3732c1b4fe +Author: Ping Cheng +Date: Wed Mar 23 14:57:51 2011 -0700 + + PAD is always on PAD_CHANNEL + + Don't assume the last tool was a pad, which confuses those tools + that never receive a serial number. Keep PAD on the PAD_CHANNEL. + + Signed-off-by: Ping Cheng + Signed-off-by: Peter Hutterer + +commit 6278f4fe4afd3ae627ea676e3c655f1e3968cd8b +Author: Ping Cheng +Date: Wed Mar 23 14:57:33 2011 -0700 + + Fix a copy/paste error in usbFindDeviceType comment + + Signed-off-by: Ping Cheng + Signed-off-by: Peter Hutterer + +commit dfc8404bec1d9d4d5eb65a2d29779d7ae1a18d62 +Author: Ping Cheng +Date: Wed Mar 23 14:57:12 2011 -0700 + + Support pen and MT on the same logical port + + Serial ISDv4 kernel driver, wacom_w8001.ko, provides both pen and + touch events on the same logical port. Filtering touch events when + pen is in proximity while allowing pen events (ABS_X/Y, etc) pass. + + Making this action configurable would make sense when XInput 2.1 is + ready. At that point, we can post MT valuators while pen events are + posted. Some code refactoring is needed to add a new channel to + store the pen data as well as the 2FGT data. + + Defering the code refactoring until we support XInput 2.1. + + Signed-off-by: Ping Cheng + Reviewed-by: Peter Hutterer + Reviewed-by: Chris Bagwell + Signed-off-by: Peter Hutterer + +commit 842f2e28f8ce90991bdb60921250c97a11101104 +Author: Peter Hutterer +Date: Thu Mar 24 12:01:34 2011 -0400 + + Silence compiler warning. + + ../src/wcmCommon.c: In function 'sendCommonEvents': + ../src/wcmCommon.c:382:2: warning: 'value' may be used uninitialized in this function [-Wuninitialized] + ../src/wcmCommon.c:329:22: note: 'value' was declared here + + Signed-off-by: Peter Hutterer + Reviewed-by: Ping Cheng + +commit 307f50afba024cb6558d7084f5a7d86ec76bd992 +Author: Peter Hutterer +Date: Tue Mar 22 14:02:32 2011 +1000 + + Fix strip_keys index, copy/paste error. + + Signed-off-by: Peter Hutterer + Reviewed-by: Ping Cheng + +commit 880512f84c26cddbfc1a8ff495890595424466f2 +Author: Peter Hutterer +Date: Tue Mar 22 13:50:44 2011 +1000 + + wcmUSB: change MOD_BUTTONS macro into a function + + Values in, values out. No magic state structs, keep it simple. + + Signed-off-by: Peter Hutterer + Reviewed-by: Ping Cheng + +commit aadf1e0d215e3e7dfe119c3e541d35854de2326a +Author: Peter Hutterer +Date: Tue Mar 22 12:00:41 2011 +1000 + + test: drop glib dependency + + We weren't really using any of the glib-specific stuff anyway, so just + replace g_assert with normal assert and drop the dependency. + + Signed-off-by: Peter Hutterer + Acked-by: Ping Cheng + +commit 91fb559b5b760c345333ec7ac67f429d61b44f9d +Author: Ping Cheng +Date: Mon Mar 21 17:56:09 2011 -0700 + + Bring idtotype and findDeviceType to the style + + Make them into the usb family and follow the style guide. + Consolidate tool id for the existing tools into three defines. + Update findDeviceType to cover more cases so it may be called + by other routines to retrieve tool types. + + Signed-off-by: Ping Cheng + Signed-off-by: Peter Hutterer + +commit b0a6637a4cf262436fb21c2b734241f376289deb +Author: Ping Cheng +Date: Mon Mar 21 17:55:41 2011 -0700 + + Move findDeviceType from wcmCommon to wcmUSB + + Serial model is not supported. So, findDeviceType is only used by + wcmUSB.c. + + Now it is the individual model's, wcmUSB or wcmISDV4, responsibility + to set the device type locally. For wcmUSB, since kernel input filters + out duplicated events, we should retrieve the device type and + associated events directly from the kernel to cover the case when tool + is on the tablet during driver starts. + + wcmCommon.c will treat packet with undefined device_type as invalid. + + Signed-off-by: Ping Cheng + Signed-off-by: Peter Hutterer + +commit 201d1c35c7de919714815be18b990e9acc570054 +Author: Ping Cheng +Date: Mon Mar 21 17:55:18 2011 -0700 + + Prepare for the removal of BTN_TOOL_FINGER for pad tool in the kernel + + BTN_TOOL_FINGER was borrowed to group PAD events. With the support + of pen and touch on the same logical port, we can not use it any more. + + PAD events of generic protocol has already manually routed to the pad + channel, the last channel of wcmChanel. + + This patch groups PAD events for protocol 4 and 5 by the device_id + sent through ABS_MISC event. In/out proximity event is also set by + the ABS_MISC event. + + Signed-off-by: Ping Cheng + Signed-off-by: Peter Hutterer + +commit 09f6c0faade997da490c1cd0277eb7f2f6cc9ef3 +Author: Jason Gerecke +Date: Fri Mar 18 18:01:17 2011 -0700 + + Clear the correct amount of memory + + Though this doesn't result in any bad behavior at the moment, it + could cause some serious headaches in the future. + + Signed-off-by: Jason Gerecke + Reviewed-by: Chris Bagwell + Signed-off-by: Peter Hutterer + +commit 2ce1c6b47ff1596093d48b5cfccaddf17c6d2924 +Author: Jason Gerecke +Date: Fri Mar 18 18:01:16 2011 -0700 + + Fix X crash after remapping touchstrips and wheels + + Crash first appears in ab311bf20535acd6e7201e024bc311e0e15b5b6b. + This commit rewrote wcmUpdateButtonKeyActions with one-indexed + arrays in mind and extended the 'keys' array in _WacomDeviceRec + to make room. However, the 'wheel_keys' and 'strip_keys' were + not updated. + + Running e.g. `xsetwacom --set pad StripLeftDown button 4` results + in a call to wcmUpdateButtonKeyActions. Its call to memset oversteps + the array bounds and just happens to zero the 'common' pointer. The + next tablet event results in a segfault as the driver tries to + dereference the pointer. + + Signed-off-by: Jason Gerecke + Acked-by: Chris Bagwell + Signed-off-by: Peter Hutterer + +commit 1427db0bfea8c015ddb713f49eb0f33450266e60 +Author: Ping Cheng +Date: Mon Mar 21 14:10:42 2011 -0700 + + Enable left click for MT touchscreen + + Tools that are in absolute mode emit left click when the tool touches + the surface. However, tools in relative mode need to locate the object + on the surface before it selects (left click on) the object. That is, + a second event (tap/leave/touch) is needed to trigger a left click for + relative mode tools. + + Tools on touchscreen is in absolute mode. So, send left click + down/up when the first finger touches/leaves the tablet. + + Signed-off-by: Ping Cheng + Acked-by: Chris Bagwell + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit 1c0696570c78b3454a9d847e5e9fe91bf0f04e9c +Author: Ping Cheng +Date: Fri Mar 18 15:07:24 2011 -0700 + + Remove one FIXME + + Get the "f" out of the code as well as the root cause. + + A proper fix would be to use resolution to decide the distance. + That can be considered when we push the resolution table to + the kernel. Hopefully, at that time, we can also post MT events + to XInput 2.1 and push the gesture support to the desktop. + + Signed-off-by: Ping Cheng + Acked-by: Chris Bagwell + Signed-off-by: Peter Hutterer + +commit 1b8287e090c5d994a3f99eed227dbb08ad78c469 +Author: Peter Hutterer +Date: Wed Mar 16 10:06:01 2011 +1000 + + xsetwacom: add pgup and pgdwn as special keys. + + "Prior" and "Next" aren't quite that obvious so specialcasing seems + warranted here. + + Signed-off-by: Peter Hutterer + Reviewed-by: Ping Cheng + +commit 1cfe05195698583e002d19eb12fc6221639283df +Author: Peter Hutterer +Date: Thu Mar 10 16:22:33 2011 +1000 + + xsetwacom: update the property when we have items to write + + Introduced in 22bc3028effbdc79d426c0b3dcf586734d4c7532, changed logic caused + the property not to update in all cases. + + Signed-off-by: Peter Hutterer + +commit 7ed24d165121e167930e34a3ea8532e358c003f5 +Author: Peter Hutterer +Date: Tue Mar 15 11:54:49 2011 +1000 + + Add fake symbols for serverClient and QueueWorkProc + + Broke linking of unit tests in + 94a8eabadd062de6ceed8563089b863d887f8770. + + Signed-off-by: Peter Hutterer + +commit 863714247c8d6020748c0cf099f1e06caf6b2b06 +Author: Jason Gerecke +Date: Mon Mar 14 16:10:59 2011 -0700 + + Add tests for convert_value_from_user + + Some basic tests to ensure booleans and non-booleans act like we + want them to. + + Signed-off-by: Jason Gerecke + Signed-off-by: Peter Hutterer + +commit f58feb275b51f1f9e059e668609591434021559f +Author: Jason Gerecke +Date: Fri Mar 11 15:13:54 2011 -0800 + + Expand recognized boolean input for convert_value_from_user + + We remove the case sensitivity requirement for off/on and also + allow the use of "true" and "false" + + Signed-off-by: Jason Gerecke + Signed-off-by: Peter Hutterer + +commit d4f44eddeb497ecfaa99449b565f6bdf46c3b9fa +Author: Jason Gerecke +Date: Fri Mar 11 15:13:53 2011 -0800 + + Use strtol instead of atoi in convert_value_from_user + + atoi provides only the most basic string conversion capabilities, + and makes determining if conversion was successful difficult (both + "abc" and "0" would return 0). We use strtol and checks to ensure + that it converted the entire string sucessfully before returning True. + + Signed-off-by: Jason Gerecke + Signed-off-by: Peter Hutterer + +commit 12eebced3f004a0bea2c85d2197897de28bf7781 +Author: Jason Gerecke +Date: Fri Mar 11 15:13:52 2011 -0800 + + Detect boolean conversion failure in convert_value_from_user + + Properties with PROP_FLAG_BOOLEAN set can only take on a restricted + set of values. We detect if the string matches any of the allowed + values and convert if possible. If not possible, the caller is notified. + + Signed-off-by: Jason Gerecke + Signed-off-by: Peter Hutterer + +commit e5af4b9928b983227cad711496d258cde5d62cfd +Author: Jason Gerecke +Date: Mon Mar 14 16:19:24 2011 -0700 + + Change signature of convert_value_from_user + + Have it return true/false to indicate conversion success/failure. + Note that in its current state the function cannot tell if there + was a conversion failure... + + Signed-off-by: Jason Gerecke + Signed-off-by: Peter Hutterer + +commit 9ecc125c1c59b591a89e6f10b79b2e1e49c86165 +Author: Chris Bagwell +Date: Sun Mar 13 22:27:44 2011 -0500 + + Initialize USB pad device once up front + + Streamlines normal execution some but also resolves an issue reported + for older Bamboo's since its now executed for all protocol types + and not just generic protocols. + + Older Bamboo's and Graphire series always keep PAD device in proximity + so you can pretty much count on never recieving a BTN_TOOL_FINGER + event. + + This does work of that missing event. + + Signed-off-by: Chris Bagwell + Signed-off-by: Peter Hutterer + +commit 33a031cab73424a0a1ea5ded36fa6631c9a5811e +Author: David Foley +Date: Mon Mar 14 15:54:52 2011 +1000 + + xsetwacom.man: Fix whitespace issues + + Signed-off-by: David Foley + Signed-off-by: Peter Hutterer + +commit 3c0a16ac630603bf966e0a9fc1ee6d5be4276156 +Author: David Foley +Date: Sun Mar 13 17:57:10 2011 -0500 + + xsetwacom.man: add RawSample and Suppress parameters + + Add RawSample and Suppress to parameter description table. + + Signed-off-by: David Foley + Signed-off-by: Peter Hutterer + +commit 301297d6423a3556fd94006d739a4afca82b5812 +Author: Peter Hutterer +Date: Thu Mar 10 10:12:48 2011 +1000 + + Re-vamp source inclusion for test build suite. + + test/Makefile.am included src/Makefile.am for the driver sources. However, + that also lead to the driver being built twice, once in src/ and once in + test/. On make install, test/wacom_drv.so would overwrite the + src/wacom_drv.so and thus install a driver with all static symbols compiled + as non-static. + + This caused the VCOPY bug worked around in + 9d227cd0bd985e7dcb7923974361145ba1d78713. + + Avoid this by moving the sources into a shared included Makefile and build + an independent libwacom-test.la in the test directory. + + Reported-by: Eduard Hasenleithner + Signed-off-by: Peter Hutterer + Tested-by: Eduard Hasenleithner + Acked-by: Ping Cheng + +commit 36ea587badc947c027c40ee4387a2d5540a9a5b3 +Author: Peter Hutterer +Date: Fri Mar 11 09:30:45 2011 +1000 + + xsetwacom: remove unused need_update + + Unused since ba77b532e6c2a0b7b05ab129009c1f614b089c37 + + Signed-off-by: Peter Hutterer + Reviewed-by: Chris Bagwell + +commit a3b6e2079155c5774baabcd9e3c53b3336536e49 +Merge: 43c82c3 69d3e93 +Author: Peter Hutterer +Date: Mon Mar 14 15:42:00 2011 +1000 + + Merge branch 'race-condition' + +commit 43c82c3139ef8b9abee7eb79a8d9055df9874329 +Author: Jason Gerecke +Date: Fri Mar 11 08:39:50 2011 -0800 + + Remove XWACOM_MAX_SAMPLES + + XWACOM_MAX_SAMPLES is a duplicate of MAX_SAMPLES, and appears to have + no reason to be included in the Xwacom.h header. We remove it and + retarget all references. + + Signed-off-by: Jason Gerecke + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit 676b25e5ec5eb70d45d3228b28bef5c8a68ab7f6 +Author: Peter Hutterer +Date: Fri Mar 11 10:53:51 2011 +1000 + + Reset tiltx/y after converting it to rotation. + + Quote from Ping: + "Since tilt is only used as raw value to calculate rotation for I4 mouse, + i.e., they are not posted as valuators, resetting them or not does not make + a difference." + + Let's reset it to 0 then so we don't get confusing values during debugging. + + Signed-off-by: Peter Hutterer + Acked-by: Ping Cheng + +commit abfcc2ac187a4a7131503c0aa80e166ca384034e +Merge: 857ef81 90ba050 +Author: Peter Hutterer +Date: Fri Mar 11 09:31:23 2011 +1000 + + Merge branch 'wcmTilt2R-fixes' + +commit 857ef8159451fe52cd999f523d9c500f6c32c0e1 +Author: Jason Gerecke +Date: Wed Mar 9 09:52:57 2011 -0800 + + Perform bounds checking on RawSample + + I made the mistake of setting this to zero and then bringing my + pen into proximity. Ooops. X crashed. Looks like mathematics + still can't handle getting the average of zero things ;) + + Signed-off-by: Jason Gerecke + Reviewed-by: Ping Cheng + Signed-off-by: Peter Hutterer + +commit 90ba05056578405307e737620782a581b942ef62 +Author: Peter Hutterer +Date: Thu Mar 10 14:18:13 2011 +1000 + + Change signature of wcmTilt2R to return the rotation calculated. + + Take an input point, calculate the rotation and return it. No need to deal + with device state structures, etc. + + Signed-off-by: Peter Hutterer + Acked-by: Ping Cheng + +commit 1023572644c5f00a418043615e802484fcff6e71 +Author: Peter Hutterer +Date: Thu Mar 10 14:13:37 2011 +1000 + + Sanitize wcmTilt2R. + + Cleaning up the code, rewriting the calculations, documentating the steps + taken. It's understandable now. Whoop-dee-doo. + + Signed-off-by: Peter Hutterer + Acked-by: Ping Cheng + +commit 42dc7cb652c5cf84433aac2aa791dc9fdb39ec2b +Author: Peter Hutterer +Date: Thu Mar 10 13:08:26 2011 +1000 + + Add a offset paramater value to wcmTilt2R + + Say No To Hardcoding. + + Signed-off-by: Peter Hutterer + Acked-by: Ping Cheng + +commit 08c5fc41ef3f81dafbb50856c589fdf4e9f5f89c +Author: Peter Hutterer +Date: Fri Mar 4 09:39:15 2011 +1000 + + Fix wcmTilt2R so it uses defines instead of hardcoded numbers. + + Every time number is hardcoded deep inside the driver, god kills a kitten + and a little part of me dies (unrelated to the kitten death). Use the + defines already. + + Signed-off-by: Peter Hutterer + Acked-by: Ping Cheng + +commit 56c550a11b57ccdc3e0d9ebcdeb323734c7c48f7 +Author: Peter Hutterer +Date: Fri Mar 4 08:56:57 2011 +1000 + + Document wcmTilt2R (and add a fixme) + + Because not everyone has hours to figure out what each function does. + Come to think of it, I don't actually either... + + Signed-off-by: Peter Hutterer + Acked-by: Ping Cheng + +commit 8d61689016b961a33e6950b09f191c16741dd608 +Author: Peter Hutterer +Date: Thu Mar 10 11:15:01 2011 +1000 + + test: write a non-test for wcmTilt2R + + It's non-transparent what wcmTilt2R actually does at the moment, so generate + a test table from the current code and test against that. This + way we at least know when we're breaking something. + + Exception: wraparound value generates +900 instead of -900. We must not + send +900, our max range is 899, then we wrap again. This function isn't + supposed to generate this value, so manually fixed up. + + Signed-off-by: Peter Hutterer + Acked-by: Ping Cheng + +commit 8e4dabd64a611dd5571aef6aff8dfb5dd258655e +Author: Peter Hutterer +Date: Fri Mar 4 09:41:48 2011 +1000 + + Remove superfluous function declaration + + Signed-off-by: Peter Hutterer + Acked-by: Ping Cheng + +commit 65220fa0276cbec10b51832c2bf9946c4bbfc4e8 +Author: Chris Bagwell +Date: Wed Mar 9 11:27:14 2011 -0600 + + remove per-device filter function + + Over time, we've merged device specific filter routines + into single version. So there is no need for historic + hook to register at runtime. + + ISDv4 devices never registered any filter which seems + like it would result in jitter. + + Removed RawFilter() from WacomDevice structure and call + wcmFilterCoord() directly from wcmCommon.c. + + Signed-off-by: Chris Bagwell + Reviewed-by: Ping Cheng + Signed-off-by: Peter Hutterer + +commit 1af65269cd22ea69b5d0920922484e0b4be3f9f6 +Author: Peter Hutterer +Date: Thu Mar 10 12:04:21 2011 +1000 + + Use xf86ScaleAxis for pressure normalization. + + And copy the server's xf86ScaleAxis for the test. Not ideal, I guess but oh + well. + + Signed-off-by: Peter Hutterer + Acked-by: Ping Cheng + +commit 0ee2a44a49ababe25dddc2b82dfa5a343fd7e893 +Author: Jason Gerecke +Date: Tue Mar 8 17:50:44 2011 -0800 + + Enable RawSample and Suppress + + The driver apparently didn't look at the RawSample option, and + xsetwacom confused it's offset with Suppress. In other words: + if you thought you've been tweaking Suppress, you've been tweaking + RawSample. If you thought you were tewaking RawSample, you weren't + doing anything. + + Signed-off-by: Jason Gerecke + Signed-off-by: Peter Hutterer + +commit 22fcd2305c1f7464bdf15286c2690fd307629c5d +Author: Jason Gerecke +Date: Tue Mar 8 17:50:43 2011 -0800 + + Remove RawFilter from xsetwacom + + With support for the option completely removed from the driver, + remove it from xsetwacom as well. Also modify the deprecation + warning to handle cases like this where we don't want a replacement. + + Signed-off-by: Jason Gerecke + Signed-off-by: Peter Hutterer + +commit ca418548e8c0114df5c7830ae6e4dc28bf38caf4 +Author: Jason Gerecke +Date: Tue Mar 8 17:50:42 2011 -0800 + + Remove RawFilter option from driver + + This option was mostly removed from the driver at some point in + the past, with only these vestigal lines remaining. + + Signed-off-by: Jason Gerecke + Signed-off-by: Peter Hutterer + +commit 7861dc281307d2a8727a99c31009af8ede144479 +Author: Jason Gerecke +Date: Tue Mar 8 08:53:44 2011 -0800 + + Fix minor doc style inconsistencies + + Add/move periods and whitespace, make defaults consistent, and clarify + where necessary. + + Signed-off-by: Jason Gerecke + Signed-off-by: Peter Hutterer + +commit 3282e954f209683ee2026d72b2adfbf1d4c48cb0 +Author: Andrzej Pronobis +Date: Mon Mar 7 12:42:01 2011 -0800 + + Decide scroll direction according to tablet orientation + + Signed-off-by: Andrzej Pronobis + Signed-off-by: Ping Cheng + Signed-off-by: Peter Hutterer + +commit fc41fb63dd883fc29236af535b22a2b347dfe326 +Author: David Foley +Date: Mon Mar 7 12:56:35 2011 -0600 + + xsetwacom.man: Add 5 parameters + + Add Mode, PressureCurve, Rotate, TabletPCButton, and Threshold. And other changes. + + Signed-off-by: David Foley + Signed-off-by: Peter Hutterer + +commit acd8552d83929963d5cc70d6217c5a15da86c6c0 +Author: Peter Hutterer +Date: Mon Mar 7 14:38:31 2011 +1000 + + Don't try to update the button mapping if we don't have anything to update. + + If keyword parsing failed and we have zero items to update to (but we're not + trying to reset the property), don't update the button action property. + + Reproducer: xsetwacom set "device" Button 1 "blah" + would print an error about invalid keywords but still update (erase) the + button mapping property. + + Signed-off-by: Peter Hutterer + Acked-by: Ping Cheng + +commit eba6b9416148e5423c5a0c2632d88dbee5589615 +Author: Peter Hutterer +Date: Mon Mar 7 14:35:54 2011 +1000 + + xsetwacom: fix button action unsetting + + xsetwacom set Button 1 + should unsets the key action for button 1 (back to button mapping) + + Signed-off-by: Peter Hutterer + Acked-by: Ping Cheng + +commit 8ed4e95e8e65f569a3639959331f0a95b0917f11 +Author: Peter Hutterer +Date: Mon Mar 7 14:29:21 2011 +1000 + + xsetwacom: update a comment for new button map arguments. + + Signed-off-by: Peter Hutterer + Acked-by: Ping Cheng + +commit 22bc3028effbdc79d426c0b3dcf586734d4c7532 +Author: Peter Hutterer +Date: Mon Mar 7 14:21:22 2011 +1000 + + xsetwacom: don't re-use argc, add new var "unset_prop" + + No functional change, making the code more readable. + + Signed-off-by: Peter Hutterer + Acked-by: Ping Cheng + +commit fe07179e4976cdcc530bd2dd3cd482a65a3fd43d +Author: Peter Hutterer +Date: Mon Mar 7 14:16:55 2011 +1000 + + xsetwacom: print error if an unknown keyword is given. + + xsetwacom set "device" Button 1 "Ctrl Z" cannot be parsed by xsetwacom, + leading to a nonfunctioning button without the user realising why. Print an + error and complain if the keyword is unknown/invalid. + + Bug 3054502 + https://sourceforge.net/tracker/?func=detail&atid=525124&aid=3054502&group_id=69596 + + Signed-off-by: Peter Hutterer + Acked-by: Ping Cheng + +commit c4007437dcd7b24d949b80fb49e5e8e0699b4201 +Merge: a8c95a7 abb4144 +Author: Peter Hutterer +Date: Mon Mar 7 13:11:56 2011 +1000 + + Merge branch 'suppress-cleanup' + +commit abb4144f6ec125fa37fb6cd1f3eb0c4616367359 +Author: Peter Hutterer +Date: Fri Mar 4 09:37:13 2011 +1000 + + Don't hardcode the rotation range for cursor RZ, use defines instead. + + Signed-off-by: Peter Hutterer + Reviewed-by: Ping Cheng + +commit 379be28b51d782c18a2f8ea3b7d59b08329ebbc0 +Author: Peter Hutterer +Date: Fri Mar 4 09:13:28 2011 +1000 + + Fix typo for max axis range on the cursor tool. + + Signed-off-by: Peter Hutterer + Reviewed-by: Ping Cheng + +commit 859d325be9fc303b78ee4b2fde7fd6ca18888b4d +Author: Peter Hutterer +Date: Fri Mar 4 09:05:09 2011 +1000 + + Fix indentation in wcmTilt2R. + + Signed-off-by: Peter Hutterer + Reviewed-by: Ping Cheng + +commit 5ca0e09f9058e47d2a2ff1c5474bc1b5aef92c14 +Author: Peter Hutterer +Date: Thu Mar 3 14:04:39 2011 +1000 + + test: remove miPointer wrappers, unneded. + + Obsolete with a9fe6a0337183c653ede6b5724612a138b022fb9 + + Signed-off-by: Peter Hutterer + Reviewed-by: Ping Cheng + +commit aa96977dc7ff0b44b7d1dcb5bf524c339d4820e5 +Author: Peter Hutterer +Date: Thu Mar 3 14:01:21 2011 +1000 + + test: add tests for wcmCheckSuppress. + + Signed-off-by: Peter Hutterer + Reviewed-by: Ping Cheng + +commit 1982daf6b13685cc6568a53b85d62089405963a9 +Author: Peter Hutterer +Date: Thu Mar 3 13:40:08 2011 +1000 + + Rewrite wcmCheckSuppress + + Instead of returning rather ambiguous 0, 1 and 2, return enums with readable + descriptions. + + No functional changes, other than that we now skip a few tests in + wcmCheckSuppress if we already have the result. + + Signed-off-by: Peter Hutterer + Reviewed-by: Ping Cheng + +commit a8c95a7975ffa16779cced264062bc64b8631095 +Author: David Foley +Date: Fri Mar 4 12:50:39 2011 -0600 + + conf: Add Fujitsu ISDV4 device ID FUJ02e9 to matches + + Signed-off-by: David Foley + Reviewed-by: Ping Cheng + Signed-off-by: Peter Hutterer + +commit 89db1ede87db655b57fb2234194f1c26993ef166 +Author: David Foley +Date: Fri Mar 4 13:28:24 2011 -0600 + + wcmUSB.c: Update BambooPT identifier comment + + Change 0xDB from CTH-661 to CTH-661/L. + + Reported-by: Pander + Signed-off-by: David Foley + Acked-by: Chris Bagwell + Signed-off-by: Peter Hutterer + +commit e79f7a730cedee93db363c20ddddc9e90b41ef3b +Author: Peter Hutterer +Date: Thu Mar 3 12:02:27 2011 +1000 + + Swap an error message "likely to crash" for one not likely to do so + + Signed-off-by: Peter Hutterer + Reviewed-by: Ping Cheng + +commit 0250ecbc798b47821ed81e87ab852b6cc342efe1 +Author: Peter Hutterer +Date: Thu Mar 3 11:54:18 2011 +1000 + + Remove now-obsolete condition. + + With the removal of the tool areas, this check became obsolete. + + Signed-off-by: Peter Hutterer + Reviewed-by: Ping Cheng + +commit fe46ffdd55f877e0750017285724181b3ddf4a4c +Author: Peter Hutterer +Date: Thu Mar 3 11:53:36 2011 +1000 + + Document findTool() + + And rename tooldef to tooldefault, I always get confused by that. + + Signed-off-by: Peter Hutterer + Reviewed-by: Ping Cheng + +commit 07964dc148767f78fee691981935f9450a1981bf +Author: Peter Hutterer +Date: Thu Mar 3 11:50:50 2011 +1000 + + Document is/set_absolute + + Signed-off-by: Peter Hutterer + Reviewed-by: Ping Cheng + +commit 69d3e9387105e0a92cae95f6f81a62e868506c06 +Author: Peter Hutterer +Date: Thu Mar 3 15:52:56 2011 +1000 + + Add a fixme about tool handling. + + Signed-off-by: Peter Hutterer + Acked-by: Ping Cheng + +commit 751976d32f756197cc7254ae85956eebdf7e8e47 +Author: Peter Hutterer +Date: Thu Mar 3 14:32:38 2011 +1000 + + Keep an enabled flag in the tool to avoid racy startup. + + There is a small time window where a device may try to send an event even + though it is not fully setup to send events yet, causing a server crash. + + This window opens when the tool is added to the list of devices in + wcmParseOptions() and closes with the server calling xf86ActivateDevice(). + If an event for a dependent device is processed during that time, the tool + will be available but the device pointer is still invalid. + + Crash can be reproduced by putting a breakpoint after wcmParseOptions() for + the eraser, then generating events with the eraser. These will cause the + tool to dereference tool->device->dev, which is uninitialized. + + Work around this with a simple "enabled" flag that is set whenever the tool + is actually enabled. + + Signed-off-by: Peter Hutterer + Acked-by: Ping Cheng + +commit 94a8eabadd062de6ceed8563089b863d887f8770 +Author: Peter Hutterer +Date: Thu Mar 3 11:29:19 2011 +1000 + + Switch to a WorkProc for device hotplugging. + + The current approach to hotplugging is to call NIDR directly from the parent + device's PreInit. This causes a nested device layout as the dependent + devices are initialised fully before the parent device is initialised. + + Switch to a WorkProc instead. Copy the necessary information to create a new + device later and tell the server to call the actual hotplug function when it + has time. + + Signed-off-by: Peter Hutterer + Acked-by: Ping Cheng + +commit 490e345f9d85a73263e96ba0b2918a9a2ca913ad +Author: Peter Hutterer +Date: Thu Mar 3 15:27:20 2011 +1000 + + Don't manually UnInit the devices for ABI 12 + + One of the changes going into ABI 12 were that the server calls Uninit even + on driver-hotplugged devices. + + Signed-off-by: Peter Hutterer + Acked-by: Ping Cheng + +commit 66466dcf8bbe4c633c006863b30d8d022c575842 +Author: Ping Cheng +Date: Wed Mar 2 15:16:15 2011 -0800 + + Don't discard the first 2 USB events + + It was an issue with older kernels. This driver only supports + kernels 2.6.26 and later. No need to do that any more. + + There is a special case that this code may have helped though. + If tool is on the tablet while driver started, waiting for more + events before processing them would fill some otherwise filtered + events from the kernel. Even for this case, the solution should + be added inside wcmUSB.c, instead of here. + + We'll work on that in wcmUSB.c later. Just for the record. The + perfect solution would be to retrieve all events from the kernel + if important events, such as tool type, serial number, etc, are + missing. This would require quite some changes in wcmUSB.c. And, + the challenge is that linux-input doesn't provide the means for + us to retrieve all of the events that posted from the kernel. At + least, we can not retrieve serial number and MT events yet. + + Signed-off-by: Ping Cheng + Reviewed-by: Chris Bagwell + Signed-off-by: Peter Hutterer + +commit 438da502c84e7742acb31e433e42efd5bd003581 +Author: Ping Cheng +Date: Wed Mar 2 15:16:49 2011 -0800 + + Set ISDV4 to PROTOCOL_GENERIC in isdv4ProbeKeys + + isdv4ProbeKeys is the place we set all tool types and other keys. + Reset the ProtocolLevel to PROTOCOL_GENERIC here as well. + Otherwise, it would be overwrote by the default. + + Signed-off-by: Ping Cheng + Acked-by: Chris Bagwell + Signed-off-by: Peter Hutterer + +commit 22e4410cb3de0ac6b6e2275bd8b8bcc0f2cf7b5a +Author: Peter Hutterer +Date: Thu Mar 3 10:05:55 2011 +1000 + + test: fix typos and copy/paste effects. + + Misplaced closing parens, then copy/pasted everywhere. + Introduced in 1d9a055bc8e95f20458d7da5b77967f2e53b7d6f + + Signed-off-by: Peter Hutterer + +commit 5c06d9584e1f231bea47aaf1dd33e0502dee34be +Author: Peter Hutterer +Date: Wed Mar 2 10:40:44 2011 +1000 + + test: add license header + + Signed-off-by: Peter Hutterer + Acked-by: Chris Bagwell + +commit b80876c01ce62baa63c2563aeef399ffea73f588 +Author: Peter Hutterer +Date: Wed Mar 2 10:39:57 2011 +1000 + + test: add note that we can't test static variables here. + + Signed-off-by: Peter Hutterer + Acked-by: Chris Bagwell + +commit 1d9a055bc8e95f20458d7da5b77967f2e53b7d6f +Author: Peter Hutterer +Date: Wed Mar 2 10:03:31 2011 +1000 + + test: add ifdefs to allow running tests against 1.7 + + Signed-off-by: Peter Hutterer + Acked-by: Chris Bagwell + +commit 9d227cd0bd985e7dcb7923974361145ba1d78713 +Author: Peter Hutterer +Date: Wed Mar 2 10:34:36 2011 +1000 + + Move VCOPY storage out of the function. + + Not 100% sure why this is needed but it looks like the returned address is + invalid, causing memory corruption. Simply moving the variable into a global + scope fixes this issue. + + Fixes crash with server 1.7. + + Reported-by: Vu Ngoc San + Signed-off-by: Peter Hutterer + Reviewed-by: Ping Cheng + Reviewed-by: Chris Bagwell + +commit a113f790fe19b0d30b672eb051a3215880df5d3e +Author: Timo Aaltonen +Date: Wed Mar 2 19:09:27 2011 +0200 + + xsetwacom.c: Fix a typo preventing Rotate ccw from working + + Introduced in ac821ba29a828fb9bb531243d0a226a7fe494504 + + Signed-off-by: Timo Aaltonen + Signed-off-by: Peter Hutterer + +commit 9dba8e81e132561732c3bc6c0645a6af44eab2a0 +Author: Peter Hutterer +Date: Wed Mar 2 11:47:45 2011 +1000 + + Bump to 0.10.99. + + New release versioning scheme until we settle on a stable 1.0. + - 0.x.99 is the version number in-between releases + - 0.x.99.901 is the first RC + - 0.x.99.902 is the second RC + - 0.x+1.0 is next the release + + Signed-off-by: Peter Hutterer + +commit 1f0cfe5dd48eec52c495c5777d20758563318783 +Author: Peter Hutterer +Date: Tue Mar 1 15:05:05 2011 +1000 + + test: add basic check that the tool is initialized correctly. + + Signed-off-by: Peter Hutterer + Reviewed-by: Ping Cheng + +commit 82e65fc52d497b57dab4bcd008ee64f9f7f08796 +Author: Peter Hutterer +Date: Fri Jan 21 14:07:55 2011 +1000 + + Remove now unused overlap checking functions + + Signed-off-by: Peter Hutterer + Reviewed-by: Ping Cheng + +commit 13a12bb852f845ce5588f1e7dcda18cd2c21cb59 +Author: Peter Hutterer +Date: Fri Jan 21 13:52:08 2011 +1000 + + Purge toolarea from device rec. + + Having multiple areas for tool is feature that has gone untested for + possibly years and it's hard to figure out how to even configure it. + Purge it. + + Signed-off-by: Peter Hutterer + Reviewed-by: Ping Cheng + +commit 751065df9bce662f2e1d74746e1ce6b6cb8c73ce +Author: Peter Hutterer +Date: Fri Jan 21 13:31:15 2011 +1000 + + Purge KeepShape option (for now, anyway). + + This option is badly broken since the driver has lost the ability to check + for screen coordinates. + + There is a need for this option, but it will have to come back as a + purely client-configured option (i.e. the client feeds the tablet + coordinates it should map to). + + Signed-off-by: Peter Hutterer + Reviewed-by: Ping Cheng + +commit 24019a07a56fb73132273910d36a036d1c811bb9 +Author: Chris Bagwell +Date: Sun Feb 20 22:49:33 2011 -0600 + + Make 1 finger tap work based on finger release. + + Previous behavior required a double-tap to get a single finger + tap to work and didn't always work for me. Its behavior was basically + tap-and-drag gesture instead of tap-to-click. + + Converted to standard touchpad behavior of single tap based on finger + release. This is arguely the more important gesture to users. + + Removed wcmTouchpadMode since it wasn't needed for simple tap-to-click + gesture. If tap-and-drag gets added back and needs a variable, it can + be added back with a name that has "drag" in it to understand its + intended usage. + + Signed-off-by: Chris Bagwell + Tested-by: Andrzej Giniewicz + Acked-by: Ping Cheng + Signed-off-by: Peter Hutterer + +commit 1b30bd68111b7e08fb9ded4302ba556f16253a8a +Author: Chris Bagwell +Date: Sun Feb 20 19:19:20 2011 -0600 + + allow button events while touch is disabled + + PROTOCOL_GENERIC devices send "pad" buttons along + with touchscreen/touchpad events. Since we are + emulating "pad" device concept, we need to let + "pad" events go through when "touch" is disabled. + + There seems to be a popular script floating around + that toggles "touch" device on/off by using + same devices "pad" buttons. This patch allows that + to work again. + + Signed-off-by: Chris Bagwell + Reviewed-by: Ping Cheng + Signed-off-by: Peter Hutterer + +commit 85f4c8ed19f8816d0353ee302cf34f8d11e2b14b +Author: Peter Hutterer +Date: Thu Feb 24 15:28:45 2011 +1000 + + Disable KeepShape - it's currently unsupported. + + Will come back once it's hooked up properly again. + + Signed-off-by: Peter Hutterer + Acked-by: Ping Cheng + +commit 577f42d38b66fd84594a6d3f2932a559e68b5751 +Author: Bruno Vasselle +Date: Fri Feb 25 08:31:21 2011 +1000 + + Division by zero in wcmInitArea when KEEP_SHAPE_FLAG is on. + + Under some circumstances, wcmInitArea faces a division by zero when trying + to deal with the "KeepShape" option. The patch disables KeepShape in the + situation. + + Signed-off-by: Bruno Vasselle + Acked-by: Ping Cheng + Signed-off-by: Peter Hutterer + +commit 240e694d861fe78d516f43f315dbe2b634368131 +Author: Ping Cheng +Date: Tue Feb 22 17:23:42 2011 -0800 + + Retrieve the ABS values through EVIOCGABS only when they are set + + We get absinfo.maximum = 0 when the ABS_ is not set in the + kernel, which is invalid. + + This issue was found when I work on the resolution. It applies to + other ABS_* as well. + + Signed-off-by: Ping Cheng + Signed-off-by: Peter Hutterer + +commit ac4f60e378150369f7de64045d80e2f2318e0f63 +Author: Peter Hutterer +Date: Wed Feb 23 09:59:15 2011 +1000 + + Update README with a few pointers to website, etc. + + Signed-off-by: Peter Hutterer + Reviewed-by: Ping Cheng + +commit 87d09b7addeee2d7119c81c2f5b415ceebc50931 +Author: Gaetan Nadon +Date: Fri Feb 18 11:50:52 2011 -0500 + + distcheck fails, xsetwacom.c needs X11_CFLAGS for UNITTESTS + + Otherwise it fails to pickup X11/keysym.h and friends. + + Signed-off-by: Gaetan Nadon + Signed-off-by: Peter Hutterer + +commit 957de9b5a32efaf891e5d4ed55207297b060e605 +Author: Gaetan Nadon +Date: Fri Feb 18 20:02:12 2011 -0500 + + Doxygen: add project name in footer. + + The footer was generated by doxygen based on doxygen.conf + + Signed-off-by: Gaetan Nadon + Signed-off-by: Peter Hutterer + +commit a52277e7f2864493342affb6a4fc6cda74a9d0af +Author: Gaetan Nadon +Date: Fri Feb 18 20:02:11 2011 -0500 + + Doxygen: use $PACKAGE_VERSION for the release number + + The release number in the main page will always be in sync. + This will allow archiving the API documentation for each release, + enabling multiple versions to coexist on the web. + + Signed-off-by: Gaetan Nadon + Reviewed-by: Ping Cheng + Signed-off-by: Peter Hutterer + +commit e21033fb505734a934bd0400d9ff72e7ec32c326 +Author: Favux +Date: Thu Feb 17 21:09:32 2011 -0600 + + xsetwacom.c: Correct typo-spelling + + Patch + + From 6e682f268416db29cb178f1f7f734b7687081d29 Mon Sep 17 00:00:00 2001 + From: David Foley + Date: Thu, 17 Feb 2011 20:57:38 -0600 + Subject: [PATCH] xsetwacom.c: Correct typo/spelling + + Reported by: Vu Ngoc San + Signed-off-by: David Foley + Signed-off-by: Peter Hutterer + +commit 01cf69515fa808c09e2ac80c29d6c638ac8191e7 +Author: Gaetan Nadon +Date: Fri Feb 18 12:05:31 2011 -0500 + + Doxygen: add description on the main html page + + Rather than staring at a blank screen. + To be completed. + + Signed-off-by: Gaetan Nadon + Signed-off-by: Peter Hutterer + +commit af58a7af91c00ef4da56c92d143d6bad1475196d +Author: Gaetan Nadon +Date: Fri Feb 18 12:05:30 2011 -0500 + + Doxygen: add "getting started" support. + + Add Makefile.am and docygen.conf with some customization + + Signed-off-by: Gaetan Nadon + Signed-off-by: Peter Hutterer + +commit b667dd01313bfbc5c76326de61d7fc659076581c +Merge: 244b5ad 79b3945 +Author: Peter Hutterer +Date: Fri Feb 18 10:07:06 2011 +1000 + + Merge branch 'next' + +commit 244b5ad8f88d3db52bdde7ade9087b096e5a12ea +Author: Peter Hutterer +Date: Thu Feb 17 14:56:06 2011 +1000 + + Require doxygen. + + Signed-off-by: Peter Hutterer + Acked-by: Ping Cheng + Reviewed-by: Gaetan Nadon + +commit 6ca246bdbb40489490d0b9a72637f997e0629a61 +Author: Peter Hutterer +Date: Thu Feb 17 11:31:36 2011 +1000 + + Update release script to deal with SF's shell service + + I get auth. failures if I log in too often. + + Signed-off-by: Peter Hutterer + Acked-by: Ping Cheng + commit 8cdf444fd1f4004b5a0d237b26ebcd72900338c4 Author: Peter Hutterer Date: Wed Feb 16 08:45:04 2011 +1000 @@ -75,6 +2303,92 @@ Signed-off-by: Peter Hutterer Acked-by: Ping Cheng +commit 79b3945d3ab3b270e7bd6a7deb8e6b52e0c2b8fa +Author: Peter Hutterer +Date: Mon Feb 14 14:12:32 2011 +1000 + + xsetwacom: comment convert_specialkeys. + + And change a paramter name to be more self-explanatory. + + Signed-off-by: Peter Hutterer + Acked-by: Ping Cheng + +commit 70e0d864b16c36486e835a79b52699aee5de5a10 +Author: Peter Hutterer +Date: Mon Feb 14 14:10:10 2011 +1000 + + xsetwacom: document is_modifier + + And change a parameter name to make the function more self-explanatory. + + Signed-off-by: Peter Hutterer + Acked-by: Ping Cheng + +commit f7bbd3a14b796c8d6adef3322cc7a4b19a466c7f +Author: Peter Hutterer +Date: Mon Feb 14 14:08:11 2011 +1000 + + xsetwacom: use single exit path in is_modifier. + + Signed-off-by: Peter Hutterer + Acked-by: Ping Cheng + +commit ba20f19bf66b1e79f1aa56be6deb8aac952ff33e +Author: Peter Hutterer +Date: Mon Feb 14 14:07:23 2011 +1000 + + xsetwacom: remove separate modifier list in is_modifier. + + Simply parse through the existing modifier list. + + Signed-off-by: Peter Hutterer + Acked-by: Ping Cheng + +commit 5fedf69d653cfbee9ac393643c4cbe0b23e87e19 +Author: Peter Hutterer +Date: Mon Feb 14 15:12:49 2011 +1000 + + xsetwacom: add test for parameter numbers. + + Simple manual check that we remeber to properly deprecate if we ever remove + a parameter again. + + Signed-off-by: Peter Hutterer + Acked-by: Ping Cheng + +commit 0b1462aa27bbf3d8653a762fd8e1648b856a76e3 +Author: Peter Hutterer +Date: Mon Feb 14 15:06:26 2011 +1000 + + xsetwacom: add test for convert_specialkey + + Signed-off-by: Peter Hutterer + Acked-by: Ping Cheng + +commit f6dc39637056adc6fe503654b9f44f225dc4f6ac +Author: Peter Hutterer +Date: Mon Feb 14 14:59:14 2011 +1000 + + xsetwacom: hook up to unittests. + + Includes simple test for is_modifier(). + + Signed-off-by: Peter Hutterer + Acked-by: Ping Cheng + +commit e1b97d153426d8e8712b09806ad0b0bfc517b485 +Author: Peter Hutterer +Date: Mon Feb 14 15:10:50 2011 +1000 + + test: fix indentation to be in-line with the rest of the driver + + And add the vim tags so this doesn't happen again. + Sorry. + + Signed-off-by: Peter Hutterer + Acked-by: Ping Cheng + commit c1e18af5794191a5560fb60bd447e05fdafd53cb Author: Przemo Firszt Date: Sun Jan 2 23:06:46 2011 +0000 diff -Nru xf86-input-wacom-0.10.11/conf/50-wacom.conf xf86-input-wacom-0.11.0/conf/50-wacom.conf --- xf86-input-wacom-0.10.11/conf/50-wacom.conf 2011-01-23 21:41:10.000000000 +0000 +++ xf86-input-wacom-0.11.0/conf/50-wacom.conf 2011-04-07 05:22:34.000000000 +0000 @@ -16,7 +16,7 @@ Section "InputClass" Identifier "Wacom serial class identifiers" - MatchProduct "WACf|FUJ02e5|FUJ02e7" + MatchProduct "WACf|FUJ02e5|FUJ02e7|FUJ02e9" Driver "wacom" EndSection diff -Nru xf86-input-wacom-0.10.11/conf/Makefile.in xf86-input-wacom-0.11.0/conf/Makefile.in --- xf86-input-wacom-0.10.11/conf/Makefile.in 2011-02-16 04:26:35.000000000 +0000 +++ xf86-input-wacom-0.11.0/conf/Makefile.in 2011-04-19 04:07:02.000000000 +0000 @@ -101,6 +101,7 @@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DOXYGEN = @DOXYGEN@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRIVER_NAME = @DRIVER_NAME@ @@ -114,8 +115,6 @@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ -GLIB_CFLAGS = @GLIB_CFLAGS@ -GLIB_LIBS = @GLIB_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ @@ -161,6 +160,8 @@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ +UDEV_CFLAGS = @UDEV_CFLAGS@ +UDEV_LIBS = @UDEV_LIBS@ VERSION = @VERSION@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ diff -Nru xf86-input-wacom-0.10.11/conf/wacom.fdi xf86-input-wacom-0.11.0/conf/wacom.fdi --- xf86-input-wacom-0.10.11/conf/wacom.fdi 2011-01-23 21:41:10.000000000 +0000 +++ xf86-input-wacom-0.11.0/conf/wacom.fdi 2011-04-07 05:22:34.000000000 +0000 @@ -8,7 +8,7 @@ - + input wacom serial.device diff -Nru xf86-input-wacom-0.10.11/configure xf86-input-wacom-0.11.0/configure --- xf86-input-wacom-0.10.11/configure 2011-02-16 04:26:36.000000000 +0000 +++ xf86-input-wacom-0.11.0/configure 2011-04-19 04:07:04.000000000 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.66 for xf86-input-wacom 0.10.11. +# Generated by GNU Autoconf 2.66 for xf86-input-wacom 0.11.0. # # Report bugs to . # @@ -539,6 +539,66 @@ SHELL=${CONFIG_SHELL-/bin/sh} +as_awk_strverscmp=' + # Use only awk features that work with 7th edition Unix awk (1978). + # My, what an old awk you have, Mr. Solaris! + END { + while (length(v1) && length(v2)) { + # Set d1 to be the next thing to compare from v1, and likewise for d2. + # Normally this is a single character, but if v1 and v2 contain digits, + # compare them as integers and fractions as strverscmp does. + if (v1 ~ /^[0-9]/ && v2 ~ /^[0-9]/) { + # Split v1 and v2 into their leading digit string components d1 and d2, + # and advance v1 and v2 past the leading digit strings. + for (len1 = 1; substr(v1, len1 + 1) ~ /^[0-9]/; len1++) continue + for (len2 = 1; substr(v2, len2 + 1) ~ /^[0-9]/; len2++) continue + d1 = substr(v1, 1, len1); v1 = substr(v1, len1 + 1) + d2 = substr(v2, 1, len2); v2 = substr(v2, len2 + 1) + if (d1 ~ /^0/) { + if (d2 ~ /^0/) { + # Compare two fractions. + while (d1 ~ /^0/ && d2 ~ /^0/) { + d1 = substr(d1, 2); len1-- + d2 = substr(d2, 2); len2-- + } + if (len1 != len2 && ! (len1 && len2 && substr(d1, 1, 1) == substr(d2, 1, 1))) { + # The two components differ in length, and the common prefix + # contains only leading zeros. Consider the longer to be less. + d1 = -len1 + d2 = -len2 + } else { + # Otherwise, compare as strings. + d1 = "x" d1 + d2 = "x" d2 + } + } else { + # A fraction is less than an integer. + exit 1 + } + } else { + if (d2 ~ /^0/) { + # An integer is greater than a fraction. + exit 2 + } else { + # Compare two integers. + d1 += 0 + d2 += 0 + } + } + } else { + # The normal case, without worrying about digits. + d1 = substr(v1, 1, 1); v1 = substr(v1, 2) + d2 = substr(v2, 1, 1); v2 = substr(v2, 2) + } + if (d1 < d2) exit 1 + if (d1 > d2) exit 2 + } + # Beware Solaris /usr/xgp4/bin/awk (at least through Solaris 10), + # which mishandles some comparisons of empty strings to integers. + if (length(v2)) exit 1 + if (length(v1)) exit 2 + } +' test -n "$DJDIR" || exec 7<&0 &1 @@ -563,8 +623,8 @@ # Identity of this package. PACKAGE_NAME='xf86-input-wacom' PACKAGE_TARNAME='xf86-input-wacom' -PACKAGE_VERSION='0.10.11' -PACKAGE_STRING='xf86-input-wacom 0.10.11' +PACKAGE_VERSION='0.11.0' +PACKAGE_STRING='xf86-input-wacom 0.11.0' PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg' PACKAGE_URL='' @@ -611,18 +671,21 @@ LIBOBJS UNITTESTS_FALSE UNITTESTS_TRUE -GLIB_LIBS -GLIB_CFLAGS HAS_XORG_CONF_DIR_FALSE HAS_XORG_CONF_DIR_TRUE configdir inputdir DRIVER_NAME sdkdir +UDEV_LIBS +UDEV_CFLAGS X11_LIBS X11_CFLAGS XORG_LIBS XORG_CFLAGS +HAVE_DOXYGEN_FALSE +HAVE_DOXYGEN_TRUE +DOXYGEN AM_BACKSLASH AM_DEFAULT_VERBOSITY MAN_SUBSTS @@ -765,6 +828,7 @@ enable_libtool_lock enable_strict_compilation enable_silent_rules +with_doxygen with_sdkdir enable_debug with_xorg_module_dir @@ -783,12 +847,13 @@ PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR +DOXYGEN XORG_CFLAGS XORG_LIBS X11_CFLAGS X11_LIBS -GLIB_CFLAGS -GLIB_LIBS' +UDEV_CFLAGS +UDEV_LIBS' # Initialize some variables set by options. @@ -1330,7 +1395,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures xf86-input-wacom 0.10.11 to adapt to many kinds of systems. +\`configure' configures xf86-input-wacom 0.11.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1401,7 +1466,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of xf86-input-wacom 0.10.11:";; + short | recursive ) echo "Configuration of xf86-input-wacom 0.11.0:";; esac cat <<\_ACEOF @@ -1432,6 +1497,8 @@ --with-pic try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] + --with-doxygen Use doxygen to regenerate documentation (default: + auto) --with-xorg-module-dir=DIR Default xorg module directory @@ -1454,12 +1521,13 @@ directories to add to pkg-config's search path PKG_CONFIG_LIBDIR path overriding pkg-config's built-in search path + DOXYGEN Path to doxygen command XORG_CFLAGS C compiler flags for XORG, overriding pkg-config XORG_LIBS linker flags for XORG, overriding pkg-config X11_CFLAGS C compiler flags for X11, overriding pkg-config X11_LIBS linker flags for X11, overriding pkg-config - GLIB_CFLAGS C compiler flags for GLIB, overriding pkg-config - GLIB_LIBS linker flags for GLIB, overriding pkg-config + UDEV_CFLAGS C compiler flags for UDEV, overriding pkg-config + UDEV_LIBS linker flags for UDEV, overriding pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. @@ -1527,7 +1595,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -xf86-input-wacom configure 0.10.11 +xf86-input-wacom configure 0.11.0 generated by GNU Autoconf 2.66 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1942,7 +2010,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by xf86-input-wacom $as_me 0.10.11, which was +It was created by xf86-input-wacom $as_me 0.11.0, which was generated by GNU Autoconf 2.66. Invocation command line was $ $0 $@ @@ -2763,7 +2831,7 @@ # Define the identity of the package. PACKAGE='xf86-input-wacom' - VERSION='0.10.11' + VERSION='0.11.0' cat >>confdefs.h <<_ACEOF @@ -11271,6 +11339,157 @@ + + + +# Check whether --with-doxygen was given. +if test "${with_doxygen+set}" = set; then : + withval=$with_doxygen; use_doxygen=$withval +else + use_doxygen=auto +fi + + + +if test "x$use_doxygen" = x"auto"; then + # Extract the first word of "doxygen", so it can be a program name with args. +set dummy doxygen; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_DOXYGEN+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $DOXYGEN in + [\\/]* | ?:[\\/]*) + ac_cv_path_DOXYGEN="$DOXYGEN" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_DOXYGEN="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +DOXYGEN=$ac_cv_path_DOXYGEN +if test -n "$DOXYGEN"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOXYGEN" >&5 +$as_echo "$DOXYGEN" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + if test "x$DOXYGEN" = "x"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: doxygen not found - documentation targets will be skipped" >&5 +$as_echo "$as_me: WARNING: doxygen not found - documentation targets will be skipped" >&2;} + have_doxygen=no + else + have_doxygen=yes + fi +elif test "x$use_doxygen" = x"yes" ; then + # Extract the first word of "doxygen", so it can be a program name with args. +set dummy doxygen; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_DOXYGEN+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $DOXYGEN in + [\\/]* | ?:[\\/]*) + ac_cv_path_DOXYGEN="$DOXYGEN" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_DOXYGEN="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +DOXYGEN=$ac_cv_path_DOXYGEN +if test -n "$DOXYGEN"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOXYGEN" >&5 +$as_echo "$DOXYGEN" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + if test "x$DOXYGEN" = "x"; then + as_fn_error $? "--with-doxygen=yes specified but doxygen not found in PATH" "$LINENO" 5 + fi + have_doxygen=yes +elif test "x$use_doxygen" = x"no" ; then + if test "x$DOXYGEN" != "x"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ignoring DOXYGEN environment variable since --with-doxygen=no was specified" >&5 +$as_echo "$as_me: WARNING: ignoring DOXYGEN environment variable since --with-doxygen=no was specified" >&2;} + fi + have_doxygen=no +else + as_fn_error $? "--with-doxygen expects 'yes' or 'no'" "$LINENO" 5 +fi +if test "$have_doxygen" = yes; then + # scrape the doxygen version + { $as_echo "$as_me:${as_lineno-$LINENO}: checking the doxygen version" >&5 +$as_echo_n "checking the doxygen version... " >&6; } + doxygen_version=`$DOXYGEN --version 2>/dev/null` + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $doxygen_version" >&5 +$as_echo "$doxygen_version" >&6; } + as_arg_v1=$doxygen_version +as_arg_v2=1.6.1 +awk "$as_awk_strverscmp" v1="$as_arg_v1" v2="$as_arg_v2" /dev/null +case $? in #( + 1) : + if test "x$use_doxygen" = xauto; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: doxygen version $doxygen_version found, but 1.6.1 needed" >&5 +$as_echo "$as_me: WARNING: doxygen version $doxygen_version found, but 1.6.1 needed" >&2;} + have_doxygen=no + else + as_fn_error $? "doxygen version $doxygen_version found, but 1.6.1 needed" "$LINENO" 5 + fi ;; #( + 0) : + ;; #( + 2) : + ;; #( + *) : + ;; +esac +fi + if test "$have_doxygen" = yes; then + HAVE_DOXYGEN_TRUE= + HAVE_DOXYGEN_FALSE='#' +else + HAVE_DOXYGEN_TRUE='#' + HAVE_DOXYGEN_FALSE= +fi + + + # Checks for libraries. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rint in -lm" >&5 $as_echo_n "checking for rint in -lm... " >&6; } @@ -11504,6 +11723,99 @@ fi +# Obtain compiler/linker options for libudev used by ISDV4 code + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UDEV" >&5 +$as_echo_n "checking for UDEV... " >&6; } + +if test -n "$UDEV_CFLAGS"; then + pkg_cv_UDEV_CFLAGS="$UDEV_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libudev\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libudev") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_UDEV_CFLAGS=`$PKG_CONFIG --cflags "libudev" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$UDEV_LIBS"; then + pkg_cv_UDEV_LIBS="$UDEV_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libudev\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libudev") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_UDEV_LIBS=`$PKG_CONFIG --libs "libudev" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + UDEV_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libudev" 2>&1` + else + UDEV_PKG_ERRORS=`$PKG_CONFIG --print-errors "libudev" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$UDEV_PKG_ERRORS" >&5 + + as_fn_error $? "Package requirements (libudev) were not met: + +$UDEV_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables UDEV_CFLAGS +and UDEV_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details." "$LINENO" 5 + +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables UDEV_CFLAGS +and UDEV_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details" "$LINENO" 5; } + +else + UDEV_CFLAGS=$pkg_cv_UDEV_CFLAGS + UDEV_LIBS=$pkg_cv_UDEV_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi + # X Server SDK location is required to install wacom header files # This location is also relayed in the xorg-wacom.pc file sdkdir=`$PKG_CONFIG --variable=sdkdir xorg-server` @@ -11572,7 +11884,6 @@ fi -# enalbe unit-tests if glib-devel is available # Check whether --enable-unit-tests was given. if test "${enable_unit_tests+set}" = set; then : enableval=$enable_unit_tests; UNITTESTS=$enableval @@ -11583,76 +11894,6 @@ # If unittests aren't explicitly disabled, check for required support if test "x$UNITTESTS" != xno ; then - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLIB" >&5 -$as_echo_n "checking for GLIB... " >&6; } - -if test -n "$GLIB_CFLAGS"; then - pkg_cv_GLIB_CFLAGS="$GLIB_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.16\""; } >&5 - ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.16") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_GLIB_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 2.16" 2>/dev/null` -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$GLIB_LIBS"; then - pkg_cv_GLIB_LIBS="$GLIB_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.16\""; } >&5 - ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.16") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_GLIB_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= 2.16" 2>/dev/null` -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - GLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "glib-2.0 >= 2.16" 2>&1` - else - GLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors "glib-2.0 >= 2.16" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$GLIB_PKG_ERRORS" >&5 - - HAVE_GLIB=no -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - HAVE_GLIB=no -else - GLIB_CFLAGS=$pkg_cv_GLIB_CFLAGS - GLIB_LIBS=$pkg_cv_GLIB_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - HAVE_GLIB=yes -fi - # Check if linker supports -wrap, passed via compiler flags # When cross-compiling, reports no, since unit tests run from # "make check", so would be running on build machine, not target @@ -11693,24 +11934,19 @@ fi if test "x$UNITTESTS" = xauto; then - if test "x$HAVE_GLIB" = xyes && test "x$linker_can_wrap" = xyes; then + if test "x$linker_can_wrap" = xyes; then UNITTESTS=yes else UNITTESTS=no fi fi if test "x$UNITTESTS" = xyes; then - if test "x$HAVE_GLIB" = xno; then - as_fn_error $? "glib required to build unit tests" "$LINENO" 5 - fi if test "x$linker_can_wrap" = xno; then as_fn_error $? "ld -wrap support required to build unit tests" "$LINENO" 5 fi $as_echo "#define UNITTESTS 1" >>confdefs.h - - fi if test "x$UNITTESTS" = xyes; then UNITTESTS_TRUE= @@ -11725,7 +11961,7 @@ # ----------------------------------------------------------------------------- -ac_config_files="$ac_config_files Makefile conf/Makefile src/Makefile man/Makefile include/Makefile tools/Makefile test/Makefile xorg-wacom.pc" +ac_config_files="$ac_config_files Makefile conf/Makefile doc/Makefile doc/doxygen.conf src/Makefile man/Makefile include/Makefile tools/Makefile test/Makefile xorg-wacom.pc" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -11845,6 +12081,10 @@ as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${HAVE_DOXYGEN_TRUE}" && test -z "${HAVE_DOXYGEN_FALSE}"; then + as_fn_error $? "conditional \"HAVE_DOXYGEN\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${HAS_XORG_CONF_DIR_TRUE}" && test -z "${HAS_XORG_CONF_DIR_FALSE}"; then as_fn_error $? "conditional \"HAS_XORG_CONF_DIR\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -12261,7 +12501,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by xf86-input-wacom $as_me 0.10.11, which was +This file was extended by xf86-input-wacom $as_me 0.11.0, which was generated by GNU Autoconf 2.66. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -12327,7 +12567,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -xf86-input-wacom config.status 0.10.11 +xf86-input-wacom config.status 0.11.0 configured by $0, generated by GNU Autoconf 2.66, with options \\"\$ac_cs_config\\" @@ -12715,6 +12955,8 @@ "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "conf/Makefile") CONFIG_FILES="$CONFIG_FILES conf/Makefile" ;; + "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; + "doc/doxygen.conf") CONFIG_FILES="$CONFIG_FILES doc/doxygen.conf" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;; "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;; diff -Nru xf86-input-wacom-0.10.11/configure.ac xf86-input-wacom-0.11.0/configure.ac --- xf86-input-wacom-0.10.11/configure.ac 2011-02-16 04:25:57.000000000 +0000 +++ xf86-input-wacom-0.11.0/configure.ac 2011-04-19 04:06:38.000000000 +0000 @@ -23,7 +23,7 @@ # Initialize Autoconf AC_PREREQ([2.60]) AC_INIT([xf86-input-wacom], - [0.10.11], + [0.11.0], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xf86-input-wacom]) AC_CONFIG_MACRO_DIR([m4]) @@ -44,6 +44,7 @@ [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])]) XORG_MACROS_VERSION([1.8]) XORG_DEFAULT_OPTIONS +XORG_WITH_DOXYGEN(1.6.1) # Checks for libraries. AC_CHECK_LIB([m], [rint]) @@ -54,6 +55,9 @@ # Obtain compiler/linker options for the xsetwacom tool PKG_CHECK_MODULES(X11, x11 xi xrandr) +# Obtain compiler/linker options for libudev used by ISDV4 code +PKG_CHECK_MODULES(UDEV, libudev) + # X Server SDK location is required to install wacom header files # This location is also relayed in the xorg-wacom.pc file sdkdir=`$PKG_CONFIG --variable=sdkdir xorg-server` @@ -99,7 +103,6 @@ AC_SUBST(configdir) AM_CONDITIONAL(HAS_XORG_CONF_DIR, [test "x$sysconfigdir" != "x"]) -# enalbe unit-tests if glib-devel is available AC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], [Enable unit-tests (default: auto)]), [UNITTESTS=$enableval], @@ -107,9 +110,6 @@ # If unittests aren't explicitly disabled, check for required support if test "x$UNITTESTS" != xno ; then - PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.16], - [HAVE_GLIB=yes], [HAVE_GLIB=no]) - # Check if linker supports -wrap, passed via compiler flags # When cross-compiling, reports no, since unit tests run from # "make check", so would be running on build machine, not target @@ -130,22 +130,17 @@ fi if test "x$UNITTESTS" = xauto; then - if test "x$HAVE_GLIB" = xyes && test "x$linker_can_wrap" = xyes; then + if test "x$linker_can_wrap" = xyes; then UNITTESTS=yes else UNITTESTS=no fi fi if test "x$UNITTESTS" = xyes; then - if test "x$HAVE_GLIB" = xno; then - AC_MSG_ERROR([glib required to build unit tests]) - fi if test "x$linker_can_wrap" = xno; then AC_MSG_ERROR([ld -wrap support required to build unit tests]) fi AC_DEFINE(UNITTESTS, 1, [Enable unit tests]) - AC_SUBST([GLIB_LIBS]) - AC_SUBST([GLIB_CFLAGS]) fi AM_CONDITIONAL(UNITTESTS, [test "x$UNITTESTS" = xyes]) @@ -155,6 +150,8 @@ AC_CONFIG_FILES([Makefile conf/Makefile + doc/Makefile + doc/doxygen.conf src/Makefile man/Makefile include/Makefile diff -Nru xf86-input-wacom-0.10.11/debian/changelog xf86-input-wacom-0.11.0/debian/changelog --- xf86-input-wacom-0.10.11/debian/changelog 2011-08-01 04:48:52.000000000 +0000 +++ xf86-input-wacom-0.11.0/debian/changelog 2011-08-01 04:48:52.000000000 +0000 @@ -1,3 +1,27 @@ +xf86-input-wacom (1:0.11.0-0ubuntu1+thjaeger1) natty; urgency=low + + * Fix rotation (http://sourceforge.net/mailarchive/forum.php?thread_name=20110513005952.GA16064%40barra.bne.redhat.com&forum_name=linuxwacom-devel) + + -- Thomas Jaeger Mon, 01 Aug 2011 00:31:01 -0400 + +xf86-input-wacom (1:0.11.0-0ubuntu1) oneiric; urgency=low + + * New upstream version. + - remove patches 101 and 102, included upstream. + * Add 100_enable_waltop.diff + - Autoload wacom for Waltop devices (LP: #300067) + * Switch to dh: + - Bump debhelper build-dep, add dh-autoreconf build-dep. + - Bump compat to 8. + - Rework debian/rules. + - Remove xsfbs. + - Remove autogenerated files. + - Add xserver-xorg-input-wacom.install. + * Add libudev-dev to build-deps. + * Bump Standards version to 3.9.1 (no changes needed). + + -- Timo Aaltonen Wed, 25 May 2011 09:58:54 +0300 + xf86-input-wacom (1:0.10.11-0ubuntu4) natty; urgency=low * 102_add_support_for_lenovo_x220.diff: Add an id for Lenovo X220 diff -Nru xf86-input-wacom-0.10.11/debian/compat xf86-input-wacom-0.11.0/debian/compat --- xf86-input-wacom-0.10.11/debian/compat 2011-08-01 04:48:52.000000000 +0000 +++ xf86-input-wacom-0.11.0/debian/compat 2011-08-01 04:48:52.000000000 +0000 @@ -1 +1 @@ -6 +8 diff -Nru xf86-input-wacom-0.10.11/debian/control xf86-input-wacom-0.11.0/debian/control --- xf86-input-wacom-0.10.11/debian/control 2011-08-01 04:48:52.000000000 +0000 +++ xf86-input-wacom-0.11.0/debian/control 2011-08-01 04:48:52.000000000 +0000 @@ -3,14 +3,16 @@ Priority: optional Maintainer: Ubuntu X-SWAT XSBC-Original-Maintainer: Ron Lee -Build-Depends: debhelper (>= 6.0.7), +Build-Depends: debhelper (>= 8), + dh-autoreconf, pkg-config, xutils-dev, xserver-xorg-dev (>= 2:1.9.99.902-2ubuntu1~), libxi-dev, libxrandr-dev, quilt, -Standards-Version: 3.8.4 + libudev-dev, +Standards-Version: 3.9.1 Homepage: http://linuxwacom.sf.net Vcs-Git: git://git.debian.org/users/ron/xf86-input-wacom.git Vcs-Browser: http://git.debian.org/?p=users/ron/xf86-input-wacom.git;a=summary diff -Nru xf86-input-wacom-0.10.11/debian/patches/0001-wcmCommon.c-fix-cw-and-ccw-swap.patch xf86-input-wacom-0.11.0/debian/patches/0001-wcmCommon.c-fix-cw-and-ccw-swap.patch --- xf86-input-wacom-0.10.11/debian/patches/0001-wcmCommon.c-fix-cw-and-ccw-swap.patch 1970-01-01 00:00:00.000000000 +0000 +++ xf86-input-wacom-0.11.0/debian/patches/0001-wcmCommon.c-fix-cw-and-ccw-swap.patch 2011-08-01 04:48:52.000000000 +0000 @@ -0,0 +1,32 @@ +From 03d6d3d64acf838ed6f91743a6baf1e8166d4174 Mon Sep 17 00:00:00 2001 +From: David Foley +Date: Thu, 12 May 2011 14:19:28 -0500 +Subject: [PATCH] wcmCommon.c: fix cw and ccw swap + +Return cw and ccw to expected behavior. + +Tested-by: Buran Ayuthia +Signed-off-by: David Foley +--- + src/wcmCommon.c | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/wcmCommon.c b/src/wcmCommon.c +index 7f8dfb1..c8aa9e4 100644 +--- a/src/wcmCommon.c ++++ b/src/wcmCommon.c +@@ -479,9 +479,9 @@ void wcmRotateAndScaleCoordinates(InputInfoPtr pInfo, int* x, int* y) + axis_x->max_value, axis_x->min_value); + } + +- if (common->wcmRotate == ROTATE_CCW) ++ if (common->wcmRotate == ROTATE_CW) + *y = axis_y->max_value - (*y - axis_y->min_value); +- else if (common->wcmRotate == ROTATE_CW) ++ else if (common->wcmRotate == ROTATE_CCW) + *x = axis_x->max_value - (*x - axis_x->min_value); + else if (common->wcmRotate == ROTATE_HALF) + { +-- +1.7.1 + diff -Nru xf86-input-wacom-0.10.11/debian/patches/100_add_ntrig_ids.patch xf86-input-wacom-0.11.0/debian/patches/100_add_ntrig_ids.patch --- xf86-input-wacom-0.10.11/debian/patches/100_add_ntrig_ids.patch 2011-08-01 04:48:52.000000000 +0000 +++ xf86-input-wacom-0.11.0/debian/patches/100_add_ntrig_ids.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,44 +0,0 @@ -From f14e8a710c17b1c15412911bf910e0d318609225 Mon Sep 17 00:00:00 2001 -From: Rafi Rubin -Date: Wed, 28 Jul 2010 20:04:10 -0400 -Subject: [PATCH] Add ntrig vendor and device codes. - -Signed-off-by: Rafi Rubin -Tested-by: Thomas Spura -Signed-off-by: Peter Hutterer ---- - src/wcmUSB.c | 5 ++++- - src/xf86WacomDefs.h | 1 + - 2 files changed, 5 insertions(+), 1 deletions(-) - -diff --git a/src/wcmUSB.c b/src/wcmUSB.c -index 2bbf1e3..c41a67b 100644 ---- a/src/wcmUSB.c -+++ b/src/wcmUSB.c -@@ -471,7 +471,10 @@ static struct - { WALTOP_VENDOR_ID, 0x500, 2540, 2540, &usbBamboo }, - { WALTOP_VENDOR_ID, 0x501, 2540, 2540, &usbBamboo }, - { WALTOP_VENDOR_ID, 0x502, 5080, 5080, &usbIntuos4 }, -- { WALTOP_VENDOR_ID, 0x503, 5080, 5080, &usbIntuos4 } -+ { WALTOP_VENDOR_ID, 0x503, 5080, 5080, &usbIntuos4 }, -+ -+ /* N-Trig devices */ -+ { NTRIG_VENDOR_ID, 0x01, 1122, 934, &usbTabletPC } - }; - - static Bool usbWcmInit(LocalDevicePtr local, char* id, float *version) -diff --git a/src/xf86WacomDefs.h b/src/xf86WacomDefs.h -index d9baea2..14409b5 100644 ---- a/src/xf86WacomDefs.h -+++ b/src/xf86WacomDefs.h -@@ -30,6 +30,7 @@ - /* vendor IDs on the kernel device */ - #define WACOM_VENDOR_ID 0x056a - #define WALTOP_VENDOR_ID 0x172F -+#define NTRIG_VENDOR_ID 0x1b96 - - #define DEFAULT_SUPPRESS 2 /* default suppress */ - #define MAX_SUPPRESS 100 /* max value of suppress */ --- -1.6.3 - diff -Nru xf86-input-wacom-0.10.11/debian/patches/100_enable_waltop.diff xf86-input-wacom-0.11.0/debian/patches/100_enable_waltop.diff --- xf86-input-wacom-0.10.11/debian/patches/100_enable_waltop.diff 1970-01-01 00:00:00.000000000 +0000 +++ xf86-input-wacom-0.11.0/debian/patches/100_enable_waltop.diff 2011-08-01 04:48:52.000000000 +0000 @@ -0,0 +1,15 @@ +diff --git a/conf/50-wacom.conf b/conf/50-wacom.conf +index dc0bfc0..7a503bc 100644 +--- a/conf/50-wacom.conf ++++ b/conf/50-wacom.conf +@@ -1,9 +1,6 @@ + Section "InputClass" + Identifier "Wacom class" +-# WALTOP needs a patched kernel driver, that isn't in mainline lk yet, +-# so for now just let it fall through and be picked up by evdev instead. +-# MatchProduct "Wacom|WALTOP|WACOM" +- MatchProduct "Wacom|WACOM|Hanwang" ++ MatchProduct "Wacom|WALTOP|WACOM|Hanwang" + MatchDevicePath "/dev/input/event*" + Driver "wacom" + EndSection diff -Nru xf86-input-wacom-0.10.11/debian/patches/101_xsetwacom_ccw.patch xf86-input-wacom-0.11.0/debian/patches/101_xsetwacom_ccw.patch --- xf86-input-wacom-0.10.11/debian/patches/101_xsetwacom_ccw.patch 2011-08-01 04:48:52.000000000 +0000 +++ xf86-input-wacom-0.11.0/debian/patches/101_xsetwacom_ccw.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,11 +0,0 @@ ---- xf86-input-wacom-0.10.11/tools/xsetwacom.c 2011-02-15 05:27:40.000000000 +0100 -+++ xf86-input-wacom-0.10.11/tools/xsetwacom.c 2011-03-02 01:19:10.003005409 +0100 -@@ -1384,7 +1384,7 @@ - - if (strcasecmp(argv[0], "cw") == 0) - rotation = 1; -- else if (strcasecmp(argv[0], "cww") == 0) -+ else if (strcasecmp(argv[0], "ccw") == 0) - rotation = 2; - else if (strcasecmp(argv[0], "half") == 0) - rotation = 3; diff -Nru xf86-input-wacom-0.10.11/debian/patches/102_add_support_for_lenovo_x220.diff xf86-input-wacom-0.11.0/debian/patches/102_add_support_for_lenovo_x220.diff --- xf86-input-wacom-0.10.11/debian/patches/102_add_support_for_lenovo_x220.diff 2011-08-01 04:48:52.000000000 +0000 +++ xf86-input-wacom-0.11.0/debian/patches/102_add_support_for_lenovo_x220.diff 1970-01-01 00:00:00.000000000 +0000 @@ -1,28 +0,0 @@ -From 702a166576c0fec0f5e1140d4a10a335efc4a92a Mon Sep 17 00:00:00 2001 -From: Timo Aaltonen -Date: Fri, 1 Apr 2011 12:37:33 +0300 -Subject: [PATCH v2] Add support for Lenovo tablet ID 0xE6 - -Signed-off-by: Timo Aaltonen -Tested-by: Manoj Iyer ---- - src/wcmUSB.c | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) - -v2: fixed the resolution to match other stylus-enabled tablets. - -diff --git a/src/wcmUSB.c b/src/wcmUSB.c -index 81af067..3f8e059 100644 ---- a/src/wcmUSB.c -+++ b/src/wcmUSB.c -@@ -269,6 +269,7 @@ static struct - { WACOM_VENDOR_ID, 0x9F, 394, 394, &usbTabletPC }, /* CapPlus 0x9F */ - { WACOM_VENDOR_ID, 0xE2, 394, 394, &usbTabletPC }, /* TabletPC 0xE2 */ - { WACOM_VENDOR_ID, 0xE3, 100000, 100000, &usbTabletPC }, /* TabletPC 0xE3 */ -+ { WACOM_VENDOR_ID, 0xE6, 100000, 100000, &usbTabletPC }, /* TabletPC 0xE6 */ - - /* IDs from Waltop's driver, available http://www.waltop.com.tw/download.asp?lv=0&id=2. - Accessed 8 Apr 2010, driver release date 2009/08/11, fork of linuxwacom 0.8.4. --- -1.7.4.1 - diff -Nru xf86-input-wacom-0.10.11/debian/patches/series xf86-input-wacom-0.11.0/debian/patches/series --- xf86-input-wacom-0.10.11/debian/patches/series 2011-08-01 04:48:52.000000000 +0000 +++ xf86-input-wacom-0.11.0/debian/patches/series 2011-08-01 04:48:52.000000000 +0000 @@ -1,3 +1,2 @@ - -101_xsetwacom_ccw.patch -102_add_support_for_lenovo_x220.diff +100_enable_waltop.diff +0001-wcmCommon.c-fix-cw-and-ccw-swap.patch diff -Nru xf86-input-wacom-0.10.11/debian/README.source xf86-input-wacom-0.11.0/debian/README.source --- xf86-input-wacom-0.10.11/debian/README.source 2011-08-01 04:48:52.000000000 +0000 +++ xf86-input-wacom-0.11.0/debian/README.source 2011-08-01 04:48:52.000000000 +0000 @@ -47,27 +47,3 @@ case, it appears directly in the .diff.gz. * Otherwise, the patch is added to debian/patches/ which is managed with quilt as documented in /usr/share/doc/quilt/README.source. - -quilt is actually invoked by the Debian X packaging through a larger -set of scripts called XSFBS. XSFBS brings some other X specific -features such as managing dependencies and conflicts due to the video -and input driver ABIs. -XSFBS itself is maintained in a separate repository at - git://git.debian.org/pkg-xorg/xsfbs.git -and it is pulled inside the other Debian X repositories when needed. - -The XSFBS patching system requires a build dependency on quilt. Also -a dependency on $(STAMP_DIR)/patch has to be added to debian/rules -so that the XSFBS patching occurs before the actual build. So the -very first target of the build (likely the one running autoreconf) -should depend on $(STAMP_DIR)/patch. It should also not depend on -anything so that parallel builds are correctly supported (nothing -should probably run while patching is being done). And finally, the -clean target should depend on the xsfclean target so that patches -are unapplied on clean. - -When the upstream sources contain some DFSG-nonfree files, they are -listed in text files in debian/prune/ in the "debian-*" branch of -the Debian repository. XSFBS' scripts then take care of removing -these listed files during the build so as to generate a modified -DFSG-free .orig.tar.gz tarball. diff -Nru xf86-input-wacom-0.10.11/debian/rules xf86-input-wacom-0.11.0/debian/rules --- xf86-input-wacom-0.10.11/debian/rules 2011-08-01 04:48:52.000000000 +0000 +++ xf86-input-wacom-0.11.0/debian/rules 2011-08-01 04:48:52.000000000 +0000 @@ -1,86 +1,21 @@ #!/usr/bin/make -f -# (ever more vaguely) Derived from: -# Sample debian/rules that uses debhelper, -# GNU copyright 1997 by Joey Hess. -# Copyright Ron Lee 2003, 2004, 2007 -export DH_OPTIONS - -# These are used for cross-compiling and for saving the configure script -# from having to guess our platform (since we know it already) -DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) -DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) - - -objdir = objs -package = xserver-xorg-input-wacom -include debian/xsfbs/xsfbs.mk - -clean: xsfclean - dh_testdir - dh_testroot - $(RM) -r $(objdir) - rm -f *-stamp - dh_clean - -configure: $(STAMP_DIR)/patch - dh_testdir - -$(objdir)/config.status: configure - dh_testdir - mkdir -p $(objdir) - cd $(objdir) && ../configure --host=$(DEB_HOST_GNU_TYPE) \ - --build=$(DEB_BUILD_GNU_TYPE) \ - --prefix=/usr - -build: build-arch - -build-arch: build-arch-stamp -build-arch-stamp: $(objdir)/config.status - dh_testdir - cd $(objdir) && $(MAKE) - touch $@ - -build-indep: - - -install: install-arch - -install-arch: DH_OPTIONS = -p$(package) -install-arch: build-arch -install-arch: - dh_testdir - dh_testroot - dh_clean -k - - cd $(objdir) && $(MAKE) install DESTDIR=$(CURDIR)/debian/$(package) - $(RM) debian/$(package)/usr/lib/xorg/modules/input/*.la +# Install in debian/tmp to retain control through dh_install: +override_dh_auto_install: + dh_auto_install --destdir=debian/tmp + +# Kill *.la files, and forget no-one: +override_dh_install: + find debian/tmp -name '*.la' -delete + dh_install --fail-missing +# Force the order: +override_dh_installudev: dh_installudev --priority=69 -install-indep: - - -binary: binary-arch - -binary-arch: DH_OPTIONS = -a -binary-arch: install-arch serverabi - dh_testdir - dh_testroot - dh_installdocs - dh_installchangelogs - dh_strip - dh_compress - dh_fixperms - dh_installdeb - dh_shlibdeps - dh_gencontrol - dh_md5sums - dh_builddeb - -binary-indep: - - -.PHONY: clean build build-arch build-indep install install-arch install-indep \ - binary binary-arch binary-indep +# That's a plugin, use appropriate warning level: +override_dh_shlibdeps: + dh_shlibdeps -- --warnings=6 +%: + dh $@ --with quilt,autoreconf,xsf --builddirectory=build/ diff -Nru xf86-input-wacom-0.10.11/debian/xserver-xorg-input-wacom.install xf86-input-wacom-0.11.0/debian/xserver-xorg-input-wacom.install --- xf86-input-wacom-0.10.11/debian/xserver-xorg-input-wacom.install 1970-01-01 00:00:00.000000000 +0000 +++ xf86-input-wacom-0.11.0/debian/xserver-xorg-input-wacom.install 2011-08-01 04:48:52.000000000 +0000 @@ -0,0 +1,6 @@ +usr/bin +usr/include +usr/lib/pkgconfig +usr/lib/xorg/modules/input/*.so +usr/share/man +usr/share/X11 diff -Nru xf86-input-wacom-0.10.11/debian/xsfbs/repack.sh xf86-input-wacom-0.11.0/debian/xsfbs/repack.sh --- xf86-input-wacom-0.10.11/debian/xsfbs/repack.sh 2011-08-01 04:48:52.000000000 +0000 +++ xf86-input-wacom-0.11.0/debian/xsfbs/repack.sh 1970-01-01 00:00:00.000000000 +0000 @@ -1,32 +0,0 @@ -#!/bin/sh - -set -e - -if ! [ -d debian/prune ]; then - exit 0 -fi - -if [ "x$1" != x--upstream-version ]; then - exit 1 -fi - -version="$2" -filename="$3" - -if [ -z "$version" ] || ! [ -f "$filename" ]; then - exit 1 -fi - -dir="$(pwd)" -tempdir="$(mktemp -d)" - -cd "$tempdir" -tar xf "$dir/$filename" -cat "$dir"/debian/prune/* | while read file; do rm -f */$file; done - -tar czf "$dir/$filename" * -cd "$dir" -rm -rf "$tempdir" -echo "Done pruning upstream tarball" - -exit 0 diff -Nru xf86-input-wacom-0.10.11/debian/xsfbs/xsfbs.mk xf86-input-wacom-0.11.0/debian/xsfbs/xsfbs.mk --- xf86-input-wacom-0.10.11/debian/xsfbs/xsfbs.mk 2011-08-01 04:48:52.000000000 +0000 +++ xf86-input-wacom-0.11.0/debian/xsfbs/xsfbs.mk 1970-01-01 00:00:00.000000000 +0000 @@ -1,285 +0,0 @@ -#!/usr/bin/make -f - -# Debian X Strike Force Build System (XSFBS): Make portion - -# Copyright 1996 Stephen Early -# Copyright 1997 Mark Eichin -# Copyright 1998-2005, 2007 Branden Robinson -# Copyright 2005 David Nusinow -# -# Licensed under the GNU General Public License, version 2. See the file -# /usr/share/common-licenses/GPL or . - -# Originally by Stephen Early -# Modified by Mark W. Eichin -# Modified by Adam Heath -# Modified by Branden Robinson -# Modified by Fabio Massimo Di Nitto -# Modified by David Nusinow -# Acknowledgements to Manoj Srivastava. - -# Pass $(DH_OPTIONS) into the environment for debhelper's benefit. -export DH_OPTIONS - -# force quilt to not use ~/.quiltrc and to use debian/patches -QUILT = QUILT_PATCHES=debian/patches quilt --quiltrc /dev/null - -# Set up parameters for the upstream build environment. - -# Determine (source) package name from Debian changelog. -SOURCE_NAME:=$(shell dpkg-parsechangelog -ldebian/changelog \ - | grep '^Source:' | awk '{print $$2}') - -# Determine package version from Debian changelog. -SOURCE_VERSION:=$(shell dpkg-parsechangelog -ldebian/changelog \ - | grep '^Version:' | awk '{print $$2}') - -# Determine upstream version number. -UPSTREAM_VERSION:=$(shell echo $(SOURCE_VERSION) | sed 's/-.*//') - -# Determine the source version without the epoch for make-orig-tar-gz -NO_EPOCH_VER:=$(shell echo $(UPSTREAM_VERSION) | sed 's/^.://') - -# Figure out who's building this package. -BUILDER:=$(shell echo $${DEBEMAIL:-$${EMAIL:-$$(echo $$LOGNAME@$$(cat /etc/mailname 2>/dev/null))}}) - -# Find out if this is an official build; an official build has nothing but -# digits, dots, and/or the codename of a release in the Debian part of the -# version number. Anything else indicates an unofficial build. -OFFICIAL_BUILD:=$(shell VERSION=$(SOURCE_VERSION); if ! expr "$$(echo $${VERSION\#\#*-} | sed 's/\(woody\|sarge\|etch\|lenny\)//g')" : ".*[^0-9.].*" >/dev/null 2>&1; then echo yes; fi) - -# Set up parameters for the Debian build environment. - -# Determine our architecture. -BUILD_ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH) -# Work around some old-time dpkg braindamage. -BUILD_ARCH:=$(subst i486,i386,$(BUILD_ARCH)) -# The DEB_HOST_ARCH variable may be set per the Debian cross-compilation policy. -ifdef DEB_HOST_ARCH - ARCH:=$(DEB_HOST_ARCH) -else - # dpkg-cross sets the ARCH environment variable; if set, use it. - ifdef ARCH - ARCH:=$(ARCH) - else - ARCH:=$(BUILD_ARCH) - endif -endif - -# $(STAMP_DIR) houses stamp files for complex targets. -STAMP_DIR:=stampdir - -# $(DEBTREEDIR) is where all install rules are told (via $(DESTDIR)) to place -# their files. -DEBTREEDIR:=$(CURDIR)/debian/tmp - -# All "important" targets have four lines: -# 1) A target name that is invoked by a package-building tool or the user. -# This consists of a dependency on a "$(STAMP_DIR)/"-prefixed counterpart. -# 2) A line delcaring 1) as a phony target (".PHONY:"). -# 3) A "$(STAMP_DIR)/"-prefixed target which does the actual work, and may -# depend on other targets. -# 4) A line declaring 3) as a member of the $(stampdir_targets) variable; the -# "$(STAMP_DIR)/" prefix is omitted. -# -# This indirection is needed so that the "stamp" files that signify when a rule -# is done can be located in a separate "stampdir". Recall that make has no way -# to know when a goal has been met for a phony target (like "build" or -# "install"). -# -# At the end of each "$(STAMP_DIR)/" target, be sure to run the command ">$@" -# so that the target will not be run again. Removing the file will make Make -# run the target over. - -# All phony targets should be declared as dependencies of .PHONY, even if they -# do not have "($STAMP_DIR)/"-prefixed counterparts. - -# Define a harmless default rule to keep things from going nuts by accident. -.PHONY: default -default: - -# Set up the $(STAMP_DIR) directory. -.PHONY: stampdir -stampdir_targets+=stampdir -stampdir: $(STAMP_DIR)/stampdir -$(STAMP_DIR)/stampdir: - mkdir $(STAMP_DIR) - >$@ - -# Set up the package build directory as quilt expects to find it. -.PHONY: prepare -stampdir_targets+=prepare -prepare: $(STAMP_DIR)/prepare -$(STAMP_DIR)/prepare: $(STAMP_DIR)/logdir $(STAMP_DIR)/genscripts - >$@ - -.PHONY: logdir -stampdir_targets+=logdir -logdir: $(STAMP_DIR)/logdir -$(STAMP_DIR)/logdir: $(STAMP_DIR)/stampdir - mkdir -p $(STAMP_DIR)/log - >$@ - -# Apply all patches to the upstream source. -.PHONY: patch -stampdir_targets+=patch -patch: $(STAMP_DIR)/patch -$(STAMP_DIR)/patch: $(STAMP_DIR)/prepare - if ! [ `which quilt` ]; then \ - echo "Couldn't find quilt. Please install it or add it to the build-depends for this package."; \ - exit 1; \ - fi; \ - if $(QUILT) next >/dev/null 2>&1; then \ - echo -n "Applying patches..."; \ - if $(QUILT) push -a -v >$(STAMP_DIR)/log/patch 2>&1; then \ - cat $(STAMP_DIR)/log/patch; \ - echo "successful."; \ - else \ - cat $(STAMP_DIR)/log/patch; \ - echo "failed! (check $(STAMP_DIR)/log/patch for details)"; \ - exit 1; \ - fi; \ - else \ - echo "No patches to apply"; \ - fi; \ - >$@ - -# Revert all patches to the upstream source. -.PHONY: unpatch -unpatch: $(STAMP_DIR)/logdir - rm -f $(STAMP_DIR)/patch - @echo -n "Unapplying patches..."; \ - if $(QUILT) applied >/dev/null 2>/dev/null; then \ - if $(QUILT) pop -a -v >$(STAMP_DIR)/log/unpatch 2>&1; then \ - cat $(STAMP_DIR)/log/unpatch; \ - echo "successful."; \ - else \ - cat $(STAMP_DIR)/log/unpatch; \ - echo "failed! (check $(STAMP_DIR)/log/unpatch for details)"; \ - exit 1; \ - fi; \ - else \ - echo "nothing to do."; \ - fi - -# Clean the generated maintainer scripts. -.PHONY: cleanscripts -cleanscripts: - rm -f $(STAMP_DIR)/genscripts - rm -f debian/*.config \ - debian/*.postinst \ - debian/*.postrm \ - debian/*.preinst \ - debian/*.prerm - -# Clean the package build tree. -.PHONY: xsfclean -xsfclean: cleanscripts unpatch - dh_testdir - rm -rf .pc - rm -rf $(STAMP_DIR) - dh_clean - -# Remove files from the upstream source tree that we don't need, or which have -# licensing problems. It must be run before creating the .orig.tar.gz. -# -# Note: This rule is for Debian package maintainers' convenience, and is not -# needed for conventional build scenarios. -.PHONY: prune-upstream-tree -prune-upstream-tree: - # Ensure we're in the correct directory. - dh_testdir - grep -rvh '^#' debian/prune/ | xargs --no-run-if-empty rm -rf - -# Verify that there are no offsets or fuzz in the patches we apply. -# -# Note: This rule is for Debian package maintainers' convenience, and is not -# needed for conventional build scenarios. -.PHONY: patch-audit -patch-audit: prepare unpatch - @echo -n "Auditing patches..."; \ - >$(STAMP_DIR)/log/patch; \ - FUZZY=; \ - while [ -n "$$($(QUILT) next)" ]; do \ - RESULT=$$($(QUILT) push -v | tee -a $(STAMP_DIR)/log/patch | grep ^Hunk | sed 's/^Hunk.*\(succeeded\|FAILED\).*/\1/');\ - case "$$RESULT" in \ - succeeded) \ - echo "fuzzy patch: $$($(QUILT) top)" \ - | tee -a $(STAMP_DIR)/log/$$($(QUILT) top); \ - FUZZY=yes; \ - ;; \ - FAILED) \ - echo "broken patch: $$($(QUILT) next)" \ - | tee -a $(STAMP_DIR)/log/$$($(QUILT) next); \ - exit 1; \ - ;; \ - esac; \ - done; \ - if [ -n "$$FUZZY" ]; then \ - echo "there were fuzzy patches; please fix."; \ - exit 1; \ - else \ - echo "done."; \ - fi - -# Generate the maintainer scripts. -.PHONY: genscripts -stampdir_targets+=genscripts -genscripts: $(STAMP_DIR)/genscripts -$(STAMP_DIR)/genscripts: $(STAMP_DIR)/stampdir - for FILE in debian/*.config.in \ - debian/*.postinst.in \ - debian/*.postrm.in \ - debian/*.preinst.in \ - debian/*.prerm.in; do \ - if [ -e "$$FILE" ]; then \ - MAINTSCRIPT=$$(echo $$FILE | sed 's/.in$$//'); \ - sed -n '1,/^#INCLUDE_SHELL_LIB#$$/p' <$$FILE \ - | sed -e '/^#INCLUDE_SHELL_LIB#$$/d' >$$MAINTSCRIPT.tmp; \ - cat debian/xsfbs/xsfbs.sh >>$$MAINTSCRIPT.tmp; \ - sed -n '/^#INCLUDE_SHELL_LIB#$$/,$$p' <$$FILE \ - | sed -e '/^#INCLUDE_SHELL_LIB#$$/d' >>$$MAINTSCRIPT.tmp; \ - sed -e 's/@SOURCE_VERSION@/$(SOURCE_VERSION)/' \ - -e 's/@OFFICIAL_BUILD@/$(OFFICIAL_BUILD)/' \ - <$$MAINTSCRIPT.tmp >$$MAINTSCRIPT; \ - rm $$MAINTSCRIPT.tmp; \ - fi; \ - done - # Validate syntax of generated shell scripts. - #sh debian/scripts/validate-posix-sh debian/*.config \ - # debian/*.postinst \ - # debian/*.postrm \ - # debian/*.preinst \ - # debian/*.prerm - >$@ - -# Compute dependencies for drivers -# -VIDEODEP = $(shell cat /usr/share/xserver-xorg/videodrvdep 2>/dev/null) -INPUTDEP = $(shell cat /usr/share/xserver-xorg/xinputdep 2>/dev/null) - -# these two can be removed post-squeeze -VIDEOABI = $(shell cat /usr/share/xserver-xorg/videoabiver 2>/dev/null) -INPUTABI = $(shell cat /usr/share/xserver-xorg/inputabiver 2>/dev/null) -VIDDRIVER_PROVIDES = xserver-xorg-video-$(VIDEOABI), xorg-driver-video -INPDRIVER_PROVIDES = xserver-xorg-input-$(INPUTABI), xorg-driver-input - -ifeq ($(PACKAGE),) -PACKAGE=$(shell awk '/^Package:/ { print $$2; exit }' < debian/control) -endif - -.PHONY: serverabi -serverabi: install -ifeq ($(VIDEODEP),) - @echo 'error: xserver-xorg-dev >= 1.7.6.901 needs to be installed' - @exit 1 -else - echo "xviddriver:Depends=$(VIDEODEP)" >> debian/$(PACKAGE).substvars - echo "xinpdriver:Depends=$(INPUTDEP)" >> debian/$(PACKAGE).substvars - # the following is there for compatibility... - echo "xviddriver:Provides=$(VIDDRIVER_PROVIDES)" >> debian/$(PACKAGE).substvars - echo "xinpdriver:Provides=$(INPDRIVER_PROVIDES)" >> debian/$(PACKAGE).substvars - echo "xserver:Depends=$(VIDEODEP), $(INPUTDEP)" >> debian/$(PACKAGE).substvars -endif - -# vim:set noet ai sts=8 sw=8 tw=0: diff -Nru xf86-input-wacom-0.10.11/debian/xsfbs/xsfbs.sh xf86-input-wacom-0.11.0/debian/xsfbs/xsfbs.sh --- xf86-input-wacom-0.10.11/debian/xsfbs/xsfbs.sh 2011-08-01 04:48:52.000000000 +0000 +++ xf86-input-wacom-0.11.0/debian/xsfbs/xsfbs.sh 1970-01-01 00:00:00.000000000 +0000 @@ -1,622 +0,0 @@ -# This is the X Strike Force shell library for X Window System package -# maintainer scripts. It serves to define shell functions commonly used by -# such packages, and performs some error checking necessary for proper operation -# of those functions. By itself, it does not "do" much; the maintainer scripts -# invoke the functions defined here to accomplish package installation and -# removal tasks. - -# If you are reading this within a Debian package maintainer script (e.g., -# /var/lib/dpkg/info/PACKAGE.{config,preinst,postinst,prerm,postrm}), you can -# skip past this library by scanning forward in this file to the string -# "GOBSTOPPER". - -SOURCE_VERSION=@SOURCE_VERSION@ -OFFICIAL_BUILD=@OFFICIAL_BUILD@ - -# Use special abnormal exit codes so that problems with this library are more -# easily tracked down. -SHELL_LIB_INTERNAL_ERROR=86 -SHELL_LIB_THROWN_ERROR=74 -SHELL_LIB_USAGE_ERROR=99 - -# old -> new variable names -if [ -z "$DEBUG_XORG_PACKAGE" ] && [ -n "$DEBUG_XFREE86_PACKAGE" ]; then - DEBUG_XORG_PACKAGE="$DEBUG_XFREE86_PACKAGE" -fi -if [ -z "$DEBUG_XORG_DEBCONF" ] && [ -n "$DEBUG_XFREE86_DEBCONF" ]; then - DEBUG_XORG_DEBCONF="$DEBUG_XFREE86_DEBCONF" -fi - -# initial sanity checks -if [ -z "$THIS_PACKAGE" ]; then - cat >&2 < on the World Wide Web for -instructions, read the file /usr/share/doc/debian/bug-reporting.txt from the -"doc-debian" package, or install the "reportbug" package and use the command of -the same name to file a report against version $SOURCE_VERSION of this package. -EOF - exit $SHELL_LIB_USAGE_ERROR -fi - -if [ -z "$THIS_SCRIPT" ]; then - cat >&2 < on the World Wide Web for -instructions, read the file /usr/share/doc/debian/bug-reporting.txt from the -"doc-debian" package, or install the "reportbug" package and use the command of -the same name to file a report against version $SOURCE_VERSION of the -"$THIS_PACKAGE" package. -EOF - exit $SHELL_LIB_USAGE_ERROR -fi - -if [ "$1" = "reconfigure" ] || [ -n "$DEBCONF_RECONFIGURE" ]; then - RECONFIGURE="true" -else - RECONFIGURE= -fi - -if ([ "$1" = "install" ] || [ "$1" = "configure" ]) && [ -z "$2" ]; then - FIRSTINST="yes" -fi - -if [ -z "$RECONFIGURE" ] && [ -z "$FIRSTINST" ]; then - UPGRADE="yes" -fi - -trap "message;\ - message \"Received signal. Aborting $THIS_PACKAGE package $THIS_SCRIPT script.\";\ - message;\ - exit 1" HUP INT QUIT TERM - -reject_nondigits () { - # syntax: reject_nondigits [ operand ... ] - # - # scan operands (typically shell variables whose values cannot be trusted) for - # characters other than decimal digits and barf if any are found - while [ -n "$1" ]; do - # does the operand contain anything but digits? - if ! expr "$1" : "[[:digit:]]\+$" > /dev/null 2>&1; then - # can't use die(), because it wraps message() which wraps this function - echo "$THIS_PACKAGE $THIS_SCRIPT error: reject_nondigits() encountered" \ - "possibly malicious garbage \"$1\"" >&2 - exit $SHELL_LIB_THROWN_ERROR - fi - shift - done -} - -reject_unlikely_path_chars () { - # syntax: reject_unlikely_path_chars [ operand ... ] - # - # scan operands (typically shell variables whose values cannot be trusted) for - # characters unlikely to be seen in a path and which the shell might - # interpret and barf if any are found - while [ -n "$1" ]; do - # does the operand contain any funny characters? - if expr "$1" : '.*[!$&()*;<>?|].*' > /dev/null 2>&1; then - # can't use die(), because I want to avoid forward references - echo "$THIS_PACKAGE $THIS_SCRIPT error: reject_unlikely_path_chars()" \ - "encountered possibly malicious garbage \"$1\"" >&2 - exit $SHELL_LIB_THROWN_ERROR - fi - shift - done -} - -# Query the terminal to establish a default number of columns to use for -# displaying messages to the user. This is used only as a fallback in the -# event the COLUMNS variable is not set. ($COLUMNS can react to SIGWINCH while -# the script is running, and this cannot, only being calculated once.) -DEFCOLUMNS=$(stty size 2> /dev/null | awk '{print $2}') || true -if ! expr "$DEFCOLUMNS" : "[[:digit:]]\+$" > /dev/null 2>&1; then - DEFCOLUMNS=80 -fi - -message () { - # pretty-print messages of arbitrary length - reject_nondigits "$COLUMNS" - echo "$*" | fmt -t -w ${COLUMNS:-$DEFCOLUMNS} >&2 -} - -observe () { - # syntax: observe message ... - # - # issue observational message suitable for logging someday when support for - # it exists in dpkg - if [ -n "$DEBUG_XORG_PACKAGE" ]; then - message "$THIS_PACKAGE $THIS_SCRIPT note: $*" - fi -} - -warn () { - # syntax: warn message ... - # - # issue warning message suitable for logging someday when support for - # it exists in dpkg; also send to standard error - message "$THIS_PACKAGE $THIS_SCRIPT warning: $*" -} - -die () { - # syntax: die message ... - # - # exit script with error message - message "$THIS_PACKAGE $THIS_SCRIPT error: $*" - exit $SHELL_LIB_THROWN_ERROR -} - -internal_error () { - # exit script with error; essentially a "THIS SHOULD NEVER HAPPEN" message - message "internal error: $*" - if [ -n "$OFFICIAL_BUILD" ]; then - message "Please report a bug in the $THIS_SCRIPT script of the" \ - "$THIS_PACKAGE package, version $SOURCE_VERSION to the Debian Bug" \ - "Tracking System. Include all messages above that mention the" \ - "$THIS_PACKAGE package. Visit " \ - " on the World Wide Web for" \ - "instructions, read the file" \ - "/usr/share/doc/debian/bug-reporting.txt from the doc-debian" \ - "package, or install the reportbug package and use the command of" \ - "the same name to file a report." - fi - exit $SHELL_LIB_INTERNAL_ERROR -} - -usage_error () { - message "usage error: $*" - message "Please report a bug in the $THIS_SCRIPT script of the" \ - "$THIS_PACKAGE package, version $SOURCE_VERSION to the Debian Bug" \ - "Tracking System. Include all messages above that mention the" \ - "$THIS_PACKAGE package. Visit " \ - " on the World Wide Web for" \ - "instructions, read the file" \ - "/usr/share/doc/debian/bug-reporting.txt from the doc-debian" \ - "package, or install the reportbug package and use the command of" \ - "the same name to file a report." - exit $SHELL_LIB_USAGE_ERROR -} - -font_update () { - # run $UPDATECMDS in $FONTDIRS - - local dir cmd shortcmd x_font_dir_prefix - - x_font_dir_prefix="/usr/share/fonts/X11" - - if [ -z "$UPDATECMDS" ]; then - usage_error "font_update() called but \$UPDATECMDS not set" - fi - if [ -z "$FONTDIRS" ]; then - usage_error "font_update() called but \$FONTDIRS not set" - fi - - reject_unlikely_path_chars "$UPDATECMDS" - reject_unlikely_path_chars "$FONTDIRS" - - for dir in $FONTDIRS; do - if [ -d "$x_font_dir_prefix/$dir" ]; then - for cmd in $UPDATECMDS; do - if which "$cmd" > /dev/null 2>&1; then - shortcmd=${cmd##*/} - observe "running $shortcmd in $dir font directory" - cmd_opts= - if [ "$shortcmd" = "update-fonts-alias" ]; then - cmd_opts=--x11r7-layout - fi - if [ "$shortcmd" = "update-fonts-dir" ]; then - cmd_opts=--x11r7-layout - fi - if [ "$shortcmd" = "update-fonts-scale" ]; then - cmd_opts=--x11r7-layout - fi - $cmd $cmd_opts $dir || warn "$cmd $cmd_opts $dir" \ - "failed; font directory data may not" \ - "be up to date" - else - warn "$cmd not found; not updating corresponding $dir font" \ - "directory data" - fi - done - else - warn "$dir is not a directory; not updating font directory data" - fi - done -} - -remove_conffile_prepare () { - # syntax: remove_conffile_prepare filename official_md5sum ... - # - # Check a conffile "filename" against a list of canonical MD5 checksums. - # If the file's current MD5 checksum matches one of the "official_md5sum" - # operands provided, then prepare the conffile for removal from the system. - # We defer actual deletion until the package is configured so that we can - # roll this operation back if package installation fails. - # - # Call this function from a preinst script in the event $1 is "upgrade" or - # "install" and verify $2 to ensure the package is being upgraded from a - # version (or installed over a version removed-but-not-purged) prior to the - # one in which the conffile was obsoleted. - - local conffile current_checksum - - # validate arguments - if [ $# -lt 2 ]; then - usage_error "remove_conffile_prepare() called with wrong number of" \ - "arguments; expected at least 2, got $#" - exit $SHELL_LIB_USAGE_ERROR - fi - - conffile="$1" - shift - - # does the conffile even exist? - if [ -e "$conffile" ]; then - # calculate its checksum - current_checksum=$(md5sum < "$conffile" | sed 's/[[:space:]].*//') - # compare it to each supplied checksum - while [ -n "$1" ]; do - if [ "$current_checksum" = "$1" ]; then - # we found a match; move the confffile and stop looking - observe "preparing obsolete conffile $conffile for removal" - mv "$conffile" "$conffile.$THIS_PACKAGE-tmp" - break - fi - shift - done - fi -} - -remove_conffile_lookup () { - # syntax: remove_conffile_lookup package filename - # - # Lookup the md5sum of a conffile in dpkg's database, and prepare for removal - # if it matches the actual file's md5sum. - # - # Call this function when you would call remove_conffile_prepare but only - # want to check against dpkg's status database instead of known checksums. - - local package conffile old_md5sum - - # validate arguments - if [ $# -ne 2 ]; then - usage_error "remove_conffile_lookup() called with wrong number of" \ - "arguments; expected 1, got $#" - exit $SHELL_LIB_USAGE_ERROR - fi - - package="$1" - conffile="$2" - - if ! [ -e "$conffile" ]; then - return - fi - old_md5sum="$(dpkg-query -W -f='${Conffiles}' "$package" | \ - awk '{ if (match($0, "^ '"$conffile"' ")) print $2}')" - if [ -n "$old_md5sum" ]; then - remove_conffile_prepare "$conffile" "$old_md5sum" - fi -} - -remove_conffile_commit () { - # syntax: remove_conffile_commit filename - # - # Complete the removal of a conffile "filename" that has become obsolete. - # - # Call this function from a postinst script after having used - # remove_conffile_prepare() in the preinst. - - local conffile - - # validate arguments - if [ $# -ne 1 ]; then - usage_error "remove_conffile_commit() called with wrong number of" \ - "arguments; expected 1, got $#" - exit $SHELL_LIB_USAGE_ERROR - fi - - conffile="$1" - - # if the temporary file created by remove_conffile_prepare() exists, remove it - if [ -e "$conffile.$THIS_PACKAGE-tmp" ]; then - observe "committing removal of obsolete conffile $conffile" - rm "$conffile.$THIS_PACKAGE-tmp" - fi -} - -remove_conffile_rollback () { - # syntax: remove_conffile_rollback filename - # - # Roll back the removal of a conffile "filename". - # - # Call this function from a postrm script in the event $1 is "abort-upgrade" - # or "abort-install" is after having used remove_conffile_prepare() in the - # preinst. - - local conffile - - # validate arguments - if [ $# -ne 1 ]; then - usage_error "remove_conffile_rollback() called with wrong number of" \ - "arguments; expected 1, got $#" - exit $SHELL_LIB_USAGE_ERROR - fi - - conffile="$1" - - # if the temporary file created by remove_conffile_prepare() exists, move it - # back - if [ -e "$conffile.$THIS_PACKAGE-tmp" ]; then - observe "rolling back removal of obsolete conffile $conffile" - mv "$conffile.$THIS_PACKAGE-tmp" "$conffile" - fi -} - -replace_conffile_with_symlink_prepare () { - # syntax: replace_conffile_with_symlink_prepare oldfilename newfilename \ - # official_md5sum ... - # - # Check a conffile "oldfilename" against a list of canonical MD5 checksums. - # If the file's current MD5 checksum matches one of the "official_md5sum" - # operands provided, then prepare the conffile for removal from the system. - # We defer actual deletion until the package is configured so that we can - # roll this operation back if package installation fails. Otherwise copy it - # to newfilename and let dpkg handle it through conffiles mechanism. - # - # Call this function from a preinst script in the event $1 is "upgrade" or - # "install" and verify $2 to ensure the package is being upgraded from a - # version (or installed over a version removed-but-not-purged) prior to the - # one in which the conffile was obsoleted. - - local conffile current_checksum - - # validate arguments - if [ $# -lt 3 ]; then - usage_error "replace_conffile_with_symlink_prepare() called with wrong" \ - " number of arguments; expected at least 3, got $#" - exit $SHELL_LIB_USAGE_ERROR - fi - - oldconffile="$1" - shift - newconffile="$1" - shift - - remove_conffile_prepare "$_oldconffile" "$@" - # If $oldconffile still exists, then md5sums didn't match. - # Copy it to new one. - if [ -f "$oldconffile" ]; then - cp "$oldconffile" "$newconffile" - fi - -} - -replace_conffile_with_symlink_commit () { - # syntax: replace_conffile_with_symlink_commit oldfilename - # - # Complete the removal of a conffile "oldfilename" that has been - # replaced by a symlink. - # - # Call this function from a postinst script after having used - # replace_conffile_with_symlink_prepare() in the preinst. - - local conffile - - # validate arguments - if [ $# -ne 1 ]; then - usage_error "replace_conffile_with_symlink_commit() called with wrong" \ - "number of arguments; expected 1, got $#" - exit $SHELL_LIB_USAGE_ERROR - fi - - conffile="$1" - - remove_conffile_commit "$conffile" -} - -replace_conffile_with_symlink_rollback () { - # syntax: replace_conffile_with_symlink_rollback oldfilename newfilename - # - # Roll back the replacing of a conffile "oldfilename" with symlink to - # "newfilename". - # - # Call this function from a postrm script in the event $1 is "abort-upgrade" - # or "abort-install" and verify $2 to ensure the package failed to upgrade - # from a version (or install over a version removed-but-not-purged) prior - # to the one in which the conffile was obsoleted. - # You should have used replace_conffile_with_symlink_prepare() in the - # preinst. - - local conffile - - # validate arguments - if [ $# -ne 2 ]; then - usage_error "replace_conffile_with_symlink_rollback() called with wrong" \ - "number of arguments; expected 2, got $#" - exit $SHELL_LIB_USAGE_ERROR - fi - - oldconffile="$1" - newconffile="$2" - - remove_conffile_rollback "$_oldconffile" - if [ -f "$newconffile" ]; then - rm "$newconffile" - fi -} - -run () { - # syntax: run command [ argument ... ] - # - # Run specified command with optional arguments and report its exit status. - # Useful for commands whose exit status may be nonzero, but still acceptable, - # or commands whose failure is not fatal to us. - # - # NOTE: Do *not* use this function with db_get or db_metaget commands; in - # those cases the return value of the debconf command *must* be checked - # before the string returned by debconf is used for anything. - - local retval - - # validate arguments - if [ $# -lt 1 ]; then - usage_error "run() called with wrong number of arguments; expected at" \ - "least 1, got $#" - exit $SHELL_LIB_USAGE_ERROR - fi - - "$@" || retval=$? - - if [ ${retval:-0} -ne 0 ]; then - observe "command \"$*\" exited with status $retval" - fi -} - -make_symlink_sane () { - # syntax: make_symlink_sane symlink target - # - # Ensure that the symbolic link symlink exists, and points to target. - # - # If symlink does not exist, create it and point it at target. - # - # If symlink exists but is not a symbolic link, back it up. - # - # If symlink exists, is a symbolic link, but points to the wrong location, fix - # it. - # - # If symlink exists, is a symbolic link, and already points to target, do - # nothing. - # - # This function wouldn't be needed if ln had an -I, --idempotent option. - - # Validate arguments. - if [ $# -ne 2 ]; then - usage_error "make_symlink_sane() called with wrong number of arguments;" \ - "expected 2, got $#" - exit $SHELL_LIB_USAGE_ERROR - fi - - # We could just use the positional parameters as-is, but that makes things - # harder to follow. - local symlink target - - symlink="$1" - target="$2" - - if [ -L "$symlink" ] && [ "$(readlink "$symlink")" = "$target" ]; then - observe "link from $symlink to $target already exists" - else - observe "creating symbolic link from $symlink to $target" - mkdir -p "${target%/*}" "${symlink%/*}" - ln -s -b -S ".dpkg-old" "$target" "$symlink" - fi -} - -migrate_dir_to_symlink () { - # syntax: migrate_dir_to_symlink old_location new_location - # - # Per Debian Policy section 6.5.4, "A directory will never be replaced by a - # symbolic link to a directory or vice versa; instead, the existing state - # (symlink or not) will be left alone and dpkg will follow the symlink if - # there is one." - # - # We have to do it ourselves. - # - # This function moves the contents of old_location, a directory, into - # new_location, a directory, then makes old_location a symbolic link to - # new_location. - # - # old_location need not exist, but if it does, it must be a directory (or a - # symlink to a directory). If it is not, it is backed up. If new_location - # exists already and is not a directory, it is backed up. - # - # This function should be called from a package's preinst so that other - # packages unpacked after this one --- but before this package's postinst runs - # --- are unpacked into new_location even if their payloads contain - # old_location filespecs. - - # Validate arguments. - if [ $# -ne 2 ]; then - usage_error "migrate_dir_to_symlink() called with wrong number of" - "arguments; expected 2, got $#" - exit $SHELL_LIB_USAGE_ERROR - fi - - # We could just use the positional parameters as-is, but that makes things - # harder to follow. - local new old - - old="$1" - new="$2" - - # Is old location a symlink? - if [ -L "$old" ]; then - # Does it already point to new location? - if [ "$(readlink "$old")" = "$new" ]; then - # Nothing to do; migration has already been done. - observe "migration of $old to $new already done" - return 0 - else - # Back it up. - warn "backing up symbolic link $old as $old.dpkg-old" - mv -b "$old" "$old.dpkg-old" - fi - fi - - # Does old location exist, but is not a directory? - if [ -e "$old" ] && ! [ -d "$old" ]; then - # Back it up. - warn "backing up non-directory $old as $old.dpkg-old" - mv -b "$old" "$old.dpkg-old" - fi - - observe "migrating $old to $new" - - # Is new location a symlink? - if [ -L "$new" ]; then - # Does it point the wrong way, i.e., back to where we're migrating from? - if [ "$(readlink "$new")" = "$old" ]; then - # Get rid of it. - observe "removing symbolic link $new which points to $old" - rm "$new" - else - # Back it up. - warn "backing up symbolic link $new as $new.dpkg-old" - mv -b "$new" "$new.dpkg-old" - fi - fi - - # Does new location exist, but is not a directory? - if [ -e "$new" ] && ! [ -d "$new" ]; then - warn "backing up non-directory $new as $new.dpkg-old" - mv -b "$new" "$new.dpkg-old" - fi - - # Create new directory if it does not yet exist. - if ! [ -e "$new" ]; then - observe "creating $new" - mkdir -p "$new" - fi - - # Copy files in old location to new location. Back up any filenames that - # already exist in the new location with the extension ".dpkg-old". - observe "copying files from $old to $new" - if ! (cd "$old" && cp -a -b -S ".dpkg-old" . "$new"); then - die "error(s) encountered while copying files from $old to $new" - fi - - # Remove files at old location. - observe "removing $old" - rm -r "$old" - - # Create symlink from old location to new location. - make_symlink_sane "$old" "$new" -} - -# vim:set ai et sw=2 ts=2 tw=80: - -# GOBSTOPPER: The X Strike Force shell library ends here. diff -Nru xf86-input-wacom-0.10.11/doc/doxygen.conf.in xf86-input-wacom-0.11.0/doc/doxygen.conf.in --- xf86-input-wacom-0.10.11/doc/doxygen.conf.in 1970-01-01 00:00:00.000000000 +0000 +++ xf86-input-wacom-0.11.0/doc/doxygen.conf.in 2011-04-07 05:22:34.000000000 +0000 @@ -0,0 +1,1551 @@ +# Doxyfile 1.6.2 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project +# +# All text after a hash (#) is considered a comment and will be ignored +# The format is: +# TAG = value [value, ...] +# For lists items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (" ") + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the config file +# that follow. The default is UTF-8 which is also the encoding used for all +# text before the first occurrence of this tag. Doxygen uses libiconv (or the +# iconv built into libc) for the transcoding. See +# http://www.gnu.org/software/libiconv for the list of possible encodings. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded +# by quotes) that should identify the project. + +PROJECT_NAME = "X.Org Wacom Input Driver" + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. +# This could be handy for archiving the generated documentation or +# if some version control system is used. + +PROJECT_NUMBER = "@PACKAGE_VERSION@" + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) +# base path where the generated documentation will be put. +# If a relative path is entered, it will be relative to the location +# where doxygen was started. If left blank the current directory will be used. + +OUTPUT_DIRECTORY = @abs_builddir@ + +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create +# 4096 sub-directories (in 2 levels) under the output directory of each output +# format and will distribute the generated files over these directories. +# Enabling this option can be useful when feeding doxygen a huge amount of +# source files, where putting all generated files in the same directory would +# otherwise cause performance problems for the file system. + +CREATE_SUBDIRS = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# The default language is English, other supported languages are: +# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, +# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, +# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English +# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, +# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak, +# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. + +OUTPUT_LANGUAGE = English + +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will +# include brief member descriptions after the members that are listed in +# the file and class documentation (similar to JavaDoc). +# Set to NO to disable this. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend +# the brief description of a member or function before the detailed description. +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator +# that is used to form the text in various listings. Each string +# in this list, if found as the leading text of the brief description, will be +# stripped from the text and the result after processing the whole list, is +# used as the annotated text. Otherwise, the brief description is used as-is. +# If left blank, the following values are used ("$name" is automatically +# replaced with the name of the entity): "The $name class" "The $name widget" +# "The $name file" "is" "provides" "specifies" "contains" +# "represents" "a" "an" "the" + +ABBREVIATE_BRIEF = + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# Doxygen will generate a detailed section even if there is only a brief +# description. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full +# path before files name in the file list and in the header files. If set +# to NO the shortest path that makes the file name unique will be used. + +FULL_PATH_NAMES = NO + +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag +# can be used to strip a user-defined part of the path. Stripping is +# only done if one of the specified strings matches the left-hand part of +# the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the +# path to strip. + +STRIP_FROM_PATH = + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of +# the path mentioned in the documentation of a class, which tells +# the reader which header file to include in order to use a class. +# If left blank only the name of the header file containing the class +# definition is used. Otherwise one should specify the include paths that +# are normally passed to the compiler using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter +# (but less readable) file names. This can be useful is your file systems +# doesn't support long names like on DOS, Mac, or CD-ROM. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen +# will interpret the first line (until the first dot) of a JavaDoc-style +# comment as the brief description. If set to NO, the JavaDoc +# comments will behave just like regular Qt-style comments +# (thus requiring an explicit @brief command for a brief description.) + +JAVADOC_AUTOBRIEF = NO + +# If the QT_AUTOBRIEF tag is set to YES then Doxygen will +# interpret the first line (until the first dot) of a Qt-style +# comment as the brief description. If set to NO, the comments +# will behave just like regular Qt-style comments (thus requiring +# an explicit \brief command for a brief description.) + +QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen +# treat a multi-line C++ special comment block (i.e. a block of //! or /// +# comments) as a brief description. This used to be the default behaviour. +# The new default is to treat a multi-line C++ comment block as a detailed +# description. Set this tag to YES if you prefer the old behaviour instead. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented +# member inherits the documentation from any documented member that it +# re-implements. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce +# a new page for each member. If set to NO, the documentation of a member will +# be part of the file/class/namespace that contains it. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. +# Doxygen uses this value to replace tabs by spaces in code fragments. + +TAB_SIZE = 8 + +# This tag can be used to specify a number of aliases that acts +# as commands in the documentation. An alias has the form "name=value". +# For example adding "sideeffect=\par Side Effects:\n" will allow you to +# put the command \sideeffect (or @sideeffect) in the documentation, which +# will result in a user-defined paragraph with heading "Side Effects:". +# You can put \n's in the value part of an alias to insert newlines. + +ALIASES = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C +# sources only. Doxygen will then generate output that is more tailored for C. +# For instance, some of the names that are used will be different. The list +# of all members will be omitted, etc. + +OPTIMIZE_OUTPUT_FOR_C = YES + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java +# sources only. Doxygen will then generate output that is more tailored for +# Java. For instance, namespaces will be presented as packages, qualified +# scopes will look different, etc. + +OPTIMIZE_OUTPUT_JAVA = NO + +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources only. Doxygen will then generate output that is more tailored for +# Fortran. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for +# VHDL. + +OPTIMIZE_OUTPUT_VHDL = NO + +# Doxygen selects the parser to use depending on the extension of the files it parses. +# With this tag you can assign which parser to use for a given extension. +# Doxygen has a built-in mapping, but you can override or extend it using this tag. +# The format is ext=language, where ext is a file extension, and language is one of +# the parsers supported by doxygen: IDL, Java, Javascript, C#, C, C++, D, PHP, +# Objective-C, Python, Fortran, VHDL, C, C++. For instance to make doxygen treat +# .inc files as Fortran files (default is PHP), and .f files as C (default is Fortran), +# use: inc=Fortran f=C. Note that for custom extensions you also need to set FILE_PATTERNS otherwise the files are not read by doxygen. + +EXTENSION_MAPPING = + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should +# set this tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. +# func(std::string) {}). This also make the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. + +BUILTIN_STL_SUPPORT = NO + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. +# Doxygen will parse them like normal C++ but will assume all classes use public +# instead of private inheritance when no explicit protection keyword is present. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate getter +# and setter methods for a property. Setting this option to YES (the default) +# will make doxygen to replace the get and set methods by a property in the +# documentation. This will only work if the methods are indeed getting or +# setting a simple type. If this is not the case, or you want to show the +# methods anyway, you should set this option to NO. + +IDL_PROPERTY_SUPPORT = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. + +DISTRIBUTE_GROUP_DOC = NO + +# Set the SUBGROUPING tag to YES (the default) to allow class member groups of +# the same type (for instance a group of public functions) to be put as a +# subgroup of that type (e.g. under the Public Functions section). Set it to +# NO to prevent subgrouping. Alternatively, this can be done per class using +# the \nosubgrouping command. + +SUBGROUPING = YES + +# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum +# is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically +# be useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. + +TYPEDEF_HIDES_STRUCT = NO + +# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to +# determine which symbols to keep in memory and which to flush to disk. +# When the cache is full, less often used symbols will be written to disk. +# For small to medium size projects (<1000 input files) the default value is +# probably good enough. For larger projects a too small cache size can cause +# doxygen to be busy swapping symbols to and from disk most of the time +# causing a significant performance penality. +# If the system has enough physical memory increasing the cache will improve the +# performance by keeping more symbols in memory. Note that the value works on +# a logarithmic scale so increasing the size by one will rougly double the +# memory usage. The cache size is given by this formula: +# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, +# corresponding to a cache size of 2^16 = 65536 symbols + +SYMBOL_CACHE_SIZE = 0 + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. +# Private class members and static file members will be hidden unless +# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES + +EXTRACT_ALL = NO + +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class +# will be included in the documentation. + +EXTRACT_PRIVATE = NO + +# If the EXTRACT_STATIC tag is set to YES all static members of a file +# will be included in the documentation. + +EXTRACT_STATIC = NO + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) +# defined locally in source files will be included in the documentation. +# If set to NO only classes defined in header files are included. + +EXTRACT_LOCAL_CLASSES = YES + +# This flag is only useful for Objective-C code. When set to YES local +# methods, which are defined in the implementation section but not in +# the interface are included in the documentation. +# If set to NO (the default) only methods in the interface are included. + +EXTRACT_LOCAL_METHODS = NO + +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base +# name of the file that contains the anonymous namespace. By default +# anonymous namespace are hidden. + +EXTRACT_ANON_NSPACES = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all +# undocumented members of documented classes, files or namespaces. +# If set to NO (the default) these members will be included in the +# various overviews, but no documentation section is generated. +# This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. +# If set to NO (the default) these classes will be included in the various +# overviews. This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_CLASSES = NO + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all +# friend (class|struct|union) declarations. +# If set to NO (the default) these declarations will be included in the +# documentation. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any +# documentation blocks found inside the body of a function. +# If set to NO (the default) these blocks will be appended to the +# function's detailed documentation block. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation +# that is typed after a \internal command is included. If the tag is set +# to NO (the default) then the documentation will be excluded. +# Set it to YES to include the internal documentation. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate +# file names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. + +CASE_SENSE_NAMES = YES + +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen +# will show members with their full class and namespace scopes in the +# documentation. If set to YES the scope will be hidden. + +HIDE_SCOPE_NAMES = NO + +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen +# will put a list of the files that are included by a file in the documentation +# of that file. + +SHOW_INCLUDE_FILES = YES + +# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen +# will list include files with double quotes in the documentation +# rather than with sharp brackets. + +FORCE_LOCAL_INCLUDES = NO + +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] +# is inserted in the documentation for inline members. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen +# will sort the (detailed) documentation of file and class members +# alphabetically by member name. If set to NO the members will appear in +# declaration order. + +SORT_MEMBER_DOCS = YES + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the +# brief documentation of file, namespace and class members alphabetically +# by member name. If set to NO (the default) the members will appear in +# declaration order. + +SORT_BRIEF_DOCS = NO + +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the (brief and detailed) documentation of class members so that constructors and destructors are listed first. If set to NO (the default) the constructors will appear in the respective orders defined by SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. + +SORT_MEMBERS_CTORS_1ST = NO + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the +# hierarchy of group names into alphabetical order. If set to NO (the default) +# the group names will appear in their defined order. + +SORT_GROUP_NAMES = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be +# sorted by fully-qualified names, including namespaces. If set to +# NO (the default), the class list will be sorted only by class name, +# not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the +# alphabetical list. + +SORT_BY_SCOPE_NAME = NO + +# The GENERATE_TODOLIST tag can be used to enable (YES) or +# disable (NO) the todo list. This list is created by putting \todo +# commands in the documentation. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable (YES) or +# disable (NO) the test list. This list is created by putting \test +# commands in the documentation. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable (YES) or +# disable (NO) the bug list. This list is created by putting \bug +# commands in the documentation. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or +# disable (NO) the deprecated list. This list is created by putting +# \deprecated commands in the documentation. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional +# documentation sections, marked by \if sectionname ... \endif. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines +# the initial value of a variable or define consists of for it to appear in +# the documentation. If the initializer consists of more lines than specified +# here it will be hidden. Use a value of 0 to hide initializers completely. +# The appearance of the initializer of individual variables and defines in the +# documentation can be controlled using \showinitializer or \hideinitializer +# command in the documentation regardless of this setting. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated +# at the bottom of the documentation of classes and structs. If set to YES the +# list will mention the files that were used to generate the documentation. + +SHOW_USED_FILES = YES + +# If the sources in your project are distributed over multiple directories +# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy +# in the documentation. The default is NO. + +SHOW_DIRECTORIES = NO + +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. +# This will remove the Files entry from the Quick Index and from the +# Folder Tree View (if specified). The default is YES. + +SHOW_FILES = YES + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the +# Namespaces page. +# This will remove the Namespaces entry from the Quick Index +# and from the Folder Tree View (if specified). The default is YES. + +SHOW_NAMESPACES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command , where is the value of +# the FILE_VERSION_FILTER tag, and is the name of an input file +# provided by doxygen. Whatever the program writes to standard output +# is used as the file version. See the manual for examples. + +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed by +# doxygen. The layout file controls the global structure of the generated output files +# in an output format independent way. The create the layout file that represents +# doxygen's defaults, run doxygen with the -l option. You can optionally specify a +# file name after the option, if omitted DoxygenLayout.xml will be used as the name +# of the layout file. + +LAYOUT_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated +# by doxygen. Possible values are YES and NO. If left blank NO is used. + +QUIET = YES + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated by doxygen. Possible values are YES and NO. If left blank +# NO is used. + +WARNINGS = YES + +# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings +# for undocumented members. If EXTRACT_ALL is set to YES then this flag will +# automatically be disabled. + +WARN_IF_UNDOCUMENTED = NO + +# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some +# parameters in a documented function, or documenting parameters that +# don't exist or using markup commands wrongly. + +WARN_IF_DOC_ERROR = YES + +# This WARN_NO_PARAMDOC option can be abled to get warnings for +# functions that are documented, but have no documentation for their parameters +# or return value. If set to NO (the default) doxygen will only warn about +# wrong or incomplete parameter documentation, but not about the absence of +# documentation. + +WARN_NO_PARAMDOC = NO + +# The WARN_FORMAT tag determines the format of the warning messages that +# doxygen can produce. The string should contain the $file, $line, and $text +# tags, which will be replaced by the file and line number from which the +# warning originated and the warning text. Optionally the format may contain +# $version, which will be replaced by the version of the file (if it could +# be obtained via FILE_VERSION_FILTER) + +WARN_FORMAT = "$file:$line: $text" + +# The WARN_LOGFILE tag can be used to specify a file to which warning +# and error messages should be written. If left blank the output is written +# to stderr. + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag can be used to specify the files and/or directories that contain +# documented source files. You may enter file names like "myfile.cpp" or +# directories like "/usr/src/myproject". Separate the files or directories +# with spaces. + +INPUT = ../src ../include + +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is +# also the default input encoding. Doxygen uses libiconv (or the iconv built +# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for +# the list of possible encodings. + +INPUT_ENCODING = UTF-8 + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank the following patterns are tested: +# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx +# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90 + +FILE_PATTERNS = + +# The RECURSIVE tag can be used to turn specify whether or not subdirectories +# should be searched for input files as well. Possible values are YES and NO. +# If left blank NO is used. + +RECURSIVE = NO + +# The EXCLUDE tag can be used to specify files and/or directories that should +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. + +EXCLUDE = + +# The EXCLUDE_SYMLINKS tag can be used select whether or not files or +# directories that are symbolic links (a Unix filesystem feature) are excluded +# from the input. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. Note that the wildcards are matched +# against the file with absolute path, so to exclude all test directories +# for example use the pattern */test/* + +EXCLUDE_PATTERNS = + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# AClass::ANamespace, ANamespace::*Test + +EXCLUDE_SYMBOLS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or +# directories that contain example code fragments that are included (see +# the \include command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank all files are included. + +EXAMPLE_PATTERNS = + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude +# commands irrespective of the value of the RECURSIVE tag. +# Possible values are YES and NO. If left blank NO is used. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or +# directories that contain image that are included in the documentation (see +# the \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command , where +# is the value of the INPUT_FILTER tag, and is the name of an +# input file. Doxygen will then use the output that the filter program writes +# to standard output. +# If FILTER_PATTERNS is specified, this tag will be +# ignored. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. +# Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. +# The filters are a list of the form: +# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further +# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER +# is applied to all files. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will be used to filter the input files when producing source +# files to browse (i.e. when SOURCE_BROWSER is set to YES). + +FILTER_SOURCE_FILES = NO + +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will +# be generated. Documented entities will be cross-referenced with these sources. +# Note: To get rid of all source code in the generated output, make sure also +# VERBATIM_HEADERS is set to NO. + +SOURCE_BROWSER = NO + +# Setting the INLINE_SOURCES tag to YES will include the body +# of functions and classes directly in the documentation. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct +# doxygen to hide any special comment blocks from generated source code +# fragments. Normal C and C++ comments will always remain visible. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES +# then for each documented function all documented +# functions referencing it will be listed. + +REFERENCED_BY_RELATION = NO + +# If the REFERENCES_RELATION tag is set to YES +# then for each documented function all documented entities +# called/used by that function will be listed. + +REFERENCES_RELATION = NO + +# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) +# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from +# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will +# link to the source code. +# Otherwise they will link to the documentation. + +REFERENCES_LINK_SOURCE = YES + +# If the USE_HTAGS tag is set to YES then the references to source code +# will point to the HTML generated by the htags(1) tool instead of doxygen +# built-in source browser. The htags tool is part of GNU's global source +# tagging system (see http://www.gnu.org/software/global/global.html). You +# will need version 4.8.6 or higher. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen +# will generate a verbatim copy of the header file for each class for +# which an include is specified. Set to NO to disable this. + +VERBATIM_HEADERS = YES + +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index +# of all compounds will be generated. Enable this if the project +# contains a lot of classes, structs, unions or interfaces. + +ALPHABETICAL_INDEX = NO + +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns +# in which this list will be split (can be a number in the range [1..20]) + +COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all +# classes will be put under the same header in the alphabetical index. +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that +# should be ignored while generating the index headers. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will +# generate HTML output. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `html' will be used as the default path. + +HTML_OUTPUT = html + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for +# each generated HTML page (for example: .htm,.php,.asp). If it is left blank +# doxygen will generate files with .html extension. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a personal HTML header for +# each generated HTML page. If it is left blank doxygen will generate a +# standard header. + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a personal HTML footer for +# each generated HTML page. If it is left blank doxygen will generate a +# standard footer. + +HTML_FOOTER = @abs_srcdir@/footer.html + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading +# style sheet that is used by each HTML page. It can be used to +# fine-tune the look of the HTML output. If the tag is left blank doxygen +# will generate a default style sheet. Note that doxygen will try to copy +# the style sheet file to the HTML output directory, so don't put your own +# stylesheet in the HTML output directory as well, or it will be erased! + +HTML_STYLESHEET = + +# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML +# page will contain the date and time when the page was generated. Setting +# this to NO can help when comparing the output of multiple runs. + +HTML_TIMESTAMP = NO + +# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, +# files or namespaces will be aligned in HTML using tables. If set to +# NO a bullet list will be used. + +HTML_ALIGN_MEMBERS = YES + +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. For this to work a browser that supports +# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox +# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). + +HTML_DYNAMIC_SECTIONS = NO + +# If the GENERATE_DOCSET tag is set to YES, additional index files +# will be generated that can be used as input for Apple's Xcode 3 +# integrated development environment, introduced with OSX 10.5 (Leopard). +# To create a documentation set, doxygen will generate a Makefile in the +# HTML output directory. Running make will produce the docset in that +# directory and running "make install" will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find +# it at startup. +# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html for more information. + +GENERATE_DOCSET = NO + +# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the +# feed. A documentation feed provides an umbrella under which multiple +# documentation sets from a single provider (such as a company or product suite) +# can be grouped. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that +# should uniquely identify the documentation set bundle. This should be a +# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen +# will append .docset to the name. + +DOCSET_BUNDLE_ID = org.doxygen.Project + +# If the GENERATE_HTMLHELP tag is set to YES, additional index files +# will be generated that can be used as input for tools like the +# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) +# of the generated HTML documentation. + +GENERATE_HTMLHELP = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can +# be used to specify the file name of the resulting .chm file. You +# can add a path in front of the file if the result should not be +# written to the html output directory. + +CHM_FILE = + +# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can +# be used to specify the location (absolute path including file name) of +# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run +# the HTML help compiler on the generated index.hhp. + +HHC_LOCATION = + +# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag +# controls if a separate .chi index file is generated (YES) or that +# it should be included in the master .chm file (NO). + +GENERATE_CHI = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING +# is used to encode HtmlHelp index (hhk), content (hhc) and project file +# content. + +CHM_INDEX_ENCODING = + +# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag +# controls whether a binary table of contents is generated (YES) or a +# normal table of contents (NO) in the .chm file. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members +# to the contents of the HTML help documentation and to the tree view. + +TOC_EXPAND = NO + +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and QHP_VIRTUAL_FOLDER +# are set, an additional index file will be generated that can be used as input for +# Qt's qhelpgenerator to generate a Qt Compressed Help (.qch) of the generated +# HTML documentation. + +GENERATE_QHP = NO + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can +# be used to specify the file name of the resulting .qch file. +# The path specified is relative to the HTML output folder. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#namespace + +QHP_NAMESPACE = org.doxygen.Project + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#virtual-folders + +QHP_VIRTUAL_FOLDER = doc + +# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to add. +# For more information please see +# http://doc.trolltech.com/qthelpproject.html#custom-filters + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the custom filter to add.For more information please see +# Qt Help Project / Custom Filters. + +QHP_CUST_FILTER_ATTRS = + +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this project's +# filter section matches. +# Qt Help Project / Filter Attributes. + +QHP_SECT_FILTER_ATTRS = + +# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can +# be used to specify the location of Qt's qhelpgenerator. +# If non-empty doxygen will try to run qhelpgenerator on the generated +# .qhp file. + +QHG_LOCATION = + +# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files +# will be generated, which together with the HTML files, form an Eclipse help +# plugin. To install this plugin and make it available under the help contents +# menu in Eclipse, the contents of the directory containing the HTML and XML +# files needs to be copied into the plugins directory of eclipse. The name of +# the directory within the plugins directory should be the same as +# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before the help appears. + +GENERATE_ECLIPSEHELP = NO + +# A unique identifier for the eclipse help plugin. When installing the plugin +# the directory name containing the HTML and XML files should also have +# this name. + +ECLIPSE_DOC_ID = org.doxygen.Project + +# The DISABLE_INDEX tag can be used to turn on/off the condensed index at +# top of each HTML page. The value NO (the default) enables the index and +# the value YES disables it. + +DISABLE_INDEX = NO + +# This tag can be used to set the number of enum values (range [1..20]) +# that doxygen will group on one line in the generated HTML documentation. + +ENUM_VALUES_PER_LINE = 4 + +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. +# If the tag value is set to YES, a side panel will be generated +# containing a tree-like index structure (just like the one that +# is generated for HTML Help). For this to work a browser that supports +# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). +# Windows users are probably better off using the HTML help feature. + +GENERATE_TREEVIEW = NO + +# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories, +# and Class Hierarchy pages using a tree view instead of an ordered list. + +USE_INLINE_TREES = NO + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be +# used to set the initial width (in pixels) of the frame in which the tree +# is shown. + +TREEVIEW_WIDTH = 250 + +# Use this tag to change the font size of Latex formulas included +# as images in the HTML documentation. The default is 10. Note that +# when you change the font size after a successful doxygen run you need +# to manually remove any form_*.png images from the HTML output directory +# to force them to be regenerated. + +FORMULA_FONTSIZE = 10 + +# When the SEARCHENGINE tag is enabled doxygen will generate a search box for the HTML output. The underlying search engine uses javascript +# and DHTML and should work on any modern browser. Note that when using HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) there is already a search function so this one should +# typically be disabled. For large projects the javascript based search engine +# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution. + +SEARCHENGINE = YES + +# When the SERVER_BASED_SEARCH tag is enabled the search engine will be implemented using a PHP enabled web server instead of at the web client using Javascript. Doxygen will generate the search PHP script and index +# file to put on the web server. The advantage of the server based approach is that it scales better to large projects and allows full text search. The disadvances is that it is more difficult to setup +# and does not have live searching capabilities. + +SERVER_BASED_SEARCH = NO + +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- + +# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will +# generate Latex output. + +GENERATE_LATEX = NO + +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `latex' will be used as the default path. + +LATEX_OUTPUT = latex + +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be +# invoked. If left blank `latex' will be used as the default command name. +# Note that when enabling USE_PDFLATEX this option is only used for +# generating bitmaps for formulas in the HTML output, but not in the +# Makefile that is written to the output directory. + +LATEX_CMD_NAME = latex + +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to +# generate index for LaTeX. If left blank `makeindex' will be used as the +# default command name. + +MAKEINDEX_CMD_NAME = makeindex + +# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact +# LaTeX documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_LATEX = NO + +# The PAPER_TYPE tag can be used to set the paper type that is used +# by the printer. Possible values are: a4, a4wide, letter, legal and +# executive. If left blank a4wide will be used. + +PAPER_TYPE = a4wide + +# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX +# packages that should be included in the LaTeX output. + +EXTRA_PACKAGES = + +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for +# the generated latex document. The header should contain everything until +# the first chapter. If it is left blank doxygen will generate a +# standard header. Notice: only use this tag if you know what you are doing! + +LATEX_HEADER = + +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated +# is prepared for conversion to pdf (using ps2pdf). The pdf file will +# contain links (just like the HTML output) instead of page references +# This makes the output suitable for online browsing using a pdf viewer. + +PDF_HYPERLINKS = YES + +# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of +# plain latex in the generated Makefile. Set this option to YES to get a +# higher quality PDF documentation. + +USE_PDFLATEX = YES + +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. +# command to the generated LaTeX files. This will instruct LaTeX to keep +# running if errors occur, instead of asking the user for help. +# This option is also used when generating formulas in HTML. + +LATEX_BATCHMODE = NO + +# If LATEX_HIDE_INDICES is set to YES then doxygen will not +# include the index chapters (such as File Index, Compound Index, etc.) +# in the output. + +LATEX_HIDE_INDICES = NO + +# If LATEX_SOURCE_CODE is set to YES then doxygen will include source code with syntax highlighting in the LaTeX output. Note that which sources are shown also depends on other settings such as SOURCE_BROWSER. + +LATEX_SOURCE_CODE = NO + +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- + +# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output +# The RTF output is optimized for Word 97 and may not look very pretty with +# other RTF readers or editors. + +GENERATE_RTF = NO + +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `rtf' will be used as the default path. + +RTF_OUTPUT = rtf + +# If the COMPACT_RTF tag is set to YES Doxygen generates more compact +# RTF documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_RTF = NO + +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated +# will contain hyperlink fields. The RTF file will +# contain links (just like the HTML output) instead of page references. +# This makes the output suitable for online browsing using WORD or other +# programs which support those fields. +# Note: wordpad (write) and others do not support links. + +RTF_HYPERLINKS = NO + +# Load stylesheet definitions from file. Syntax is similar to doxygen's +# config file, i.e. a series of assignments. You only have to provide +# replacements, missing definitions are set to their default value. + +RTF_STYLESHEET_FILE = + +# Set optional variables used in the generation of an rtf document. +# Syntax is similar to doxygen's config file. + +RTF_EXTENSIONS_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- + +# If the GENERATE_MAN tag is set to YES (the default) Doxygen will +# generate man pages + +GENERATE_MAN = NO + +# The MAN_OUTPUT tag is used to specify where the man pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `man' will be used as the default path. + +MAN_OUTPUT = man + +# The MAN_EXTENSION tag determines the extension that is added to +# the generated man pages (default is the subroutine's section .3) + +MAN_EXTENSION = .3 + +# If the MAN_LINKS tag is set to YES and Doxygen generates man output, +# then it will generate one additional man file for each entity +# documented in the real man page(s). These additional files +# only source the real man page, but without them the man command +# would be unable to find the correct page. The default is NO. + +MAN_LINKS = NO + +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- + +# If the GENERATE_XML tag is set to YES Doxygen will +# generate an XML file that captures the structure of +# the code including all documentation. + +GENERATE_XML = NO + +# The XML_OUTPUT tag is used to specify where the XML pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `xml' will be used as the default path. + +XML_OUTPUT = xml + +# The XML_SCHEMA tag can be used to specify an XML schema, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_SCHEMA = + +# The XML_DTD tag can be used to specify an XML DTD, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_DTD = + +# If the XML_PROGRAMLISTING tag is set to YES Doxygen will +# dump the program listings (including syntax highlighting +# and cross-referencing information) to the XML output. Note that +# enabling this will significantly increase the size of the XML output. + +XML_PROGRAMLISTING = YES + +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- + +# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will +# generate an AutoGen Definitions (see autogen.sf.net) file +# that captures the structure of the code including all +# documentation. Note that this feature is still experimental +# and incomplete at the moment. + +GENERATE_AUTOGEN_DEF = NO + +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- + +# If the GENERATE_PERLMOD tag is set to YES Doxygen will +# generate a Perl module file that captures the structure of +# the code including all documentation. Note that this +# feature is still experimental and incomplete at the +# moment. + +GENERATE_PERLMOD = NO + +# If the PERLMOD_LATEX tag is set to YES Doxygen will generate +# the necessary Makefile rules, Perl scripts and LaTeX code to be able +# to generate PDF and DVI output from the Perl module output. + +PERLMOD_LATEX = NO + +# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be +# nicely formatted so it can be parsed by a human reader. +# This is useful +# if you want to understand what is going on. +# On the other hand, if this +# tag is set to NO the size of the Perl module output will be much smaller +# and Perl will parse it just the same. + +PERLMOD_PRETTY = YES + +# The names of the make variables in the generated doxyrules.make file +# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. +# This is useful so different doxyrules.make files included by the same +# Makefile don't overwrite each other's variables. + +PERLMOD_MAKEVAR_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- + +# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will +# evaluate all C-preprocessor directives found in the sources and include +# files. + +ENABLE_PREPROCESSING = YES + +# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro +# names in the source code. If set to NO (the default) only conditional +# compilation will be performed. Macro expansion can be done in a controlled +# way by setting EXPAND_ONLY_PREDEF to YES. + +MACRO_EXPANSION = NO + +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES +# then the macro expansion is limited to the macros specified with the +# PREDEFINED and EXPAND_AS_DEFINED tags. + +EXPAND_ONLY_PREDEF = NO + +# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files +# in the INCLUDE_PATH (see below) will be search if a #include is found. + +SEARCH_INCLUDES = YES + +# The INCLUDE_PATH tag can be used to specify one or more directories that +# contain include files that are not input files but should be processed by +# the preprocessor. + +INCLUDE_PATH = + +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard +# patterns (like *.h and *.hpp) to filter out the header-files in the +# directories. If left blank, the patterns specified with FILE_PATTERNS will +# be used. + +INCLUDE_FILE_PATTERNS = + +# The PREDEFINED tag can be used to specify one or more macro names that +# are defined before the preprocessor is started (similar to the -D option of +# gcc). The argument of the tag is a list of macros of the form: name +# or name=definition (no spaces). If the definition and the = are +# omitted =1 is assumed. To prevent a macro definition from being +# undefined via #undef or recursively expanded use the := operator +# instead of the = operator. + +PREDEFINED = + +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then +# this tag can be used to specify a list of macro names that should be expanded. +# The macro definition that is found in the sources will be used. +# Use the PREDEFINED tag if you want to use a different macro definition. + +EXPAND_AS_DEFINED = + +# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then +# doxygen's preprocessor will remove all function-like macros that are alone +# on a line, have an all uppercase name, and do not end with a semicolon. Such +# function macros are typically used for boiler-plate code, and will confuse +# the parser if not removed. + +SKIP_FUNCTION_MACROS = YES + +#--------------------------------------------------------------------------- +# Configuration::additions related to external references +#--------------------------------------------------------------------------- + +# The TAGFILES option can be used to specify one or more tagfiles. +# Optionally an initial location of the external documentation +# can be added for each tagfile. The format of a tag file without +# this location is as follows: +# +# TAGFILES = file1 file2 ... +# Adding location for the tag files is done as follows: +# +# TAGFILES = file1=loc1 "file2 = loc2" ... +# where "loc1" and "loc2" can be relative or absolute paths or +# URLs. If a location is present for each tag, the installdox tool +# does not have to be run to correct the links. +# Note that each tag file must have a unique name +# (where the name does NOT include the path) +# If a tag file is not located in the directory in which doxygen +# is run, you must also specify the path to the tagfile here. + +TAGFILES = + +# When a file name is specified after GENERATE_TAGFILE, doxygen will create +# a tag file that is based on the input files it reads. + +GENERATE_TAGFILE = + +# If the ALLEXTERNALS tag is set to YES all external classes will be listed +# in the class index. If set to NO only the inherited external classes +# will be listed. + +ALLEXTERNALS = NO + +# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will +# be listed. + +EXTERNAL_GROUPS = YES + +# The PERL_PATH should be the absolute path and name of the perl script +# interpreter (i.e. the result of `which perl'). + +PERL_PATH = /usr/bin/perl + +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- + +# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will +# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base +# or super classes. Setting the tag to NO turns the diagrams off. Note that +# this option is superseded by the HAVE_DOT option below. This is only a +# fallback. It is recommended to install and use dot, since it yields more +# powerful graphs. + +CLASS_DIAGRAMS = YES + +# You can define message sequence charts within doxygen comments using the \msc +# command. Doxygen will then run the mscgen tool (see +# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the +# documentation. The MSCGEN_PATH tag allows you to specify the directory where +# the mscgen tool resides. If left empty the tool is assumed to be found in the +# default search path. + +MSCGEN_PATH = + +# If set to YES, the inheritance and collaboration graphs will hide +# inheritance and usage relations if the target is undocumented +# or is not a class. + +HIDE_UNDOC_RELATIONS = YES + +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is +# available from the path. This tool is part of Graphviz, a graph visualization +# toolkit from AT&T and Lucent Bell Labs. The other options in this section +# have no effect if this option is set to NO (the default) + +HAVE_DOT = NO + +# By default doxygen will write a font called FreeSans.ttf to the output +# directory and reference it in all dot files that doxygen generates. This +# font does not include all possible unicode characters however, so when you need +# these (or just want a differently looking font) you can specify the font name +# using DOT_FONTNAME. You need need to make sure dot is able to find the font, +# which can be done by putting it in a standard location or by setting the +# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory +# containing the font. + +DOT_FONTNAME = FreeSans + +# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. +# The default size is 10pt. + +DOT_FONTSIZE = 10 + +# By default doxygen will tell dot to use the output directory to look for the +# FreeSans.ttf font (which doxygen will put there itself). If you specify a +# different font using DOT_FONTNAME you can set the path where dot +# can find it using this tag. + +DOT_FONTPATH = + +# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect inheritance relations. Setting this tag to YES will force the +# the CLASS_DIAGRAMS tag to NO. + +CLASS_GRAPH = YES + +# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect implementation dependencies (inheritance, containment, and +# class references variables) of the class with other documented classes. + +COLLABORATION_GRAPH = YES + +# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for groups, showing the direct groups dependencies + +GROUP_GRAPHS = YES + +# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# collaboration diagrams in a style similar to the OMG's Unified Modeling +# Language. + +UML_LOOK = NO + +# If set to YES, the inheritance and collaboration graphs will show the +# relations between templates and their instances. + +TEMPLATE_RELATIONS = NO + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT +# tags are set to YES then doxygen will generate a graph for each documented +# file showing the direct and indirect include dependencies of the file with +# other documented files. + +INCLUDE_GRAPH = YES + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and +# HAVE_DOT tags are set to YES then doxygen will generate a graph for each +# documented header file showing the documented files that directly or +# indirectly include this file. + +INCLUDED_BY_GRAPH = YES + +# If the CALL_GRAPH and HAVE_DOT options are set to YES then +# doxygen will generate a call dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable call graphs +# for selected functions only using the \callgraph command. + +CALL_GRAPH = NO + +# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then +# doxygen will generate a caller dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable caller +# graphs for selected functions only using the \callergraph command. + +CALLER_GRAPH = NO + +# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen +# will graphical hierarchy of all classes instead of a textual one. + +GRAPHICAL_HIERARCHY = YES + +# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES +# then doxygen will show the dependencies a directory has on other directories +# in a graphical way. The dependency relations are determined by the #include +# relations between the files in the directories. + +DIRECTORY_GRAPH = YES + +# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images +# generated by dot. Possible values are png, jpg, or gif +# If left blank png will be used. + +DOT_IMAGE_FORMAT = png + +# The tag DOT_PATH can be used to specify the path where the dot tool can be +# found. If left blank, it is assumed the dot tool can be found in the path. + +DOT_PATH = + +# The DOTFILE_DIRS tag can be used to specify one or more directories that +# contain dot files that are included in the documentation (see the +# \dotfile command). + +DOTFILE_DIRS = + +# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of +# nodes that will be shown in the graph. If the number of nodes in a graph +# becomes larger than this value, doxygen will truncate the graph, which is +# visualized by representing a node as a red box. Note that doxygen if the +# number of direct children of the root node in a graph is already larger than +# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note +# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. + +DOT_GRAPH_MAX_NODES = 50 + +# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the +# graphs generated by dot. A depth value of 3 means that only nodes reachable +# from the root by following a path via at most 3 edges will be shown. Nodes +# that lay further from the root node will be omitted. Note that setting this +# option to 1 or 2 may greatly reduce the computation time needed for large +# code bases. Also note that the size of a graph can be further restricted by +# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. + +MAX_DOT_GRAPH_DEPTH = 0 + +# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent +# background. This is disabled by default, because dot on Windows does not +# seem to support this out of the box. Warning: Depending on the platform used, +# enabling this option may lead to badly anti-aliased labels on the edges of +# a graph (i.e. they become hard to read). + +DOT_TRANSPARENT = NO + +# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output +# files in one run (i.e. multiple -o and -T options on the command line). This +# makes dot run faster, but since only newer versions of dot (>1.8.10) +# support this, this feature is disabled by default. + +DOT_MULTI_TARGETS = YES + +# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will +# generate a legend page explaining the meaning of the various boxes and +# arrows in the dot generated graphs. + +GENERATE_LEGEND = YES + +# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will +# remove the intermediate dot files that are used to generate +# the various graphs. + +DOT_CLEANUP = YES diff -Nru xf86-input-wacom-0.10.11/doc/footer.html xf86-input-wacom-0.11.0/doc/footer.html --- xf86-input-wacom-0.10.11/doc/footer.html 1970-01-01 00:00:00.000000000 +0000 +++ xf86-input-wacom-0.11.0/doc/footer.html 2011-04-07 05:22:34.000000000 +0000 @@ -0,0 +1,4 @@ +
+Generated on $datetime for $projectname by doxygen $doxygenversion
+ + diff -Nru xf86-input-wacom-0.10.11/doc/Makefile.am xf86-input-wacom-0.11.0/doc/Makefile.am --- xf86-input-wacom-0.10.11/doc/Makefile.am 1970-01-01 00:00:00.000000000 +0000 +++ xf86-input-wacom-0.11.0/doc/Makefile.am 2011-04-07 05:22:34.000000000 +0000 @@ -0,0 +1,14 @@ + +if HAVE_DOXYGEN + +# Developers documentation is not installed +noinst_DATA = html/index.html +dist_noinst_DATA = doxygen.conf.in footer.html + +html/index.html: + $(AM_V_GEN)$(DOXYGEN) doxygen.conf + +clean-local: + $(AM_V_at)rm -fr html/ + +endif HAVE_DOXYGEN diff -Nru xf86-input-wacom-0.10.11/doc/Makefile.in xf86-input-wacom-0.11.0/doc/Makefile.in --- xf86-input-wacom-0.10.11/doc/Makefile.in 1970-01-01 00:00:00.000000000 +0000 +++ xf86-input-wacom-0.11.0/doc/Makefile.in 2011-04-19 04:07:02.000000000 +0000 @@ -0,0 +1,403 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = doc +DIST_COMMON = $(am__dist_noinst_DATA_DIST) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(srcdir)/doxygen.conf.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = doxygen.conf +CONFIG_CLEAN_VPATH_FILES = +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +SOURCES = +DIST_SOURCES = +am__dist_noinst_DATA_DIST = doxygen.conf.in footer.html +DATA = $(dist_noinst_DATA) $(noinst_DATA) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ +ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +APP_MAN_DIR = @APP_MAN_DIR@ +APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DOXYGEN = @DOXYGEN@ +DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ +DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRIVER_NAME = @DRIVER_NAME@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FILE_MAN_DIR = @FILE_MAN_DIR@ +FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_CMD = @INSTALL_CMD@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIB_MAN_DIR = @LIB_MAN_DIR@ +LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MAN_SUBSTS = @MAN_SUBSTS@ +MISC_MAN_DIR = @MISC_MAN_DIR@ +MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +UDEV_CFLAGS = @UDEV_CFLAGS@ +UDEV_LIBS = @UDEV_LIBS@ +VERSION = @VERSION@ +X11_CFLAGS = @X11_CFLAGS@ +X11_LIBS = @X11_LIBS@ +XORG_CFLAGS = @XORG_CFLAGS@ +XORG_LIBS = @XORG_LIBS@ +XORG_MAN_PAGE = @XORG_MAN_PAGE@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +configdir = @configdir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +inputdir = @inputdir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sdkdir = @sdkdir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +# Developers documentation is not installed +@HAVE_DOXYGEN_TRUE@noinst_DATA = html/index.html +@HAVE_DOXYGEN_TRUE@dist_noinst_DATA = doxygen.conf.in footer.html +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign doc/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +doxygen.conf: $(top_builddir)/config.status $(srcdir)/doxygen.conf.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(DATA) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +@HAVE_DOXYGEN_FALSE@clean-local: +clean: clean-am + +clean-am: clean-generic clean-libtool clean-local mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + clean-local distclean distclean-generic distclean-libtool \ + distdir dvi dvi-am html html-am info info-am install \ + install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + uninstall uninstall-am + + +@HAVE_DOXYGEN_TRUE@html/index.html: +@HAVE_DOXYGEN_TRUE@ $(AM_V_GEN)$(DOXYGEN) doxygen.conf + +@HAVE_DOXYGEN_TRUE@clean-local: +@HAVE_DOXYGEN_TRUE@ $(AM_V_at)rm -fr html/ + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff -Nru xf86-input-wacom-0.10.11/include/Makefile.in xf86-input-wacom-0.11.0/include/Makefile.in --- xf86-input-wacom-0.10.11/include/Makefile.in 2011-02-16 04:26:35.000000000 +0000 +++ xf86-input-wacom-0.11.0/include/Makefile.in 2011-04-19 04:07:02.000000000 +0000 @@ -101,6 +101,7 @@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DOXYGEN = @DOXYGEN@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRIVER_NAME = @DRIVER_NAME@ @@ -114,8 +115,6 @@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ -GLIB_CFLAGS = @GLIB_CFLAGS@ -GLIB_LIBS = @GLIB_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ @@ -161,6 +160,8 @@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ +UDEV_CFLAGS = @UDEV_CFLAGS@ +UDEV_LIBS = @UDEV_LIBS@ VERSION = @VERSION@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ diff -Nru xf86-input-wacom-0.10.11/include/wacom-properties.h xf86-input-wacom-0.11.0/include/wacom-properties.h --- xf86-input-wacom-0.10.11/include/wacom-properties.h 2011-02-15 04:27:40.000000000 +0000 +++ xf86-input-wacom-0.11.0/include/wacom-properties.h 2011-04-08 01:31:00.000000000 +0000 @@ -78,7 +78,8 @@ /* 32 bit, 3 values, zoom, rotate, tap parameters */ #define WACOM_PROP_GESTURE_PARAMETERS "Wacom Touch Gesture Parameters" -/* BOOL, 1 value */ +/* BOOL, 1 value, + TRUE == hover click is enabled, FALSE == hover click disabled */ #define WACOM_PROP_HOVER "Wacom Hover Click" /* Atom, 1 value, read-only */ diff -Nru xf86-input-wacom-0.10.11/include/Xwacom.h xf86-input-wacom-0.11.0/include/Xwacom.h --- xf86-input-wacom-0.10.11/include/Xwacom.h 2011-02-14 06:04:14.000000000 +0000 +++ xf86-input-wacom-0.11.0/include/Xwacom.h 2011-04-07 05:22:34.000000000 +0000 @@ -17,6 +17,15 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/** + * @mainpage The X.Org Wacom Input Driver API Documentation + * @section intro Introduction + * The Linux Wacom Project manages the drivers, libraries, and documentation + * for configuring and running Wacom tablets under the Linux operating system. + * It contains diagnostic applications and X.Org input drivers + * for servers 1.7 and later. + */ + #ifndef __XORG_XWACOM_H #define __XORG_XWACOM_H @@ -34,8 +43,6 @@ #define ROTATE_CCW 2 #define ROTATE_HALF 3 -#define XWACOM_MAX_SAMPLES 20 - /* The following flags are used for button action property values to mark * the type of event that should be emitted when that button is pressed; * combined together they form an Action Code (AC). Each button has up to diff -Nru xf86-input-wacom-0.10.11/m4/libtool.m4 xf86-input-wacom-0.11.0/m4/libtool.m4 --- xf86-input-wacom-0.10.11/m4/libtool.m4 1970-01-01 00:00:00.000000000 +0000 +++ xf86-input-wacom-0.11.0/m4/libtool.m4 2011-08-01 04:48:52.000000000 +0000 @@ -0,0 +1,7377 @@ +# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008 Free Software Foundation, Inc. +# Written by Gordon Matzigkeit, 1996 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +m4_define([_LT_COPYING], [dnl +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008 Free Software Foundation, Inc. +# Written by Gordon Matzigkeit, 1996 +# +# This file is part of GNU Libtool. +# +# GNU Libtool is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# As a special exception to the GNU General Public License, +# if you distribute this file as part of a program or library that +# is built using GNU Libtool, you may include this file under the +# same distribution terms that you use for the rest of that program. +# +# GNU Libtool is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Libtool; see the file COPYING. If not, a copy +# can be downloaded from http://www.gnu.org/licenses/gpl.html, or +# obtained by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +]) + +# serial 56 LT_INIT + + +# LT_PREREQ(VERSION) +# ------------------ +# Complain and exit if this libtool version is less that VERSION. +m4_defun([LT_PREREQ], +[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, + [m4_default([$3], + [m4_fatal([Libtool version $1 or higher is required], + 63)])], + [$2])]) + + +# _LT_CHECK_BUILDDIR +# ------------------ +# Complain if the absolute build directory name contains unusual characters +m4_defun([_LT_CHECK_BUILDDIR], +[case `pwd` in + *\ * | *\ *) + AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; +esac +]) + + +# LT_INIT([OPTIONS]) +# ------------------ +AC_DEFUN([LT_INIT], +[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT +AC_BEFORE([$0], [LT_LANG])dnl +AC_BEFORE([$0], [LT_OUTPUT])dnl +AC_BEFORE([$0], [LTDL_INIT])dnl +m4_require([_LT_CHECK_BUILDDIR])dnl + +dnl Autoconf doesn't catch unexpanded LT_ macros by default: +m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl +m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl +dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 +dnl unless we require an AC_DEFUNed macro: +AC_REQUIRE([LTOPTIONS_VERSION])dnl +AC_REQUIRE([LTSUGAR_VERSION])dnl +AC_REQUIRE([LTVERSION_VERSION])dnl +AC_REQUIRE([LTOBSOLETE_VERSION])dnl +m4_require([_LT_PROG_LTMAIN])dnl + +dnl Parse OPTIONS +_LT_SET_OPTIONS([$0], [$1]) + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ltmain" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' +AC_SUBST(LIBTOOL)dnl + +_LT_SETUP + +# Only expand once: +m4_define([LT_INIT]) +])# LT_INIT + +# Old names: +AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) +AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_PROG_LIBTOOL], []) +dnl AC_DEFUN([AM_PROG_LIBTOOL], []) + + +# _LT_CC_BASENAME(CC) +# ------------------- +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +m4_defun([_LT_CC_BASENAME], +[for cc_temp in $1""; do + case $cc_temp in + compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; + distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` +]) + + +# _LT_FILEUTILS_DEFAULTS +# ---------------------- +# It is okay to use these file commands and assume they have been set +# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. +m4_defun([_LT_FILEUTILS_DEFAULTS], +[: ${CP="cp -f"} +: ${MV="mv -f"} +: ${RM="rm -f"} +])# _LT_FILEUTILS_DEFAULTS + + +# _LT_SETUP +# --------- +m4_defun([_LT_SETUP], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +_LT_DECL([], [host_alias], [0], [The host system])dnl +_LT_DECL([], [host], [0])dnl +_LT_DECL([], [host_os], [0])dnl +dnl +_LT_DECL([], [build_alias], [0], [The build system])dnl +_LT_DECL([], [build], [0])dnl +_LT_DECL([], [build_os], [0])dnl +dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([LT_PATH_LD])dnl +AC_REQUIRE([LT_PATH_NM])dnl +dnl +AC_REQUIRE([AC_PROG_LN_S])dnl +test -z "$LN_S" && LN_S="ln -s" +_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl +dnl +AC_REQUIRE([LT_CMD_MAX_LEN])dnl +_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl +_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl +dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_CHECK_SHELL_FEATURES])dnl +m4_require([_LT_CMD_RELOAD])dnl +m4_require([_LT_CHECK_MAGIC_METHOD])dnl +m4_require([_LT_CMD_OLD_ARCHIVE])dnl +m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl + +_LT_CONFIG_LIBTOOL_INIT([ +# See if we are running on zsh, and set the options which allow our +# commands through without removal of \ escapes INIT. +if test -n "\${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi +]) +if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi + +_LT_CHECK_OBJDIR + +m4_require([_LT_TAG_COMPILER])dnl +_LT_PROG_ECHO_BACKSLASH + +case $host_os in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; +esac + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\([["`\\]]\)/\\\1/g' + +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# Sed substitution to delay expansion of an escaped single quote. +delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' + +# Global variables: +ofile=libtool +can_build_shared=yes + +# All known linkers require a `.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a + +with_gnu_ld="$lt_cv_prog_gnu_ld" + +old_CC="$CC" +old_CFLAGS="$CFLAGS" + +# Set sane defaults for various variables +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +test -z "$LD" && LD=ld +test -z "$ac_objext" && ac_objext=o + +_LT_CC_BASENAME([$compiler]) + +# Only perform the check for file, if the check method requires it +test -z "$MAGIC_CMD" && MAGIC_CMD=file +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + _LT_PATH_MAGIC + fi + ;; +esac + +# Use C for the default configuration in the libtool script +LT_SUPPORTED_TAG([CC]) +_LT_LANG_C_CONFIG +_LT_LANG_DEFAULT_CONFIG +_LT_CONFIG_COMMANDS +])# _LT_SETUP + + +# _LT_PROG_LTMAIN +# --------------- +# Note that this code is called both from `configure', and `config.status' +# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, +# `config.status' has no value for ac_aux_dir unless we are using Automake, +# so we pass a copy along to make sure it has a sensible value anyway. +m4_defun([_LT_PROG_LTMAIN], +[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl +_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) +ltmain="$ac_aux_dir/ltmain.sh" +])# _LT_PROG_LTMAIN + + +## ------------------------------------- ## +## Accumulate code for creating libtool. ## +## ------------------------------------- ## + +# So that we can recreate a full libtool script including additional +# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS +# in macros and then make a single call at the end using the `libtool' +# label. + + +# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) +# ---------------------------------------- +# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. +m4_define([_LT_CONFIG_LIBTOOL_INIT], +[m4_ifval([$1], + [m4_append([_LT_OUTPUT_LIBTOOL_INIT], + [$1 +])])]) + +# Initialize. +m4_define([_LT_OUTPUT_LIBTOOL_INIT]) + + +# _LT_CONFIG_LIBTOOL([COMMANDS]) +# ------------------------------ +# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. +m4_define([_LT_CONFIG_LIBTOOL], +[m4_ifval([$1], + [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], + [$1 +])])]) + +# Initialize. +m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) + + +# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) +# ----------------------------------------------------- +m4_defun([_LT_CONFIG_SAVE_COMMANDS], +[_LT_CONFIG_LIBTOOL([$1]) +_LT_CONFIG_LIBTOOL_INIT([$2]) +]) + + +# _LT_FORMAT_COMMENT([COMMENT]) +# ----------------------------- +# Add leading comment marks to the start of each line, and a trailing +# full-stop to the whole comment if one is not present already. +m4_define([_LT_FORMAT_COMMENT], +[m4_ifval([$1], [ +m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], + [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) +)]) + + + +## ------------------------ ## +## FIXME: Eliminate VARNAME ## +## ------------------------ ## + + +# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) +# ------------------------------------------------------------------- +# CONFIGNAME is the name given to the value in the libtool script. +# VARNAME is the (base) name used in the configure script. +# VALUE may be 0, 1 or 2 for a computed quote escaped value based on +# VARNAME. Any other value will be used directly. +m4_define([_LT_DECL], +[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], + [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], + [m4_ifval([$1], [$1], [$2])]) + lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) + m4_ifval([$4], + [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) + lt_dict_add_subkey([lt_decl_dict], [$2], + [tagged?], [m4_ifval([$5], [yes], [no])])]) +]) + + +# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) +# -------------------------------------------------------- +m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) + + +# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) +# ------------------------------------------------ +m4_define([lt_decl_tag_varnames], +[_lt_decl_filter([tagged?], [yes], $@)]) + + +# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) +# --------------------------------------------------------- +m4_define([_lt_decl_filter], +[m4_case([$#], + [0], [m4_fatal([$0: too few arguments: $#])], + [1], [m4_fatal([$0: too few arguments: $#: $1])], + [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], + [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], + [lt_dict_filter([lt_decl_dict], $@)])[]dnl +]) + + +# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) +# -------------------------------------------------- +m4_define([lt_decl_quote_varnames], +[_lt_decl_filter([value], [1], $@)]) + + +# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) +# --------------------------------------------------- +m4_define([lt_decl_dquote_varnames], +[_lt_decl_filter([value], [2], $@)]) + + +# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) +# --------------------------------------------------- +m4_define([lt_decl_varnames_tagged], +[m4_assert([$# <= 2])dnl +_$0(m4_quote(m4_default([$1], [[, ]])), + m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), + m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) +m4_define([_lt_decl_varnames_tagged], +[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) + + +# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) +# ------------------------------------------------ +m4_define([lt_decl_all_varnames], +[_$0(m4_quote(m4_default([$1], [[, ]])), + m4_if([$2], [], + m4_quote(lt_decl_varnames), + m4_quote(m4_shift($@))))[]dnl +]) +m4_define([_lt_decl_all_varnames], +[lt_join($@, lt_decl_varnames_tagged([$1], + lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl +]) + + +# _LT_CONFIG_STATUS_DECLARE([VARNAME]) +# ------------------------------------ +# Quote a variable value, and forward it to `config.status' so that its +# declaration there will have the same value as in `configure'. VARNAME +# must have a single quote delimited value for this to work. +m4_define([_LT_CONFIG_STATUS_DECLARE], +[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`']) + + +# _LT_CONFIG_STATUS_DECLARATIONS +# ------------------------------ +# We delimit libtool config variables with single quotes, so when +# we write them to config.status, we have to be sure to quote all +# embedded single quotes properly. In configure, this macro expands +# each variable declared with _LT_DECL (and _LT_TAGDECL) into: +# +# ='`$ECHO "X$" | $Xsed -e "$delay_single_quote_subst"`' +m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], +[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), + [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) + + +# _LT_LIBTOOL_TAGS +# ---------------- +# Output comment and list of tags supported by the script +m4_defun([_LT_LIBTOOL_TAGS], +[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl +available_tags="_LT_TAGS"dnl +]) + + +# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) +# ----------------------------------- +# Extract the dictionary values for VARNAME (optionally with TAG) and +# expand to a commented shell variable setting: +# +# # Some comment about what VAR is for. +# visible_name=$lt_internal_name +m4_define([_LT_LIBTOOL_DECLARE], +[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], + [description])))[]dnl +m4_pushdef([_libtool_name], + m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl +m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), + [0], [_libtool_name=[$]$1], + [1], [_libtool_name=$lt_[]$1], + [2], [_libtool_name=$lt_[]$1], + [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl +m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl +]) + + +# _LT_LIBTOOL_CONFIG_VARS +# ----------------------- +# Produce commented declarations of non-tagged libtool config variables +# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' +# script. Tagged libtool config variables (even for the LIBTOOL CONFIG +# section) are produced by _LT_LIBTOOL_TAG_VARS. +m4_defun([_LT_LIBTOOL_CONFIG_VARS], +[m4_foreach([_lt_var], + m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), + [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) + + +# _LT_LIBTOOL_TAG_VARS(TAG) +# ------------------------- +m4_define([_LT_LIBTOOL_TAG_VARS], +[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), + [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) + + +# _LT_TAGVAR(VARNAME, [TAGNAME]) +# ------------------------------ +m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) + + +# _LT_CONFIG_COMMANDS +# ------------------- +# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of +# variables for single and double quote escaping we saved from calls +# to _LT_DECL, we can put quote escaped variables declarations +# into `config.status', and then the shell code to quote escape them in +# for loops in `config.status'. Finally, any additional code accumulated +# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. +m4_defun([_LT_CONFIG_COMMANDS], +[AC_PROVIDE_IFELSE([LT_OUTPUT], + dnl If the libtool generation code has been placed in $CONFIG_LT, + dnl instead of duplicating it all over again into config.status, + dnl then we will have config.status run $CONFIG_LT later, so it + dnl needs to know what name is stored there: + [AC_CONFIG_COMMANDS([libtool], + [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], + dnl If the libtool generation code is destined for config.status, + dnl expand the accumulated commands and init code now: + [AC_CONFIG_COMMANDS([libtool], + [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) +])#_LT_CONFIG_COMMANDS + + +# Initialize. +m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], +[ + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +sed_quote_subst='$sed_quote_subst' +double_quote_subst='$double_quote_subst' +delay_variable_subst='$delay_variable_subst' +_LT_CONFIG_STATUS_DECLARATIONS +LTCC='$LTCC' +LTCFLAGS='$LTCFLAGS' +compiler='$compiler_DEFAULT' + +# Quote evaled strings. +for var in lt_decl_all_varnames([[ \ +]], lt_decl_quote_varnames); do + case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in + *[[\\\\\\\`\\"\\\$]]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +# Double-quote double-evaled strings. +for var in lt_decl_all_varnames([[ \ +]], lt_decl_dquote_varnames); do + case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in + *[[\\\\\\\`\\"\\\$]]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +# Fix-up fallback echo if it was mangled by the above quoting rules. +case \$lt_ECHO in +*'\\\[$]0 --fallback-echo"')dnl " + lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\` + ;; +esac + +_LT_OUTPUT_LIBTOOL_INIT +]) + + +# LT_OUTPUT +# --------- +# This macro allows early generation of the libtool script (before +# AC_OUTPUT is called), incase it is used in configure for compilation +# tests. +AC_DEFUN([LT_OUTPUT], +[: ${CONFIG_LT=./config.lt} +AC_MSG_NOTICE([creating $CONFIG_LT]) +cat >"$CONFIG_LT" <<_LTEOF +#! $SHELL +# Generated by $as_me. +# Run this file to recreate a libtool stub with the current configuration. + +lt_cl_silent=false +SHELL=\${CONFIG_SHELL-$SHELL} +_LTEOF + +cat >>"$CONFIG_LT" <<\_LTEOF +AS_SHELL_SANITIZE +_AS_PREPARE + +exec AS_MESSAGE_FD>&1 +exec AS_MESSAGE_LOG_FD>>config.log +{ + echo + AS_BOX([Running $as_me.]) +} >&AS_MESSAGE_LOG_FD + +lt_cl_help="\ +\`$as_me' creates a local libtool stub from the current configuration, +for use in further configure time tests before the real libtool is +generated. + +Usage: $[0] [[OPTIONS]] + + -h, --help print this help, then exit + -V, --version print version number, then exit + -q, --quiet do not print progress messages + -d, --debug don't remove temporary files + +Report bugs to ." + +lt_cl_version="\ +m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl +m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) +configured by $[0], generated by m4_PACKAGE_STRING. + +Copyright (C) 2008 Free Software Foundation, Inc. +This config.lt script is free software; the Free Software Foundation +gives unlimited permision to copy, distribute and modify it." + +while test $[#] != 0 +do + case $[1] in + --version | --v* | -V ) + echo "$lt_cl_version"; exit 0 ;; + --help | --h* | -h ) + echo "$lt_cl_help"; exit 0 ;; + --debug | --d* | -d ) + debug=: ;; + --quiet | --q* | --silent | --s* | -q ) + lt_cl_silent=: ;; + + -*) AC_MSG_ERROR([unrecognized option: $[1] +Try \`$[0] --help' for more information.]) ;; + + *) AC_MSG_ERROR([unrecognized argument: $[1] +Try \`$[0] --help' for more information.]) ;; + esac + shift +done + +if $lt_cl_silent; then + exec AS_MESSAGE_FD>/dev/null +fi +_LTEOF + +cat >>"$CONFIG_LT" <<_LTEOF +_LT_OUTPUT_LIBTOOL_COMMANDS_INIT +_LTEOF + +cat >>"$CONFIG_LT" <<\_LTEOF +AC_MSG_NOTICE([creating $ofile]) +_LT_OUTPUT_LIBTOOL_COMMANDS +AS_EXIT(0) +_LTEOF +chmod +x "$CONFIG_LT" + +# configure is writing to config.log, but config.lt does its own redirection, +# appending to config.log, which fails on DOS, as config.log is still kept +# open by configure. Here we exec the FD to /dev/null, effectively closing +# config.log, so it can be properly (re)opened and appended to by config.lt. +if test "$no_create" != yes; then + lt_cl_success=: + test "$silent" = yes && + lt_config_lt_args="$lt_config_lt_args --quiet" + exec AS_MESSAGE_LOG_FD>/dev/null + $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false + exec AS_MESSAGE_LOG_FD>>config.log + $lt_cl_success || AS_EXIT(1) +fi +])# LT_OUTPUT + + +# _LT_CONFIG(TAG) +# --------------- +# If TAG is the built-in tag, create an initial libtool script with a +# default configuration from the untagged config vars. Otherwise add code +# to config.status for appending the configuration named by TAG from the +# matching tagged config vars. +m4_defun([_LT_CONFIG], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +_LT_CONFIG_SAVE_COMMANDS([ + m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl + m4_if(_LT_TAG, [C], [ + # See if we are running on zsh, and set the options which allow our + # commands through without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + + cfgfile="${ofile}T" + trap "$RM \"$cfgfile\"; exit 1" 1 2 15 + $RM "$cfgfile" + + cat <<_LT_EOF >> "$cfgfile" +#! $SHELL + +# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +_LT_COPYING +_LT_LIBTOOL_TAGS + +# ### BEGIN LIBTOOL CONFIG +_LT_LIBTOOL_CONFIG_VARS +_LT_LIBTOOL_TAG_VARS +# ### END LIBTOOL CONFIG + +_LT_EOF + + case $host_os in + aix3*) + cat <<\_LT_EOF >> "$cfgfile" +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES +fi +_LT_EOF + ;; + esac + + _LT_PROG_LTMAIN + + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + _LT_PROG_XSI_SHELLFNS + + sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + mv -f "$cfgfile" "$ofile" || + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" +], +[cat <<_LT_EOF >> "$ofile" + +dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded +dnl in a comment (ie after a #). +# ### BEGIN LIBTOOL TAG CONFIG: $1 +_LT_LIBTOOL_TAG_VARS(_LT_TAG) +# ### END LIBTOOL TAG CONFIG: $1 +_LT_EOF +])dnl /m4_if +], +[m4_if([$1], [], [ + PACKAGE='$PACKAGE' + VERSION='$VERSION' + TIMESTAMP='$TIMESTAMP' + RM='$RM' + ofile='$ofile'], []) +])dnl /_LT_CONFIG_SAVE_COMMANDS +])# _LT_CONFIG + + +# LT_SUPPORTED_TAG(TAG) +# --------------------- +# Trace this macro to discover what tags are supported by the libtool +# --tag option, using: +# autoconf --trace 'LT_SUPPORTED_TAG:$1' +AC_DEFUN([LT_SUPPORTED_TAG], []) + + +# C support is built-in for now +m4_define([_LT_LANG_C_enabled], []) +m4_define([_LT_TAGS], []) + + +# LT_LANG(LANG) +# ------------- +# Enable libtool support for the given language if not already enabled. +AC_DEFUN([LT_LANG], +[AC_BEFORE([$0], [LT_OUTPUT])dnl +m4_case([$1], + [C], [_LT_LANG(C)], + [C++], [_LT_LANG(CXX)], + [Java], [_LT_LANG(GCJ)], + [Fortran 77], [_LT_LANG(F77)], + [Fortran], [_LT_LANG(FC)], + [Windows Resource], [_LT_LANG(RC)], + [m4_ifdef([_LT_LANG_]$1[_CONFIG], + [_LT_LANG($1)], + [m4_fatal([$0: unsupported language: "$1"])])])dnl +])# LT_LANG + + +# _LT_LANG(LANGNAME) +# ------------------ +m4_defun([_LT_LANG], +[m4_ifdef([_LT_LANG_]$1[_enabled], [], + [LT_SUPPORTED_TAG([$1])dnl + m4_append([_LT_TAGS], [$1 ])dnl + m4_define([_LT_LANG_]$1[_enabled], [])dnl + _LT_LANG_$1_CONFIG($1)])dnl +])# _LT_LANG + + +# _LT_LANG_DEFAULT_CONFIG +# ----------------------- +m4_defun([_LT_LANG_DEFAULT_CONFIG], +[AC_PROVIDE_IFELSE([AC_PROG_CXX], + [LT_LANG(CXX)], + [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) + +AC_PROVIDE_IFELSE([AC_PROG_F77], + [LT_LANG(F77)], + [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) + +AC_PROVIDE_IFELSE([AC_PROG_FC], + [LT_LANG(FC)], + [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) + +dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal +dnl pulling things in needlessly. +AC_PROVIDE_IFELSE([AC_PROG_GCJ], + [LT_LANG(GCJ)], + [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], + [LT_LANG(GCJ)], + [AC_PROVIDE_IFELSE([LT_PROG_GCJ], + [LT_LANG(GCJ)], + [m4_ifdef([AC_PROG_GCJ], + [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) + m4_ifdef([A][M_PROG_GCJ], + [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) + m4_ifdef([LT_PROG_GCJ], + [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) + +AC_PROVIDE_IFELSE([LT_PROG_RC], + [LT_LANG(RC)], + [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) +])# _LT_LANG_DEFAULT_CONFIG + +# Obsolete macros: +AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) +AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) +AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) +AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_CXX], []) +dnl AC_DEFUN([AC_LIBTOOL_F77], []) +dnl AC_DEFUN([AC_LIBTOOL_FC], []) +dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) + + +# _LT_TAG_COMPILER +# ---------------- +m4_defun([_LT_TAG_COMPILER], +[AC_REQUIRE([AC_PROG_CC])dnl + +_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl +_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl +_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl +_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC +])# _LT_TAG_COMPILER + + +# _LT_COMPILER_BOILERPLATE +# ------------------------ +# Check for compiler boilerplate output or warnings with +# the simple compiler test code. +m4_defun([_LT_COMPILER_BOILERPLATE], +[m4_require([_LT_DECL_SED])dnl +ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$RM conftest* +])# _LT_COMPILER_BOILERPLATE + + +# _LT_LINKER_BOILERPLATE +# ---------------------- +# Check for linker boilerplate output or warnings with +# the simple link test code. +m4_defun([_LT_LINKER_BOILERPLATE], +[m4_require([_LT_DECL_SED])dnl +ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$RM -r conftest* +])# _LT_LINKER_BOILERPLATE + +# _LT_REQUIRED_DARWIN_CHECKS +# ------------------------- +m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ + case $host_os in + rhapsody* | darwin*) + AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) + AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) + AC_CHECK_TOOL([LIPO], [lipo], [:]) + AC_CHECK_TOOL([OTOOL], [otool], [:]) + AC_CHECK_TOOL([OTOOL64], [otool64], [:]) + _LT_DECL([], [DSYMUTIL], [1], + [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) + _LT_DECL([], [NMEDIT], [1], + [Tool to change global to local symbols on Mac OS X]) + _LT_DECL([], [LIPO], [1], + [Tool to manipulate fat objects and archives on Mac OS X]) + _LT_DECL([], [OTOOL], [1], + [ldd/readelf like tool for Mach-O binaries on Mac OS X]) + _LT_DECL([], [OTOOL64], [1], + [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) + + AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], + [lt_cv_apple_cc_single_mod=no + if test -z "${LT_MULTI_MODULE}"; then + # By default we will add the -single_module flag. You can override + # by either setting the environment variable LT_MULTI_MODULE + # non-empty at configure time, or by adding -multi_module to the + # link flags. + rm -rf libconftest.dylib* + echo "int foo(void){return 1;}" > conftest.c + echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ +-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD + $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ + -dynamiclib -Wl,-single_module conftest.c 2>conftest.err + _lt_result=$? + if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then + lt_cv_apple_cc_single_mod=yes + else + cat conftest.err >&AS_MESSAGE_LOG_FD + fi + rm -rf libconftest.dylib* + rm -f conftest.* + fi]) + AC_CACHE_CHECK([for -exported_symbols_list linker flag], + [lt_cv_ld_exported_symbols_list], + [lt_cv_ld_exported_symbols_list=no + save_LDFLAGS=$LDFLAGS + echo "_main" > conftest.sym + LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" + AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], + [lt_cv_ld_exported_symbols_list=yes], + [lt_cv_ld_exported_symbols_list=no]) + LDFLAGS="$save_LDFLAGS" + ]) + case $host_os in + rhapsody* | darwin1.[[012]]) + _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; + darwin1.*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + darwin*) # darwin 5.x on + # if running on 10.5 or later, the deployment target defaults + # to the OS version, if on x86, and 10.4, the deployment + # target defaults to 10.4. Don't you love it? + case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in + 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + 10.[[012]]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + 10.*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + esac + ;; + esac + if test "$lt_cv_apple_cc_single_mod" = "yes"; then + _lt_dar_single_mod='$single_module' + fi + if test "$lt_cv_ld_exported_symbols_list" = "yes"; then + _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' + else + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + if test "$DSYMUTIL" != ":"; then + _lt_dsymutil='~$DSYMUTIL $lib || :' + else + _lt_dsymutil= + fi + ;; + esac +]) + + +# _LT_DARWIN_LINKER_FEATURES +# -------------------------- +# Checks for linker and compiler features on darwin +m4_defun([_LT_DARWIN_LINKER_FEATURES], +[ + m4_require([_LT_REQUIRED_DARWIN_CHECKS]) + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_automatic, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_TAGVAR(whole_archive_flag_spec, $1)='' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" + case $cc_basename in + ifort*) _lt_dar_can_shared=yes ;; + *) _lt_dar_can_shared=$GCC ;; + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=echo + _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" + _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" + _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" + _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + m4_if([$1], [CXX], +[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then + _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" + _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" + fi +],[]) + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi +]) + +# _LT_SYS_MODULE_PATH_AIX +# ----------------------- +# Links a minimal program and checks the executable +# for the system default hardcoded library path. In most cases, +# this is /usr/lib:/lib, but when the MPI compilers are used +# the location of the communication and MPI libs are included too. +# If we don't find anything, use the default library path according +# to the aix ld manual. +m4_defun([_LT_SYS_MODULE_PATH_AIX], +[m4_require([_LT_DECL_SED])dnl +AC_LINK_IFELSE(AC_LANG_PROGRAM,[ +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi],[]) +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi +])# _LT_SYS_MODULE_PATH_AIX + + +# _LT_SHELL_INIT(ARG) +# ------------------- +m4_define([_LT_SHELL_INIT], +[ifdef([AC_DIVERSION_NOTICE], + [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], + [AC_DIVERT_PUSH(NOTICE)]) +$1 +AC_DIVERT_POP +])# _LT_SHELL_INIT + + +# _LT_PROG_ECHO_BACKSLASH +# ----------------------- +# Add some code to the start of the generated configure script which +# will find an echo command which doesn't interpret backslashes. +m4_defun([_LT_PROG_ECHO_BACKSLASH], +[_LT_SHELL_INIT([ +# Check that we are running under the correct shell. +SHELL=${CONFIG_SHELL-/bin/sh} + +case X$lt_ECHO in +X*--fallback-echo) + # Remove one level of quotation (which was required for Make). + ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` + ;; +esac + +ECHO=${lt_ECHO-echo} +if test "X[$]1" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift +elif test "X[$]1" = X--fallback-echo; then + # Avoid inline document here, it may be left over + : +elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then + # Yippee, $ECHO works! + : +else + # Restart under the correct shell. + exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} +fi + +if test "X[$]1" = X--fallback-echo; then + # used as fallback echo + shift + cat <<_LT_EOF +[$]* +_LT_EOF + exit 0 +fi + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +if test -z "$lt_ECHO"; then + if test "X${echo_test_string+set}" != Xset; then + # find a string as large as possible, as long as the shell can cope with it + for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do + # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... + if { echo_test_string=`eval $cmd`; } 2>/dev/null && + { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null + then + break + fi + done + fi + + if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && + echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + : + else + # The Solaris, AIX, and Digital Unix default echo programs unquote + # backslashes. This makes it impossible to quote backslashes using + # echo "$something" | sed 's/\\/\\\\/g' + # + # So, first we look for a working echo in the user's PATH. + + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for dir in $PATH /usr/ucb; do + IFS="$lt_save_ifs" + if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && + test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + ECHO="$dir/echo" + break + fi + done + IFS="$lt_save_ifs" + + if test "X$ECHO" = Xecho; then + # We didn't find a better echo, so look for alternatives. + if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && + echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # This shell has a builtin print -r that does the trick. + ECHO='print -r' + elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && + test "X$CONFIG_SHELL" != X/bin/ksh; then + # If we have ksh, try running configure again with it. + ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} + export ORIGINAL_CONFIG_SHELL + CONFIG_SHELL=/bin/ksh + export CONFIG_SHELL + exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} + else + # Try using printf. + ECHO='printf %s\n' + if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && + echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # Cool, printf works + : + elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL + export CONFIG_SHELL + SHELL="$CONFIG_SHELL" + export SHELL + ECHO="$CONFIG_SHELL [$]0 --fallback-echo" + elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + ECHO="$CONFIG_SHELL [$]0 --fallback-echo" + else + # maybe with a smaller string... + prev=: + + for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do + if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null + then + break + fi + prev="$cmd" + done + + if test "$prev" != 'sed 50q "[$]0"'; then + echo_test_string=`eval $prev` + export echo_test_string + exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} + else + # Oops. We lost completely, so just stick with echo. + ECHO=echo + fi + fi + fi + fi + fi +fi + +# Copy echo and quote the copy suitably for passing to libtool from +# the Makefile, instead of quoting the original, which is used later. +lt_ECHO=$ECHO +if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then + lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" +fi + +AC_SUBST(lt_ECHO) +]) +_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) +_LT_DECL([], [ECHO], [1], + [An echo program that does not interpret backslashes]) +])# _LT_PROG_ECHO_BACKSLASH + + +# _LT_ENABLE_LOCK +# --------------- +m4_defun([_LT_ENABLE_LOCK], +[AC_ARG_ENABLE([libtool-lock], + [AS_HELP_STRING([--disable-libtool-lock], + [avoid locking (might break parallel builds)])]) +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case $host in +ia64-*-hpux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE="32" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; + esac + fi + rm -rf conftest* + ;; +*-*-irix6*) + # Find out which ABI we are using. + echo '[#]line __oline__ "configure"' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + if test "$lt_cv_prog_gnu_ld" = yes; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* + ;; + +x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +s390*-*linux*|s390*-*tpf*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.o` in + *32-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_i386_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_i386" + ;; + ppc64-*linux*|powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_x86_64_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + ppc*-*linux*|powerpc*-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*|s390*-*tpf*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -belf" + AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, + [AC_LANG_PUSH(C) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) + AC_LANG_POP]) + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; +sparc*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) LD="${LD-ld} -m elf64_sparc" ;; + *) + if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then + LD="${LD-ld} -64" + fi + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; +esac + +need_locks="$enable_libtool_lock" +])# _LT_ENABLE_LOCK + + +# _LT_CMD_OLD_ARCHIVE +# ------------------- +m4_defun([_LT_CMD_OLD_ARCHIVE], +[AC_CHECK_TOOL(AR, ar, false) +test -z "$AR" && AR=ar +test -z "$AR_FLAGS" && AR_FLAGS=cru +_LT_DECL([], [AR], [1], [The archiver]) +_LT_DECL([], [AR_FLAGS], [1]) + +AC_CHECK_TOOL(STRIP, strip, :) +test -z "$STRIP" && STRIP=: +_LT_DECL([], [STRIP], [1], [A symbol stripping program]) + +AC_CHECK_TOOL(RANLIB, ranlib, :) +test -z "$RANLIB" && RANLIB=: +_LT_DECL([], [RANLIB], [1], + [Commands used to install an old-style archive]) + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= + +if test -n "$RANLIB"; then + case $host_os in + openbsd*) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" + ;; + *) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" +fi +_LT_DECL([], [old_postinstall_cmds], [2]) +_LT_DECL([], [old_postuninstall_cmds], [2]) +_LT_TAGDECL([], [old_archive_cmds], [2], + [Commands used to build an old-style archive]) +])# _LT_CMD_OLD_ARCHIVE + + +# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) +# ---------------------------------------------------------------- +# Check whether the given compiler option works +AC_DEFUN([_LT_COMPILER_OPTION], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_SED])dnl +AC_CACHE_CHECK([$1], [$2], + [$2=no + m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$3" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + $2=yes + fi + fi + $RM conftest* +]) + +if test x"[$]$2" = xyes; then + m4_if([$5], , :, [$5]) +else + m4_if([$6], , :, [$6]) +fi +])# _LT_COMPILER_OPTION + +# Old name: +AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) + + +# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [ACTION-SUCCESS], [ACTION-FAILURE]) +# ---------------------------------------------------- +# Check whether the given linker option works +AC_DEFUN([_LT_LINKER_OPTION], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_SED])dnl +AC_CACHE_CHECK([$1], [$2], + [$2=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $3" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&AS_MESSAGE_LOG_FD + $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + $2=yes + fi + else + $2=yes + fi + fi + $RM -r conftest* + LDFLAGS="$save_LDFLAGS" +]) + +if test x"[$]$2" = xyes; then + m4_if([$4], , :, [$4]) +else + m4_if([$5], , :, [$5]) +fi +])# _LT_LINKER_OPTION + +# Old name: +AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) + + +# LT_CMD_MAX_LEN +#--------------- +AC_DEFUN([LT_CMD_MAX_LEN], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +# find the maximum length of command line arguments +AC_MSG_CHECKING([the maximum length of command line arguments]) +AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl + i=0 + teststring="ABCD" + + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; + + cygwin* | mingw* | cegcc*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; + + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; + + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; + + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 + ;; + + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi + ;; + *) + lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` + if test -n "$lt_cv_sys_max_cmd_len"; then + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + else + # Make teststring a little bigger before we do anything with it. + # a 1K string should be a reasonable start. + for i in 1 2 3 4 5 6 7 8 ; do + teststring=$teststring$teststring + done + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + # If test is not a shell built-in, we'll probably end up computing a + # maximum length that is only half of the actual maximum length, but + # we can't tell. + while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ + = "XX$teststring$teststring"; } >/dev/null 2>&1 && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + # Only check the string length outside the loop. + lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` + teststring= + # Add a significant safety factor because C++ compilers can tack on + # massive amounts of additional arguments before passing them to the + # linker. It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + fi + ;; + esac +]) +if test -n $lt_cv_sys_max_cmd_len ; then + AC_MSG_RESULT($lt_cv_sys_max_cmd_len) +else + AC_MSG_RESULT(none) +fi +max_cmd_len=$lt_cv_sys_max_cmd_len +_LT_DECL([], [max_cmd_len], [0], + [What is the maximum length of a command?]) +])# LT_CMD_MAX_LEN + +# Old name: +AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) + + +# _LT_HEADER_DLFCN +# ---------------- +m4_defun([_LT_HEADER_DLFCN], +[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl +])# _LT_HEADER_DLFCN + + +# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, +# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) +# ---------------------------------------------------------------- +m4_defun([_LT_TRY_DLOPEN_SELF], +[m4_require([_LT_HEADER_DLFCN])dnl +if test "$cross_compiling" = yes; then : + [$4] +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +[#line __oline__ "configure" +#include "confdefs.h" + +#if HAVE_DLFCN_H +#include +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + else + puts (dlerror ()); + + return status; +}] +_LT_EOF + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) $1 ;; + x$lt_dlneed_uscore) $2 ;; + x$lt_dlunknown|x*) $3 ;; + esac + else : + # compilation failed + $3 + fi +fi +rm -fr conftest* +])# _LT_TRY_DLOPEN_SELF + + +# LT_SYS_DLOPEN_SELF +# ------------------ +AC_DEFUN([LT_SYS_DLOPEN_SELF], +[m4_require([_LT_HEADER_DLFCN])dnl +if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32* | cegcc*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + AC_CHECK_LIB([dl], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ]) + ;; + + *) + AC_CHECK_FUNC([shl_load], + [lt_cv_dlopen="shl_load"], + [AC_CHECK_LIB([dld], [shl_load], + [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], + [AC_CHECK_FUNC([dlopen], + [lt_cv_dlopen="dlopen"], + [AC_CHECK_LIB([dl], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], + [AC_CHECK_LIB([svld], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], + [AC_CHECK_LIB([dld], [dld_link], + [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) + ]) + ]) + ]) + ]) + ]) + ;; + esac + + if test "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes + else + enable_dlopen=no + fi + + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS="$LDFLAGS" + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" + + AC_CACHE_CHECK([whether a program can dlopen itself], + lt_cv_dlopen_self, [dnl + _LT_TRY_DLOPEN_SELF( + lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, + lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) + ]) + + if test "x$lt_cv_dlopen_self" = xyes; then + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" + AC_CACHE_CHECK([whether a statically linked program can dlopen itself], + lt_cv_dlopen_self_static, [dnl + _LT_TRY_DLOPEN_SELF( + lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, + lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) + ]) + fi + + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi +_LT_DECL([dlopen_support], [enable_dlopen], [0], + [Whether dlopen is supported]) +_LT_DECL([dlopen_self], [enable_dlopen_self], [0], + [Whether dlopen of programs is supported]) +_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], + [Whether dlopen of statically linked programs is supported]) +])# LT_SYS_DLOPEN_SELF + +# Old name: +AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) + + +# _LT_COMPILER_C_O([TAGNAME]) +# --------------------------- +# Check to see if options -c and -o are simultaneously supported by compiler. +# This macro does not hard code the compiler like AC_PROG_CC_C_O. +m4_defun([_LT_COMPILER_C_O], +[m4_require([_LT_DECL_SED])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_TAG_COMPILER])dnl +AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], + [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], + [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes + fi + fi + chmod u+w . 2>&AS_MESSAGE_LOG_FD + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* +]) +_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], + [Does compiler simultaneously support -c and -o options?]) +])# _LT_COMPILER_C_O + + +# _LT_COMPILER_FILE_LOCKS([TAGNAME]) +# ---------------------------------- +# Check to see if we can do hard links to lock some files if needed +m4_defun([_LT_COMPILER_FILE_LOCKS], +[m4_require([_LT_ENABLE_LOCK])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +_LT_COMPILER_C_O([$1]) + +hard_links="nottested" +if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + AC_MSG_CHECKING([if we can lock with hard links]) + hard_links=yes + $RM conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + AC_MSG_RESULT([$hard_links]) + if test "$hard_links" = no; then + AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) + need_locks=warn + fi +else + need_locks=no +fi +_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) +])# _LT_COMPILER_FILE_LOCKS + + +# _LT_CHECK_OBJDIR +# ---------------- +m4_defun([_LT_CHECK_OBJDIR], +[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], +[rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + lt_cv_objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + lt_cv_objdir=_libs +fi +rmdir .libs 2>/dev/null]) +objdir=$lt_cv_objdir +_LT_DECL([], [objdir], [0], + [The name of the directory that contains temporary libtool files])dnl +m4_pattern_allow([LT_OBJDIR])dnl +AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", + [Define to the sub-directory in which libtool stores uninstalled libraries.]) +])# _LT_CHECK_OBJDIR + + +# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) +# -------------------------------------- +# Check hardcoding attributes. +m4_defun([_LT_LINKER_HARDCODE_LIBPATH], +[AC_MSG_CHECKING([how to hardcode library paths into programs]) +_LT_TAGVAR(hardcode_action, $1)= +if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || + test -n "$_LT_TAGVAR(runpath_var, $1)" || + test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then + + # We can hardcode non-existent directories. + if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && + test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then + # Linking always hardcodes the temporary library directory. + _LT_TAGVAR(hardcode_action, $1)=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + _LT_TAGVAR(hardcode_action, $1)=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + _LT_TAGVAR(hardcode_action, $1)=unsupported +fi +AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) + +if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || + test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi +_LT_TAGDECL([], [hardcode_action], [0], + [How to hardcode a shared library path into an executable]) +])# _LT_LINKER_HARDCODE_LIBPATH + + +# _LT_CMD_STRIPLIB +# ---------------- +m4_defun([_LT_CMD_STRIPLIB], +[m4_require([_LT_DECL_EGREP]) +striplib= +old_striplib= +AC_MSG_CHECKING([whether stripping libraries is possible]) +if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + AC_MSG_RESULT([yes]) +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + old_striplib="$STRIP -S" + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + fi + ;; + *) + AC_MSG_RESULT([no]) + ;; + esac +fi +_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) +_LT_DECL([], [striplib], [1]) +])# _LT_CMD_STRIPLIB + + +# _LT_SYS_DYNAMIC_LINKER([TAG]) +# ----------------------------- +# PORTME Fill in your ld.so characteristics +m4_defun([_LT_SYS_DYNAMIC_LINKER], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_OBJDUMP])dnl +m4_require([_LT_DECL_SED])dnl +AC_MSG_CHECKING([dynamic linker characteristics]) +m4_if([$1], + [], [ +if test "$GCC" = yes; then + case $host_os in + darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; + *) lt_awk_arg="/^libraries:/" ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` + else + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # Ok, now we have the path, separated by spaces, we can step through it + # and add multilib dir if necessary. + lt_tmp_lt_search_path_spec= + lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + for lt_sys_path in $lt_search_path_spec; do + if test -d "$lt_sys_path/$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" + else + test -d "$lt_sys_path" && \ + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" + fi + done + lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' +BEGIN {RS=" "; FS="/|\n";} { + lt_foo=""; + lt_count=0; + for (lt_i = NF; lt_i > 0; lt_i--) { + if ($lt_i != "" && $lt_i != ".") { + if ($lt_i == "..") { + lt_count++; + } else { + if (lt_count == 0) { + lt_foo="/" $lt_i lt_foo; + } else { + lt_count--; + } + } + } + } + if (lt_foo != "") { lt_freq[[lt_foo]]++; } + if (lt_freq[[lt_foo]] == 1) { print lt_foo; } +}'` + sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi]) +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix[[4-9]]*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[[01]] | aix4.[[01]].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + case $host_cpu in + powerpc) + # Since July 2007 AmigaOS4 officially supports .so libraries. + # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + ;; + m68k) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + esac + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[[45]]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32* | cegcc*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw* | cegcc*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' +m4_if([$1], [],[ + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[[123]]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[[01]]* | freebsdelf3.[[01]]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ + freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +interix[[3-9]]*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # Some binutils ld are patched to set DT_RUNPATH + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ + LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" + AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], + [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], + [shlibpath_overrides_runpath=yes])]) + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +*nto* | *qnx*) + version_type=qnx + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='ldqnx.so' + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[[89]] | openbsd2.[[89]].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +rdos*) + dynamic_linker=no + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +tpf*) + # TPF is a cross-target only. Preferred cross-host = GNU/Linux. + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +AC_MSG_RESULT([$dynamic_linker]) +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then + sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +fi +if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then + sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" +fi + +_LT_DECL([], [variables_saved_for_relink], [1], + [Variables whose values should be saved in libtool wrapper scripts and + restored at link time]) +_LT_DECL([], [need_lib_prefix], [0], + [Do we need the "lib" prefix for modules?]) +_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) +_LT_DECL([], [version_type], [0], [Library versioning type]) +_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) +_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) +_LT_DECL([], [shlibpath_overrides_runpath], [0], + [Is shlibpath searched before the hard-coded library search path?]) +_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) +_LT_DECL([], [library_names_spec], [1], + [[List of archive names. First name is the real one, the rest are links. + The last name is the one that the linker finds with -lNAME]]) +_LT_DECL([], [soname_spec], [1], + [[The coded name of the library, if different from the real name]]) +_LT_DECL([], [postinstall_cmds], [2], + [Command to use after installation of a shared archive]) +_LT_DECL([], [postuninstall_cmds], [2], + [Command to use after uninstallation of a shared archive]) +_LT_DECL([], [finish_cmds], [2], + [Commands used to finish a libtool library installation in a directory]) +_LT_DECL([], [finish_eval], [1], + [[As "finish_cmds", except a single script fragment to be evaled but + not shown]]) +_LT_DECL([], [hardcode_into_libs], [0], + [Whether we should hardcode library paths into libraries]) +_LT_DECL([], [sys_lib_search_path_spec], [2], + [Compile-time system search path for libraries]) +_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], + [Run-time system search path for libraries]) +])# _LT_SYS_DYNAMIC_LINKER + + +# _LT_PATH_TOOL_PREFIX(TOOL) +# -------------------------- +# find a file program which can recognize shared library +AC_DEFUN([_LT_PATH_TOOL_PREFIX], +[m4_require([_LT_DECL_EGREP])dnl +AC_MSG_CHECKING([for $1]) +AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, +[case $MAGIC_CMD in +[[\\/*] | ?:[\\/]*]) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR +dnl $ac_dummy forces splitting on constant user-supplied paths. +dnl POSIX.2 word splitting is done only on the output of word expansions, +dnl not every word. This closes a longstanding sh security hole. + ac_dummy="m4_if([$2], , $PATH, [$2])" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$1; then + lt_cv_path_MAGIC_CMD="$ac_dir/$1" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_LT_EOF 1>&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +_LT_EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac]) +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + AC_MSG_RESULT($MAGIC_CMD) +else + AC_MSG_RESULT(no) +fi +_LT_DECL([], [MAGIC_CMD], [0], + [Used to examine libraries when file_magic_cmd begins with "file"])dnl +])# _LT_PATH_TOOL_PREFIX + +# Old name: +AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) + + +# _LT_PATH_MAGIC +# -------------- +# find a file program which can recognize a shared library +m4_defun([_LT_PATH_MAGIC], +[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) + else + MAGIC_CMD=: + fi +fi +])# _LT_PATH_MAGIC + + +# LT_PATH_LD +# ---------- +# find the pathname to the GNU or non-GNU linker +AC_DEFUN([LT_PATH_LD], +[AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_DECL_EGREP])dnl + +AC_ARG_WITH([gnu-ld], + [AS_HELP_STRING([--with-gnu-ld], + [assume the C compiler uses GNU ld @<:@default=no@:>@])], + [test "$withval" = no || with_gnu_ld=yes], + [with_gnu_ld=no])dnl + +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + AC_MSG_CHECKING([for ld used by $CC]) + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [[\\/]]* | ?:[[\\/]]*) + re_direlt='/[[^/]][[^/]]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` + while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do + ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + AC_MSG_CHECKING([for GNU ld]) +else + AC_MSG_CHECKING([for non-GNU ld]) +fi +AC_CACHE_VAL(lt_cv_path_LD, +[if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else + lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; + +cegcc) + # use the weaker test based on 'objdump'. See mingw*. + lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + ;; + +darwin* | rhapsody*) + lt_cv_deplibs_check_method=pass_all + ;; + +freebsd* | dragonfly*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + +gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + +hpux10.20* | hpux11*) + lt_cv_file_magic_cmd=/usr/bin/file + case $host_cpu in + ia64*) + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so + ;; + hppa*64*) + [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl + ;; + *) + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + esac + ;; + +interix[[3-9]]*) + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' + ;; + +irix5* | irix6* | nonstopux*) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + lt_cv_deplibs_check_method=pass_all + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu) + lt_cv_deplibs_check_method=pass_all + ;; + +netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' + fi + ;; + +newos6*) + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libnls.so + ;; + +*nto* | *qnx*) + lt_cv_deplibs_check_method=pass_all + ;; + +openbsd*) + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' + fi + ;; + +osf3* | osf4* | osf5*) + lt_cv_deplibs_check_method=pass_all + ;; + +rdos*) + lt_cv_deplibs_check_method=pass_all + ;; + +solaris*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv4 | sysv4.3*) + case $host_vendor in + motorola) + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + ncr) + lt_cv_deplibs_check_method=pass_all + ;; + sequent) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' + ;; + sni) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" + lt_cv_file_magic_test_file=/lib/libc.so + ;; + siemens) + lt_cv_deplibs_check_method=pass_all + ;; + pc) + lt_cv_deplibs_check_method=pass_all + ;; + esac + ;; + +tpf*) + lt_cv_deplibs_check_method=pass_all + ;; +esac +]) +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method +test -z "$deplibs_check_method" && deplibs_check_method=unknown + +_LT_DECL([], [deplibs_check_method], [1], + [Method to check whether dependent libraries are shared objects]) +_LT_DECL([], [file_magic_cmd], [1], + [Command to use when deplibs_check_method == "file_magic"]) +])# _LT_CHECK_MAGIC_METHOD + + +# LT_PATH_NM +# ---------- +# find the pathname to a BSD- or MS-compatible name lister +AC_DEFUN([LT_PATH_NM], +[AC_REQUIRE([AC_PROG_CC])dnl +AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, +[if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM="$NM" +else + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + tmp_nm="$ac_dir/$lt_tmp_nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" + done + : ${lt_cv_path_NM=no} +fi]) +if test "$lt_cv_path_NM" != "no"; then + NM="$lt_cv_path_NM" +else + # Didn't find any BSD compatible name lister, look for dumpbin. + AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :) + AC_SUBST([DUMPBIN]) + if test "$DUMPBIN" != ":"; then + NM="$DUMPBIN" + fi +fi +test -z "$NM" && NM=nm +AC_SUBST([NM]) +_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl + +AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], + [lt_cv_nm_interface="BSD nm" + echo "int some_variable = 0;" > conftest.$ac_ext + (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$ac_compile" 2>conftest.err) + cat conftest.err >&AS_MESSAGE_LOG_FD + (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) + (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) + cat conftest.err >&AS_MESSAGE_LOG_FD + (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD) + cat conftest.out >&AS_MESSAGE_LOG_FD + if $GREP 'External.*some_variable' conftest.out > /dev/null; then + lt_cv_nm_interface="MS dumpbin" + fi + rm -f conftest*]) +])# LT_PATH_NM + +# Old names: +AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) +AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_PROG_NM], []) +dnl AC_DEFUN([AC_PROG_NM], []) + + +# LT_LIB_M +# -------- +# check for math library +AC_DEFUN([LT_LIB_M], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +LIBM= +case $host in +*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) + # These system don't have libm, or don't need it + ;; +*-ncr-sysv4.3*) + AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") + AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") + ;; +*) + AC_CHECK_LIB(m, cos, LIBM="-lm") + ;; +esac +AC_SUBST([LIBM]) +])# LT_LIB_M + +# Old name: +AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_CHECK_LIBM], []) + + +# _LT_COMPILER_NO_RTTI([TAGNAME]) +# ------------------------------- +m4_defun([_LT_COMPILER_NO_RTTI], +[m4_require([_LT_TAG_COMPILER])dnl + +_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= + +if test "$GCC" = yes; then + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' + + _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], + lt_cv_prog_compiler_rtti_exceptions, + [-fno-rtti -fno-exceptions], [], + [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) +fi +_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], + [Compiler flag to turn off builtin functions]) +])# _LT_COMPILER_NO_RTTI + + +# _LT_CMD_GLOBAL_SYMBOLS +# ---------------------- +m4_defun([_LT_CMD_GLOBAL_SYMBOLS], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([LT_PATH_NM])dnl +AC_REQUIRE([LT_PATH_LD])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_TAG_COMPILER])dnl + +# Check for command to grab the raw symbol name followed by C symbol from nm. +AC_MSG_CHECKING([command to parse $NM output from $compiler object]) +AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], +[ +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] + +# Character class describing NM global symbol codes. +symcode='[[BCDEGRST]]' + +# Regexp to match symbols that can be accessed directly from C. +sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[[BCDT]]' + ;; +cygwin* | mingw* | pw32* | cegcc*) + symcode='[[ABCDGISTW]]' + ;; +hpux*) + if test "$host_cpu" = ia64; then + symcode='[[ABCDEGRST]]' + fi + ;; +irix* | nonstopux*) + symcode='[[BCDEGRST]]' + ;; +osf*) + symcode='[[BCDEGQRST]]' + ;; +solaris*) + symcode='[[BDRT]]' + ;; +sco3.2v5*) + symcode='[[DT]]' + ;; +sysv4.2uw2*) + symcode='[[DT]]' + ;; +sysv5* | sco5v6* | unixware* | OpenUNIX*) + symcode='[[ABDT]]' + ;; +sysv4) + symcode='[[DFNSTU]]' + ;; +esac + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[[ABCDGIRSTW]]' ;; +esac + +# Transform an extracted symbol line into a proper C declaration. +# Some systems (esp. on ia64) link data and code symbols differently, +# so use this general approach. +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + +# Transform an extracted symbol line into symbol name and symbol address +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" + +# Handle CRLF in mingw tool chain +opt_cr= +case $build_os in +mingw*) + opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp + ;; +esac + +# Try without a prefix underscore, then with it. +for ac_symprfx in "" "_"; do + + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. + symxfrm="\\1 $ac_symprfx\\2 \\2" + + # Write the raw and C identifiers. + if test "$lt_cv_nm_interface" = "MS dumpbin"; then + # Fake it for dumpbin and say T for any non-static function + # and D for any global variable. + # Also find C++ and __fastcall symbols from MSVC++, + # which start with @ or ?. + lt_cv_sys_global_symbol_pipe="$AWK ['"\ +" {last_section=section; section=\$ 3};"\ +" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ +" \$ 0!~/External *\|/{next};"\ +" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ +" {if(hide[section]) next};"\ +" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ +" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ +" s[1]~/^[@?]/{print s[1], s[1]; next};"\ +" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ +" ' prfx=^$ac_symprfx]" + else + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + fi + + # Check to see that the pipe works correctly. + pipe_works=no + + rm -f conftest* + cat > conftest.$ac_ext <<_LT_EOF +#ifdef __cplusplus +extern "C" { +#endif +char nm_test_var; +void nm_test_func(void); +void nm_test_func(void){} +#ifdef __cplusplus +} +#endif +int main(){nm_test_var='a';nm_test_func();return(0);} +_LT_EOF + + if AC_TRY_EVAL(ac_compile); then + # Now try to grab the symbols. + nlist=conftest.nm + if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T + fi + + # Make sure that we snagged all the symbols we need. + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then + cat <<_LT_EOF > conftest.$ac_ext +#ifdef __cplusplus +extern "C" { +#endif + +_LT_EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' + + cat <<_LT_EOF >> conftest.$ac_ext + +/* The mapping between symbol names and symbols. */ +const struct { + const char *name; + void *address; +} +lt__PROGRAM__LTX_preloaded_symbols[[]] = +{ + { "@PROGRAM@", (void *) 0 }, +_LT_EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext + cat <<\_LT_EOF >> conftest.$ac_ext + {0, (void *) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt__PROGRAM__LTX_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif +_LT_EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_save_LIBS="$LIBS" + lt_save_CFLAGS="$CFLAGS" + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then + pipe_works=yes + fi + LIBS="$lt_save_LIBS" + CFLAGS="$lt_save_CFLAGS" + else + echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD + fi + else + echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD + fi + else + echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD + cat conftest.$ac_ext >&5 + fi + rm -rf conftest* conftst* + + # Do not use the global_symbol_pipe unless it works. + if test "$pipe_works" = yes; then + break + else + lt_cv_sys_global_symbol_pipe= + fi +done +]) +if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= +fi +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + AC_MSG_RESULT(failed) +else + AC_MSG_RESULT(ok) +fi + +_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], + [Take the output of nm and produce a listing of raw symbols and C names]) +_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], + [Transform the output of nm in a proper C declaration]) +_LT_DECL([global_symbol_to_c_name_address], + [lt_cv_sys_global_symbol_to_c_name_address], [1], + [Transform the output of nm in a C name address pair]) +_LT_DECL([global_symbol_to_c_name_address_lib_prefix], + [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], + [Transform the output of nm in a C name address pair when lib prefix is needed]) +]) # _LT_CMD_GLOBAL_SYMBOLS + + +# _LT_COMPILER_PIC([TAGNAME]) +# --------------------------- +m4_defun([_LT_COMPILER_PIC], +[m4_require([_LT_TAG_COMPILER])dnl +_LT_TAGVAR(lt_prog_compiler_wl, $1)= +_LT_TAGVAR(lt_prog_compiler_pic, $1)= +_LT_TAGVAR(lt_prog_compiler_static, $1)= + +AC_MSG_CHECKING([for $compiler option to produce PIC]) +m4_if([$1], [CXX], [ + # C++ specific cases for pic, static, wl, etc. + if test "$GXX" = yes; then + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + mingw* | cygwin* | os2* | pw32* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + *djgpp*) + # DJGPP does not support shared libraries at all + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + interix[[3-9]]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + else + case $host_os in + aix[[4-9]]*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + chorus*) + case $cc_basename in + cxch68*) + # Green Hills C++ Compiler + # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" + ;; + esac + ;; + dgux*) + case $cc_basename in + ec++*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + ghcx*) + # Green Hills C++ Compiler + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + freebsd* | dragonfly*) + # FreeBSD uses GNU C++ + ;; + hpux9* | hpux10* | hpux11*) + case $cc_basename in + CC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + if test "$host_cpu" != ia64; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + fi + ;; + aCC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + ;; + esac + ;; + *) + ;; + esac + ;; + interix*) + # This is c89, which is MS Visual C++ (no shared libs) + # Anyone wants to do a port? + ;; + irix5* | irix6* | nonstopux*) + case $cc_basename in + CC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + # CC pic flag -KPIC is the default. + ;; + *) + ;; + esac + ;; + linux* | k*bsd*-gnu | kopensolaris*-gnu) + case $cc_basename in + KCC*) + # KAI C++ Compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + ecpc* ) + # old Intel C++ for x86_64 which still supported -KPIC. + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + icpc* ) + # Intel C++, used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + cxx*) + # Compaq C++ + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + xlc* | xlC*) + # IBM XL 8.0 on PPC + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + esac + ;; + esac + ;; + lynxos*) + ;; + m88k*) + ;; + mvs*) + case $cc_basename in + cxx*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' + ;; + *) + ;; + esac + ;; + netbsd* | netbsdelf*-gnu) + ;; + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + ;; + RCC*) + # Rational C++ 2.4.1 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + cxx*) + # Digital/Compaq C++ + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + *) + ;; + esac + ;; + psos*) + ;; + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + ;; + *) + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + lcc*) + # Lucid + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + case $cc_basename in + CC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + *) + ;; + esac + ;; + vxworks*) + ;; + *) + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +], +[ + if test "$GCC" = yes; then + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + # +Z the default + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + + interix[[3-9]]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + enable_shared=no + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + + hpux9* | hpux10* | hpux11*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC (with -KPIC) is the default. + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + linux* | k*bsd*-gnu | kopensolaris*-gnu) + case $cc_basename in + # old Intel for x86_64 which still supported -KPIC. + ecc*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + # icc used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + icc* | ifort*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + # Lahey Fortran 8.1. + lf95*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' + _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' + ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + ccc*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All Alpha code is PIC. + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + xl*) + # IBM XL C 8.0/Fortran 10.1 on PPC + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C 5.9 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + ;; + *Sun\ F*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='' + ;; + esac + ;; + esac + ;; + + newsos6) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + + osf3* | osf4* | osf5*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All OSF/1 code is PIC. + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + rdos*) + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + solaris*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; + *) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; + esac + ;; + + sunos4*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + unicos*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + + uts4*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + *) + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +]) +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" + ;; +esac +AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) +_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], + [How to pass a linker flag through the compiler]) + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then + _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], + [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], + [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], + [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in + "" | " "*) ;; + *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; + esac], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) +fi +_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], + [Additional compiler flags for building library objects]) + +# +# Check to make sure the static flag actually works. +# +wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" +_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], + _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), + $lt_tmp_static_flag, + [], + [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) +_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], + [Compiler flag to prevent dynamic linking]) +])# _LT_COMPILER_PIC + + +# _LT_LINKER_SHLIBS([TAGNAME]) +# ---------------------------- +# See if the linker supports building shared libraries. +m4_defun([_LT_LINKER_SHLIBS], +[AC_REQUIRE([LT_PATH_LD])dnl +AC_REQUIRE([LT_PATH_NM])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl +m4_require([_LT_TAG_COMPILER])dnl +AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) +m4_if([$1], [CXX], [ + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + case $host_os in + aix[[4-9]]*) + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + else + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + fi + ;; + pw32*) + _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" + ;; + cygwin* | mingw* | cegcc*) + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' + ;; + linux* | k*bsd*-gnu) + _LT_TAGVAR(link_all_deplibs, $1)=no + ;; + *) + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + ;; + esac + _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] +], [ + runpath_var= + _LT_TAGVAR(allow_undefined_flag, $1)= + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(archive_cmds, $1)= + _LT_TAGVAR(archive_expsym_cmds, $1)= + _LT_TAGVAR(compiler_needs_object, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + _LT_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(hardcode_automatic, $1)=no + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= + _LT_TAGVAR(hardcode_libdir_separator, $1)= + _LT_TAGVAR(hardcode_minus_L, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_TAGVAR(inherit_rpath, $1)=no + _LT_TAGVAR(link_all_deplibs, $1)=unknown + _LT_TAGVAR(module_cmds, $1)= + _LT_TAGVAR(module_expsym_cmds, $1)= + _LT_TAGVAR(old_archive_from_new_cmds, $1)= + _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= + _LT_TAGVAR(thread_safe_flag_spec, $1)= + _LT_TAGVAR(whole_archive_flag_spec, $1)= + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + _LT_TAGVAR(include_expsyms, $1)= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + # Exclude shared library initialization/finalization symbols. +dnl Note also adjust exclude_expsyms for C++ above. + extract_expsyms_cmds= + + case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + linux* | k*bsd*-gnu) + _LT_TAGVAR(link_all_deplibs, $1)=no + ;; + esac + + _LT_TAGVAR(ld_shlibs, $1)=yes + if test "$with_gnu_ld" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then + _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)= + fi + supports_anon_versioning=no + case `$LD -v 2>&1` in + *GNU\ gold*) supports_anon_versioning=yes ;; + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix[[3-9]]*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + _LT_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to modify your PATH +*** so that a non-GNU linker is found, and then restart. + +_LT_EOF + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='' + ;; + m68k) + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + interix[[3-9]]*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) + tmp_diet=no + if test "$host_os" = linux-dietlibc; then + case $cc_basename in + diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) + esac + fi + if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ + && test "$tmp_diet" = no + then + tmp_addflag= + tmp_sharedflag='-shared' + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + lf95*) # Lahey Fortran 8.1 + _LT_TAGVAR(whole_archive_flag_spec, $1)= + tmp_sharedflag='--shared' ;; + xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) + tmp_sharedflag='-qmkshrobj' + tmp_addflag= ;; + esac + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(compiler_needs_object, $1)=yes + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + esac + _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test "x$supports_anon_versioning" = xyes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + + case $cc_basename in + xlf*) + # IBM XL Fortran 10.1 on PPC cannot create shared libs itself + _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' + _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + fi + ;; + esac + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then + _LT_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) + _LT_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + # For security reasons, it is highly recommended that you always + # use absolute paths for naming shared libraries, and exclude the + # DT_RUNPATH tag from executables and libraries. But doing so + # requires that you compile everything twice, which is a pain. + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + sunos4*) + _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + + if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then + runpath_var= + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_TAGVAR(whole_archive_flag_spec, $1)= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=yes + _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + _LT_TAGVAR(hardcode_direct, $1)=unsupported + fi + ;; + + aix[[4-9]]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + else + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + _LT_TAGVAR(archive_cmds, $1)='' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' + + if test "$GCC" = yes; then + case $host_os in aix4.[[012]]|aix4.[[012]].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + _LT_TAGVAR(hardcode_direct, $1)=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + _LT_TAGVAR(link_all_deplibs, $1)=no + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + _LT_TAGVAR(always_export_symbols, $1)=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. + _LT_SYS_MODULE_PATH_AIX + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + _LT_SYS_MODULE_PATH_AIX + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds its shared libraries. + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='' + ;; + m68k) + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + ;; + + bsdi[[45]]*) + _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' + # FIXME: Should let the user specify the lib program. + _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' + _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + ;; + + darwin* | rhapsody*) + _LT_DARWIN_LINKER_FEATURES($1) + ;; + + dgux*) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + freebsd1*) + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + hpux9*) + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(hardcode_direct, $1)=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + fi + if test "$with_gnu_ld" = no; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + # Try to use the -exported_symbol ld option, if it does not + # work, assume that -exports_file does not work either and + # implicitly export all symbols. + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + AC_LINK_IFELSE(int foo(void) {}, + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + ) + LDFLAGS="$save_LDFLAGS" + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(inherit_rpath, $1)=yes + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + newsos6) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *nto* | *qnx*) + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + else + case $host_os in + openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + ;; + esac + fi + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + os2*) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + else + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ + $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' + + # Both c and cxx compiler support -rpath directly + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + solaris*) + _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' + if test "$GCC" = yes; then + wlarc='${wl}' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + else + case `$CC -V 2>&1` in + *"Compilers 5.0"*) + wlarc='' + _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' + ;; + *) + wlarc='${wl}' + _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + ;; + esac + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. GCC discards it without `$wl', + # but is careful enough not to reorder. + # Supported since Solaris 2.6 (maybe 2.5.1?) + if test "$GCC" = yes; then + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' + fi + ;; + esac + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4) + case $host_vendor in + sni) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' + _LT_TAGVAR(hardcode_direct, $1)=no + ;; + motorola) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4.3*) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + _LT_TAGVAR(ld_shlibs, $1)=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + + if test x$host_vendor = xsni; then + case $host in + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' + ;; + esac + fi + fi +]) +AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) +test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + +_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld + +_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl +_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl +_LT_DECL([], [extract_expsyms_cmds], [2], + [The commands to extract the exported symbol list from a shared archive]) + +# +# Do we need to explicitly link libc? +# +case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in +x|xyes) + # Assume -lc should be added + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $_LT_TAGVAR(archive_cmds, $1) in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + AC_MSG_CHECKING([whether -lc should be explicitly linked in]) + $RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if AC_TRY_EVAL(ac_compile) 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) + pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) + _LT_TAGVAR(allow_undefined_flag, $1)= + if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) + then + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + else + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + fi + _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)]) + ;; + esac + fi + ;; +esac + +_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], + [Whether or not to add -lc for building shared libraries]) +_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], + [enable_shared_with_static_runtimes], [0], + [Whether or not to disallow shared libs when runtime libs are static]) +_LT_TAGDECL([], [export_dynamic_flag_spec], [1], + [Compiler flag to allow reflexive dlopens]) +_LT_TAGDECL([], [whole_archive_flag_spec], [1], + [Compiler flag to generate shared objects directly from archives]) +_LT_TAGDECL([], [compiler_needs_object], [1], + [Whether the compiler copes with passing no objects directly]) +_LT_TAGDECL([], [old_archive_from_new_cmds], [2], + [Create an old-style archive from a shared archive]) +_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], + [Create a temporary old-style archive to link instead of a shared archive]) +_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) +_LT_TAGDECL([], [archive_expsym_cmds], [2]) +_LT_TAGDECL([], [module_cmds], [2], + [Commands used to build a loadable module if different from building + a shared archive.]) +_LT_TAGDECL([], [module_expsym_cmds], [2]) +_LT_TAGDECL([], [with_gnu_ld], [1], + [Whether we are building with GNU ld or not]) +_LT_TAGDECL([], [allow_undefined_flag], [1], + [Flag that allows shared libraries with undefined symbols to be built]) +_LT_TAGDECL([], [no_undefined_flag], [1], + [Flag that enforces no undefined symbols]) +_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], + [Flag to hardcode $libdir into a binary during linking. + This must work even if $libdir does not exist]) +_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], + [[If ld is used when linking, flag to hardcode $libdir into a binary + during linking. This must work even if $libdir does not exist]]) +_LT_TAGDECL([], [hardcode_libdir_separator], [1], + [Whether we need a single "-rpath" flag with a separated argument]) +_LT_TAGDECL([], [hardcode_direct], [0], + [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes + DIR into the resulting binary]) +_LT_TAGDECL([], [hardcode_direct_absolute], [0], + [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes + DIR into the resulting binary and the resulting library dependency is + "absolute", i.e impossible to change by setting ${shlibpath_var} if the + library is relocated]) +_LT_TAGDECL([], [hardcode_minus_L], [0], + [Set to "yes" if using the -LDIR flag during linking hardcodes DIR + into the resulting binary]) +_LT_TAGDECL([], [hardcode_shlibpath_var], [0], + [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR + into the resulting binary]) +_LT_TAGDECL([], [hardcode_automatic], [0], + [Set to "yes" if building a shared library automatically hardcodes DIR + into the library and all subsequent libraries and executables linked + against it]) +_LT_TAGDECL([], [inherit_rpath], [0], + [Set to yes if linker adds runtime paths of dependent libraries + to runtime path list]) +_LT_TAGDECL([], [link_all_deplibs], [0], + [Whether libtool must link a program against all its dependency libraries]) +_LT_TAGDECL([], [fix_srcfile_path], [1], + [Fix the shell variable $srcfile for the compiler]) +_LT_TAGDECL([], [always_export_symbols], [0], + [Set to "yes" if exported symbols are required]) +_LT_TAGDECL([], [export_symbols_cmds], [2], + [The commands to list exported symbols]) +_LT_TAGDECL([], [exclude_expsyms], [1], + [Symbols that should not be listed in the preloaded symbols]) +_LT_TAGDECL([], [include_expsyms], [1], + [Symbols that must always be exported]) +_LT_TAGDECL([], [prelink_cmds], [2], + [Commands necessary for linking programs (against libraries) with templates]) +_LT_TAGDECL([], [file_list_spec], [1], + [Specify filename containing input files]) +dnl FIXME: Not yet implemented +dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], +dnl [Compiler flag to generate thread safe objects]) +])# _LT_LINKER_SHLIBS + + +# _LT_LANG_C_CONFIG([TAG]) +# ------------------------ +# Ensure that the configuration variables for a C compiler are suitably +# defined. These variables are subsequently used by _LT_CONFIG to write +# the compiler configuration to `libtool'. +m4_defun([_LT_LANG_C_CONFIG], +[m4_require([_LT_DECL_EGREP])dnl +lt_save_CC="$CC" +AC_LANG_PUSH(C) + +# Source file extension for C test sources. +ac_ext=c + +# Object file extension for compiled C test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(){return(0);}' + +_LT_TAG_COMPILER +# Save the default compiler, since it gets overwritten when the other +# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. +compiler_DEFAULT=$CC + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... +if test -n "$compiler"; then + _LT_COMPILER_NO_RTTI($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + LT_SYS_DLOPEN_SELF + _LT_CMD_STRIPLIB + + # Report which library types will actually be built + AC_MSG_CHECKING([if libtool supports shared libraries]) + AC_MSG_RESULT([$can_build_shared]) + + AC_MSG_CHECKING([whether to build shared libraries]) + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + + aix[[4-9]]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + AC_MSG_RESULT([$enable_shared]) + + AC_MSG_CHECKING([whether to build static libraries]) + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + AC_MSG_RESULT([$enable_static]) + + _LT_CONFIG($1) +fi +AC_LANG_POP +CC="$lt_save_CC" +])# _LT_LANG_C_CONFIG + + +# _LT_PROG_CXX +# ------------ +# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++ +# compiler, we have our own version here. +m4_defun([_LT_PROG_CXX], +[ +pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes]) +AC_PROG_CXX +if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + AC_PROG_CXXCPP +else + _lt_caught_CXX_error=yes +fi +popdef([AC_MSG_ERROR]) +])# _LT_PROG_CXX + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([_LT_PROG_CXX], []) + + +# _LT_LANG_CXX_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for a C++ compiler are suitably +# defined. These variables are subsequently used by _LT_CONFIG to write +# the compiler configuration to `libtool'. +m4_defun([_LT_LANG_CXX_CONFIG], +[AC_REQUIRE([_LT_PROG_CXX])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_EGREP])dnl + +AC_LANG_PUSH(C++) +_LT_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_TAGVAR(allow_undefined_flag, $1)= +_LT_TAGVAR(always_export_symbols, $1)=no +_LT_TAGVAR(archive_expsym_cmds, $1)= +_LT_TAGVAR(compiler_needs_object, $1)=no +_LT_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_TAGVAR(hardcode_direct, $1)=no +_LT_TAGVAR(hardcode_direct_absolute, $1)=no +_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= +_LT_TAGVAR(hardcode_libdir_separator, $1)= +_LT_TAGVAR(hardcode_minus_L, $1)=no +_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported +_LT_TAGVAR(hardcode_automatic, $1)=no +_LT_TAGVAR(inherit_rpath, $1)=no +_LT_TAGVAR(module_cmds, $1)= +_LT_TAGVAR(module_expsym_cmds, $1)= +_LT_TAGVAR(link_all_deplibs, $1)=unknown +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(no_undefined_flag, $1)= +_LT_TAGVAR(whole_archive_flag_spec, $1)= +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Source file extension for C++ test sources. +ac_ext=cpp + +# Object file extension for compiled C++ test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# No sense in running all these tests if we already determined that +# the CXX compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_caught_CXX_error" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="int some_variable = 0;" + + # Code to be used in simple link tests + lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + _LT_TAG_COMPILER + + # save warnings/boilerplate of simple test code + _LT_COMPILER_BOILERPLATE + _LT_LINKER_BOILERPLATE + + # Allow CC to be a program name with arguments. + lt_save_CC=$CC + lt_save_LD=$LD + lt_save_GCC=$GCC + GCC=$GXX + lt_save_with_gnu_ld=$with_gnu_ld + lt_save_path_LD=$lt_cv_path_LD + if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then + lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx + else + $as_unset lt_cv_prog_gnu_ld + fi + if test -n "${lt_cv_path_LDCXX+set}"; then + lt_cv_path_LD=$lt_cv_path_LDCXX + else + $as_unset lt_cv_path_LD + fi + test -z "${LDCXX+set}" || LD=$LDCXX + CC=${CXX-"c++"} + compiler=$CC + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) + + if test -n "$compiler"; then + # We don't want -fno-exception when compiling C++ code, so set the + # no_builtin_flag separately + if test "$GXX" = yes; then + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' + else + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= + fi + + if test "$GXX" = yes; then + # Set up default GNU C++ configuration + + LT_PATH_LD + + # Check if GNU C++ uses GNU ld as the underlying linker, since the + # archiving commands below assume that GNU ld is being used. + if test "$with_gnu_ld" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + + # If archive_cmds runs LD, not CC, wlarc should be empty + # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to + # investigate it a little bit more. (MM) + wlarc='${wl}' + + # ancient GNU ld didn't support --whole-archive et. al. + if eval "`$CC -print-prog-name=ld` --help 2>&1" | + $GREP 'no-whole-archive' > /dev/null; then + _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)= + fi + else + with_gnu_ld=no + wlarc= + + # A generic and very simple default shared library creation + # command for GNU C++ for the case where it uses the native + # linker, instead of GNU ld. If possible, this setting should + # overridden to take advantage of the native linker features on + # the platform it is being used on. + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + fi + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + + else + GXX=no + with_gnu_ld=no + wlarc= + fi + + # PORTME: fill in a description of your system's C++ link characteristics + AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) + _LT_TAGVAR(ld_shlibs, $1)=yes + case $host_os in + aix3*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + aix[[4-9]]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) + for ld_flag in $LDFLAGS; do + case $ld_flag in + *-brtl*) + aix_use_runtimelinking=yes + break + ;; + esac + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + _LT_TAGVAR(archive_cmds, $1)='' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' + + if test "$GXX" = yes; then + case $host_os in aix4.[[012]]|aix4.[[012]].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + _LT_TAGVAR(hardcode_direct, $1)=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)= + fi + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to + # export. + _LT_TAGVAR(always_export_symbols, $1)=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an empty + # executable. + _LT_SYS_MODULE_PATH_AIX + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + _LT_SYS_MODULE_PATH_AIX + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds its shared + # libraries. + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + chorus*) + case $cc_basename in + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + darwin* | rhapsody*) + _LT_DARWIN_LINKER_FEATURES($1) + ;; + + dgux*) + case $cc_basename in + ec++*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + ghcx*) + # Green Hills C++ Compiler + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + freebsd[[12]]*) + # C++ shared libraries reported to be fairly broken before + # switch to ELF + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + freebsd-elf*) + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + ;; + + freebsd* | dragonfly*) + # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF + # conventions + _LT_TAGVAR(ld_shlibs, $1)=yes + ;; + + gnu*) + ;; + + hpux9*) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + ;; + *) + if test "$GXX" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + hpux10*|hpux11*) + if test $with_gnu_ld = no; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) + ;; + *) + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + esac + fi + case $host_cpu in + hppa*64*|ia64*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + ;; + esac + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + ;; + *) + if test "$GXX" = yes; then + if test $with_gnu_ld = no; then + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + fi + else + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + interix[[3-9]]*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + irix5* | irix6*) + case $cc_basename in + CC*) + # SGI C++ + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + + # Archives containing C++ object files must be created using + # "CC -ar", where "CC" is the IRIX C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' + ;; + *) + if test "$GXX" = yes; then + if test "$with_gnu_ld" = no; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib' + fi + fi + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + esac + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(inherit_rpath, $1)=yes + ;; + + linux* | k*bsd*-gnu | kopensolaris*-gnu) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' + ;; + icpc* | ecpc* ) + # Intel C++ + with_gnu_ld=yes + # version 8.0 and above of icpc choke on multiply defined symbols + # if we add $predep_objects and $postdep_objects, however 7.1 and + # earlier do not add the objects themselves. + case `$CC -V 2>&1` in + *"Version 7."*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + *) # Version 8.0 or newer + tmp_idyn= + case $host_cpu in + ia64*) tmp_idyn=' -i_dynamic';; + esac + _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + esac + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler + case `$CC -V` in + *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*) + _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ + compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' + _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ + $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ + $RANLIB $oldlib' + _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + ;; + *) # Version 6 will use weak symbols + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + ;; + esac + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + ;; + cxx*) + # Compaq C++ + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' + + runpath_var=LD_RUN_PATH + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + ;; + xl*) + # IBM XL 8.0 on PPC, with GNU ld + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(compiler_needs_object, $1)=yes + + # Not sure whether something based on + # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 + # would be better. + output_verbose_link_cmd='echo' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + esac + ;; + esac + ;; + + lynxos*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + m88k*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + mvs*) + case $cc_basename in + cxx*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' + wlarc= + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + fi + # Workaround some broken pre-1.5 toolchains + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' + ;; + + *nto* | *qnx*) + _LT_TAGVAR(ld_shlibs, $1)=yes + ;; + + openbsd2*) + # C++ shared libraries are fairly broken + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + fi + output_verbose_link_cmd=echo + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Archives containing C++ object files must be created using + # the KAI C++ compiler. + case $host in + osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; + *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; + esac + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + cxx*) + case $host in + osf3*) + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + ;; + *) + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ + echo "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~ + $RM $lib.exp' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + ;; + esac + + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + case $host in + osf3*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + ;; + esac + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + + else + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + psos*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + lcc*) + # Lucid + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_TAGVAR(archive_cmds_need_lc,$1)=yes + _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. + # Supported since Solaris 2.6 (maybe 2.5.1?) + _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' + ;; + esac + _LT_TAGVAR(link_all_deplibs, $1)=yes + + output_verbose_link_cmd='echo' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + + # The C++ compiler must be used to create the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' + ;; + *) + # GNU C++ compiler with Solaris linker + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' + if $CC --version | $GREP -v '^2\.7' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + else + # g++ 2.7 appears to require `-G' NOT `-shared' on this + # platform. + _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + fi + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + ;; + esac + fi + ;; + esac + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + vxworks*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + + AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) + test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + + _LT_TAGVAR(GCC, $1)="$GXX" + _LT_TAGVAR(LD, $1)="$LD" + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + _LT_SYS_HIDDEN_LIBDEPS($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) + fi # test -n "$compiler" + + CC=$lt_save_CC + LDCXX=$LD + LD=$lt_save_LD + GCC=$lt_save_GCC + with_gnu_ld=$lt_save_with_gnu_ld + lt_cv_path_LDCXX=$lt_cv_path_LD + lt_cv_path_LD=$lt_save_path_LD + lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld + lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld +fi # test "$_lt_caught_CXX_error" != yes + +AC_LANG_POP +])# _LT_LANG_CXX_CONFIG + + +# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) +# --------------------------------- +# Figure out "hidden" library dependencies from verbose +# compiler output when linking a shared library. +# Parse the compiler output and extract the necessary +# objects, libraries and library flags. +m4_defun([_LT_SYS_HIDDEN_LIBDEPS], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +# Dependencies to place before and after the object being linked: +_LT_TAGVAR(predep_objects, $1)= +_LT_TAGVAR(postdep_objects, $1)= +_LT_TAGVAR(predeps, $1)= +_LT_TAGVAR(postdeps, $1)= +_LT_TAGVAR(compiler_lib_search_path, $1)= + +dnl we can't use the lt_simple_compile_test_code here, +dnl because it contains code intended for an executable, +dnl not a library. It's possible we should let each +dnl tag define a new lt_????_link_test_code variable, +dnl but it's only used here... +m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF +int a; +void foo (void) { a = 0; } +_LT_EOF +], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF +class Foo +{ +public: + Foo (void) { a = 0; } +private: + int a; +}; +_LT_EOF +], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF + subroutine foo + implicit none + integer*4 a + a=0 + return + end +_LT_EOF +], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF + subroutine foo + implicit none + integer a + a=0 + return + end +_LT_EOF +], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF +public class foo { + private int a; + public void bar (void) { + a = 0; + } +}; +_LT_EOF +]) +dnl Parse the compiler output and extract the necessary +dnl objects, libraries and library flags. +if AC_TRY_EVAL(ac_compile); then + # Parse the compiler output and extract the necessary + # objects, libraries and library flags. + + # Sentinel used to keep track of whether or not we are before + # the conftest object file. + pre_test_object_deps_done=no + + for p in `eval "$output_verbose_link_cmd"`; do + case $p in + + -L* | -R* | -l*) + # Some compilers place space between "-{L,R}" and the path. + # Remove the space. + if test $p = "-L" || + test $p = "-R"; then + prev=$p + continue + else + prev= + fi + + if test "$pre_test_object_deps_done" = no; then + case $p in + -L* | -R*) + # Internal compiler library paths should come after those + # provided the user. The postdeps already come after the + # user supplied libs so there is no need to process them. + if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then + _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" + else + _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" + fi + ;; + # The "-l" case would never come before the object being + # linked, so don't bother handling this case. + esac + else + if test -z "$_LT_TAGVAR(postdeps, $1)"; then + _LT_TAGVAR(postdeps, $1)="${prev}${p}" + else + _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" + fi + fi + ;; + + *.$objext) + # This assumes that the test object file only shows up + # once in the compiler output. + if test "$p" = "conftest.$objext"; then + pre_test_object_deps_done=yes + continue + fi + + if test "$pre_test_object_deps_done" = no; then + if test -z "$_LT_TAGVAR(predep_objects, $1)"; then + _LT_TAGVAR(predep_objects, $1)="$p" + else + _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" + fi + else + if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then + _LT_TAGVAR(postdep_objects, $1)="$p" + else + _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" + fi + fi + ;; + + *) ;; # Ignore the rest. + + esac + done + + # Clean up. + rm -f a.out a.exe +else + echo "libtool.m4: error: problem compiling $1 test program" +fi + +$RM -f confest.$objext + +# PORTME: override above test on systems where it is broken +m4_if([$1], [CXX], +[case $host_os in +interix[[3-9]]*) + # Interix 3.5 installs completely hosed .la files for C++, so rather than + # hack all around it, let's just trust "g++" to DTRT. + _LT_TAGVAR(predep_objects,$1)= + _LT_TAGVAR(postdep_objects,$1)= + _LT_TAGVAR(postdeps,$1)= + ;; + +linux*) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + + if test "$solaris_use_stlport4" != yes; then + _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' + fi + ;; + esac + ;; + +solaris*) + case $cc_basename in + CC*) + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + + # Adding this requires a known-good setup of shared libraries for + # Sun compiler versions before 5.6, else PIC objects from an old + # archive will be linked into the output, leading to subtle bugs. + if test "$solaris_use_stlport4" != yes; then + _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' + fi + ;; + esac + ;; +esac +]) + +case " $_LT_TAGVAR(postdeps, $1) " in +*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; +esac + _LT_TAGVAR(compiler_lib_search_dirs, $1)= +if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then + _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` +fi +_LT_TAGDECL([], [compiler_lib_search_dirs], [1], + [The directories searched by this compiler when creating a shared library]) +_LT_TAGDECL([], [predep_objects], [1], + [Dependencies to place before and after the objects being linked to + create a shared library]) +_LT_TAGDECL([], [postdep_objects], [1]) +_LT_TAGDECL([], [predeps], [1]) +_LT_TAGDECL([], [postdeps], [1]) +_LT_TAGDECL([], [compiler_lib_search_path], [1], + [The library search path used internally by the compiler when linking + a shared library]) +])# _LT_SYS_HIDDEN_LIBDEPS + + +# _LT_PROG_F77 +# ------------ +# Since AC_PROG_F77 is broken, in that it returns the empty string +# if there is no fortran compiler, we have our own version here. +m4_defun([_LT_PROG_F77], +[ +pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes]) +AC_PROG_F77 +if test -z "$F77" || test "X$F77" = "Xno"; then + _lt_disable_F77=yes +fi +popdef([AC_MSG_ERROR]) +])# _LT_PROG_F77 + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([_LT_PROG_F77], []) + + +# _LT_LANG_F77_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for a Fortran 77 compiler are +# suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_F77_CONFIG], +[AC_REQUIRE([_LT_PROG_F77])dnl +AC_LANG_PUSH(Fortran 77) + +_LT_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_TAGVAR(allow_undefined_flag, $1)= +_LT_TAGVAR(always_export_symbols, $1)=no +_LT_TAGVAR(archive_expsym_cmds, $1)= +_LT_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_TAGVAR(hardcode_direct, $1)=no +_LT_TAGVAR(hardcode_direct_absolute, $1)=no +_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= +_LT_TAGVAR(hardcode_libdir_separator, $1)= +_LT_TAGVAR(hardcode_minus_L, $1)=no +_LT_TAGVAR(hardcode_automatic, $1)=no +_LT_TAGVAR(inherit_rpath, $1)=no +_LT_TAGVAR(module_cmds, $1)= +_LT_TAGVAR(module_expsym_cmds, $1)= +_LT_TAGVAR(link_all_deplibs, $1)=unknown +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(no_undefined_flag, $1)= +_LT_TAGVAR(whole_archive_flag_spec, $1)= +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Source file extension for f77 test sources. +ac_ext=f + +# Object file extension for compiled f77 test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# No sense in running all these tests if we already determined that +# the F77 compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_disable_F77" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="\ + subroutine t + return + end +" + + # Code to be used in simple link tests + lt_simple_link_test_code="\ + program t + end +" + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + _LT_TAG_COMPILER + + # save warnings/boilerplate of simple test code + _LT_COMPILER_BOILERPLATE + _LT_LINKER_BOILERPLATE + + # Allow CC to be a program name with arguments. + lt_save_CC="$CC" + lt_save_GCC=$GCC + CC=${F77-"f77"} + compiler=$CC + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) + GCC=$G77 + if test -n "$compiler"; then + AC_MSG_CHECKING([if libtool supports shared libraries]) + AC_MSG_RESULT([$can_build_shared]) + + AC_MSG_CHECKING([whether to build shared libraries]) + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + aix[[4-9]]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + AC_MSG_RESULT([$enable_shared]) + + AC_MSG_CHECKING([whether to build static libraries]) + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + AC_MSG_RESULT([$enable_static]) + + _LT_TAGVAR(GCC, $1)="$G77" + _LT_TAGVAR(LD, $1)="$LD" + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) + fi # test -n "$compiler" + + GCC=$lt_save_GCC + CC="$lt_save_CC" +fi # test "$_lt_disable_F77" != yes + +AC_LANG_POP +])# _LT_LANG_F77_CONFIG + + +# _LT_PROG_FC +# ----------- +# Since AC_PROG_FC is broken, in that it returns the empty string +# if there is no fortran compiler, we have our own version here. +m4_defun([_LT_PROG_FC], +[ +pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes]) +AC_PROG_FC +if test -z "$FC" || test "X$FC" = "Xno"; then + _lt_disable_FC=yes +fi +popdef([AC_MSG_ERROR]) +])# _LT_PROG_FC + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([_LT_PROG_FC], []) + + +# _LT_LANG_FC_CONFIG([TAG]) +# ------------------------- +# Ensure that the configuration variables for a Fortran compiler are +# suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_FC_CONFIG], +[AC_REQUIRE([_LT_PROG_FC])dnl +AC_LANG_PUSH(Fortran) + +_LT_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_TAGVAR(allow_undefined_flag, $1)= +_LT_TAGVAR(always_export_symbols, $1)=no +_LT_TAGVAR(archive_expsym_cmds, $1)= +_LT_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_TAGVAR(hardcode_direct, $1)=no +_LT_TAGVAR(hardcode_direct_absolute, $1)=no +_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= +_LT_TAGVAR(hardcode_libdir_separator, $1)= +_LT_TAGVAR(hardcode_minus_L, $1)=no +_LT_TAGVAR(hardcode_automatic, $1)=no +_LT_TAGVAR(inherit_rpath, $1)=no +_LT_TAGVAR(module_cmds, $1)= +_LT_TAGVAR(module_expsym_cmds, $1)= +_LT_TAGVAR(link_all_deplibs, $1)=unknown +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(no_undefined_flag, $1)= +_LT_TAGVAR(whole_archive_flag_spec, $1)= +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Source file extension for fc test sources. +ac_ext=${ac_fc_srcext-f} + +# Object file extension for compiled fc test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# No sense in running all these tests if we already determined that +# the FC compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_disable_FC" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="\ + subroutine t + return + end +" + + # Code to be used in simple link tests + lt_simple_link_test_code="\ + program t + end +" + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + _LT_TAG_COMPILER + + # save warnings/boilerplate of simple test code + _LT_COMPILER_BOILERPLATE + _LT_LINKER_BOILERPLATE + + # Allow CC to be a program name with arguments. + lt_save_CC="$CC" + lt_save_GCC=$GCC + CC=${FC-"f95"} + compiler=$CC + GCC=$ac_cv_fc_compiler_gnu + + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) + + if test -n "$compiler"; then + AC_MSG_CHECKING([if libtool supports shared libraries]) + AC_MSG_RESULT([$can_build_shared]) + + AC_MSG_CHECKING([whether to build shared libraries]) + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + aix[[4-9]]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + AC_MSG_RESULT([$enable_shared]) + + AC_MSG_CHECKING([whether to build static libraries]) + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + AC_MSG_RESULT([$enable_static]) + + _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" + _LT_TAGVAR(LD, $1)="$LD" + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + _LT_SYS_HIDDEN_LIBDEPS($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) + fi # test -n "$compiler" + + GCC=$lt_save_GCC + CC="$lt_save_CC" +fi # test "$_lt_disable_FC" != yes + +AC_LANG_POP +])# _LT_LANG_FC_CONFIG + + +# _LT_LANG_GCJ_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for the GNU Java Compiler compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_GCJ_CONFIG], +[AC_REQUIRE([LT_PROG_GCJ])dnl +AC_LANG_SAVE + +# Source file extension for Java test sources. +ac_ext=java + +# Object file extension for compiled Java test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="class foo {}" + +# Code to be used in simple link tests +lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_TAG_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +lt_save_GCC=$GCC +GCC=yes +CC=${GCJ-"gcj"} +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_TAGVAR(LD, $1)="$LD" +_LT_CC_BASENAME([$compiler]) + +# GCJ did not exist at the time GCC didn't implicitly link libc in. +_LT_TAGVAR(archive_cmds_need_lc, $1)=no + +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds + +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... +if test -n "$compiler"; then + _LT_COMPILER_NO_RTTI($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) +fi + +AC_LANG_RESTORE + +GCC=$lt_save_GCC +CC="$lt_save_CC" +])# _LT_LANG_GCJ_CONFIG + + +# _LT_LANG_RC_CONFIG([TAG]) +# ------------------------- +# Ensure that the configuration variables for the Windows resource compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_RC_CONFIG], +[AC_REQUIRE([LT_PROG_RC])dnl +AC_LANG_SAVE + +# Source file extension for RC test sources. +ac_ext=rc + +# Object file extension for compiled RC test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' + +# Code to be used in simple link tests +lt_simple_link_test_code="$lt_simple_compile_test_code" + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_TAG_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +lt_save_GCC=$GCC +GCC= +CC=${RC-"windres"} +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_CC_BASENAME([$compiler]) +_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes + +if test -n "$compiler"; then + : + _LT_CONFIG($1) +fi + +GCC=$lt_save_GCC +AC_LANG_RESTORE +CC="$lt_save_CC" +])# _LT_LANG_RC_CONFIG + + +# LT_PROG_GCJ +# ----------- +AC_DEFUN([LT_PROG_GCJ], +[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], + [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], + [AC_CHECK_TOOL(GCJ, gcj,) + test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" + AC_SUBST(GCJFLAGS)])])[]dnl +]) + +# Old name: +AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([LT_AC_PROG_GCJ], []) + + +# LT_PROG_RC +# ---------- +AC_DEFUN([LT_PROG_RC], +[AC_CHECK_TOOL(RC, windres,) +]) + +# Old name: +AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([LT_AC_PROG_RC], []) + + +# _LT_DECL_EGREP +# -------------- +# If we don't have a new enough Autoconf to choose the best grep +# available, choose the one first in the user's PATH. +m4_defun([_LT_DECL_EGREP], +[AC_REQUIRE([AC_PROG_EGREP])dnl +AC_REQUIRE([AC_PROG_FGREP])dnl +test -z "$GREP" && GREP=grep +_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) +_LT_DECL([], [EGREP], [1], [An ERE matcher]) +_LT_DECL([], [FGREP], [1], [A literal string matcher]) +dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too +AC_SUBST([GREP]) +]) + + +# _LT_DECL_OBJDUMP +# -------------- +# If we don't have a new enough Autoconf to choose the best objdump +# available, choose the one first in the user's PATH. +m4_defun([_LT_DECL_OBJDUMP], +[AC_CHECK_TOOL(OBJDUMP, objdump, false) +test -z "$OBJDUMP" && OBJDUMP=objdump +_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) +AC_SUBST([OBJDUMP]) +]) + + +# _LT_DECL_SED +# ------------ +# Check for a fully-functional sed program, that truncates +# as few characters as possible. Prefer GNU sed if found. +m4_defun([_LT_DECL_SED], +[AC_PROG_SED +test -z "$SED" && SED=sed +Xsed="$SED -e 1s/^X//" +_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) +_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], + [Sed that helps us avoid accidentally triggering echo(1) options like -n]) +])# _LT_DECL_SED + +m4_ifndef([AC_PROG_SED], [ +############################################################ +# NOTE: This macro has been submitted for inclusion into # +# GNU Autoconf as AC_PROG_SED. When it is available in # +# a released version of Autoconf we should remove this # +# macro and use it instead. # +############################################################ + +m4_defun([AC_PROG_SED], +[AC_MSG_CHECKING([for a sed that does not truncate output]) +AC_CACHE_VAL(lt_cv_path_SED, +[# Loop through the user's path and test for sed and gsed. +# Then use that list of sed's as ones to test for truncation. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for lt_ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then + lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" + fi + done + done +done +IFS=$as_save_IFS +lt_ac_max=0 +lt_ac_count=0 +# Add /usr/xpg4/bin/sed as it is typically found on Solaris +# along with /bin/sed that truncates output. +for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do + test ! -f $lt_ac_sed && continue + cat /dev/null > conftest.in + lt_ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >conftest.in + # Check for GNU sed and select it if it is found. + if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then + lt_cv_path_SED=$lt_ac_sed + break + fi + while true; do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + echo >>conftest.nl + $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break + cmp -s conftest.out conftest.nl || break + # 10000 chars as input seems more than enough + test $lt_ac_count -gt 10 && break + lt_ac_count=`expr $lt_ac_count + 1` + if test $lt_ac_count -gt $lt_ac_max; then + lt_ac_max=$lt_ac_count + lt_cv_path_SED=$lt_ac_sed + fi + done +done +]) +SED=$lt_cv_path_SED +AC_SUBST([SED]) +AC_MSG_RESULT([$SED]) +])#AC_PROG_SED +])#m4_ifndef + +# Old name: +AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([LT_AC_PROG_SED], []) + + +# _LT_CHECK_SHELL_FEATURES +# ------------------------ +# Find out whether the shell is Bourne or XSI compatible, +# or has some other useful features. +m4_defun([_LT_CHECK_SHELL_FEATURES], +[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) +# Try some XSI features +xsi_shell=no +( _lt_dummy="a/b/c" + test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ + = c,a/b,, \ + && eval 'test $(( 1 + 1 )) -eq 2 \ + && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ + && xsi_shell=yes +AC_MSG_RESULT([$xsi_shell]) +_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) + +AC_MSG_CHECKING([whether the shell understands "+="]) +lt_shell_append=no +( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ + >/dev/null 2>&1 \ + && lt_shell_append=yes +AC_MSG_RESULT([$lt_shell_append]) +_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) + +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + lt_unset=unset +else + lt_unset=false +fi +_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl + +# test EBCDIC or ASCII +case `echo X|tr X '\101'` in + A) # ASCII based system + # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr + lt_SP2NL='tr \040 \012' + lt_NL2SP='tr \015\012 \040\040' + ;; + *) # EBCDIC based system + lt_SP2NL='tr \100 \n' + lt_NL2SP='tr \r\n \100\100' + ;; +esac +_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl +_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl +])# _LT_CHECK_SHELL_FEATURES + + +# _LT_PROG_XSI_SHELLFNS +# --------------------- +# Bourne and XSI compatible variants of some useful shell functions. +m4_defun([_LT_PROG_XSI_SHELLFNS], +[case $xsi_shell in + yes) + cat << \_LT_EOF >> "$cfgfile" + +# func_dirname file append nondir_replacement +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +func_dirname () +{ + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac +} + +# func_basename file +func_basename () +{ + func_basename_result="${1##*/}" +} + +# func_dirname_and_basename file append nondir_replacement +# perform func_basename and func_dirname in a single function +# call: +# dirname: Compute the dirname of FILE. If nonempty, +# add APPEND to the result, otherwise set result +# to NONDIR_REPLACEMENT. +# value returned in "$func_dirname_result" +# basename: Compute filename of FILE. +# value retuned in "$func_basename_result" +# Implementation must be kept synchronized with func_dirname +# and func_basename. For efficiency, we do not delegate to +# those functions but instead duplicate the functionality here. +func_dirname_and_basename () +{ + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac + func_basename_result="${1##*/}" +} + +# func_stripname prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +func_stripname () +{ + # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are + # positional parameters, so assign one to ordinary parameter first. + func_stripname_result=${3} + func_stripname_result=${func_stripname_result#"${1}"} + func_stripname_result=${func_stripname_result%"${2}"} +} + +# func_opt_split +func_opt_split () +{ + func_opt_split_opt=${1%%=*} + func_opt_split_arg=${1#*=} +} + +# func_lo2o object +func_lo2o () +{ + case ${1} in + *.lo) func_lo2o_result=${1%.lo}.${objext} ;; + *) func_lo2o_result=${1} ;; + esac +} + +# func_xform libobj-or-source +func_xform () +{ + func_xform_result=${1%.*}.lo +} + +# func_arith arithmetic-term... +func_arith () +{ + func_arith_result=$(( $[*] )) +} + +# func_len string +# STRING may not start with a hyphen. +func_len () +{ + func_len_result=${#1} +} + +_LT_EOF + ;; + *) # Bourne compatible functions. + cat << \_LT_EOF >> "$cfgfile" + +# func_dirname file append nondir_replacement +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +func_dirname () +{ + # Extract subdirectory from the argument. + func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` + if test "X$func_dirname_result" = "X${1}"; then + func_dirname_result="${3}" + else + func_dirname_result="$func_dirname_result${2}" + fi +} + +# func_basename file +func_basename () +{ + func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` +} + +dnl func_dirname_and_basename +dnl A portable version of this function is already defined in general.m4sh +dnl so there is no need for it here. + +# func_stripname prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +# func_strip_suffix prefix name +func_stripname () +{ + case ${2} in + .*) func_stripname_result=`$ECHO "X${3}" \ + | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; + *) func_stripname_result=`$ECHO "X${3}" \ + | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; + esac +} + +# sed scripts: +my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' +my_sed_long_arg='1s/^-[[^=]]*=//' + +# func_opt_split +func_opt_split () +{ + func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` + func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` +} + +# func_lo2o object +func_lo2o () +{ + func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` +} + +# func_xform libobj-or-source +func_xform () +{ + func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'` +} + +# func_arith arithmetic-term... +func_arith () +{ + func_arith_result=`expr "$[@]"` +} + +# func_len string +# STRING may not start with a hyphen. +func_len () +{ + func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` +} + +_LT_EOF +esac + +case $lt_shell_append in + yes) + cat << \_LT_EOF >> "$cfgfile" + +# func_append var value +# Append VALUE to the end of shell variable VAR. +func_append () +{ + eval "$[1]+=\$[2]" +} +_LT_EOF + ;; + *) + cat << \_LT_EOF >> "$cfgfile" + +# func_append var value +# Append VALUE to the end of shell variable VAR. +func_append () +{ + eval "$[1]=\$$[1]\$[2]" +} + +_LT_EOF + ;; + esac +]) diff -Nru xf86-input-wacom-0.10.11/m4/lt~obsolete.m4 xf86-input-wacom-0.11.0/m4/lt~obsolete.m4 --- xf86-input-wacom-0.10.11/m4/lt~obsolete.m4 1970-01-01 00:00:00.000000000 +0000 +++ xf86-input-wacom-0.11.0/m4/lt~obsolete.m4 2011-08-01 04:48:52.000000000 +0000 @@ -0,0 +1,92 @@ +# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- +# +# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc. +# Written by Scott James Remnant, 2004. +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# serial 4 lt~obsolete.m4 + +# These exist entirely to fool aclocal when bootstrapping libtool. +# +# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) +# which have later been changed to m4_define as they aren't part of the +# exported API, or moved to Autoconf or Automake where they belong. +# +# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN +# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us +# using a macro with the same name in our local m4/libtool.m4 it'll +# pull the old libtool.m4 in (it doesn't see our shiny new m4_define +# and doesn't know about Autoconf macros at all.) +# +# So we provide this file, which has a silly filename so it's always +# included after everything else. This provides aclocal with the +# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything +# because those macros already exist, or will be overwritten later. +# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. +# +# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. +# Yes, that means every name once taken will need to remain here until +# we give up compatibility with versions before 1.7, at which point +# we need to keep only those names which we still refer to. + +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) + +m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) +m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) +m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) +m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) +m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) +m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) +m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) +m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) +m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) +m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) +m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) +m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) +m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) +m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) +m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) +m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) +m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) +m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) +m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) +m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) +m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) +m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) +m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) +m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) +m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) +m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) +m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) +m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) +m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) +m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) +m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) +m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) +m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) +m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) +m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) +m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) +m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) +m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) +m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) +m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) +m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) +m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) +m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])]) +m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) +m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) +m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) +m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) +m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) +m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) +m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) +m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) diff -Nru xf86-input-wacom-0.10.11/m4/ltoptions.m4 xf86-input-wacom-0.11.0/m4/ltoptions.m4 --- xf86-input-wacom-0.10.11/m4/ltoptions.m4 1970-01-01 00:00:00.000000000 +0000 +++ xf86-input-wacom-0.11.0/m4/ltoptions.m4 2011-08-01 04:48:52.000000000 +0000 @@ -0,0 +1,368 @@ +# Helper functions for option handling. -*- Autoconf -*- +# +# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. +# Written by Gary V. Vaughan, 2004 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# serial 6 ltoptions.m4 + +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) + + +# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) +# ------------------------------------------ +m4_define([_LT_MANGLE_OPTION], +[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) + + +# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) +# --------------------------------------- +# Set option OPTION-NAME for macro MACRO-NAME, and if there is a +# matching handler defined, dispatch to it. Other OPTION-NAMEs are +# saved as a flag. +m4_define([_LT_SET_OPTION], +[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl +m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), + _LT_MANGLE_DEFUN([$1], [$2]), + [m4_warning([Unknown $1 option `$2'])])[]dnl +]) + + +# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) +# ------------------------------------------------------------ +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +m4_define([_LT_IF_OPTION], +[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) + + +# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) +# ------------------------------------------------------- +# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME +# are set. +m4_define([_LT_UNLESS_OPTIONS], +[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), + [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), + [m4_define([$0_found])])])[]dnl +m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 +])[]dnl +]) + + +# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) +# ---------------------------------------- +# OPTION-LIST is a space-separated list of Libtool options associated +# with MACRO-NAME. If any OPTION has a matching handler declared with +# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about +# the unknown option and exit. +m4_defun([_LT_SET_OPTIONS], +[# Set options +m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), + [_LT_SET_OPTION([$1], _LT_Option)]) + +m4_if([$1],[LT_INIT],[ + dnl + dnl Simply set some default values (i.e off) if boolean options were not + dnl specified: + _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no + ]) + _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no + ]) + dnl + dnl If no reference was made to various pairs of opposing options, then + dnl we run the default mode handler for the pair. For example, if neither + dnl `shared' nor `disable-shared' was passed, we enable building of shared + dnl archives by default: + _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) + _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) + _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) + _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], + [_LT_ENABLE_FAST_INSTALL]) + ]) +])# _LT_SET_OPTIONS + + +## --------------------------------- ## +## Macros to handle LT_INIT options. ## +## --------------------------------- ## + +# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) +# ----------------------------------------- +m4_define([_LT_MANGLE_DEFUN], +[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) + + +# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) +# ----------------------------------------------- +m4_define([LT_OPTION_DEFINE], +[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl +])# LT_OPTION_DEFINE + + +# dlopen +# ------ +LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes +]) + +AU_DEFUN([AC_LIBTOOL_DLOPEN], +[_LT_SET_OPTION([LT_INIT], [dlopen]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the `dlopen' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) + + +# win32-dll +# --------- +# Declare package support for building win32 dll's. +LT_OPTION_DEFINE([LT_INIT], [win32-dll], +[enable_win32_dll=yes + +case $host in +*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) + AC_CHECK_TOOL(AS, as, false) + AC_CHECK_TOOL(DLLTOOL, dlltool, false) + AC_CHECK_TOOL(OBJDUMP, objdump, false) + ;; +esac + +test -z "$AS" && AS=as +_LT_DECL([], [AS], [0], [Assembler program])dnl + +test -z "$DLLTOOL" && DLLTOOL=dlltool +_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl + +test -z "$OBJDUMP" && OBJDUMP=objdump +_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl +])# win32-dll + +AU_DEFUN([AC_LIBTOOL_WIN32_DLL], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +_LT_SET_OPTION([LT_INIT], [win32-dll]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the `win32-dll' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) + + +# _LT_ENABLE_SHARED([DEFAULT]) +# ---------------------------- +# implement the --enable-shared flag, and supports the `shared' and +# `disable-shared' LT_INIT options. +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +m4_define([_LT_ENABLE_SHARED], +[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([shared], + [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], + [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) + + _LT_DECL([build_libtool_libs], [enable_shared], [0], + [Whether or not to build shared libraries]) +])# _LT_ENABLE_SHARED + +LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) + +# Old names: +AC_DEFUN([AC_ENABLE_SHARED], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) +]) + +AC_DEFUN([AC_DISABLE_SHARED], +[_LT_SET_OPTION([LT_INIT], [disable-shared]) +]) + +AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) +AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_ENABLE_SHARED], []) +dnl AC_DEFUN([AM_DISABLE_SHARED], []) + + + +# _LT_ENABLE_STATIC([DEFAULT]) +# ---------------------------- +# implement the --enable-static flag, and support the `static' and +# `disable-static' LT_INIT options. +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +m4_define([_LT_ENABLE_STATIC], +[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([static], + [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], + [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_static=]_LT_ENABLE_STATIC_DEFAULT) + + _LT_DECL([build_old_libs], [enable_static], [0], + [Whether or not to build static libraries]) +])# _LT_ENABLE_STATIC + +LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) + +# Old names: +AC_DEFUN([AC_ENABLE_STATIC], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) +]) + +AC_DEFUN([AC_DISABLE_STATIC], +[_LT_SET_OPTION([LT_INIT], [disable-static]) +]) + +AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) +AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_ENABLE_STATIC], []) +dnl AC_DEFUN([AM_DISABLE_STATIC], []) + + + +# _LT_ENABLE_FAST_INSTALL([DEFAULT]) +# ---------------------------------- +# implement the --enable-fast-install flag, and support the `fast-install' +# and `disable-fast-install' LT_INIT options. +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +m4_define([_LT_ENABLE_FAST_INSTALL], +[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([fast-install], + [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], + [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; + *) + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) + +_LT_DECL([fast_install], [enable_fast_install], [0], + [Whether or not to optimize for fast installation])dnl +])# _LT_ENABLE_FAST_INSTALL + +LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) + +# Old names: +AU_DEFUN([AC_ENABLE_FAST_INSTALL], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you put +the `fast-install' option into LT_INIT's first parameter.]) +]) + +AU_DEFUN([AC_DISABLE_FAST_INSTALL], +[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you put +the `disable-fast-install' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) +dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) + + +# _LT_WITH_PIC([MODE]) +# -------------------- +# implement the --with-pic flag, and support the `pic-only' and `no-pic' +# LT_INIT options. +# MODE is either `yes' or `no'. If omitted, it defaults to `both'. +m4_define([_LT_WITH_PIC], +[AC_ARG_WITH([pic], + [AS_HELP_STRING([--with-pic], + [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], + [pic_mode="$withval"], + [pic_mode=default]) + +test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) + +_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl +])# _LT_WITH_PIC + +LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) +LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) + +# Old name: +AU_DEFUN([AC_LIBTOOL_PICMODE], +[_LT_SET_OPTION([LT_INIT], [pic-only]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the `pic-only' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) + +## ----------------- ## +## LTDL_INIT Options ## +## ----------------- ## + +m4_define([_LTDL_MODE], []) +LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], + [m4_define([_LTDL_MODE], [nonrecursive])]) +LT_OPTION_DEFINE([LTDL_INIT], [recursive], + [m4_define([_LTDL_MODE], [recursive])]) +LT_OPTION_DEFINE([LTDL_INIT], [subproject], + [m4_define([_LTDL_MODE], [subproject])]) + +m4_define([_LTDL_TYPE], []) +LT_OPTION_DEFINE([LTDL_INIT], [installable], + [m4_define([_LTDL_TYPE], [installable])]) +LT_OPTION_DEFINE([LTDL_INIT], [convenience], + [m4_define([_LTDL_TYPE], [convenience])]) diff -Nru xf86-input-wacom-0.10.11/m4/ltsugar.m4 xf86-input-wacom-0.11.0/m4/ltsugar.m4 --- xf86-input-wacom-0.10.11/m4/ltsugar.m4 1970-01-01 00:00:00.000000000 +0000 +++ xf86-input-wacom-0.11.0/m4/ltsugar.m4 2011-08-01 04:48:52.000000000 +0000 @@ -0,0 +1,123 @@ +# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- +# +# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. +# Written by Gary V. Vaughan, 2004 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# serial 6 ltsugar.m4 + +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) + + +# lt_join(SEP, ARG1, [ARG2...]) +# ----------------------------- +# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their +# associated separator. +# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier +# versions in m4sugar had bugs. +m4_define([lt_join], +[m4_if([$#], [1], [], + [$#], [2], [[$2]], + [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) +m4_define([_lt_join], +[m4_if([$#$2], [2], [], + [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) + + +# lt_car(LIST) +# lt_cdr(LIST) +# ------------ +# Manipulate m4 lists. +# These macros are necessary as long as will still need to support +# Autoconf-2.59 which quotes differently. +m4_define([lt_car], [[$1]]) +m4_define([lt_cdr], +[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], + [$#], 1, [], + [m4_dquote(m4_shift($@))])]) +m4_define([lt_unquote], $1) + + +# lt_append(MACRO-NAME, STRING, [SEPARATOR]) +# ------------------------------------------ +# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. +# Note that neither SEPARATOR nor STRING are expanded; they are appended +# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). +# No SEPARATOR is output if MACRO-NAME was previously undefined (different +# than defined and empty). +# +# This macro is needed until we can rely on Autoconf 2.62, since earlier +# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. +m4_define([lt_append], +[m4_define([$1], + m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) + + + +# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) +# ---------------------------------------------------------- +# Produce a SEP delimited list of all paired combinations of elements of +# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list +# has the form PREFIXmINFIXSUFFIXn. +# Needed until we can rely on m4_combine added in Autoconf 2.62. +m4_define([lt_combine], +[m4_if(m4_eval([$# > 3]), [1], + [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl +[[m4_foreach([_Lt_prefix], [$2], + [m4_foreach([_Lt_suffix], + ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, + [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) + + +# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) +# ----------------------------------------------------------------------- +# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited +# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. +m4_define([lt_if_append_uniq], +[m4_ifdef([$1], + [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], + [lt_append([$1], [$2], [$3])$4], + [$5])], + [lt_append([$1], [$2], [$3])$4])]) + + +# lt_dict_add(DICT, KEY, VALUE) +# ----------------------------- +m4_define([lt_dict_add], +[m4_define([$1($2)], [$3])]) + + +# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) +# -------------------------------------------- +m4_define([lt_dict_add_subkey], +[m4_define([$1($2:$3)], [$4])]) + + +# lt_dict_fetch(DICT, KEY, [SUBKEY]) +# ---------------------------------- +m4_define([lt_dict_fetch], +[m4_ifval([$3], + m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), + m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) + + +# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) +# ----------------------------------------------------------------- +m4_define([lt_if_dict_fetch], +[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], + [$5], + [$6])]) + + +# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) +# -------------------------------------------------------------- +m4_define([lt_dict_filter], +[m4_if([$5], [], [], + [lt_join(m4_quote(m4_default([$4], [[, ]])), + lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), + [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl +]) diff -Nru xf86-input-wacom-0.10.11/m4/ltversion.m4 xf86-input-wacom-0.11.0/m4/ltversion.m4 --- xf86-input-wacom-0.10.11/m4/ltversion.m4 1970-01-01 00:00:00.000000000 +0000 +++ xf86-input-wacom-0.11.0/m4/ltversion.m4 2011-08-01 04:48:52.000000000 +0000 @@ -0,0 +1,23 @@ +# ltversion.m4 -- version numbers -*- Autoconf -*- +# +# Copyright (C) 2004 Free Software Foundation, Inc. +# Written by Scott James Remnant, 2004 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# Generated from ltversion.in. + +# serial 3017 ltversion.m4 +# This file is part of GNU Libtool + +m4_define([LT_PACKAGE_VERSION], [2.2.6b]) +m4_define([LT_PACKAGE_REVISION], [1.3017]) + +AC_DEFUN([LTVERSION_VERSION], +[macro_version='2.2.6b' +macro_revision='1.3017' +_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) +_LT_DECL(, macro_revision, 0) +]) diff -Nru xf86-input-wacom-0.10.11/Makefile.am xf86-input-wacom-0.11.0/Makefile.am --- xf86-input-wacom-0.10.11/Makefile.am 2011-02-15 04:27:40.000000000 +0000 +++ xf86-input-wacom-0.11.0/Makefile.am 2011-04-07 05:22:34.000000000 +0000 @@ -22,7 +22,7 @@ DISTCHECK_CONFIGURE_FLAGS = --with-sdkdir='$${includedir}/xorg' \ --with-xorg-conf-dir='$${datadir}/X11/xorg.conf.d' -SUBDIRS = conf src man include tools test +SUBDIRS = conf doc src man include tools test MAINTAINERCLEANFILES = ChangeLog INSTALL pkgconfigdir = $(libdir)/pkgconfig diff -Nru xf86-input-wacom-0.10.11/Makefile.in xf86-input-wacom-0.11.0/Makefile.in --- xf86-input-wacom-0.10.11/Makefile.in 2011-02-16 04:26:35.000000000 +0000 +++ xf86-input-wacom-0.11.0/Makefile.in 2011-04-19 04:07:03.000000000 +0000 @@ -174,6 +174,7 @@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DOXYGEN = @DOXYGEN@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRIVER_NAME = @DRIVER_NAME@ @@ -187,8 +188,6 @@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ -GLIB_CFLAGS = @GLIB_CFLAGS@ -GLIB_LIBS = @GLIB_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ @@ -234,6 +233,8 @@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ +UDEV_CFLAGS = @UDEV_CFLAGS@ +UDEV_LIBS = @UDEV_LIBS@ VERSION = @VERSION@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ @@ -299,7 +300,7 @@ DISTCHECK_CONFIGURE_FLAGS = --with-sdkdir='$${includedir}/xorg' \ --with-xorg-conf-dir='$${datadir}/X11/xorg.conf.d' -SUBDIRS = conf src man include tools test +SUBDIRS = conf doc src man include tools test MAINTAINERCLEANFILES = ChangeLog INSTALL pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = xorg-wacom.pc diff -Nru xf86-input-wacom-0.10.11/man/Makefile.am xf86-input-wacom-0.11.0/man/Makefile.am --- xf86-input-wacom-0.10.11/man/Makefile.am 2011-01-23 21:41:10.000000000 +0000 +++ xf86-input-wacom-0.11.0/man/Makefile.am 2011-04-14 04:06:47.000000000 +0000 @@ -39,6 +39,9 @@ SUFFIXES = .$(DRIVER_MAN_SUFFIX) $(APP_MAN_SUFFIX) .man # String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure +MAN_SUBSTS += \ + -e 's|__drivername__|$(DRIVER_NAME)|g' + .man.$(DRIVER_MAN_SUFFIX): $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@ .man.$(APP_MAN_SUFFIX): diff -Nru xf86-input-wacom-0.10.11/man/Makefile.in xf86-input-wacom-0.11.0/man/Makefile.in --- xf86-input-wacom-0.10.11/man/Makefile.in 2011-02-16 04:26:35.000000000 +0000 +++ xf86-input-wacom-0.11.0/man/Makefile.in 2011-04-19 04:07:02.000000000 +0000 @@ -124,6 +124,7 @@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DOXYGEN = @DOXYGEN@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRIVER_NAME = @DRIVER_NAME@ @@ -137,8 +138,6 @@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ -GLIB_CFLAGS = @GLIB_CFLAGS@ -GLIB_LIBS = @GLIB_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ @@ -158,7 +157,9 @@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ -MAN_SUBSTS = @MAN_SUBSTS@ + +# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure +MAN_SUBSTS = @MAN_SUBSTS@ -e 's|__drivername__|$(DRIVER_NAME)|g' MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -184,6 +185,8 @@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ +UDEV_CFLAGS = @UDEV_CFLAGS@ +UDEV_LIBS = @UDEV_LIBS@ VERSION = @VERSION@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ @@ -485,7 +488,6 @@ uninstall-drivermanDATA uninstall-xsetwacommanDATA -# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure .man.$(DRIVER_MAN_SUFFIX): $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@ .man.$(APP_MAN_SUFFIX): diff -Nru xf86-input-wacom-0.10.11/man/wacom.man xf86-input-wacom-0.11.0/man/wacom.man --- xf86-input-wacom-0.10.11/man/wacom.man 2011-02-15 04:27:40.000000000 +0000 +++ xf86-input-wacom-0.11.0/man/wacom.man 2011-04-14 04:06:47.000000000 +0000 @@ -1,7 +1,7 @@ .ds q \N'34' .TH WACOM __drivermansuffix__ __vendorversion__ .SH NAME -wacom \- Wacom input driver +__drivername__ \- Wacom input driver .SH SYNOPSIS .nf .B "Section \*qInputDevice\*q" @@ -17,20 +17,46 @@ .PP The .B wacom -driver functions as a pointer input device, and may be used as the -X server's core pointer. +driver functions as a pointer input device. .SH SUPPORTED HARDWARE This driver supports the Wacom IV and Wacom V protocols. Serial tablets only -need this driver. USB tablet support is available on some Linux platforms. -USB tablets needs wacom kernel driver being loaded before this driver starts. -Please check linuxwacom.sf.net for latest updates of Wacom X and kernel drivers. +need this driver. USB tablet support is available on some Linux platforms +and requires the wacom kernel driver being loaded before this driver starts. +Please check http://linuxwacom.sf.net for latest updates of Wacom X and +kernel drivers. +.SH DRIVER-INTERNAL DEVICE HOTPLUGGING +When input device hotplugging in the X server is enabled and no +.B InputDevice +section exists for a compatible tablet device and an +.B InputClass +section (see xorg.conf.d(5x)) assigns this driver for the device, the +.B wacom +driver creates multiple X devices for each a physical device, one X device +for each available tool. The list of tools is hardware-dependent. See +.B Option "Type" +as outlined in the +.B CONFIGURATION DETAILS +section. +.PP +These tool-specific devices are referred to as parent device and dependent +device. The parent device is the one presented by the system and the one +that causes the X server to load the +.B wacom +driver. This parent device then causes the automatic addition of several +dependent devices. If the parent device is unplugged or otherwise removed, +the dependent devices will be automatically removed as well. +.PP +Dependent devices may be assigned tool-specific options through additional +.B InputClass +sections. We recommend that a +.B MatchDriver "wacom" +line is used in these sections in addition to the user-specific pattern. .SH CONFIGURATION DETAILS -Please refer to xorg.conf(5x) for general configuration +Please refer to xorg.conf(5x) or xorg.conf.d(5x) for general configuration details and for options that can be used with all input drivers. This section only covers configuration details specific to this driver. .PP -Multiple instances of the Wacom devices can cohabit. It can be useful -to define multiple devices with different active zones. Each device +Multiple instances of the Wacom devices can cohabit. Each device supports the following entries: .RS 8 .TP 4 @@ -138,7 +164,9 @@ .B Option \fI"Rotate"\fP \fI"CW"|"CCW"|"HALF"|"NONE"\fP rotates the tablet orientation counterclockwise (CCW) or clockwise (CW) or 180 degrees (HALF). If you have specific tablet mappings, i.e. TopX/Y or BottomX/Y were set, the mapping will be -applied before rotation. The default is "NONE". +applied before rotation. Rotation must be applied to the parent device +(usually the stylus), rotation settings on hotplugged devices will be +ignored. The default is "NONE". .TP 4 .B Option \fI"PressCurve"\fP \fI"x1,y1,x2,y2"\fP sets pressure curve by control points x1, y1, x2, and y2. Their values are in range @@ -151,13 +179,6 @@ slightly raised curve (softer) might be "0,5,95,100". The pressure curve is only applicable to devices of type stylus or eraser, other devices do not honor this setting. - -.TP 4 -.B Option \fI"KeepShape"\fP \fI"on"|"off"\fP -When this option is enabled, the active zone begins according to TopX -and TopY. The bottom corner is adjusted to keep the ratio width/height -of the active zone the same as the screen while maximizing the area -described by TopX, TopY, BottomX, BottomY. .TP 4 .B Option \fI"DebugLevel"\fP \fI"number"\fP sets the level of debugging info for tool-specific messages. There are 12 @@ -191,7 +212,7 @@ The default is 27. .RE .SH "SEE ALSO" -Xorg(1x), xorg.conf(5x), xorgconfig(1x), Xserver(1x), X(7). +Xorg(1x), xorg.conf(5x), xorg.conf.d(5x), xorgconfig(1x), Xserver(1x), X(7). .SH AUTHORS Frederic Lepied , Ping Cheng , diff -Nru xf86-input-wacom-0.10.11/man/xsetwacom.man xf86-input-wacom-0.11.0/man/xsetwacom.man --- xf86-input-wacom-0.10.11/man/xsetwacom.man 2011-02-15 04:27:40.000000000 +0000 +++ xf86-input-wacom-0.11.0/man/xsetwacom.man 2011-04-14 04:06:47.000000000 +0000 @@ -6,7 +6,7 @@ xsetwacom \- commandline utility to query and modify __drivername__ driver settings. .SH "SYNOPSIS" .LP -xsetwacom [options] command [device_name] [parameter] [value] +xsetwacom [options] [command [arguments]] .SH "DESCRIPTION" .LP @@ -66,7 +66,8 @@ not all parameters are available on all device types. The special parameter name "all" may be provided to display all current settings on the device. .TP -By default, options are printed on the commandline in the respective format. The output format may be altered with one of the following options: +By default, options are printed on the commandline in the respective format. +The output format may be altered with one of the following options: .TP \fB-s, --shell\fR Display the output in shell format, i.e. as shell commands to xsetwacom to @@ -78,58 +79,129 @@ .SS "SET COMMANDS" .TP -\fBset\fR device_name parameter value +\fBset\fR device_name parameter [value] Set the parameter value on the given device to the value provided. Note that not all parameters are writable, some are read-only and result in an error when trying to be modified. .SH "PARAMETERS" +.LP +Not all parameters are available on all tools. Use the get command with the +parameter or "all" parameter for specific input tool applicable parameters +and current settings. .TP \fBArea\fR x1 y1 x2 y2 -Specify the tablet input area in device coordinates in the form top left +Set the tablet input area in device coordinates in the form top left x/y and bottom right x/y. Top left and bottom right are defined in the device's native orientation, regardless of the actual rotation currently -applied. Input outside of these coordinates will be clipped -to the edges of the area defined. +applied. Input outside of these coordinates will be clipped to the edges +of the area defined. Default: 0 0 x2 y2; with x2 and y2 tablet specific. .TP \fBButton\fR button-number [mapping] -Get or set the specified button. The mapping may be a button number to map -the physical button to. e.g. a mapping of button 1 to 3 means -a button 1 press will be interpreted as right click. Alternatively, a -mapping in the form of "key +a +shift b -shift -a" converts the button into a series -of keystrokes, in this example "press a, press shift, press and release b, -release shift, release a". Such key mappings need to be reapplied whenever -the keyboard layout changes. +Set a mapping for the specified button-number. Mappings take the form of +either a single numeric button or an 'action' to be performed. If no mapping +is provided, the default mapping is restored. + +Numeric button mappings indicate what X11 button number the given button-number +should correspond to. For example, a mapping of "3" means a press of the given +button-number will produce as a press of X11 button 3 (i.e. right click). + +Action mappings allow button presses to perform many events. They take the form +of a string of keywords and arguments. For example, "key +a +shift b -shift -a" +converts the button into a series of keystrokes, in this example "press a, press +shift, press and release b, release shift, release a". In addition to the "key" +keyword, "button" and "modetoggle" are also recognized. Multiple keywords may +be present in one action if desired: for example "key +ctrl button 5 key -ctrl". .TP \fBMapToOutput\fR output Map the tablet's input area to the given output (e.g. "VGA1"). The output must specify one of those available through the XRandR extension. A list of outputs may be obtained with the xrandr tool. The output mapping -configuration is a once-off setting and does not track output +configuration is a onetime setting and does not track output reconfigurations; the command needs to be re-run whenever the output configuration changes. When used with tablet rotation, the tablet must be rotated before it is mapped to the new screen. This parameter is write-only and cannot be queried. .TP +\fBMode\fR Absolute|Relative +Set the device mode as either Relative or Absolute. Relative means pointer +tracking for the device will function like a mouse, whereas Absolute means +the pointer corresponds to the device's actual position on the tablet or +tablet PC screen. Default: Absolute for stylus, eraser and tablet PC touch; +Relative for cursor and tablet touch. +.TP +\fBPressureCurve\fR x1 y1 x2 y2 +A Bezier curve of third order, composed of two anchor points (0,0 and 100,100) +and two user modifiable control points that define the curve's shape. Raise +the curve (x1y1 x2>y2) +for a "firmer" feel. Sigmoid shaped curves are permitted (x1>y1 x2y2). Default: 0 0 100 100, a linear curve; range of 0 to 100 for +all four values. +.TP +\fBRawSample\fR level +Set the sample window size (a sliding average sampling window) for incoming +input tool raw data points. Default: 4, range of 1 to 20. +.TP +\fBRotate\fR none|half|cw|ccw +Set the tablet to the given rotation: + none: the tablet is not rotated and uses its natural rotation + half: the tablet is rotated by 180 degrees (upside-down) + cw: the tablet is rotated 90 degrees clockwise + ccw: the tablet is rotated 90 degrees counter-clockwise + +Rotation is a tablet-wide option: rotation of one tool affects all other tools +associated with the same tablet. When the tablet is physically rotated, rotate +any tool to the corresponding orientation. Default: none +.TP +\fBSuppress\fR level +Set the delta (difference) cutoff level for further processing of incoming +input tool coordinate values. For example a X or Y coordinate event will be +sent only if the change between the current X or Y coordinate and the +previous one is greater than the Suppress value. The same applies to +pressure level (Z coordinate) and Tilt rotation values. With a current +absolute wheel (AbsWheel) or Tilt value the delta between it and the +previous value must be equal to or greater than the Suppress value in order +to be sent on. Suppress is a tablet wide parameter. A specified delta +level for one input tool is applied to all input tool coordinates. To +disable suppression use a level of 0. Default: 2, range of 0 to 100. +.TP \fBTabletDebugLevel\fR level Set the debug level for this tablet to the given level. This only affects code paths that are shared between several tools on the same physical tablet. A higher level means more fine-grained debug messages, a level of 0 turns debugging off for this tool. Requires the driver to be built with -debugging enabled. See also ToolDebugLevel. +debugging enabled. See also ToolDebugLevel. Default: 0, range of 0 to 12. +.TP +\fBTabletPCButton\fR on|off +If on, the stylus must be in contact with the screen for a stylus side button +to work. If off, stylus buttons will work once the stylus is in proximity +of the tablet (regardless of whether it is touching the screen). Default: on +for Tablet PCs; off for all other models. +.TP +\fBCursorProximity\fR distance +sets the max distance from tablet to stop reporting movement for cursor in +relative mode. Default for Intuos series is 10, for Graphire series (including +Volitos) is 42. Only available for the cursor/puck device. +.TP +\fBThreshold\fR level +Set the minimum pressure necessary to generate a Button event for the stylus +tip, eraser, or touch. The pressure levels of all tablets are normalized to +2048 levels irregardless of the actual hardware supported levels. This +parameter is independent of the PressureCurve parameter. Default: 27, +range of 0 to 2047. .TP \fBToolDebugLevel\fR level -Set the debug level for this tool to the given level. This only affects code -paths that are specific to a given tool. A higher level means -more fine-grained debug messages, a level of 0 turns debugging off for this +Set the debug level for this tool to the given level. This only affects +code paths that are specific to a given tool. A higher level means more +fine-grained debug messages, a level of 0 turns debugging off for this tool. Requires the driver to be built with debugging enabled. See also -TabletDebugLevel. +TabletDebugLevel. Default: 0, range of 0 to 12. .SH "AUTHORS" Peter Hutterer .SH "SEE ALSO" -__xservername__(__appmansuffix__), wacom(__drivermansuffix__), +__xservername__(__appmansuffix__), __drivername__(__drivermansuffix__), xorg.conf(__filemansuffix__), X(__miscmansuffix__) diff -Nru xf86-input-wacom-0.10.11/README xf86-input-wacom-0.11.0/README --- xf86-input-wacom-0.10.11/README 2011-01-23 21:41:10.000000000 +0000 +++ xf86-input-wacom-0.11.0/README 2011-04-07 05:22:34.000000000 +0000 @@ -3,14 +3,8 @@ higher. Server versions lower than 1.7 may be supported by this driver, but users are encouraged to use the old linuxwacom driver instead. -Provided that hotplugging is enabled in the X server, the simplest -configuration is to copy the wacom.fdi file into /etc/hal/fdi/policies and -to restart HAL and then plug in the tablet. The driver will autoconfigure -itself. - -If hotplugging is not possible or desired, an InputDevice section in the -xorg.conf with the Driver wacom will load the device. Details on the -configuration can be found in xorg.conf(5) and wacom(4). +Information about building this driver, configuration and general use is +available on http://linuxwacom.sourceforge.net Since this driver is an X11 driver only, a kernel driver is required to get hardware support. If the kernel driver is older than this driver, some @@ -20,23 +14,34 @@ BUILDING FROM GIT: $ ./autogen.sh --prefix=/usr + $ make + Adjust the prefix according to your local setup, in most cases, a prefix of /usr is correct. BUILDING FROM TARBALL: - $ ./configure && make + $ ./configure --prefix=/usr + $ make + Adjust the prefix according to your local setup, in most cases, a prefix of /usr is correct. ============================================================================== -Please surf the HOWTO page at http://linuxwacom.sf.net/index.php/howto/main -(or the miniHOWTO at http://linuxwacom.sourceforge.net/index.php/minihowto if -you run a Fedora system) to find the proper options if the default building -environment doesn't work for you. +Please surf the HOWTO pages at +http://sourceforge.net/apps/mediawiki/linuxwacom/index.php?title=Category:HOWTO +to find the proper options if the default building environment doesn't work +for you. + +============================================================================== + +Developers, please surf the DeveloperPages at +http://sourceforge.net/apps/mediawiki/linuxwacom/index.php?title=Category:DeveloperPages +to find more information on how to contribute to this driver. ============================================================================== -WEBSITE: http://linuxwacom.sf.net + +WEBSITE: http://linuxwacom.sourceforge.net diff -Nru xf86-input-wacom-0.10.11/release.sh xf86-input-wacom-0.11.0/release.sh --- xf86-input-wacom-0.10.11/release.sh 1970-01-01 00:00:00.000000000 +0000 +++ xf86-input-wacom-0.11.0/release.sh 2011-08-01 04:48:52.000000000 +0000 @@ -0,0 +1,223 @@ +#!/bin/sh +# Release script for xf86-input-wacom. +# This is essentially a copy of the X.Org util/modular/release.sh script +# with a few modified parameters. + +set -e + +announce_list="linuxwacom-announce@lists.sourceforge.net" +module=xf86-input-wacom +user=${USER}@ +host=shell.sourceforge.net +srv_path=/home/frs/project/l/li/linuxwacom/$module +webpath=sourceforge.net/projects/linuxwacom/files/$module +remote=origin + +usage() +{ + cat < + +Options: + --force force overwritting an existing release + --user username on $host + --help this help message + --ignore-local-changes don't abort on uncommitted local changes + --remote git remote where the change should be pushed (default "origin") +HELP +} + +abort_for_changes() +{ + cat < /dev/null 2>&1 + if [ $? -ne 0 ]; then + abort_for_changes + fi + set -e +fi + +# Check if the object has been pushed. Do do so +# 1. Check if the current branch has the object. If not, abort. +# 2. Check if the object is on $remote/branchname. If not, abort. +local_sha=`git rev-list -1 $tag_current` +current_branch=`git branch | grep "\*" | sed -e "s/\* //"` +set +e +git rev-list $current_branch | grep $local_sha > /dev/null +if [ $? -eq 1 ]; then + echo "Cannot find tag '$tag_current' on current branch. Aborting." + echo "Switch to the correct branch and re-run the script." + exit 1 +fi + +revs=`git rev-list $remote/$current_branch..$current_branch | wc -l` +if [ $revs -ne 0 ]; then + git rev-list $remote/$current_branch..$current_branch | grep $local_sha > /dev/null + + if [ $? -ne 1 ]; then + echo "$remote/$current_branch doesn't have object $local_sha" + echo "for tag '$tag_current'. Did you push branch first? Aborting." + exit 1 + fi +fi +set -e + +tarball_dir="$(dirname $(find . -name config.status))" +module="${tag_current%-*}" +if [ "x$module" = "x$tag_current" ]; then + # version-number-only tag. + pwd=`pwd` + module=`basename $pwd` + version="$tag_current" +else + # module-and-version style tag + version="${tag_current##*-}" +fi + +detected_module=`grep 'PACKAGE = ' $tarball_dir/Makefile | sed 's|PACKAGE = ||'` +if [ -f $detected_module-$version.tar.bz2 ]; then + module=$detected_module +fi + +modulever=$module-$version +tarbz2="$modulever.tar.bz2" +targz="$modulever.tar.gz" +announce="$tarball_dir/$modulever.announce" + +echo "checking parameters" +if ! [ -f "$tarball_dir/$tarbz2" ] || + ! [ -f "$tarball_dir/$targz" ] || + [ -z "$tag_previous" ]; then + echo "error: incorrect parameters!" + usage + exit 1 +fi + +echo "checking for proper current dir" +if ! [ -d .git ]; then + echo "error: do this from your git dir, weenie" + exit 1 +fi + +echo "checking for an existing tag" +if ! git tag -l $tag_current >/dev/null; then + echo "error: you must tag your release first!" + exit 1 +fi + +echo "creating shell on sourceforge for $USER" +echo "Simply log out once you get to the prompt" +ssh -t ${user/%@},linuxwacom@shell.sourceforge.net create + +echo "Sleeping for 30 seconds, because this sometimes helps against sourceforge's random authentication denials" +sleep 30 + +echo "checking for an existing release" +if ssh $user$host ls $srv_path/$module/$targz >/dev/null 2>&1 || +ssh $user$host_people ls $srv_path/$module/$tarbz2 >/dev/null 2>&1; then +if [ "x$force" = "xyes" ]; then +echo "warning: overriding released file ... here be dragons." +else +echo "error: file already exists!" +exit 1 +fi +fi + +echo "generating announce mail template, remember to sign it" +gen_announce_mail >$announce +echo " at: $announce" + +echo "Sleeping for 30 seconds, because this sometimes helps against sourceforge's random authentication denials" +sleep 30 + +echo "installing release into server" +scp $tarball_dir/$targz $tarball_dir/$tarbz2 $user$host:$srv_path + +echo "pushing tag upstream" +git push $remote $tag_current diff -Nru xf86-input-wacom-0.10.11/src/common.mk xf86-input-wacom-0.11.0/src/common.mk --- xf86-input-wacom-0.10.11/src/common.mk 1970-01-01 00:00:00.000000000 +0000 +++ xf86-input-wacom-0.11.0/src/common.mk 2011-04-07 05:22:34.000000000 +0000 @@ -0,0 +1,15 @@ +# shared makefile between src/Makefile.am and test/Makefile.am + +DRIVER_SOURCES= \ + $(top_srcdir)/src/xf86Wacom.c \ + $(top_srcdir)/src/xf86Wacom.h \ + $(top_srcdir)/src/wcmCommon.c \ + $(top_srcdir)/src/wcmConfig.c \ + $(top_srcdir)/src/wcmISDV4.c \ + $(top_srcdir)/src/wcmFilter.c \ + $(top_srcdir)/src/wcmFilter.h \ + $(top_srcdir)/src/xf86WacomDefs.h \ + $(top_srcdir)/src/wcmUSB.c \ + $(top_srcdir)/src/wcmXCommand.c \ + $(top_srcdir)/src/wcmValidateDevice.c \ + $(top_srcdir)/src/wcmTouchFilter.c diff -Nru xf86-input-wacom-0.10.11/src/Makefile.am xf86-input-wacom-0.11.0/src/Makefile.am --- xf86-input-wacom-0.10.11/src/Makefile.am 2011-02-15 04:27:40.000000000 +0000 +++ xf86-input-wacom-0.11.0/src/Makefile.am 2011-04-07 05:22:34.000000000 +0000 @@ -25,23 +25,13 @@ # _ladir passes a dummy rpath to libtool so the thing will actually link # TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc. +include common.mk + @DRIVER_NAME@_drv_la_LTLIBRARIES = @DRIVER_NAME@_drv.la @DRIVER_NAME@_drv_la_LDFLAGS = -module -avoid-version @DRIVER_NAME@_drv_ladir = @inputdir@ AM_CPPFLAGS=-I$(top_srcdir)/include/ -AM_CFLAGS = $(XORG_CFLAGS) $(CWARNFLAGS) +AM_CFLAGS = $(XORG_CFLAGS) $(CWARNFLAGS) $(UDEV_CFLAGS) -@DRIVER_NAME@_drv_la_SOURCES = \ - $(top_srcdir)/src/xf86Wacom.c \ - $(top_srcdir)/src/xf86Wacom.h \ - $(top_srcdir)/src/wcmCommon.c \ - $(top_srcdir)/src/wcmConfig.c \ - $(top_srcdir)/src/wcmISDV4.c \ - $(top_srcdir)/src/wcmFilter.c \ - $(top_srcdir)/src/wcmFilter.h \ - $(top_srcdir)/src/xf86WacomDefs.h \ - $(top_srcdir)/src/wcmUSB.c \ - $(top_srcdir)/src/wcmXCommand.c \ - $(top_srcdir)/src/wcmValidateDevice.c \ - $(top_srcdir)/src/wcmTouchFilter.c +@DRIVER_NAME@_drv_la_SOURCES = $(DRIVER_SOURCES) diff -Nru xf86-input-wacom-0.10.11/src/Makefile.in xf86-input-wacom-0.11.0/src/Makefile.in --- xf86-input-wacom-0.10.11/src/Makefile.in 2011-02-16 04:26:35.000000000 +0000 +++ xf86-input-wacom-0.11.0/src/Makefile.in 2011-04-19 04:07:03.000000000 +0000 @@ -41,6 +41,8 @@ # _ladir passes a dummy rpath to libtool so the thing will actually link # TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc. +# shared makefile between src/Makefile.am and test/Makefile.am + VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ @@ -60,8 +62,9 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(srcdir)/common.mk subdir = src -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -94,9 +97,10 @@ am__installdirs = "$(DESTDIR)$(@DRIVER_NAME@_drv_ladir)" LTLIBRARIES = $(@DRIVER_NAME@_drv_la_LTLIBRARIES) @DRIVER_NAME@_drv_la_LIBADD = -am_@DRIVER_NAME@_drv_la_OBJECTS = xf86Wacom.lo wcmCommon.lo \ - wcmConfig.lo wcmISDV4.lo wcmFilter.lo wcmUSB.lo wcmXCommand.lo \ - wcmValidateDevice.lo wcmTouchFilter.lo +am__objects_1 = xf86Wacom.lo wcmCommon.lo wcmConfig.lo wcmISDV4.lo \ + wcmFilter.lo wcmUSB.lo wcmXCommand.lo wcmValidateDevice.lo \ + wcmTouchFilter.lo +am_@DRIVER_NAME@_drv_la_OBJECTS = $(am__objects_1) @DRIVER_NAME@_drv_la_OBJECTS = $(am_@DRIVER_NAME@_drv_la_OBJECTS) AM_V_lt = $(am__v_lt_$(V)) am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) @@ -158,6 +162,7 @@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DOXYGEN = @DOXYGEN@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRIVER_NAME = @DRIVER_NAME@ @@ -171,8 +176,6 @@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ -GLIB_CFLAGS = @GLIB_CFLAGS@ -GLIB_LIBS = @GLIB_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ @@ -218,6 +221,8 @@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ +UDEV_CFLAGS = @UDEV_CFLAGS@ +UDEV_LIBS = @UDEV_LIBS@ VERSION = @VERSION@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ @@ -278,12 +283,7 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -@DRIVER_NAME@_drv_la_LTLIBRARIES = @DRIVER_NAME@_drv.la -@DRIVER_NAME@_drv_la_LDFLAGS = -module -avoid-version -@DRIVER_NAME@_drv_ladir = @inputdir@ -AM_CPPFLAGS = -I$(top_srcdir)/include/ -AM_CFLAGS = $(XORG_CFLAGS) $(CWARNFLAGS) -@DRIVER_NAME@_drv_la_SOURCES = \ +DRIVER_SOURCES = \ $(top_srcdir)/src/xf86Wacom.c \ $(top_srcdir)/src/xf86Wacom.h \ $(top_srcdir)/src/wcmCommon.c \ @@ -297,11 +297,17 @@ $(top_srcdir)/src/wcmValidateDevice.c \ $(top_srcdir)/src/wcmTouchFilter.c +@DRIVER_NAME@_drv_la_LTLIBRARIES = @DRIVER_NAME@_drv.la +@DRIVER_NAME@_drv_la_LDFLAGS = -module -avoid-version +@DRIVER_NAME@_drv_ladir = @inputdir@ +AM_CPPFLAGS = -I$(top_srcdir)/include/ +AM_CFLAGS = $(XORG_CFLAGS) $(CWARNFLAGS) $(UDEV_CFLAGS) +@DRIVER_NAME@_drv_la_SOURCES = $(DRIVER_SOURCES) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/common.mk $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ diff -Nru xf86-input-wacom-0.10.11/src/wcmCommon.c xf86-input-wacom-0.11.0/src/wcmCommon.c --- xf86-input-wacom-0.10.11/src/wcmCommon.c 2011-02-16 04:25:52.000000000 +0000 +++ xf86-input-wacom-0.11.0/src/wcmCommon.c 2011-04-19 04:04:00.000000000 +0000 @@ -36,9 +36,9 @@ * data beforehand. */ #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 11 +static int v[MAX_VALUATORS]; static int *VCOPY(const int *valuators, int nvals) { - static int v[MAX_VALUATORS]; memcpy(v, valuators, nvals * sizeof(int)); return v; } @@ -53,8 +53,10 @@ ****************************************************************************/ static int applyPressureCurve(WacomDevicePtr pDev, const WacomDeviceStatePtr pState); -static void commonDispatchDevice(WacomCommonPtr common, unsigned int channel, - const WacomChannelPtr pChannel, int suppress); +static void commonDispatchDevice(WacomCommonPtr common, + unsigned int channel, + const WacomChannelPtr pChannel, + enum WacomSuppressMode suppress); static void sendAButton(InputInfoPtr pInfo, int button, int mask, int first_val, int num_vals, int *valuators); @@ -62,12 +64,20 @@ * Utility functions ****************************************************************************/ +/** + * @return TRUE if the device is set to abolute mode, or FALSE otherwise + */ Bool is_absolute(InputInfoPtr pInfo) { WacomDevicePtr priv = (WacomDevicePtr)pInfo->private; return !!(priv->flags & ABSOLUTE_FLAG); } +/** + * Set the device to absolute or relative mode + * + * @param absolute TRUE to set the device to absolute mode. + */ void set_absolute(InputInfoPtr pInfo, Bool absolute) { WacomDevicePtr priv = (WacomDevicePtr)pInfo->private; @@ -316,14 +326,14 @@ unsigned int **fakeKey) { WacomDevicePtr priv = (WacomDevicePtr) pInfo->private; - int fakeButton = 0, value; + int fakeButton = 0, value = 0; /* emulate events for relative wheel */ if ( ds->relwheel ) { value = ds->relwheel; fakeButton = (value > 0) ? priv->relup : priv->reldn; - *fakeKey = (value > 0) ? priv->wheel_keys[0] : priv->wheel_keys[1]; + *fakeKey = (value > 0) ? priv->wheel_keys[0+1] : priv->wheel_keys[1+1]; } /* emulate events for absolute wheel when it is a touch ring (on pad) */ @@ -348,7 +358,7 @@ value = wrap_delta; fakeButton = (value > 0) ? priv->wheelup : priv->wheeldn; - *fakeKey = (value > 0) ? priv->wheel_keys[2] : priv->wheel_keys[3]; + *fakeKey = (value > 0) ? priv->wheel_keys[2+1] : priv->wheel_keys[3+1]; } /* emulate events for left strip */ @@ -357,7 +367,7 @@ value = ds->stripx - priv->oldStripX; fakeButton = (value > 0) ? priv->striplup : priv->stripldn; - *fakeKey = (value > 0) ? priv->strip_keys[0] : priv->strip_keys[1]; + *fakeKey = (value > 0) ? priv->strip_keys[0+1] : priv->strip_keys[1+1]; } /* emulate events for right strip */ @@ -366,7 +376,7 @@ value = ds->stripy - priv->oldStripY; fakeButton = (value > 0) ? priv->striprup : priv->striprdn; - *fakeKey = (value > 0) ? priv->strip_keys[2] : priv->strip_keys[2]; + *fakeKey = (value > 0) ? priv->strip_keys[2+1] : priv->strip_keys[3+1]; } DBG(10, priv, "send fakeButton %x with value = %d \n", @@ -401,13 +411,14 @@ xf86PostButtonEventP(pInfo->dev, is_absolute(pInfo), fakeButton & AC_CODE, 0, first_val, num_vals, VCOPY(valuators, num_vals)); - return; } - - sendAction(pInfo, 1, fakeKey, ARRAY_SIZE(priv->wheel_keys[0]), - first_val, num_vals, valuators); - sendAction(pInfo, 0, fakeKey, ARRAY_SIZE(priv->wheel_keys[0]), - first_val, num_vals, valuators); + else + { + sendAction(pInfo, 1, fakeKey, ARRAY_SIZE(priv->wheel_keys[0]), + first_val, num_vals, valuators); + sendAction(pInfo, 0, fakeKey, ARRAY_SIZE(priv->wheel_keys[0]), + first_val, num_vals, valuators); + } } /***************************************************************************** @@ -652,14 +663,6 @@ int v3, v4, v5; int valuators[priv->naxes]; - if (priv->serial && serial != priv->serial) - { - DBG(10, priv, "serial number" - " is %u but your system configured %u", - serial, (int)priv->serial); - return; - } - /* don't move the cursor when going out-prox */ if (!ds->proximity) { @@ -758,50 +761,69 @@ } } -/***************************************************************************** - * wcmCheckSuppress -- - * Determine whether device state has changed enough - return 0 - * if not. - ****************************************************************************/ - -static int wcmCheckSuppress(WacomCommonPtr common, - const WacomDeviceState* dsOrig, - WacomDeviceState* dsNew) +/** + * Determine whether device state has changed enough to warrant further + * processing. The driver's "suppress" setting decides how much + * movement/state change must occur before we process events to avoid + * overloading the server with minimal changes (and getting fuzzy events). + * wcmCheckSuppress ensures that events meet this standard. + * + * @param dsOrig Previous device state + * @param dsNew Current device state + * + * @retval SUPPRESS_ALL Ignore this event completely. + * @retval SUPPRESS_NONE Process event normally. + * @retval SUPPRESS_NON_MOTION Suppress all data but motion data. + */ +static enum WacomSuppressMode +wcmCheckSuppress(WacomCommonPtr common, + const WacomDeviceState* dsOrig, + WacomDeviceState* dsNew) { int suppress = common->wcmSuppress; - /* NOTE: Suppression value of zero disables suppression. */ - int returnV = 0; + enum WacomSuppressMode returnV = SUPPRESS_NONE; /* Ignore all other changes that occur after initial out-of-prox. */ if (!dsNew->proximity && !dsOrig->proximity) - return 0; + return SUPPRESS_ALL; /* Never ignore proximity changes. */ - if (dsOrig->proximity != dsNew->proximity) returnV = 1; + if (dsOrig->proximity != dsNew->proximity) goto out; - if (dsOrig->buttons != dsNew->buttons) returnV = 1; - if (dsOrig->stripx != dsNew->stripx) returnV = 1; - if (dsOrig->stripy != dsNew->stripy) returnV = 1; - if (abs(dsOrig->tiltx - dsNew->tiltx) > suppress) returnV = 1; - if (abs(dsOrig->tilty - dsNew->tilty) > suppress) returnV = 1; - if (abs(dsOrig->pressure - dsNew->pressure) > suppress) returnV = 1; - if (abs(dsOrig->capacity - dsNew->capacity) > suppress) returnV = 1; - if (abs(dsOrig->throttle - dsNew->throttle) > suppress) returnV = 1; + if (dsOrig->buttons != dsNew->buttons) goto out; + if (dsOrig->stripx != dsNew->stripx) goto out; + if (dsOrig->stripy != dsNew->stripy) goto out; + + /* FIXME: we should have different suppress values for different + * axes. The resolution for x/y is vastly higher than for capacity + * for example. */ + if (abs(dsOrig->tiltx - dsNew->tiltx) > suppress) goto out; + if (abs(dsOrig->tilty - dsNew->tilty) > suppress) goto out; + if (abs(dsOrig->pressure - dsNew->pressure) > suppress) goto out; + if (abs(dsOrig->capacity - dsNew->capacity) > suppress) goto out; + if (abs(dsOrig->throttle - dsNew->throttle) > suppress) goto out; if (abs(dsOrig->rotation - dsNew->rotation) > suppress && - (1800 - abs(dsOrig->rotation - dsNew->rotation)) > suppress) returnV = 1; + (1800 - abs(dsOrig->rotation - dsNew->rotation)) > suppress) goto out; /* look for change in absolute wheel position * or any relative wheel movement */ if ((abs(dsOrig->abswheel - dsNew->abswheel) > suppress) - || (dsNew->relwheel != 0)) returnV = 1; + || (dsNew->relwheel != 0)) + goto out; + + returnV = SUPPRESS_ALL; - /* cursor moves or not? */ +out: + /* Special handling for cursor: if nothing else changed but the + * pointer x/y, suppress all but cursor movement. This return value + * is used in commonDispatchDevice to short-cut event processing. + */ if ((abs(dsOrig->x - dsNew->x) > suppress) || (abs(dsOrig->y - dsNew->y) > suppress)) { - if (!returnV) /* need to check if cursor moves or not */ - returnV = 2; + if (returnV == SUPPRESS_ALL) + returnV = SUPPRESS_NON_MOTION; } else /* don't move cursor */ { @@ -825,7 +847,7 @@ WacomDeviceState* pLast; WacomDeviceState ds; WacomChannelPtr pChannel; - int suppress = 0; + enum WacomSuppressMode suppress; WacomDevicePtr priv = common->wcmDevices; pChannel = common->wcmChannel + channel; pLast = &pChannel->valid.state; @@ -843,7 +865,7 @@ DBG(10, common, "c=%d i=%d t=%d s=%u x=%d y=%d b=%d " "p=%d rz=%d tx=%d ty=%d aw=%d rw=%d " - "t=%d df=%d px=%d st=%d cs=%d \n", + "t=%d px=%d st=%d cs=%d \n", channel, ds.device_id, ds.device_type, @@ -851,7 +873,7 @@ ds.x, ds.y, ds.buttons, ds.pressure, ds.rotation, ds.tiltx, ds.tilty, ds.abswheel, ds.relwheel, ds.throttle, - ds.discard_first, ds.proximity, ds.sample, + ds.proximity, ds.sample, pChannel->nSamples); /* touch device is needed for gesture later */ @@ -864,47 +886,35 @@ if (priv == NULL || !IsTouch(priv)) { priv = common->wcmDevices; - /* this error will likely cause the driver crash */ - xf86Msg(X_ERROR, "%s: wcmEvent could not " - "find touch device.\n", priv->name); + xf86Msg(X_ERROR, "could not find touch device " + "for device on %s.\n", common->device_path); } } - /* Discard the first 2 USB packages due to events delay */ - if ( (pChannel->nSamples < 2) && IsUSBDevice(common) && - ds.device_type != PAD_ID && (ds.device_type != TOUCH_ID) ) - { - DBG(11, common, - "discarded %dth USB data.\n", - pChannel->nSamples); - ++pChannel->nSamples; - return; /* discard */ - } - if (TabletHasFeature(common, WCM_ROTATION) && TabletHasFeature(common, WCM_RING)) /* I4 */ { /* convert Intuos4 mouse tilt to rotation */ - wcmTilt2R(&ds); + ds.rotation = wcmTilt2R(ds.tiltx, ds.tilty, + INTUOS4_CURSOR_ROTATION_OFFSET); + ds.tiltx = 0; + ds.tilty = 0; } /* Optionally filter values only while in proximity */ - if (RAW_FILTERING(common) && common->wcmModel->FilterRaw && - ds.proximity && ds.device_type != PAD_ID) + if (ds.proximity && ds.device_type != PAD_ID) { /* Start filter fresh when entering proximity */ if (!pLast->proximity) wcmResetSampleCounter(pChannel); - common->wcmModel->FilterRaw(common,pChannel,&ds); + wcmFilterCoord(common,pChannel,&ds); } - /* Discard unwanted data */ + /* skip event if we don't have enough movement */ suppress = wcmCheckSuppress(common, pLast, &ds); - if (!suppress) - { + if (suppress == SUPPRESS_ALL) return; - } /* JEJ - Do not move this code without discussing it with me. * The device state is invariant of any filtering performed below. @@ -932,93 +942,19 @@ commonDispatchDevice(common,channel,pChannel, suppress); } -static int idtotype(int id) -{ - int type = CURSOR_ID; - - /* tools with id, such as Intuos series and Cintiq 21UX */ - switch (id) - { - case 0x812: /* Inking pen */ - case 0x801: /* Intuos3 Inking pen */ - case 0x012: - case 0x822: /* Pen */ - case 0x842: - case 0x852: - case 0x823: /* Intuos3 Grip Pen */ - case 0x813: /* Intuos3 Classic Pen */ - case 0x885: /* Intuos3 Marker Pen */ - case 0x022: - case 0x832: /* Stroke pen */ - case 0x032: - case 0xd12: /* Airbrush */ - case 0x912: - case 0x112: - case 0x913: /* Intuos3 Airbrush */ - type = STYLUS_ID; - break; - case 0x82a: /* Eraser */ - case 0x85a: - case 0x91a: - case 0xd1a: - case 0x0fa: - case 0x82b: /* Intuos3 Grip Pen Eraser */ - case 0x81b: /* Intuos3 Classic Pen Eraser */ - case 0x91b: /* Intuos3 Airbrush Eraser */ - type = ERASER_ID; - break; - } - return type; -} - /** - * Identify the device type (STYLUS_ID, etc.) based on the device_id or the - * current tool serial number. + * Find the device the current events are meant for. If multiple tools are + * configured on this tablet, the one that matches the serial number for the + * current device state is returned. If none match, the tool that has a + * serial of 0 is returned. + * + * @param ds The current device state as read from the fd + * @return The tool that should be used to emit the current events. */ -static int findDeviceType(const WacomCommonPtr common, - const WacomDeviceState *ds) -{ - WacomToolPtr tool = NULL; - int device_type = 0; - - switch (ds->device_id) - { - case STYLUS_DEVICE_ID: - device_type = STYLUS_ID; - break; - case ERASER_DEVICE_ID: - device_type = ERASER_ID; - break; - case CURSOR_DEVICE_ID: - device_type = CURSOR_ID; - break; - case TOUCH_DEVICE_ID: - device_type = TOUCH_ID; - break; - case PAD_DEVICE_ID: - device_type = PAD_ID; - break; - default: - device_type = idtotype(ds->device_id); - } - - if (ds->serial_num) - { - for (tool = common->wcmTool; tool; tool = tool->next) - if (ds->serial_num == tool->serial) - { - device_type = tool->typeid; - break; - } - } - return device_type; -} - -/* Find the device the current events are meant for */ static WacomToolPtr findTool(const WacomCommonPtr common, const WacomDeviceState *ds) { - WacomToolPtr tooldef = NULL; + WacomToolPtr tooldefault = NULL; WacomToolPtr tool = NULL; /* 1: Find the tool (the one with correct serial or in second @@ -1031,64 +967,13 @@ if (tool->serial == ds->serial_num) break; else if (!tool->serial) - tooldef = tool; + tooldefault = tool; } } - /* pad does not need area check. Skip the unnecessary steps */ - if (tool && (tool->typeid == PAD_ID) && tool->arealist) - return tool; - /* Use default tool (serial == 0) if no specific was found */ if (!tool) - tool = tooldef; - - /* 2: Find the associated area, and its InputDevice */ - if (tool) - { - /* if the current area is not in-prox anymore, we - * might want to use another area. So move the - * current-pointer away for a moment while we have a - * look if there's a better area defined. - * Skip this if only one area is defined - */ - WacomToolAreaPtr outprox = NULL; - if (tool->current && tool->arealist->next && - !wcmPointInArea(tool->current, ds->x, ds->y)) - { - outprox = tool->current; - tool->current = NULL; - } - - /* If only one area is defined for the tool, always - * use this area even if we're not inside it - */ - if (!tool->current && !tool->arealist->next) - tool->current = tool->arealist; - - /* If no current area in-prox, find a matching area */ - if(!tool->current) - { - WacomToolAreaPtr area = tool->arealist; - for(; area; area = area->next) - if (wcmPointInArea(area, ds->x, ds->y)) - break; - tool->current = area; - } - - /* If a better area was found, send a soft prox-out - * for the current in-prox area, else use the old one. */ - if (outprox) - { - if (tool->current) - { - /* Send soft prox-out for the old area */ - wcmSoftOutEvent(outprox->device); - } - else - tool->current = outprox; - } - } + tool = tooldefault; return tool; } @@ -1152,9 +1037,11 @@ p = priv->minPressure; } - /* normalize pressure to FILTER_PRESSURE_RES */ - pressure = (p - priv->minPressure) * FILTER_PRESSURE_RES; - pressure /= (common->wcmMaxZ - priv->minPressure); + /* normalize pressure to 0..FILTER_PRESSURE_RES */ + pressure = xf86ScaleAxis(p - priv->minPressure, + FILTER_PRESSURE_RES, 0, + common->wcmMaxZ - priv->minPressure, + 0); return (int)pressure; } @@ -1195,7 +1082,8 @@ } static void commonDispatchDevice(WacomCommonPtr common, unsigned int channel, - const WacomChannelPtr pChannel, Bool suppress) + const WacomChannelPtr pChannel, + enum WacomSuppressMode suppress) { InputInfoPtr pInfo = NULL; WacomToolPtr tool = NULL; @@ -1203,9 +1091,16 @@ WacomDevicePtr priv = NULL; WacomDeviceState filtered; - /* if something went wrong, figure out device type by device id */ - if (!ds->device_type && ds->proximity) - ds->device_type = findDeviceType(common, ds); + /* device_type should have been retrieved and set in the respective + * models, wcmISDV4.c or wcmUSB.c. Once it comes here, something + * must have been wrong. Ignore the events. + */ + if (!ds->device_type) + { + DBG(11, common, "no device type matches with" + " serial=%u\n", ds->serial_num); + return; + } DBG(10, common, "device type = %d\n", ds->device_type); @@ -1213,7 +1108,7 @@ tool = findTool(common, ds); /* if a device matched criteria, handle filtering per device * settings, and send event to XInput */ - if (!tool || !tool->current || !tool->current->device) + if (!tool || !tool->device) { DBG(11, common, "no device matches with" " id=%d, serial=%u\n", @@ -1221,77 +1116,70 @@ return; } - pInfo = tool->current->device; - DBG(11, common, "tool id=%d for %s\n", ds->device_type, pInfo->name); - /* Tool on the tablet when driver starts. This sometime causes * access errors to the device */ - if (!pInfo || !pInfo->dev || !pInfo->dev->enabled) - { + if (!tool->enabled) { xf86Msg(X_ERROR, "wcmEvent: tool not initialized yet. Skipping event. \n"); return; } + pInfo = tool->device; + DBG(11, common, "tool id=%d for %s\n", ds->device_type, pInfo->name); + filtered = pChannel->valid.state; /* Device transformations come first */ priv = pInfo->private; - if (IsUSBDevice(common)) + if (priv->serial && filtered.serial_num != priv->serial) { - if (IsTouch(priv) && !ds->proximity) - priv->oldHwProx = 0; - else if (IsStylus(priv) || IsEraser(priv)) - priv->oldHwProx = 1; + DBG(10, priv, "serial number" + " is %u but your system configured %u", + filtered.serial_num, priv->serial); + return; } - /* send a touch out for USB Tablet PCs */ - if (IsUSBDevice(common) && !IsTouch(priv) - && common->wcmTouchDefault && !priv->oldProximity) + if (TabletHasFeature(common, WCM_PENTOUCH)) { - InputInfoPtr device = xf86FirstLocalDevice(); - WacomCommonPtr tempcommon = NULL; - WacomDevicePtr temppriv = NULL; - - /* Lookup to see if associated touch was enabled */ - for (; device != NULL; device = device->next) + if (IsPen(priv)) { - if (strstr(device->drv->driverName, "wacom")) + /* send touch out when pen coming in-prox for devices + * that provideboth pen and touch events so system + * cursor won't jump between tools. + */ + if (common->wcmTouchDevice->oldProximity) { - temppriv = (WacomDevicePtr) device->private; - tempcommon = temppriv->common; - - if ((tempcommon->tablet_id == common->tablet_id) && - IsTouch(temppriv) && temppriv->oldProximity) - { - /* Send soft prox-out for touch first */ - wcmSoftOutEvent(device); - } + wcmSoftOutEvent(common->wcmTouchDevice->pInfo); + return; } } + else if (IsTouch(priv) && common->wcmPenInProx) + /* Ignore touch events when pen is in prox */ + return; } - if (IsStylus(priv) || IsEraser(priv)) + if (IsPen(priv)) { priv->minPressure = rebasePressure(priv, &filtered); filtered.pressure = normalizePressure(priv, &filtered); filtered.buttons = setPressureButton(priv, &filtered); filtered.pressure = applyPressureCurve(priv,&filtered); + common->wcmPenInProx = filtered.proximity; } - else if (IsCursor(priv) && !priv->oldHwProx) + else if (IsCursor(priv) && !priv->oldCursorHwProx) { /* initial current max distance for Intuos series */ if ((TabletHasFeature(common, WCM_ROTATION)) || (TabletHasFeature(common, WCM_DUALINPUT))) - common->wcmMaxCursorDist = 256; + common->wcmMaxCursorDist = common->wcmMaxDist; else common->wcmMaxCursorDist = 0; } - /* Store current hard prox for next use */ - if (!IsTouch(priv)) - priv->oldHwProx = ds->proximity; + /* Store cursor hardware prox for next use */ + if (IsCursor(priv)) + priv->oldCursorHwProx = ds->proximity; /* User-requested filtering comes next */ @@ -1307,34 +1195,36 @@ deltx *= priv->factorX; delty *= priv->factorY; + /* less than one device coordinate movement? */ if (abs(deltx)<1 && abs(delty)<1) { - /* don't move the cursor */ - if (suppress == 1) - { - /* send other events, such as button/wheel */ - filtered.x = priv->oldX; - filtered.y = priv->oldY; - } - else /* no other events to send */ + /* We have no other data in this event, skip */ + if (suppress == SUPPRESS_NON_MOTION) { DBG(10, common, "Ignore non-movement relative data \n"); return; } + + /* send other events, such as button/wheel */ + filtered.x = priv->oldX; + filtered.y = priv->oldY; } } /* force out-prox when distance is outside wcmCursorProxoutDist for pucks */ if (IsCursor(priv)) { - /* force out-prox when distance is outside wcmCursorProxoutDist. */ if (common->wcmProtocolLevel == WCM_PROTOCOL_5) { + /* protocol 5 distance starts from the MaxDist + * when getting in the prox. + */ if (common->wcmMaxCursorDist > filtered.distance) common->wcmMaxCursorDist = filtered.distance; } else { + /* protocol 4 distance is 0 when getting in the prox */ if (common->wcmMaxCursorDist < filtered.distance) common->wcmMaxCursorDist = filtered.distance; } @@ -1364,9 +1254,6 @@ } } wcmSendEvents(pInfo, &filtered); - /* If out-prox, reset the current area pointer */ - if (!filtered.proximity) - tool->current = NULL; } /***************************************************************************** @@ -1430,9 +1317,6 @@ out.device_id = wcmGetPhyDeviceID(priv); DBG(2, priv->common, "send a soft prox-out\n"); wcmSendEvents(pInfo, &out); - - if (out.device_type == TOUCH_ID) - priv->common->wcmTouchpadMode = 0; } /***************************************************************************** @@ -1463,48 +1347,18 @@ { WacomDevicePtr priv = (WacomDevicePtr)pInfo->private; WacomCommonPtr common = priv->common; + WacomToolPtr tool; DBG(10, priv, "\n"); common->wcmRotate = value; -} - -/* wcmPointInArea - check whether the point is within the area */ -Bool wcmPointInArea(WacomToolAreaPtr area, int x, int y) -{ - if (area->topX <= x && x <= area->bottomX && - area->topY <= y && y <= area->bottomY) - return 1; - return 0; + /* Only try updating properties once we're enabled, no point + * otherwise. */ + tool = priv->tool; + if (tool->enabled) + wcmUpdateRotationProperty(priv); } -/* wcmAreasOverlap - check if two areas are overlapping */ - -static Bool wcmAreasOverlap(WacomToolAreaPtr area1, WacomToolAreaPtr area2) -{ - if (wcmPointInArea(area1, area2->topX, area2->topY) || - wcmPointInArea(area1, area2->topX, area2->bottomY) || - wcmPointInArea(area1, area2->bottomX, area2->topY) || - wcmPointInArea(area1, area2->bottomX, area2->bottomY)) - return 1; - if (wcmPointInArea(area2, area1->topX, area1->topY) || - wcmPointInArea(area2, area1->topX, area1->bottomY) || - wcmPointInArea(area2, area1->bottomX, area1->topY) || - wcmPointInArea(area2, area1->bottomX, area1->bottomY)) - return 1; - return 0; -} - -/* wcmAreaListOverlap - check if the area overlaps any area in the list */ -Bool wcmAreaListOverlap(WacomToolAreaPtr area, WacomToolAreaPtr list) -{ - for (; list; list=list->next) - if (area != list && wcmAreasOverlap(list, area)) - return 1; - return 0; -} - - /* Common pointer refcounting utilities. * Common is shared across all wacom devices off the same port. These * functions implement basic refcounting to avoid double-frees and memleaks. diff -Nru xf86-input-wacom-0.10.11/src/wcmConfig.c xf86-input-wacom-0.11.0/src/wcmConfig.c --- xf86-input-wacom-0.10.11/src/wcmConfig.c 2011-02-15 04:27:40.000000000 +0000 +++ xf86-input-wacom-0.11.0/src/wcmConfig.c 2011-04-19 04:04:00.000000000 +0000 @@ -38,7 +38,6 @@ WacomDevicePtr priv = NULL; WacomCommonPtr common = NULL; WacomToolPtr tool = NULL; - WacomToolAreaPtr area = NULL; int i; priv = calloc(1, sizeof(WacomDeviceRec)); @@ -53,10 +52,6 @@ if(!tool) goto error; - area = calloc(1, sizeof(WacomToolArea)); - if (!area) - goto error; - pInfo->device_control = gWacomModule.DevProc; pInfo->read_input = gWacomModule.DevReadInput; pInfo->control_proc = gWacomModule.DevChangeControl; @@ -67,7 +62,7 @@ priv->next = NULL; priv->pInfo = pInfo; priv->common = common; /* common info pointer */ - priv->oldHwProx = 1; /* previous hardware proximity */ + priv->oldCursorHwProx = 0; /* previous cursor hardware proximity */ priv->nPressCtrl [0] = 0; /* pressure curve x0 */ priv->nPressCtrl [1] = 0; /* pressure curve y0 */ priv->nPressCtrl [2] = 100; /* pressure curve x1 */ @@ -94,7 +89,7 @@ /* JEJ - throttle sampling code */ priv->throttleLimit = -1; - common->wcmFlags = RAW_FILTERING_FLAG; /* various flags */ + common->wcmFlags = 0; /* various flags */ common->wcmDevices = priv; common->wcmProtocolLevel = WCM_PROTOCOL_4; /* protocol level */ common->wcmTPCButton = 0; /* set Tablet PC button on/off */ @@ -128,18 +123,12 @@ priv->tool = tool; common->wcmTool = tool; tool->next = NULL; /* next tool in list */ - tool->arealist = area; /* list of defined areas */ + tool->device = pInfo; /* tool->typeid is set once we know the type - see wcmSetType */ - /* tool area */ - priv->toolarea = area; - area->next = NULL; /* next area in list */ - area->device = pInfo; /* associated WacomDevice */ - return 1; error: - free(area); free(tool); wcmFreeCommon(&common); free(priv); @@ -158,7 +147,6 @@ if (!priv) return; - free(priv->toolarea); free(priv->tool); wcmFreeCommon(&priv->common); free(priv); @@ -171,12 +159,7 @@ WacomDevicePtr priv = pInfo->private; if (!type) - { - xf86Msg(X_ERROR, "%s: No type or invalid type specified.\n" - "Must be one of stylus, touch, cursor, eraser, or pad\n", - pInfo->name); - return 0; - } + goto invalid; if (xf86NameCmp(type, "stylus") == 0) { @@ -203,7 +186,8 @@ { priv->flags = ABSOLUTE_FLAG|PAD_ID; pInfo->type_name = WACOM_PROP_XI_TYPE_PAD; - } + } else + goto invalid; /* Set the device id of the "last seen" device on this tool */ priv->old_device_id = wcmGetPhyDeviceID(priv); @@ -214,6 +198,12 @@ priv->tool->typeid = DEVICE_ID(priv->flags); /* tool type (stylus/touch/eraser/cursor/pad) */ return 1; + +invalid: + xf86Msg(X_ERROR, "%s: No type or invalid type specified.\n" + "Must be one of stylus, touch, cursor, eraser, or pad\n", + pInfo->name); + return 0; } int wcmGetPhyDeviceID(WacomDevicePtr priv) @@ -261,6 +251,8 @@ DBG(1, priv, "\n"); + /* Server 1.10 will UnInit all devices for us */ +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12 if (priv->isParent) { /* HAL removal sees the parent device removed first. */ @@ -285,22 +277,7 @@ free(pInfo->name); pInfo->name = NULL; } - - if (priv->toolarea) - { - WacomToolAreaPtr *prev_area = &priv->tool->arealist; - WacomToolAreaPtr area = *prev_area; - while (area) - { - if (area == priv->toolarea) - { - *prev_area = area->next; - break; - } - prev_area = &area->next; - area = area->next; - } - } +#endif if (priv->tool) { @@ -365,6 +342,11 @@ { DBG(2, priv, "port share between %s and %s\n", pLocal->name, pMatch->name); + /* FIXME: we loose the common->wcmTool here but it + * gets re-added during wcmParseOptions. This is + * currently required by the code, adding the tool + * again here means we trigger the duplicate tool + * detection */ wcmFreeCommon(&priv->common); priv->common = wcmRefCommon(privMatch->common); priv->next = priv->common->wcmDevices; @@ -417,6 +399,66 @@ return TRUE; } +/** + * Link the touch tool to the pen of the same device + * so we can arbitrate the events when posting them. + */ +static void wcmLinkTouchAndPen(InputInfoPtr pInfo) +{ + WacomDevicePtr priv = pInfo->private; + WacomCommonPtr common = priv->common; + InputInfoPtr device = xf86FirstLocalDevice(); + WacomCommonPtr tmpcommon = NULL; + WacomDevicePtr tmppriv = NULL; + Bool touch_device_assigned = FALSE; + + /* Lookup to find the associated pen and touch */ + for (; device != NULL; device = device->next) + { + if (!strcmp(device->drv->driverName, "wacom")) + { + tmppriv = (WacomDevicePtr) device->private; + tmpcommon = tmppriv->common; + touch_device_assigned = (common->wcmTouchDevice || + tmpcommon->wcmTouchDevice); + + /* skip the same tool or already linked devices */ + if ((tmppriv == priv) || touch_device_assigned) + continue; + + if (tmpcommon->tablet_id == common->tablet_id) + { + if (IsTouch(tmppriv) && IsPen(priv)) + common->wcmTouchDevice = tmppriv; + else if (IsTouch(priv) && IsPen(tmppriv)) + tmpcommon->wcmTouchDevice = priv; + + if (common->wcmTouchDevice || + tmpcommon->wcmTouchDevice) + { + common->tablet_type |= WCM_PENTOUCH; + tmpcommon->tablet_type |= WCM_PENTOUCH; + } + } + } + } +} + +/** + * Check if this device was hotplugged by the driver by checking the _source + * option. + * + * Must be called before wcmNeedAutoHotplug() + * + * @return True if the source for this device is the wacom driver itself or + * false otherwise. + */ +static int wcmIsHotpluggedDevice(InputInfoPtr pInfo) +{ + char *source = xf86CheckStrOption(pInfo->options, "_source", ""); + return !strcmp(source, "_driver/wacom"); +} + /* wcmPreInit - called for each input devices with the driver set to * "wacom" */ #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12 @@ -456,7 +498,7 @@ WacomCommonPtr common = NULL; const char* type; char* device, *oldname; - int need_hotplug = 0; + int need_hotplug = 0, is_dependent = 0; gWacomModule.wcmDrv = drv; @@ -503,7 +545,9 @@ oldname = pInfo->name; - if ((need_hotplug = wcmNeedAutoHotplug(pInfo, &type))) + if (wcmIsHotpluggedDevice(pInfo)) + is_dependent = 1; + else if ((need_hotplug = wcmNeedAutoHotplug(pInfo, &type))) { /* we need subdevices, change the name so all of them have a type. */ @@ -520,7 +564,7 @@ if (!wcmSetType(pInfo, type)) goto SetupProc_fail; - if (!wcmParseOptions(pInfo, need_hotplug)) + if (!wcmParseOptions(pInfo, need_hotplug, is_dependent)) goto SetupProc_fail; if (!wcmInitModel(pInfo)) @@ -538,6 +582,12 @@ pInfo->fd = -1; } + /* only link them once per port. We need to try for both pen and touch + * since we do not know which tool (touch or pen) will be added first. + */ + if (IsTouch(priv) || (IsPen(priv) && !common->wcmTouchDevice)) + wcmLinkTouchAndPen(pInfo); + return Success; SetupProc_fail: diff -Nru xf86-input-wacom-0.10.11/src/wcmFilter.c xf86-input-wacom-0.11.0/src/wcmFilter.c --- xf86-input-wacom-0.10.11/src/wcmFilter.c 2011-02-15 04:27:40.000000000 +0000 +++ xf86-input-wacom-0.11.0/src/wcmFilter.c 2011-04-07 05:22:34.000000000 +0000 @@ -35,7 +35,6 @@ static int filterOnLine(double x0, double y0, double x1, double y1, double a, double b); static void filterLine(int* pCurve, int nMax, int x0, int y0, int x1, int y1); -void wcmTilt2R(WacomDeviceStatePtr ds); /***************************************************************************** @@ -314,30 +313,64 @@ return 0; /* lookin' good */ } -/***************************************************************************** - * wcmTilt2R - - * Converts tilt X and Y to rotation, for Intuos4 mouse for now. - * It can be used for other devices when necessary. - ****************************************************************************/ - -void wcmTilt2R(WacomDeviceStatePtr ds) +/*** + * Convert a point (X/Y) in a left-handed coordinate system to a normalized + * rotation angle. + * + * This function is currently called for the Intuos4 mouse (cursor) tool + * only (to convert tilt to rotation), but it may be used for other devices + * in the future. + * + * Method used: rotation angle is calculated through the atan of x/y + * then converted to degrees and normalized into the rotation + * range (MIN_ROTATION/MAX_ROTATION). + + * IMPORTANT: calculation inverts direction, the formula to get the target + * rotation value in degrees is: 360 - offset - input-angle. + * + * Example table of return values for an offset of 0, assuming a left-handed + * coordinate system: + * input 0 degrees: MIN + * 90 degrees: MAX - RANGE/4 + * 180 degrees: RANGE/2 + * 270 degrees: MIN + RANGE/4 + * + * @param x X coordinate in left-handed coordiante system. + * @param y Y coordiante in left-handed coordinate system. + * @param offset Custom rotation offset in degrees. Offset is + * applied in counterclockwise direction. + * + * @return The mapped rotation angle based on the device's tilt state. + */ +int wcmTilt2R(int x, int y, double offset) { - short tilt_x = ds->tiltx; - short tilt_y = ds->tilty; - double rotation = 0.0; - - /* other tilt-enabled devices need to apply round() after this call */ - if (tilt_x || tilt_y) - rotation = ((180.0 * atan2(-tilt_x,tilt_y)) / M_PI) + 180.0; - - /* Intuos4 mouse has an (180-5) offset */ - ds->rotation = round((360.0 - rotation + 180.0 - 5.0) * 5.0); - ds->rotation %= 1800; + double angle = 0.0; + int rotation; - if (ds->rotation >= 900) - ds->rotation = 1800 - ds->rotation; - else - ds->rotation = -ds->rotation; + if (x || y) + /* rotate in the inverse direction, changing CW to CCW + * rotation and vice versa */ + angle = ((180.0 * atan2(-x, y)) / M_PI); + + /* rotation is now in 0 - 360 deg value range, apply the offset. Use + * 360 to avoid getting into negative range, the normalization code + * below expects 0...360 */ + angle = 360 + angle - offset; + + /* normalize into the rotation range (0...MAX), then offset by MIN_ROTATION + we used 360 as base offset above, so %= MAX_ROTATION_RANGE brings us back. + Note: we can't use xf86ScaleAxis here because of rounding issues. + */ + rotation = round(angle * (MAX_ROTATION_RANGE / 360.0)); + rotation %= MAX_ROTATION_RANGE; + + /* now scale back from 0...MAX to MIN..(MIN+MAX) */ + rotation = xf86ScaleAxis(rotation, + MIN_ROTATION + MAX_ROTATION_RANGE, + MIN_ROTATION, + MAX_ROTATION_RANGE, 0); + + return rotation; } /* vim: set noexpandtab tabstop=8 shiftwidth=8: */ diff -Nru xf86-input-wacom-0.10.11/src/wcmISDV4.c xf86-input-wacom-0.11.0/src/wcmISDV4.c --- xf86-input-wacom-0.10.11/src/wcmISDV4.c 2011-02-15 04:27:40.000000000 +0000 +++ xf86-input-wacom-0.11.0/src/wcmISDV4.c 2011-04-14 02:38:55.000000000 +0000 @@ -28,6 +28,7 @@ #include "isdv4.h" #include #include +#include #define RESET_RELATIVE(ds) do { (ds).relwheel = 0; } while (0) @@ -315,8 +316,6 @@ static void isdv4InitISDV4(WacomCommonPtr common, const char* id, float version) { - /* Change to generic protocol to match USB MT format */ - common->wcmProtocolLevel = WCM_PROTOCOL_GENERIC; /* length of a packet */ common->wcmPktLength = ISDV4_PKGLEN_TPCPEN; @@ -894,18 +893,81 @@ }; /** + * Query the model number from the sysfs /sys/.../device/id file and return + * the matching model and the ID for the model we found. + * + * @param pInfo Used for debugging purposes only. + * @param fd File descriptor to the serial device. + * @param[out] id On success, returns the numeric ID for this device + * according to the model-specific matching pattern. + * + * @return The model description for the matching device or NULL if no + * matching one could be found. + */ +static ISDV4ModelDesc* +model_from_sysfs(const InputInfoPtr pInfo, int fd, int *id) +{ + WacomDevicePtr priv = pInfo->private; + ISDV4ModelDesc* model = NULL; + struct udev *udev = NULL; + struct udev_device *device = NULL; + struct stat st; + char *sysfs_path = NULL; + FILE *file = NULL; + + fstat(fd, &st); + + udev = udev_new(); + device = udev_device_new_from_devnum(udev, 'c', st.st_rdev); + + if (!device) + goto out; + + if (asprintf(&sysfs_path, "%s/device/id", + udev_device_get_syspath(device)) == -1) + goto out; + + DBG(8, priv, "sysfs path: %s\n", sysfs_path); + + file = fopen(sysfs_path, "r"); + if (!file) + goto out; + + model = isdv4_models; + + while(model->pattern && fscanf(file, model->pattern, id) <= 0) + model++; + + if (!model->pattern) + model = NULL; + + DBG(8, priv, "sysfs check found %s:%d\n", + (model) ? model->pattern : "", *id); + +out: + udev_device_unref(device); + udev_unref(udev); + fclose(file); + free(sysfs_path); + return model; +} + +/** * Query the device's fd for the key bits and the tablet ID. Returns the ID - * on success or 0 on failure. + * on success. If the model vendor is unknown, we assume a penabled device + * (0x90). If the model vendor is known but the model itself is unknown, the + * return value depends on the model-specific matching code (0 for Wacom, + * 0x90 for Fujitsu). + * * For serial devices, we set the BTN_TOOL_DOUBLETAP etc. bits based on the * device ID. This matching only works for known devices (see the * isdv4_model list), all others are simply assumed to be pen + erasor. */ static int isdv4ProbeKeys(InputInfoPtr pInfo) { - int id; + int id = 0; int tablet_id = 0x90; struct serial_struct tmp; - const char *device = xf86SetStrOption(pInfo->options, "Device", NULL); WacomDevicePtr priv = (WacomDevicePtr)pInfo->private; WacomCommonPtr common = priv->common; ISDV4ModelDesc *model = isdv4_models; @@ -917,31 +979,9 @@ while (model->pattern && sscanf(pInfo->name, model->pattern, &id) < 1) model++; + /* grab id from sysfs/.../device/id */ if (!model->pattern) - { - /* id in file sys/class/tty/%str/device/id */ - FILE *file; - char sysfs_id[256]; - char *str = strstr(device, "ttyS"); - snprintf(sysfs_id, sizeof(sysfs_id), - "/sys/class/tty/%s/device/id", str); - file = fopen(sysfs_id, "r"); - - /* return true since it falls to default */ - if (file) - { - model = isdv4_models; - - while(model->pattern && fscanf(file, model->pattern, &id) <= 0) - model++; - - /* make sure we fall to default */ - if (!model->pattern) - id = 0; - - fclose(file); - } - } + model = model_from_sysfs(pInfo, pInfo->fd, &id); memset(common->wcmKeys, 0, sizeof(common->wcmKeys)); @@ -949,9 +989,12 @@ SETBIT(common->wcmKeys, BTN_TOOL_PEN); SETBIT(common->wcmKeys, BTN_TOOL_RUBBER); - if (model->set_bits) + if (model && model->set_bits) tablet_id = model->set_bits(id, common->wcmKeys); + /* Change to generic protocol to match USB MT format */ + common->wcmProtocolLevel = WCM_PROTOCOL_GENERIC; + return tablet_id; } diff -Nru xf86-input-wacom-0.10.11/src/wcmTouchFilter.c xf86-input-wacom-0.11.0/src/wcmTouchFilter.c --- xf86-input-wacom-0.10.11/src/wcmTouchFilter.c 2011-01-30 23:11:35.000000000 +0000 +++ xf86-input-wacom-0.11.0/src/wcmTouchFilter.c 2011-04-07 05:22:34.000000000 +0000 @@ -54,28 +54,34 @@ WacomDeviceState ds1) { Bool ret = FALSE; + Bool rotated = common->wcmRotate == ROTATE_CW || + common->wcmRotate == ROTATE_CCW; + int horizon_rotated = (rotated) ? + WACOM_HORIZ_ALLOWED : WACOM_VERT_ALLOWED; + int vertical_rotated = (rotated) ? + WACOM_VERT_ALLOWED : WACOM_HORIZ_ALLOWED; if (!common->wcmGestureParameters.wcmScrollDirection) { if ((abs(ds0.x - ds1.x) < WACOM_INLINE_DISTANCE) && (abs(ds0.y - ds1.y) > WACOM_INLINE_DISTANCE)) { - common->wcmGestureParameters.wcmScrollDirection = WACOM_VERT_ALLOWED; + common->wcmGestureParameters.wcmScrollDirection = horizon_rotated; ret = TRUE; } if ((abs(ds0.y - ds1.y) < WACOM_INLINE_DISTANCE) && (abs(ds0.x - ds1.x) > WACOM_INLINE_DISTANCE)) { - common->wcmGestureParameters.wcmScrollDirection = WACOM_HORIZ_ALLOWED; + common->wcmGestureParameters.wcmScrollDirection = vertical_rotated; ret = TRUE; } } - else if (common->wcmGestureParameters.wcmScrollDirection == WACOM_HORIZ_ALLOWED) + else if (common->wcmGestureParameters.wcmScrollDirection == vertical_rotated) { if (abs(ds0.y - ds1.y) < WACOM_INLINE_DISTANCE) ret = TRUE; } - else if (common->wcmGestureParameters.wcmScrollDirection == WACOM_VERT_ALLOWED) + else if (common->wcmGestureParameters.wcmScrollDirection == horizon_rotated) { if (abs(ds0.x - ds1.x) < WACOM_INLINE_DISTANCE) ret = TRUE; @@ -141,32 +147,45 @@ } -/* process single finger Relative mode events - * if touch is not in an active gesture mode. +/* A single finger tap is defined as 1 finger tap that lasts less than + * wcmTapTime. It results in a left button press. + * + * Some work must be done to make sure two fingers were not touching + * during this gesture. This is easy if first finger is released + * first. To handle case of second finger released first, require + * second finger to have been released before first finger ever touched. + * + * Function relies on ds[0/1].sample to be updated only when entering or + * exiting proximity so no storage is needed when initial touch occurs. */ -static void wcmFirstFingerClick(WacomCommonPtr common) +static void wcmSingleFingerTap(WacomDevicePtr priv) { - static int tmpStamp = 0; - WacomChannelPtr aChannel = common->wcmChannel; - WacomDeviceState ds = aChannel->valid.states[0]; - WacomDeviceState dsLast = aChannel->valid.states[1]; - if (ds.proximity) - { - if (common->wcmTouchpadMode) - /* continuing left button down */ - aChannel->valid.states[0].buttons |= 1; - else if (!dsLast.proximity && - (abs(tmpStamp - ds.sample) <= common->wcmGestureParameters.wcmTapTime)) + WacomCommonPtr common = priv->common; + WacomChannelPtr firstChannel = common->wcmChannel; + WacomChannelPtr secondChannel = common->wcmChannel + 1; + WacomDeviceState ds[2] = { firstChannel->valid.states[0], + secondChannel->valid.states[0] }; + WacomDeviceState dsLast[2] = { firstChannel->valid.states[1], + secondChannel->valid.states[1] }; + + DBG(10, priv, "\n"); + + if (!ds[0].proximity && dsLast[0].proximity && !ds[1].proximity) + { + /* Single Tap must have lasted less than wcmTapTime + * and second finger must not have released after + * first finger touched. + */ + if (ds[0].sample - dsLast[0].sample <= + common->wcmGestureParameters.wcmTapTime && + ds[1].sample < dsLast[0].sample) { - /* initial left button down */ - aChannel->valid.states[0].buttons |= 1; - common->wcmTouchpadMode = 1; + /* left button down */ + wcmSendButtonClick(priv, 1, 1); + + /* left button up */ + wcmSendButtonClick(priv, 1, 0); } - } else { - tmpStamp = GetTimeInMillis(); - if (common->wcmTouchpadMode) - aChannel->valid.states[0].buttons &= ~1; - common->wcmTouchpadMode = 0; } } @@ -198,7 +217,6 @@ * was in in prox */ if (ds[1].proximity && !common->wcmGestureMode && dsLast[0].proximity) { - common->wcmTouchpadMode = 0; common->wcmGestureMode = GESTURE_LAG_MODE; } @@ -248,7 +266,6 @@ common->wcmGestureMode = 0; common->wcmGestureParameters.wcmScrollDirection = 0; - common->wcmTouchpadMode = 0; goto ret; } @@ -288,7 +305,7 @@ } ret: if (!common->wcmGestureMode && !channel && !is_absolute(priv->pInfo)) - wcmFirstFingerClick(common); + wcmSingleFingerTap(priv); } static void wcmSendScrollEvent(WacomDevicePtr priv, int dist, diff -Nru xf86-input-wacom-0.10.11/src/wcmUSB.c xf86-input-wacom-0.11.0/src/wcmUSB.c --- xf86-input-wacom-0.10.11/src/wcmUSB.c 2011-02-15 04:27:40.000000000 +0000 +++ xf86-input-wacom-0.11.0/src/wcmUSB.c 2011-04-19 04:04:00.000000000 +0000 @@ -22,7 +22,6 @@ #endif #include "xf86Wacom.h" -#include "wcmFilter.h" #include #include @@ -34,6 +33,8 @@ typedef struct { int wcmLastToolSerial; int wcmBTNChannel; + int wcmDeviceType; + Bool wcmPenTouch; Bool wcmUseMT; int wcmMTChannel; int wcmPrevChannel; @@ -76,7 +77,6 @@ .GetRanges = usbWcmGetRanges, \ .Start = usbStart, \ .Parse = usbParse, \ - .FilterRaw = wcmFilterCoord, \ .DetectConfig = usbDetectConfig, \ }; @@ -200,7 +200,7 @@ { WACOM_VENDOR_ID, 0xD7, 100000, 100000, &usbBamboo }, /* CTH-461/S */ { WACOM_VENDOR_ID, 0xD8, 100000, 100000, &usbBamboo }, /* CTH-661/S1 */ { WACOM_VENDOR_ID, 0xDA, 100000, 100000, &usbBamboo }, /* CTH-461/L */ - { WACOM_VENDOR_ID, 0xDB, 100000, 100000, &usbBamboo }, /* CTH-661 */ + { WACOM_VENDOR_ID, 0xDB, 100000, 100000, &usbBamboo }, /* CTH-661/L */ { WACOM_VENDOR_ID, 0x20, 100000, 100000, &usbIntuos }, /* Intuos 4x5 */ { WACOM_VENDOR_ID, 0x21, 100000, 100000, &usbIntuos }, /* Intuos 6x8 */ @@ -266,9 +266,10 @@ { WACOM_VENDOR_ID, 0x90, 100000, 100000, &usbTabletPC }, /* TabletPC 0x90 */ { WACOM_VENDOR_ID, 0x93, 100000, 100000, &usbTabletPC }, /* TabletPC 0x93 */ { WACOM_VENDOR_ID, 0x9A, 100000, 100000, &usbTabletPC }, /* TabletPC 0x9A */ - { WACOM_VENDOR_ID, 0x9F, 394, 394, &usbTabletPC }, /* CapPlus 0x9F */ - { WACOM_VENDOR_ID, 0xE2, 394, 394, &usbTabletPC }, /* TabletPC 0xE2 */ + { WACOM_VENDOR_ID, 0x9F, 100000, 100000, &usbTabletPC }, /* CapPlus 0x9F */ + { WACOM_VENDOR_ID, 0xE2, 100000, 100000, &usbTabletPC }, /* TabletPC 0xE2 */ { WACOM_VENDOR_ID, 0xE3, 100000, 100000, &usbTabletPC }, /* TabletPC 0xE3 */ + { WACOM_VENDOR_ID, 0xE6, 100000, 100000, &usbTabletPC }, /* TabletPC 0xE6 */ /* IDs from Waltop's driver, available http://www.waltop.com.tw/download.asp?lv=0&id=2. Accessed 8 Apr 2010, driver release date 2009/08/11, fork of linuxwacom 0.8.4. @@ -332,7 +333,7 @@ ioctl(pInfo->fd, EVIOCGID, &sID); ioctl(pInfo->fd, EVIOCGNAME(sizeof(id)), id); - for (i = 0; i < sizeof (WacomModelDesc) / sizeof (WacomModelDesc [0]); i++) + for (i = 0; i < ARRAY_SIZE(WacomModelDesc); i++) { if (sID.vendor == WacomModelDesc[i].vendor_id && sID.product == WacomModelDesc [i].model_id) @@ -351,7 +352,7 @@ /* Find out supported button codes. */ common->npadkeys = 0; - for (i = 0; i < sizeof (padkey_codes) / sizeof (padkey_codes [0]); i++) + for (i = 0; i < ARRAY_SIZE(padkey_codes); i++) if (ISBITSET (common->wcmKeys, padkey_codes [i])) common->padkey_code [common->npadkeys++] = padkey_codes [i]; @@ -360,7 +361,7 @@ /* If mouse buttons detected but no mouse tool * then they must be associated with pad buttons. */ - for (i = sizeof(mouse_codes)/sizeof(mouse_codes[0]); i > 0; i--) + for (i = ARRAY_SIZE(mouse_codes); i > 0; i--) if (ISBITSET(common->wcmKeys, mouse_codes[i])) break; @@ -389,15 +390,10 @@ { common->wcmProtocolLevel = WCM_PROTOCOL_5; common->wcmPktLength = sizeof(struct input_event); - common->wcmCursorProxoutDistDefault - = PROXOUT_INTUOS_DISTANCE; + common->wcmCursorProxoutDistDefault = PROXOUT_INTUOS_DISTANCE; /* tilt enabled */ common->wcmFlags |= TILT_ENABLED_FLAG; - - /* reinitialize max here since 0 is for Graphire series */ - common->wcmMaxCursorDist = 256; - } static void usbInitProtocol4(WacomCommonPtr common, const char* id, @@ -405,13 +401,40 @@ { common->wcmProtocolLevel = WCM_PROTOCOL_4; common->wcmPktLength = sizeof(struct input_event); - common->wcmCursorProxoutDistDefault - = PROXOUT_GRAPHIRE_DISTANCE; + common->wcmCursorProxoutDistDefault = PROXOUT_GRAPHIRE_DISTANCE; /* tilt disabled */ common->wcmFlags &= ~TILT_ENABLED_FLAG; } +/* Initialize fixed PAD channel's state to in proximity. + * + * Some, but not all, Wacom protocol 4/5 devices are always in proximity. + * Because of evdev filtering, there will never be a BTN_TOOL_FINGER + * sent to initialize state. + * Generic protocol devices never send anything to help initialize PAD + * device as well. + * This helps those 2 cases and does not hurt the cases where kernel + * driver sends out-of-proximity event for PAD since PAD is always on + * its own channel, PAD_CHANNEL. + */ +static void usbWcmInitPadState(InputInfoPtr pInfo) +{ + WacomDevicePtr priv = (WacomDevicePtr)pInfo->private; + WacomCommonPtr common = priv->common; + WacomDeviceState *ds; + int channel = PAD_CHANNEL; + + DBG(6, common, "Initializing PAD channel %d\n", channel); + + ds = &common->wcmChannel[channel].work; + + ds->proximity = 1; + ds->device_type = PAD_ID; + ds->device_id = PAD_DEVICE_ID; + ds->serial_num = channel; +} + int usbWcmGetRanges(InputInfoPtr pInfo) { struct input_absinfo absinfo; @@ -436,14 +459,14 @@ return !Success; } - if (ioctl(pInfo->fd, EVIOCGBIT(EV_ABS,sizeof(abs)),abs) < 0) + if (!ISBITSET(ev,EV_ABS)) { - xf86Msg(X_ERROR, "%s: unable to ioctl abs bits.\n", pInfo->name); + xf86Msg(X_ERROR, "%s: no abs bits.\n", pInfo->name); return !Success; } /* absolute values */ - if (!ISBITSET(ev,EV_ABS)) + if (ioctl(pInfo->fd, EVIOCGBIT(EV_ABS, sizeof(abs)), abs) < 0) { xf86Msg(X_ERROR, "%s: unable to ioctl max values.\n", pInfo->name); return !Success; @@ -458,7 +481,8 @@ if (absinfo.maximum <= 0) { - xf86Msg(X_ERROR, "%s: xmax value is wrong.\n", pInfo->name); + xf86Msg(X_ERROR, "%s: xmax value is %d, expected > 0.\n", + pInfo->name, absinfo.maximum); return !Success; } if (!is_touch) @@ -481,7 +505,8 @@ if (absinfo.maximum <= 0) { - xf86Msg(X_ERROR, "%s: ymax value is wrong.\n", pInfo->name); + xf86Msg(X_ERROR, "%s: ymax value is %d, expected > 0.\n", + pInfo->name, absinfo.maximum); return !Success; } if (!is_touch) @@ -497,7 +522,8 @@ /* max finger strip X for tablets with Expresskeys * or physical X for touch devices in hundredths of a mm */ - if (ioctl(pInfo->fd, EVIOCGABS(ABS_RX), &absinfo) == 0) + if (ISBITSET(abs, ABS_RX) && + !ioctl(pInfo->fd, EVIOCGABS(ABS_RX), &absinfo)) { if (is_touch) common->wcmTouchResolX = @@ -509,7 +535,8 @@ /* max finger strip Y for tablets with Expresskeys * or physical Y for touch devices in hundredths of a mm */ - if (ioctl(pInfo->fd, EVIOCGABS(ABS_RY), &absinfo) == 0) + if (ISBITSET(abs, ABS_RY) && + !ioctl(pInfo->fd, EVIOCGABS(ABS_RY), &absinfo)) { if (is_touch) common->wcmTouchResolY = @@ -520,20 +547,30 @@ } /* max z cannot be configured */ - if (ioctl(pInfo->fd, EVIOCGABS(ABS_PRESSURE), &absinfo) == 0) + if (ISBITSET(abs, ABS_PRESSURE) && + !ioctl(pInfo->fd, EVIOCGABS(ABS_PRESSURE), &absinfo)) common->wcmMaxZ = absinfo.maximum; /* max distance */ - if (ioctl(pInfo->fd, EVIOCGABS(ABS_DISTANCE), &absinfo) == 0) + if (ISBITSET(abs, ABS_DISTANCE) && + !ioctl(pInfo->fd, EVIOCGABS(ABS_DISTANCE), &absinfo)) common->wcmMaxDist = absinfo.maximum; if (ISBITSET(abs, ABS_MT_SLOT)) + { private->wcmUseMT = 1; + /* pen and MT on the same logical port */ + if (ISBITSET(common->wcmKeys, BTN_TOOL_PEN)) + private->wcmPenTouch = TRUE; + } + /* A generic protocol device does not report ABS_MISC event */ if (!ISBITSET(abs, ABS_MISC)) common->wcmProtocolLevel = WCM_PROTOCOL_GENERIC; + usbWcmInitPadState(pInfo); + return Success; } @@ -820,12 +857,29 @@ } else if (event->type == EV_ABS) { - switch(event->code) + if (private->wcmDeviceType == TOUCH_ID) { - case ABS_X: - case ABS_Y: - case ABS_PRESSURE: - return 1; + /* filter ST for MT */ + switch(event->code) + { + case ABS_X: + case ABS_Y: + case ABS_PRESSURE: + return 1; + } + } + else + { + /* filter MT for pen */ + switch(event->code) + { + case ABS_MT_SLOT: + case ABS_MT_TRACKING_ID: + case ABS_MT_POSITION_X: + case ABS_MT_POSITION_Y: + case ABS_MT_PRESSURE: + return 1; + } } } } @@ -849,6 +903,84 @@ return 0; } +#define ERASER_BIT 0x008 +#define PUCK_BITS 0xf00 +#define PUCK_EXCEPTION 0x806 +/** + * Decide the tool type by its id for protocol 5 devices + * + * @param id The tool id received from the kernel. + * @return The tool type associated with the tool id. + */ +static int usbIdToType(int id) +{ + int type = STYLUS_ID; + + /* The existing tool ids have the following patten: all pucks, except + * one, have the third byte set to zero; all erasers have the fourth + * bit set. The rest are styli. + */ + if (id & ERASER_BIT) + type = ERASER_ID; + else if (!(id & PUCK_BITS) || (id == PUCK_EXCEPTION)) + type = CURSOR_ID; + + return type; +} + +/** + * Find the tool type (STYLUS_ID, etc.) based on the device_id or the + * current tool serial number if the device_id is unknown (0). + * + * Protocol 5 devices report different IDs for different styli and pucks, + * Protocol 4 devices simply report STYLUS_DEVICE_ID, etc. + * + * @param ds The current device state received from the kernel. + * @return The tool type associated with the tool id or the current + * tool serial number. + */ +static int usbFindDeviceType(const WacomCommonPtr common, + const WacomDeviceState *ds) +{ + WacomToolPtr tool = NULL; + int device_type = 0; + + if (!ds->device_id && ds->serial_num) + { + for (tool = common->wcmTool; tool; tool = tool->next) + if (ds->serial_num == tool->serial) + { + device_type = tool->typeid; + break; + } + } + + if (device_type || !ds->device_id) return device_type; + + switch (ds->device_id) + { + case STYLUS_DEVICE_ID: + device_type = STYLUS_ID; + break; + case ERASER_DEVICE_ID: + device_type = ERASER_ID; + break; + case CURSOR_DEVICE_ID: + device_type = CURSOR_ID; + break; + case TOUCH_DEVICE_ID: + device_type = TOUCH_ID; + break; + case PAD_DEVICE_ID: + device_type = PAD_ID; + break; + default: /* protocol 5 */ + device_type = usbIdToType(ds->device_id); + } + + return device_type; +} + static int usbParseAbsEvent(WacomCommonPtr common, struct input_event *event, WacomDeviceState *ds) { @@ -896,8 +1028,12 @@ ds->throttle = event->value; break; case ABS_MISC: + ds->proximity = (event->value != 0); if (event->value) + { ds->device_id = event->value; + ds->device_type = usbFindDeviceType(common, ds); + } break; default: change = 0; @@ -905,6 +1041,36 @@ return change; } +/** + * Flip the mask bit in buttons corresponding to btn to the specified state. + * + * @param buttons The current button mask + * @param btn Zero-indexed button number to change + * @param state Zero to unset, non-zero to set the mask for the button + * + * @return The new button mask + */ +static int mod_buttons(int buttons, int btn, int state) +{ + int mask; + + if (btn >= sizeof(int) * 8) + { + xf86Msg(X_ERROR, "%s: Invalid button number %d. Insufficient " + "storage\n", __func__, btn); + return buttons; + } + + mask = 1 << btn; + + if (state) + buttons |= mask; + else + buttons &= ~mask; + + return buttons; +} + static int usbParseAbsMTEvent(WacomCommonPtr common, struct input_event *event) { int change = 1; @@ -926,6 +1092,14 @@ ds->device_id = TOUCH_DEVICE_ID; ds->serial_num = private->wcmMTChannel+1; ds->sample = (int)GetTimeInMillis(); + + /* Send left click down/up for touchscreen + * when the first finger touches/leaves the tablet. + */ + if (TabletHasFeature(common, WCM_LCD) && + !private->wcmMTChannel) + ds->buttons = mod_buttons(ds->buttons, 0, + (event->value != -1)); break; case ABS_MT_POSITION_X: @@ -965,17 +1139,10 @@ { PAD_ID, BTN_0 } }; -#define MOD_BUTTONS(bit, value) do { \ - shift = 1<buttons = (((value) != 0) ? \ - (ds->buttons | (shift)) : (ds->buttons & ~(shift))); \ - } while (0) - static int usbParseKeyEvent(WacomCommonPtr common, struct input_event *event, WacomDeviceState *ds, WacomDeviceState *dslast) { - int shift; int change = 1; /* BTN_TOOL_* are sent to indicate when a specific tool is going @@ -1038,7 +1205,7 @@ ds->device_type = TOUCH_ID; ds->device_id = TOUCH_DEVICE_ID; ds->proximity = event->value; - MOD_BUTTONS(0, event->value); + ds->buttons = mod_buttons(ds->buttons, 0, event->value); } } break; @@ -1079,7 +1246,7 @@ */ if (common->wcmCapacityDefault < 0 && (TabletHasFeature(common, WCM_LCD))) - MOD_BUTTONS(0, event->value); + ds->buttons = mod_buttons(ds->buttons, 0, event->value); break; case BTN_TOOL_TRIPLETAP: @@ -1114,11 +1281,11 @@ switch (event->code) { case BTN_STYLUS: - MOD_BUTTONS(1, event->value); + ds->buttons = mod_buttons(ds->buttons, 1, event->value); break; case BTN_STYLUS2: - MOD_BUTTONS(2, event->value); + ds->buttons = mod_buttons(ds->buttons, 2, event->value); break; default: @@ -1132,31 +1299,31 @@ static int usbParseBTNEvent(WacomCommonPtr common, struct input_event *event, WacomDeviceState *ds) { - int shift, nkeys; + int nkeys; int change = 1; switch (event->code) { case BTN_LEFT: - MOD_BUTTONS(0, event->value); + ds->buttons = mod_buttons(ds->buttons, 0, event->value); break; case BTN_MIDDLE: - MOD_BUTTONS(1, event->value); + ds->buttons = mod_buttons(ds->buttons, 1, event->value); break; case BTN_RIGHT: - MOD_BUTTONS(2, event->value); + ds->buttons = mod_buttons(ds->buttons, 2, event->value); break; case BTN_SIDE: case BTN_BACK: - MOD_BUTTONS(3, event->value); + ds->buttons = mod_buttons(ds->buttons, 3, event->value); break; case BTN_EXTRA: case BTN_FORWARD: - MOD_BUTTONS(4, event->value); + ds->buttons = mod_buttons(ds->buttons, 4, event->value); break; default: @@ -1164,7 +1331,7 @@ { if (event->code == common->padkey_code[nkeys]) { - MOD_BUTTONS(nkeys, event->value); + ds->buttons = mod_buttons(ds->buttons, nkeys, event->value); break; } } @@ -1174,6 +1341,64 @@ return change; } +/*** + * Retrieve the tool type from an USB data packet by looking at the event + * codes. Refer to linux/input.h for event codes that define tool types. + * + * @param event_ptr A pointer to the USB data packet that contains the + * events to be processed. + * @param nevents Number of events in the packet. + * + * @return The tool type. 0 if no pen/touch/eraser event code in the event. + */ +static int usbInitToolType(const struct input_event *event_ptr, int nevents) +{ + int i, device_type = 0; + struct input_event* event = (struct input_event *)event_ptr; + + for (i = 0; (i < nevents) && !device_type; ++i) + { + switch (event->code) + { + case BTN_TOOL_PEN: + case BTN_TOOL_PENCIL: + case BTN_TOOL_BRUSH: + case BTN_TOOL_AIRBRUSH: + device_type = STYLUS_ID; + break; + + case BTN_TOOL_FINGER: + case ABS_MT_SLOT: + case ABS_MT_TRACKING_ID: + device_type = TOUCH_ID; + break; + + case BTN_TOOL_RUBBER: + device_type = ERASER_ID; + break; + } + + event++; + } + + return device_type; +} + +/** + * Check if the tool is a stylus/eraser and in-prox or not. + * + * @param device_type The tool type stored in wcmChannel + * @param proximity The tool's proximity state + + * @return True if stylus/eraser is in-prox; False otherwise. + */ +static Bool usbIsPenInProx(int device_type, int proximity) +{ + Bool is_pen = (device_type == STYLUS_ID) || + (device_type == ERASER_ID); + return (is_pen && proximity); +} + static void usbDispatchEvents(InputInfoPtr pInfo) { int i; @@ -1183,11 +1408,32 @@ WacomCommonPtr common = priv->common; int channel; int channel_change = 0, btn_channel_change = 0, mt_channel_change = 0; - WacomDeviceState dslast; + WacomDeviceState dslast = common->wcmChannel[0].valid.state; wcmUSBData* private = common->private; DBG(6, common, "%d events received\n", private->wcmEventCnt); + if (private->wcmUseMT) + private->wcmDeviceType = usbInitToolType(private->wcmEvents, + private->wcmEventCnt); + + if (private->wcmPenTouch) + { + /* We get both pen and touch data from the kernel when they + * both are in/down. So, if we were (hence the need of dslast) + * processing pen events, we should ignore touch events. + * + * MT events will be posted to the userland when XInput 2.1 + * is ready. + */ + if ((private->wcmDeviceType == TOUCH_ID) && + usbIsPenInProx(dslast.device_type, dslast.proximity)) + { + private->wcmEventCnt = 0; + return; + } + } + channel = usbChooseChannel(common); /* couldn't decide channel? invalid data */ @@ -1301,7 +1547,7 @@ /* Retrieve the type by asking a resend from the kernel */ ioctl(common->fd, EVIOCGKEY(sizeof(keys)), keys); - for (i=0; idevice_type == TOUCH_ID) && !common->wcmTouch) - return; - /* DTF720 and DTF720a don't support eraser */ if (((common->tablet_id == 0xC0) || (common->tablet_id == 0xC2)) && (ds->device_type == ERASER_ID)) @@ -1329,30 +1571,28 @@ if (!ds->proximity) private->wcmLastToolSerial = 0; - /* dispatch events */ - if (channel_change || - (private->wcmBTNChannel == channel && btn_channel_change)) - wcmEvent(common, channel, ds); - - /* dispatch for second finger. first finger is handled above. */ - if (mt_channel_change) + /* don't send touch event when touch isn't enabled */ + if (ds->device_type != TOUCH_ID || common->wcmTouch) { - WacomDeviceState *mt_ds; + /* dispatch events */ + if (channel_change || + (private->wcmBTNChannel == channel && btn_channel_change)) + wcmEvent(common, channel, ds); + + /* dispatch for second finger. + * first finger is handled above. */ + if (mt_channel_change) + { + WacomDeviceState *mt_ds; - mt_ds = &common->wcmChannel[1].work; - wcmEvent(common, 1, mt_ds); + mt_ds = &common->wcmChannel[1].work; + wcmEvent(common, 1, mt_ds); + } } /* dispatch butten events when re-routed */ if (private->wcmBTNChannel != channel && btn_channel_change) - { - /* Force to in proximity for this special case */ - btn_ds->proximity = 1; - btn_ds->device_type = PAD_ID; - btn_ds->device_id = PAD_DEVICE_ID; - btn_ds->serial_num = 0xf0; wcmEvent(common, private->wcmBTNChannel, btn_ds); - } } /* Quirks to unify the tool types for GENERIC protocol tablet PCs */ diff -Nru xf86-input-wacom-0.10.11/src/wcmValidateDevice.c xf86-input-wacom-0.11.0/src/wcmValidateDevice.c --- xf86-input-wacom-0.10.11/src/wcmValidateDevice.c 2011-02-15 04:27:40.000000000 +0000 +++ xf86-input-wacom-0.11.0/src/wcmValidateDevice.c 2011-04-08 01:31:00.000000000 +0000 @@ -380,35 +380,78 @@ #endif /** - * Hotplug one device of the given type. - * Device has the same options as the "parent" device, type is one of - * erasor, stylus, pad, touch, cursor, etc. - * Name of the new device is set automatically to " ". + * This struct contains the necessary info for hotplugging a device later. + * Memory must be freed after use. */ -static void wcmHotplug(InputInfoPtr pInfo, const char* basename, const char *type) -{ - DeviceIntPtr dev; /* dummy */ +typedef struct { InputOption *input_options; #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 9 - InputAttributes *attrs = NULL; + InputAttributes *attrs; #endif +} WacomHotplugInfo; - input_options = wcmOptionDupConvert(pInfo, basename, type); +/** + * Actually hotplug the device. This function is called by the server when + * the WorkProcs are processed. + * + * @param client The server client. unused + * @param closure A pointer to a struct WcmHotplugInfo containing the + * necessary information to create a new device. + * @return TRUE to remove this function from the server's work queue. + */ +static Bool +wcmHotplugDevice(ClientPtr client, pointer closure ) +{ + WacomHotplugInfo *hotplug_info = closure; + DeviceIntPtr dev; /* dummy */ -#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 11 - attrs = wcmDuplicateAttributes(pInfo, type); + NewInputDeviceRequest(hotplug_info->input_options, +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 9 + hotplug_info->attrs, #endif + &dev); + wcmFreeInputOpts(hotplug_info->input_options); - NewInputDeviceRequest(input_options, -#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 9 - attrs, +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 11 + FreeInputAttributes(hotplug_info->attrs); #endif - &dev); - wcmFreeInputOpts(input_options); + free(hotplug_info); + + return TRUE; +} + +/** + * Queue the hotplug for one tool/device of the given type. + * Device has the same options as the "parent" device, type is one of + * erasor, stylus, pad, touch, cursor, etc. + * Name of the new device is set automatically to " ". + * + * Note that we don't actually hotplug the device here. We store the + * information needed to hotplug the device later and then queue the + * hotplug. The server will come back and call the @wcmHotplugDevice + * later. + * + * @param pInfo The parent device + * @param basename The base name for the device (type will be appended) + * @param type Type name for this tool + */ +static void wcmQueueHotplug(InputInfoPtr pInfo, const char* basename, const char *type) +{ + WacomHotplugInfo *hotplug_info; + + hotplug_info = calloc(1, sizeof(WacomHotplugInfo)); + + if (!hotplug_info) + { + xf86Msg(X_ERROR, "%s: OOM, cannot hotplug dependent devices\n", pInfo->name); + return; + } + hotplug_info->input_options = wcmOptionDupConvert(pInfo, basename, type); #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 11 - FreeInputAttributes(attrs); + hotplug_info->attrs = wcmDuplicateAttributes(pInfo, type); #endif + QueueWorkProc(wcmHotplugDevice, serverClient, hotplug_info); } void wcmHotplugOthers(InputInfoPtr pInfo, const char *basename) @@ -427,7 +470,7 @@ if (skip) skip = 0; else - wcmHotplug(pInfo, basename, wcmType[i].type); + wcmQueueHotplug(pInfo, basename, wcmType[i].type); } } xf86Msg(X_INFO, "%s: hotplugging completed.\n", pInfo->name); @@ -470,20 +513,31 @@ xf86Msg(X_INFO, "%s: type not specified, assuming '%s'.\n", pInfo->name, *type); xf86Msg(X_INFO, "%s: other types will be automatically added.\n", pInfo->name); + /* Note: wcmIsHotpluggedDevice() relies on this */ pInfo->options = xf86AddNewOption(pInfo->options, "Type", *type); pInfo->options = xf86ReplaceStrOption(pInfo->options, "_source", "_driver/wacom"); return 1; } -int wcmParseOptions(InputInfoPtr pInfo, int hotplugged) +/** + * Parse the options for this device. + * Note that parameters is_primary and is_dependent are mutually exclusive, + * though both may be false in the case of an xorg.conf device. + * + * @param is_primary True if the device is the parent device for + * hotplugging, False if the device is a depent or xorg.conf device. + * @param is_hotplugged True if the device is a dependent device, FALSE + * otherwise. + * @retvalue True on success or False otherwise. + */ +Bool wcmParseOptions(InputInfoPtr pInfo, Bool is_primary, Bool is_dependent) { WacomDevicePtr priv = (WacomDevicePtr)pInfo->private; WacomCommonPtr common = priv->common; char *s, b[12]; int i; WacomToolPtr tool = NULL; - WacomToolAreaPtr area = NULL; int tpc_button_is_on; /* Optional configuration */ @@ -524,18 +578,35 @@ if (s) { + int rotation; + if (xf86NameCmp(s, "CW") == 0) - common->wcmRotate=ROTATE_CW; + rotation = ROTATE_CW; else if (xf86NameCmp(s, "CCW") ==0) - common->wcmRotate=ROTATE_CCW; + rotation = ROTATE_CCW; else if (xf86NameCmp(s, "HALF") ==0) - common->wcmRotate=ROTATE_HALF; + rotation = ROTATE_HALF; else if (xf86NameCmp(s, "NONE") !=0) { xf86Msg(X_ERROR, "%s: invalid Rotate option '%s'.\n", pInfo->name, s); goto error; } + + if (is_dependent && rotation != common->wcmRotate) + xf86Msg(X_INFO, "%s: ignoring rotation of dependent" + " device\n", pInfo->name); + else + wcmRotateTablet(pInfo, rotation); + } + + common->wcmRawSample = xf86SetIntOption(pInfo->options, "RawSample", + common->wcmRawSample); + if (common->wcmRawSample < 1 || common->wcmRawSample > MAX_SAMPLES) + { + xf86Msg(X_ERROR, "%s: RawSample setting '%d' out of range [1..%d]. Using default.\n", + pInfo->name, common->wcmRawSample, MAX_SAMPLES); + common->wcmRawSample = DEFAULT_SAMPLES; } common->wcmSuppress = xf86SetIntOption(pInfo->options, "Suppress", @@ -552,10 +623,6 @@ (common->wcmFlags & TILT_REQUEST_FLAG))) common->wcmFlags |= TILT_REQUEST_FLAG; - if (xf86SetBoolOption(pInfo->options, "RawFilter", - (common->wcmFlags & RAW_FILTERING_FLAG))) - common->wcmFlags |= RAW_FILTERING_FLAG; - /* pressure curve takes control points x1,y1,x2,y2 * values in range from 0..100. * Linear curve is 0,0,100,100 @@ -577,14 +644,12 @@ if (IsCursor(priv)) { common->wcmCursorProxoutDist = xf86SetIntOption(pInfo->options, "CursorProx", 0); - if (common->wcmCursorProxoutDist < 0 || common->wcmCursorProxoutDist > 255) + if (common->wcmCursorProxoutDist < 0 || + common->wcmCursorProxoutDist > common->wcmMaxDist) xf86Msg(X_CONFIG, "%s: CursorProx invalid %d \n", pInfo->name, common->wcmCursorProxoutDist); } - if (xf86SetBoolOption(pInfo->options, "KeepShape", 0)) - priv->flags |= KEEP_SHAPE_FLAG; - priv->topX = xf86SetIntOption(pInfo->options, "TopX", 0); priv->topY = xf86SetIntOption(pInfo->options, "TopY", 0); priv->bottomX = xf86SetIntOption(pInfo->options, "BottomX", 0); @@ -592,11 +657,6 @@ priv->serial = xf86SetIntOption(pInfo->options, "Serial", 0); tool = priv->tool; - area = priv->toolarea; - area->topX = priv->topX; - area->topY = priv->topY; - area->bottomX = priv->bottomX; - area->bottomY = priv->bottomY; tool->serial = priv->serial; /* The first device doesn't need to add any tools/areas as it @@ -612,18 +672,10 @@ if(toollist) /* Already have a tool with the same type/serial */ { - WacomToolAreaPtr arealist; - - free(tool); - priv->tool = tool = toollist; - arealist = toollist->arealist; - - /* Add the area to the end of the list */ - while(arealist->next) - arealist = arealist->next; - arealist->next = area; - } - else /* No match on existing tool/serial, add tool to the end of the list */ + xf86Msg(X_ERROR, "%s: already have a tool with type/serial %d/%d.", + pInfo->name, tool->typeid, tool->serial); + goto error; + } else /* No match on existing tool/serial, add tool to the end of the list */ { toollist = common->wcmTool; while(toollist->next) @@ -644,7 +696,7 @@ tpc_button_is_on = xf86SetBoolOption(pInfo->options, "TPCButton", TabletHasFeature(common, WCM_TPC)); - if (hotplugged || IsStylus(priv)) + if (is_primary || IsStylus(priv)) common->wcmTPCButton = tpc_button_is_on; else if (tpc_button_is_on != common->wcmTPCButton) xf86Msg(X_WARNING, "%s: TPCButton option can only be set " @@ -663,7 +715,7 @@ touch_is_on = xf86SetBoolOption(pInfo->options, "Touch", common->wcmTouchDefault); - if (hotplugged || IsTouch(priv)) + if (is_primary || IsTouch(priv)) common->wcmTouch = touch_is_on; else if (touch_is_on != common->wcmTouch) xf86Msg(X_WARNING, "%s: Touch option can only be set " @@ -672,7 +724,7 @@ capacity_is_on = xf86SetBoolOption(pInfo->options, "Capacity", common->wcmCapacityDefault); - if (hotplugged || IsTouch(priv)) + if (is_primary || IsTouch(priv)) common->wcmCapacity = capacity_is_on; else if (capacity_is_on != common->wcmCapacity) xf86Msg(X_WARNING, "%s: Touch Capacity option can only be" @@ -691,20 +743,12 @@ gesture_is_on = xf86SetBoolOption(pInfo->options, "Gesture", common->wcmGestureDefault); - if (hotplugged || IsTouch(priv)) + if (is_primary || IsTouch(priv)) common->wcmGesture = gesture_is_on; else if (gesture_is_on != common->wcmGesture) xf86Msg(X_WARNING, "%s: Touch gesture option can only " "be set by a touch tool.\n", pInfo->name); - /* FIXME: wtf is this here?? */ - if (IsUSBDevice(common) && - TabletHasFeature(common, WCM_LCD) && - TabletHasFeature(common, WCM_2FGT)) { - common->wcmGestureParameters.wcmZoomDistanceDefault = 30; - common->wcmGestureParameters.wcmScrollDistanceDefault = 30; - } - common->wcmGestureParameters.wcmZoomDistance = xf86SetIntOption(pInfo->options, "ZoomDistance", common->wcmGestureParameters.wcmZoomDistanceDefault); @@ -736,11 +780,10 @@ !common->wcmDevCls->ParseOptions(pInfo)) goto error; - return 1; + return TRUE; error: - free(area); free(tool); - return 0; + return FALSE; } /* vim: set noexpandtab tabstop=8 shiftwidth=8: */ diff -Nru xf86-input-wacom-0.10.11/src/wcmXCommand.c xf86-input-wacom-0.11.0/src/wcmXCommand.c --- xf86-input-wacom-0.10.11/src/wcmXCommand.c 2011-02-15 04:27:40.000000000 +0000 +++ xf86-input-wacom-0.11.0/src/wcmXCommand.c 2011-04-14 04:06:47.000000000 +0000 @@ -165,20 +165,6 @@ values[3] = priv->serial; prop_serials = InitWcmAtom(pInfo->dev, WACOM_PROP_SERIALIDS, 32, 4, values); - if (IsPad(priv)) { - values[0] = priv->striplup; - values[1] = priv->stripldn; - values[2] = priv->striprup; - values[3] = priv->striprdn; - prop_strip_buttons = InitWcmAtom(pInfo->dev, WACOM_PROP_STRIPBUTTONS, 8, 4, values); - - values[0] = priv->relup; - values[1] = priv->reldn; - values[2] = priv->wheelup; - values[3] = priv->wheeldn; - prop_wheel_buttons = InitWcmAtom(pInfo->dev, WACOM_PROP_WHEELBUTTONS, 8, 4, values); - } - if (IsCursor(priv)) { values[0] = common->wcmCursorProxoutDist; prop_cursorprox = InitWcmAtom(pInfo->dev, WACOM_PROP_PROXIMITY_THRESHOLD, 32, 1, values); @@ -198,7 +184,7 @@ prop_touch = InitWcmAtom(pInfo->dev, WACOM_PROP_TOUCH, 8, 1, values); if (IsStylus(priv)) { - values[0] = common->wcmTPCButton; + values[0] = !common->wcmTPCButton; prop_hover = InitWcmAtom(pInfo->dev, WACOM_PROP_HOVER, 8, 1, values); } @@ -217,6 +203,17 @@ memset(values, 0, sizeof(values)); prop_btnactions = InitWcmAtom(pInfo->dev, WACOM_PROP_BUTTON_ACTIONS, -32, WCM_MAX_MOUSE_BUTTONS, values); + if (IsPad(priv)) { + memset(values, 0, sizeof(values)); + prop_strip_buttons = InitWcmAtom(pInfo->dev, WACOM_PROP_STRIPBUTTONS, -32, 4, values); + } + + if (IsPad(priv) || IsCursor(priv)) + { + memset(values, 0, sizeof(values)); + prop_wheel_buttons = InitWcmAtom(pInfo->dev, WACOM_PROP_WHEELBUTTONS, -32, 4, values); + } + #ifdef DEBUG values[0] = priv->debugLevel; values[1] = common->debugLevel; @@ -300,7 +297,7 @@ for (i = 0; i < prop->size; i++) { /* keys is one based array to align with X buttons */ - memset(keys[i+1], 0, sizeof(keys[i])); + memset(keys[i+1], 0, sizeof(keys[i+1])); if (!values[i]) continue; @@ -537,6 +534,33 @@ } /** + * Update the rotation property for all tools on the same physical tablet as + * pInfo. + */ +void wcmUpdateRotationProperty(WacomDevicePtr priv) +{ + WacomCommonPtr common = priv->common; + WacomDevicePtr other; + char rotation = common->wcmRotate; + + for (other = common->wcmDevices; other; other = other->next) + { + InputInfoPtr pInfo; + DeviceIntPtr dev; + + if (other == priv) + continue; + + pInfo = other->pInfo; + dev = pInfo->dev; + + XIChangeDeviceProperty(dev, prop_rotation, XA_INTEGER, 8, + PropModeReplace, 1, &rotation, + TRUE); + } +} + +/** * Only allow deletion of a property if it is not being used by any of the * button actions. */ @@ -569,33 +593,10 @@ if (property == prop_tablet_area) { INT32 *values = (INT32*)prop->data; - WacomToolAreaPtr area = priv->toolarea; if (prop->size != 4 || prop->format != 32) return BadValue; - /* value validation is unnecessary since we let utility programs, such as - * xsetwacom and userland control panel take care of the validation role. - * when all four values are set to -1, it is an area reset (xydefault) */ - if ((values[0] != -1) || (values[1] != -1) || - (values[2] != -1) || (values[3] != -1)) - { - WacomToolArea tmp_area = *area; - - area->topX = values[0]; - area->topY = values[1]; - area->bottomX = values[2]; - area->bottomY = values[3]; - - /* validate the area */ - if (wcmAreaListOverlap(area, priv->tool->arealist)) - { - *area = tmp_area; - return BadValue; - } - *area = tmp_area; - } - if (!checkonly) { if ((values[0] == -1) && (values[1] == -1) && @@ -607,10 +608,10 @@ values[3] = priv->maxY; } - priv->topX = area->topX = values[0]; - priv->topY = area->topY = values[1]; - priv->bottomX = area->bottomX = values[2]; - priv->bottomY = area->bottomY = values[3]; + priv->topX = values[0]; + priv->topY = values[1]; + priv->bottomX = values[2]; + priv->bottomY = values[3]; } } else if (property == prop_pressurecurve) { @@ -643,7 +644,7 @@ if ((values[0] < 0) || (values[0] > 100)) return BadValue; - if ((values[1] < 0) || (values[1] > XWACOM_MAX_SAMPLES)) + if ((values[1] < 1) || (values[1] > MAX_SAMPLES)) return BadValue; if (!checkonly) @@ -664,6 +665,7 @@ if (!checkonly && common->wcmRotate != value) wcmRotateTablet(pInfo, value); + } else if (property == prop_serials) { return BadValue; /* Read-only */ @@ -683,7 +685,7 @@ value = *(CARD32*)prop->data; - if (value > 255) + if (value > common->wcmMaxDist) return BadValue; if (!checkonly) @@ -773,7 +775,7 @@ return BadMatch; if (!checkonly) - common->wcmTPCButton = values[0]; + common->wcmTPCButton = !values[0]; #ifdef DEBUG } else if (property == prop_debuglevels) { diff -Nru xf86-input-wacom-0.10.11/src/xf86Wacom.c xf86-input-wacom-0.11.0/src/xf86Wacom.c --- xf86-input-wacom-0.10.11/src/xf86Wacom.c 2011-02-15 04:27:40.000000000 +0000 +++ xf86-input-wacom-0.11.0/src/xf86Wacom.c 2011-04-14 02:38:55.000000000 +0000 @@ -85,105 +85,6 @@ { } -static int wcmInitArea(InputInfoPtr pInfo) -{ - WacomDevicePtr priv = (WacomDevicePtr)pInfo->private; - WacomToolAreaPtr area = priv->toolarea, inlist; - WacomCommonPtr common = priv->common; - double screenRatio, tabletRatio; - int bottomx = priv->maxX, bottomy = priv->maxY; - - DBG(10, priv, "\n"); - - /* verify the box and initialize the area */ - if (priv->topX > bottomx) - priv->topX = 0; - - if (priv->topY > bottomy) - priv->topY = 0; - - if (priv->bottomX < priv->topX || !priv->bottomX) - priv->bottomX = bottomx; - - if (priv->bottomY < priv->topY || !priv->bottomY) - priv->bottomY = bottomy; - - area->topX = priv->topX; - area->topY = priv->topY; - area->bottomX = priv->bottomX; - area->bottomY = priv->bottomY; - - /* Maintain aspect ratio to the whole desktop - * May need to consider a specific screen in multimonitor settings - */ - if (priv->flags & KEEP_SHAPE_FLAG) - { - - screenRatio = ((double)priv->maxWidth / (double)priv->maxHeight); - tabletRatio = ((double)(bottomx - priv->topX) / - (double)(bottomy - priv->topY)); - - DBG(2, priv, "screenRatio = %.3g, " - "tabletRatio = %.3g\n", screenRatio, tabletRatio); - - if (screenRatio > tabletRatio) - { - area->bottomX = priv->bottomX = bottomx; - area->bottomY = priv->bottomY = (bottomy - priv->topY) * - tabletRatio / screenRatio + priv->topY; - } - else - { - area->bottomX = priv->bottomX = (bottomx - priv->topX) * - screenRatio / tabletRatio + priv->topX; - area->bottomY = priv->bottomY = bottomy; - } - } - /* end keep shape */ - - inlist = priv->tool->arealist; - - /* The first one in the list is always valid */ - if (area != inlist && wcmAreaListOverlap(area, inlist)) - { - inlist = priv->tool->arealist; - - /* remove this overlapped area from the list */ - for (; inlist; inlist=inlist->next) - { - if (inlist->next == area) - { - inlist->next = area->next; - free(area); - priv->toolarea = NULL; - break; - } - } - - /* Remove this device from the common struct */ - if (common->wcmDevices == priv) - common->wcmDevices = priv->next; - else - { - WacomDevicePtr tmp = common->wcmDevices; - while(tmp->next && tmp->next != priv) - tmp = tmp->next; - if(tmp) - tmp->next = priv->next; - } - xf86Msg(X_ERROR, "%s: Top/Bottom area overlaps with another devices.\n", - pInfo->name); - return FALSE; - } - xf86Msg(X_PROBED, "%s: top X=%d top Y=%d " - "bottom X=%d bottom Y=%d " - "resol X=%d resol Y=%d\n", - pInfo->name, priv->topX, - priv->topY, priv->bottomX, priv->bottomY, - priv->resolX, priv->resolY); - return TRUE; -} - /***************************************************************************** * wcmVirtualTabletPadding(InputInfoPtr pInfo) ****************************************************************************/ @@ -210,8 +111,6 @@ { WacomDevicePtr priv = (WacomDevicePtr)pInfo->private; WacomCommonPtr common = priv->common; - WacomToolPtr toollist = common->wcmTool; - WacomToolAreaPtr arealist; /* assign max and resolution here since we don't get them during * the configuration stage */ @@ -230,17 +129,10 @@ priv->resolY = common->wcmResolY; } - for (; toollist; toollist=toollist->next) - { - arealist = toollist->arealist; - for (; arealist; arealist=arealist->next) - { - if (!arealist->bottomX) - arealist->bottomX = priv->maxX; - if (!arealist->bottomY) - arealist->bottomY = priv->maxY; - } - } + if (!priv->bottomX) + priv->bottomX = priv->maxX; + if (!priv->bottomY) + priv->bottomY = priv->maxY; return; } @@ -332,8 +224,8 @@ if (IsCursor(priv)) { label = XIGetKnownProperty(AXIS_LABEL_PROP_ABS_RZ); - min = -900; - max = -899; + min = MIN_ROTATION; + max = MIN_ROTATION + MAX_ROTATION_RANGE - 1; min_res = max_res = res = 1; mode = Absolute; } else if (IsPad(priv)) @@ -442,7 +334,6 @@ { InputInfoPtr pInfo = (InputInfoPtr)pWcm->public.devicePrivate; WacomDevicePtr priv = (WacomDevicePtr)pInfo->private; - WacomCommonPtr common = priv->common; unsigned char butmap[WCM_MAX_BUTTONS+1]; int nbaxes, nbbuttons, nbkeys; int loop; @@ -544,24 +435,12 @@ if (!IsPad(priv)) { wcmInitialToolSize(pInfo); - - if (wcmInitArea(pInfo) == FALSE) - return FALSE; - wcmMappingFactor(pInfo); } if (!wcmInitAxes(pWcm)) return FALSE; - wcmRotateTablet(pInfo, common->wcmRotate); - - if (IsTouch(priv)) - { - /* hard prox out */ - priv->oldHwProx = 0; - } - InitWcmDeviceProperties(pInfo); XIRegisterPropertyHandler(pInfo->dev, wcmSetProperty, NULL, wcmDeleteProperty); @@ -869,6 +748,65 @@ } } +static void wcmEnableDisableTool(DeviceIntPtr dev, Bool enable) +{ + InputInfoPtr pInfo = dev->public.devicePrivate; + WacomDevicePtr priv = pInfo->private; + WacomToolPtr tool = priv->tool; + + tool->enabled = enable; +} + +static void wcmEnableTool(DeviceIntPtr dev) +{ + wcmEnableDisableTool(dev, TRUE); +} +static void wcmDisableTool(DeviceIntPtr dev) +{ + wcmEnableDisableTool(dev, FALSE); +} + +/** + * Unlink the touch tool from the pen of the same device + */ +static void wcmUnlinkTouchAndPen(InputInfoPtr pInfo) +{ + WacomDevicePtr priv = pInfo->private; + WacomCommonPtr common = priv->common; + InputInfoPtr device = xf86FirstLocalDevice(); + WacomCommonPtr tmpcommon = NULL; + WacomDevicePtr tmppriv = NULL; + Bool touch_device = FALSE; + + if (!TabletHasFeature(common, WCM_PENTOUCH)) + return; + + /* Lookup to find the associated pen and touch */ + for (; device != NULL; device = device->next) + { + if (!strcmp(device->drv->driverName, "wacom")) + { + tmppriv = (WacomDevicePtr) device->private; + tmpcommon = tmppriv->common; + touch_device = (common->wcmTouchDevice || + tmpcommon->wcmTouchDevice); + + /* skip the same tool or unlinked devices */ + if ((tmppriv == priv) || !touch_device) + continue; + + if (tmpcommon->tablet_id == common->tablet_id) + { + common->wcmTouchDevice = NULL; + tmpcommon->wcmTouchDevice = NULL; + common->tablet_type &= ~WCM_PENTOUCH; + tmpcommon->tablet_type &= ~WCM_PENTOUCH; + return; + } + } + } +} + /***************************************************************************** * wcmDevProc -- * Handle the initialization, etc. of a wacom tablet. Called by the server @@ -905,12 +843,15 @@ case DEVICE_ON: if (!wcmDevOpen(pWcm)) goto out; + wcmEnableTool(pWcm); xf86AddEnabledDevice(pInfo); pWcm->public.on = TRUE; break; case DEVICE_OFF: case DEVICE_CLOSE: + wcmDisableTool(pWcm); + wcmUnlinkTouchAndPen(pInfo); if (pInfo->fd >= 0) { xf86RemoveEnabledDevice(pInfo); diff -Nru xf86-input-wacom-0.10.11/src/xf86WacomDefs.h xf86-input-wacom-0.11.0/src/xf86WacomDefs.h --- xf86-input-wacom-0.10.11/src/xf86WacomDefs.h 2011-02-15 04:27:40.000000000 +0000 +++ xf86-input-wacom-0.11.0/src/xf86WacomDefs.h 2011-04-19 04:04:00.000000000 +0000 @@ -45,6 +45,9 @@ #define MIN_PAD_RING 0 /* I4 absolute scroll ring min value */ #define MAX_PAD_RING 71 /* I4 absolute scroll ring max value */ +/* I4 cursor tool has a rotation offset of 175 degrees */ +#define INTUOS4_CURSOR_ROTATION_OFFSET 175 + /* Default max distance to the tablet at which a proximity-out event is generated for * cursor device (e.g. mouse). */ @@ -128,8 +131,6 @@ int (*GetRanges)(InputInfoPtr pInfo); int (*Start)(InputInfoPtr pInfo); int (*Parse)(InputInfoPtr pInfo, const unsigned char* data, int len); - int (*FilterRaw)(WacomCommonPtr common, WacomChannelPtr pChannel, - WacomDeviceStatePtr ds); int (*DetectConfig)(InputInfoPtr pInfo); }; @@ -137,6 +138,7 @@ * WacomDeviceRec *****************************************************************************/ +/* these device IDs are reported through ABS_MISC for Protocol 4 devices */ #define DEVICE_ID(flags) ((flags) & 0xff) #define STYLUS_DEVICE_ID 0x02 #define TOUCH_DEVICE_ID 0x03 @@ -171,10 +173,10 @@ #define WCM_TPC (0x00000200 | WCM_LCD) /* TabletPC (special button handling, always an LCD) */ +#define WCM_PENTOUCH 0x00000400 /* Tablet supports pen and touch */ #define TabletHasFeature(common, feature) (((common)->tablet_type & (feature)) != 0) #define ABSOLUTE_FLAG 0x00000100 -#define KEEP_SHAPE_FLAG 0x00000200 #define BAUD_19200_FLAG 0x00000400 #define BUTTONS_ONLY_FLAG 0x00000800 @@ -183,6 +185,7 @@ #define IsTouch(priv) (DEVICE_ID((priv)->flags) == TOUCH_ID) #define IsEraser(priv) (DEVICE_ID((priv)->flags) == ERASER_ID) #define IsPad(priv) (DEVICE_ID((priv)->flags) == PAD_ID) +#define IsPen(priv) (IsStylus(priv) || IsEraser(priv)) #define IsUSBDevice(common) ((common)->wcmDevCls == &gWacomUSBDevice) @@ -240,16 +243,18 @@ int wheelup; int wheeldn; /* keystrokes assigned to wheel events (default is the buttons above). - * Order is relup, reldwn, wheelup, wheeldn. */ - unsigned wheel_keys[4][256]; + * Order is relup, reldwn, wheelup, wheeldn. Like 'keys', this array + * is one-indexed */ + unsigned wheel_keys[4+1][256]; int striplup; int stripldn; int striprup; int striprdn; /* keystrokes assigned to strip events (default is the buttons above). - * Order is striplup, stripldn, striprup, striprdn. */ - unsigned strip_keys[4][256]; + * Order is striplup, stripldn, striprup, striprdn. Like 'keys', this + * array is one-indexed */ + unsigned strip_keys[4+1][256]; int nbuttons; /* number of buttons for this subdevice */ int naxes; /* number of axes */ /* FIXME: always 6, and the code relies on that... */ @@ -274,7 +279,7 @@ int oldThrottle; /* previous throttle value */ int oldButtons; /* previous buttons state */ int oldProximity; /* previous proximity */ - int oldHwProx; /* previous hardware proximity */ + int oldCursorHwProx; /* previous cursor hardware proximity */ int old_device_id; /* last in prox device id */ int old_serial; /* last in prox tool serial number */ int devReverseCount; /* Relative ReverseConvert called twice each movement*/ @@ -290,7 +295,6 @@ int minPressure; /* the minimum pressure a pen may hold */ WacomToolPtr tool; /* The common tool-structure for this device */ - WacomToolAreaPtr toolarea; /* The area defined for this device */ int isParent; /* set to 1 if the device is not auto-hotplugged */ @@ -327,7 +331,6 @@ int relwheel; int distance; int throttle; - int discard_first; int proximity; int sample; /* wraps every 24 days */ }; @@ -384,7 +387,6 @@ #define TILT_REQUEST_FLAG 1 #define TILT_ENABLED_FLAG 2 -#define RAW_FILTERING_FLAG 4 #define MAX_CHANNELS 3 #define PAD_CHANNEL (MAX_CHANNELS-1) @@ -419,6 +421,9 @@ int fd; /* file descriptor to tablet */ int fd_refs; /* number of references to fd; if =0, fd is invalid */ unsigned long wcmKeys[NBITS(KEY_MAX)]; /* supported tool types for the device */ + WacomDevicePtr wcmTouchDevice; /* The pointer for pen to access the + touch tool of the same device id */ + Bool wcmPenInProx; /* Keep pen in-prox state for touch tool */ /* These values are in tablet coordinates */ int wcmMaxX; /* tablet max X value */ @@ -441,8 +446,8 @@ int wcmMaxStripY; /* Maximum fingerstrip Y */ int nbuttons; /* total number of buttons */ - int npadkeys; /* number of pad keys in the above array */ int padkey_code[WCM_MAX_BUTTONS];/* hardware codes for buttons */ + int npadkeys; /* number of pad keys in the above array */ WacomDevicePtr wcmDevices; /* list of devices sharing same port */ int wcmPktLength; /* length of a packet */ @@ -460,7 +465,6 @@ int wcmGesture; /* disable/enable touch gesture */ int wcmGestureDefault; /* default touch gesture to disable when not supported */ int wcmGestureMode; /* data is in Gesture Mode? */ - int wcmTouchpadMode; /* in touchpad mode? */ WacomDeviceState wcmGestureState[MAX_FINGERS]; /* inital state when in gesture mode */ int wcmCapacity; /* disable/enable capacity */ int wcmCapacityDefault; /* default to -1 when capacity isn't supported/disabled */ @@ -484,7 +488,6 @@ }; #define HANDLE_TILT(comm) ((comm)->wcmFlags & TILT_ENABLED_FLAG) -#define RAW_FILTERING(comm) ((comm)->wcmFlags & RAW_FILTERING_FLAG) /****************************************************************************** * WacomTool @@ -495,24 +498,9 @@ int typeid; /* Tool type */ int serial; /* Serial id, 0 == no serial id */ + Bool enabled; - WacomToolAreaPtr current; /* Current area in-prox */ - WacomToolAreaPtr arealist; /* List of defined areas */ -}; - -/****************************************************************************** - * WacomToolArea - *****************************************************************************/ -struct _WacomToolArea -{ - WacomToolAreaPtr next; - - int topX; /* Top X/Y */ - int topY; - int bottomX; /* Bottom X/Y */ - int bottomY; - - InputInfoPtr device; /* The InputDevice connected to this area */ + InputInfoPtr device; /* The InputDevice connected to this tool */ }; #endif /*__XF86_XF86WACOMDEFS_H */ diff -Nru xf86-input-wacom-0.10.11/src/xf86Wacom.h xf86-input-wacom-0.11.0/src/xf86Wacom.h --- xf86-input-wacom-0.10.11/src/xf86Wacom.h 2011-02-16 04:25:52.000000000 +0000 +++ xf86-input-wacom-0.11.0/src/xf86Wacom.h 2011-04-08 01:31:00.000000000 +0000 @@ -140,7 +140,7 @@ extern void wcmHotplugOthers(InputInfoPtr pInfo, const char *basename); /* setup */ -extern int wcmParseOptions(InputInfoPtr pInfo, int hotplugged); +extern Bool wcmParseOptions(InputInfoPtr pInfo, Bool is_primary, Bool is_dependent); extern void wcmInitialCoordinates(InputInfoPtr pInfo, int axes); extern void wcmInitialScreens(InputInfoPtr pInfo); extern void wcmInitialScreens(InputInfoPtr pInfo); @@ -150,7 +150,7 @@ /* run-time modifications */ extern void wcmChangeScreen(InputInfoPtr pInfo, int value); -extern void wcmTilt2R(WacomDeviceStatePtr ds); +extern int wcmTilt2R(int x, int y, double offset); extern void wcmGestureFilter(WacomDevicePtr priv, int channel); extern void wcmEmitKeycode(DeviceIntPtr keydev, int keycode, int state); extern void wcmSoftOutEvent(InputInfoPtr pInfo); @@ -167,6 +167,7 @@ extern int wcmSetProperty(DeviceIntPtr dev, Atom property, XIPropertyValuePtr prop, BOOL checkonly); extern int wcmDeleteProperty(DeviceIntPtr dev, Atom property); extern void InitWcmDeviceProperties(InputInfoPtr pInfo); +extern void wcmUpdateRotationProperty(WacomDevicePtr priv); /* Utility functions */ extern Bool is_absolute(InputInfoPtr pInfo); @@ -175,6 +176,12 @@ extern void wcmFreeCommon(WacomCommonPtr *common); extern WacomCommonPtr wcmNewCommon(void); +enum WacomSuppressMode { + SUPPRESS_NONE = 8, /* Process event normally */ + SUPPRESS_ALL, /* Supress and discard the whole event */ + SUPPRESS_NON_MOTION /* Supress all events but x/y motion */ +}; + /****************************************************************************/ #endif /* __XF86WACOM_H */ diff -Nru xf86-input-wacom-0.10.11/test/fake-symbols.c xf86-input-wacom-0.11.0/test/fake-symbols.c --- xf86-input-wacom-0.10.11/test/fake-symbols.c 2011-02-16 04:25:57.000000000 +0000 +++ xf86-input-wacom-0.11.0/test/fake-symbols.c 2011-04-14 04:06:47.000000000 +0000 @@ -81,7 +81,7 @@ _X_EXPORT int xf86NameCmp(const char *s1, const char *s2) { - return 0; + return strcasecmp(s1, s2); } _X_EXPORT char * @@ -121,7 +121,24 @@ int from_max, int from_min ) { - return 0; + int X; + int64_t to_width = to_max - to_min; + int64_t from_width = from_max - from_min; + + if (from_width) { + X = (int)(((to_width * (Cx - from_min)) / from_width) + to_min); + } + else { + X = 0; + /*ErrorF ("Divide by Zero in xf86ScaleAxis\n");*/ + } + + if (X > to_max) + X = to_max; + if (X < to_min) + X = to_min; + + return X; } @@ -132,12 +149,13 @@ } +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 11 _X_EXPORT void FreeInputAttributes(InputAttributes *attrs) { return; } - +#endif _X_EXPORT void xf86PostButtonEvent(DeviceIntPtr device, @@ -249,7 +267,10 @@ _X_EXPORT int -NewInputDeviceRequest (InputOption *options, InputAttributes *attrs, +NewInputDeviceRequest (InputOption *options, +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 11 + InputAttributes *attrs, +#endif DeviceIntPtr *pdev) { return 0; @@ -263,17 +284,13 @@ } -_X_EXPORT ScreenPtr -miPointerGetScreen(DeviceIntPtr pDev) -{ - return NULL; -} - +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 11 _X_EXPORT InputAttributes* DuplicateInputAttributes(InputAttributes *attrs) { return NULL; } +#endif _X_EXPORT int ValidAtom(Atom atom) @@ -411,5 +428,14 @@ return NULL; } - #endif + +ClientPtr serverClient; + +Bool QueueWorkProc ( + Bool (*function)(ClientPtr /* pClient */, pointer /* closure */), + ClientPtr client, pointer closure) +{ + return FALSE; +} + diff -Nru xf86-input-wacom-0.10.11/test/fake-symbols.h xf86-input-wacom-0.11.0/test/fake-symbols.h --- xf86-input-wacom-0.10.11/test/fake-symbols.h 2011-02-16 04:25:57.000000000 +0000 +++ xf86-input-wacom-0.11.0/test/fake-symbols.h 2011-04-07 05:22:34.000000000 +0000 @@ -36,7 +36,9 @@ int from_min ); extern void DeleteInputDeviceRequest(DeviceIntPtr pDev); +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 11 extern void FreeInputAttributes(InputAttributes *attrs); +#endif extern void xf86PostButtonEvent(DeviceIntPtr device, int is_absolute, @@ -85,14 +87,18 @@ extern CARD32 GetTimeInMillis (void); extern int -NewInputDeviceRequest (InputOption *options, InputAttributes *attrs, +NewInputDeviceRequest (InputOption *options, +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 11 + InputAttributes *attrs, +#endif DeviceIntPtr *pdev); extern Bool InitLedFeedbackClassDeviceStruct (DeviceIntPtr dev, LedCtrlProcPtr controlProc); -extern ScreenPtr miPointerGetScreen(DeviceIntPtr pDev); +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 11 extern InputAttributes* DuplicateInputAttributes(InputAttributes *attrs); +#endif extern int ValidAtom(Atom atom); extern Bool InitKeyboardDeviceStruct(DeviceIntPtr dev, XkbRMLVOSet *rmlvo, @@ -162,4 +168,9 @@ xf86AllocateInput(InputDriverPtr drv, int flags); +extern ClientPtr serverClient; + +extern Bool QueueWorkProc ( + Bool (*function)(ClientPtr /* pClient */, pointer /* closure */), + ClientPtr client, pointer closure); #endif diff -Nru xf86-input-wacom-0.10.11/test/Makefile.am xf86-input-wacom-0.11.0/test/Makefile.am --- xf86-input-wacom-0.10.11/test/Makefile.am 2011-02-15 04:27:40.000000000 +0000 +++ xf86-input-wacom-0.11.0/test/Makefile.am 2011-04-14 02:38:55.000000000 +0000 @@ -1,18 +1,19 @@ if UNITTESTS -include ../src/Makefile.am +include ../src/common.mk check_PROGRAMS = wacom-tests -check_LTLIBRARRIES = @DRIVER_NAME@_drv.la -@DRIVER_NAME@_drv_la_CFLAGS = -DDISABLE_STATIC -I$(top_srcdir)/src $(XORG_CFLAGS) $(CWARNFLAGS) -fvisibility=default +check_LTLIBRARIES = libwacom-test.la +libwacom_test_la_SOURCES =$(DRIVER_SOURCES) +libwacom_test_la_CFLAGS = -DDISABLE_STATIC -I$(top_srcdir)/src $(XORG_CFLAGS) $(CWARNFLAGS) -fvisibility=default TESTS=$(check_PROGRAMS) -INCLUDES = -I$(top_srcdir)/src -AM_CFLAGS += $(GLIB_CFLAGS) -TEST_LDADD=$(GLIB_LIBS) @DRIVER_NAME@_drv.la +INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/include +AM_CFLAGS = $(XORG_CFLAGS) $(CWARNFLAGS) $(UDEV_CFLAGS) +TEST_LDADD= libwacom-test.la COMMON_SOURCES=fake-symbols.c fake-symbols.h -wacom_tests_LDADD=$(TEST_LDADD) +wacom_tests_LDADD=$(TEST_LDADD) $(UDEV_LIBS) wacom_tests_SOURCES=wacom-tests.c $(COMMON_SOURCES) endif diff -Nru xf86-input-wacom-0.10.11/test/Makefile.in xf86-input-wacom-0.11.0/test/Makefile.in --- xf86-input-wacom-0.10.11/test/Makefile.in 2011-02-16 04:26:35.000000000 +0000 +++ xf86-input-wacom-0.11.0/test/Makefile.in 2011-04-19 04:07:03.000000000 +0000 @@ -15,32 +15,7 @@ @SET_MAKE@ -# Copyright 2005 Adam Jackson. -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# on the rights to use, copy, modify, merge, publish, distribute, sub -# license, and/or sell copies of the Software, and to permit persons to whom -# the Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice (including the next -# paragraph) shall be included in all copies or substantial portions of the -# Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL -# ADAM JACKSON BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -# this is obnoxious: -# -module lets us name the module exactly how we want -# -avoid-version prevents gratuitous .0.0.0 version numbers on the end -# _ladir passes a dummy rpath to libtool so the thing will actually link -# TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc. - +# shared makefile between src/Makefile.am and test/Makefile.am VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ @@ -60,7 +35,7 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -DIST_COMMON = $(srcdir)/../src/Makefile.am $(srcdir)/Makefile.am \ +DIST_COMMON = $(srcdir)/../src/common.mk $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in @UNITTESTS_TRUE@check_PROGRAMS = wacom-tests$(EXEEXT) subdir = test @@ -72,31 +47,8 @@ CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__installdirs = "$(DESTDIR)$(@DRIVER_NAME@_drv_ladir)" -LTLIBRARIES = $(@DRIVER_NAME@_drv_la_LTLIBRARIES) -@DRIVER_NAME@_drv_la_LIBADD = -am__@DRIVER_NAME@_drv_la_SOURCES_DIST = $(top_srcdir)/src/xf86Wacom.c \ +libwacom_test_la_LIBADD = +am__libwacom_test_la_SOURCES_DIST = $(top_srcdir)/src/xf86Wacom.c \ $(top_srcdir)/src/xf86Wacom.h $(top_srcdir)/src/wcmCommon.c \ $(top_srcdir)/src/wcmConfig.c $(top_srcdir)/src/wcmISDV4.c \ $(top_srcdir)/src/wcmFilter.c $(top_srcdir)/src/wcmFilter.h \ @@ -104,36 +56,34 @@ $(top_srcdir)/src/wcmXCommand.c \ $(top_srcdir)/src/wcmValidateDevice.c \ $(top_srcdir)/src/wcmTouchFilter.c -@UNITTESTS_TRUE@am_@DRIVER_NAME@_drv_la_OBJECTS = \ -@UNITTESTS_TRUE@ @DRIVER_NAME@_drv_la-xf86Wacom.lo \ -@UNITTESTS_TRUE@ @DRIVER_NAME@_drv_la-wcmCommon.lo \ -@UNITTESTS_TRUE@ @DRIVER_NAME@_drv_la-wcmConfig.lo \ -@UNITTESTS_TRUE@ @DRIVER_NAME@_drv_la-wcmISDV4.lo \ -@UNITTESTS_TRUE@ @DRIVER_NAME@_drv_la-wcmFilter.lo \ -@UNITTESTS_TRUE@ @DRIVER_NAME@_drv_la-wcmUSB.lo \ -@UNITTESTS_TRUE@ @DRIVER_NAME@_drv_la-wcmXCommand.lo \ -@UNITTESTS_TRUE@ @DRIVER_NAME@_drv_la-wcmValidateDevice.lo \ -@UNITTESTS_TRUE@ @DRIVER_NAME@_drv_la-wcmTouchFilter.lo -@DRIVER_NAME@_drv_la_OBJECTS = $(am_@DRIVER_NAME@_drv_la_OBJECTS) +@UNITTESTS_TRUE@am__objects_1 = libwacom_test_la-xf86Wacom.lo \ +@UNITTESTS_TRUE@ libwacom_test_la-wcmCommon.lo \ +@UNITTESTS_TRUE@ libwacom_test_la-wcmConfig.lo \ +@UNITTESTS_TRUE@ libwacom_test_la-wcmISDV4.lo \ +@UNITTESTS_TRUE@ libwacom_test_la-wcmFilter.lo \ +@UNITTESTS_TRUE@ libwacom_test_la-wcmUSB.lo \ +@UNITTESTS_TRUE@ libwacom_test_la-wcmXCommand.lo \ +@UNITTESTS_TRUE@ libwacom_test_la-wcmValidateDevice.lo \ +@UNITTESTS_TRUE@ libwacom_test_la-wcmTouchFilter.lo +@UNITTESTS_TRUE@am_libwacom_test_la_OBJECTS = $(am__objects_1) +libwacom_test_la_OBJECTS = $(am_libwacom_test_la_OBJECTS) AM_V_lt = $(am__v_lt_$(V)) am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) am__v_lt_0 = --silent -@DRIVER_NAME@_drv_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ +libwacom_test_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ - $(@DRIVER_NAME@_drv_la_CFLAGS) $(CFLAGS) \ - $(@DRIVER_NAME@_drv_la_LDFLAGS) $(LDFLAGS) -o $@ -@UNITTESTS_TRUE@am_@DRIVER_NAME@_drv_la_rpath = -rpath \ -@UNITTESTS_TRUE@ $(@DRIVER_NAME@_drv_ladir) + $(libwacom_test_la_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ + -o $@ +@UNITTESTS_TRUE@am_libwacom_test_la_rpath = am__wacom_tests_SOURCES_DIST = wacom-tests.c fake-symbols.c \ fake-symbols.h -@UNITTESTS_TRUE@am__objects_1 = fake-symbols.$(OBJEXT) +@UNITTESTS_TRUE@am__objects_2 = fake-symbols.$(OBJEXT) @UNITTESTS_TRUE@am_wacom_tests_OBJECTS = wacom-tests.$(OBJEXT) \ -@UNITTESTS_TRUE@ $(am__objects_1) +@UNITTESTS_TRUE@ $(am__objects_2) wacom_tests_OBJECTS = $(am_wacom_tests_OBJECTS) am__DEPENDENCIES_1 = -@UNITTESTS_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) \ -@UNITTESTS_TRUE@ @DRIVER_NAME@_drv.la -@UNITTESTS_TRUE@wacom_tests_DEPENDENCIES = $(am__DEPENDENCIES_2) +@UNITTESTS_TRUE@wacom_tests_DEPENDENCIES = $(TEST_LDADD) \ +@UNITTESTS_TRUE@ $(am__DEPENDENCIES_1) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @@ -160,8 +110,8 @@ AM_V_GEN = $(am__v_GEN_$(V)) am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) am__v_GEN_0 = @echo " GEN " $@; -SOURCES = $(@DRIVER_NAME@_drv_la_SOURCES) $(wacom_tests_SOURCES) -DIST_SOURCES = $(am__@DRIVER_NAME@_drv_la_SOURCES_DIST) \ +SOURCES = $(libwacom_test_la_SOURCES) $(wacom_tests_SOURCES) +DIST_SOURCES = $(am__libwacom_test_la_SOURCES_DIST) \ $(am__wacom_tests_SOURCES_DIST) ETAGS = etags CTAGS = ctags @@ -190,6 +140,7 @@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DOXYGEN = @DOXYGEN@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRIVER_NAME = @DRIVER_NAME@ @@ -203,8 +154,6 @@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ -GLIB_CFLAGS = @GLIB_CFLAGS@ -GLIB_LIBS = @GLIB_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ @@ -250,6 +199,8 @@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ +UDEV_CFLAGS = @UDEV_CFLAGS@ +UDEV_LIBS = @UDEV_LIBS@ VERSION = @VERSION@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ @@ -310,13 +261,7 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -@UNITTESTS_TRUE@@DRIVER_NAME@_drv_la_LTLIBRARIES = @DRIVER_NAME@_drv.la -@UNITTESTS_TRUE@@DRIVER_NAME@_drv_la_LDFLAGS = -module -avoid-version -@UNITTESTS_TRUE@@DRIVER_NAME@_drv_ladir = @inputdir@ -@UNITTESTS_TRUE@AM_CPPFLAGS = -I$(top_srcdir)/include/ -@UNITTESTS_TRUE@AM_CFLAGS = $(XORG_CFLAGS) $(CWARNFLAGS) \ -@UNITTESTS_TRUE@ $(GLIB_CFLAGS) -@UNITTESTS_TRUE@@DRIVER_NAME@_drv_la_SOURCES = \ +@UNITTESTS_TRUE@DRIVER_SOURCES = \ @UNITTESTS_TRUE@ $(top_srcdir)/src/xf86Wacom.c \ @UNITTESTS_TRUE@ $(top_srcdir)/src/xf86Wacom.h \ @UNITTESTS_TRUE@ $(top_srcdir)/src/wcmCommon.c \ @@ -330,19 +275,21 @@ @UNITTESTS_TRUE@ $(top_srcdir)/src/wcmValidateDevice.c \ @UNITTESTS_TRUE@ $(top_srcdir)/src/wcmTouchFilter.c -@UNITTESTS_TRUE@check_LTLIBRARRIES = @DRIVER_NAME@_drv.la -@UNITTESTS_TRUE@@DRIVER_NAME@_drv_la_CFLAGS = -DDISABLE_STATIC -I$(top_srcdir)/src $(XORG_CFLAGS) $(CWARNFLAGS) -fvisibility=default +@UNITTESTS_TRUE@check_LTLIBRARIES = libwacom-test.la +@UNITTESTS_TRUE@libwacom_test_la_SOURCES = $(DRIVER_SOURCES) +@UNITTESTS_TRUE@libwacom_test_la_CFLAGS = -DDISABLE_STATIC -I$(top_srcdir)/src $(XORG_CFLAGS) $(CWARNFLAGS) -fvisibility=default @UNITTESTS_TRUE@TESTS = $(check_PROGRAMS) -@UNITTESTS_TRUE@INCLUDES = -I$(top_srcdir)/src -@UNITTESTS_TRUE@TEST_LDADD = $(GLIB_LIBS) @DRIVER_NAME@_drv.la +@UNITTESTS_TRUE@INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/include +@UNITTESTS_TRUE@AM_CFLAGS = $(XORG_CFLAGS) $(CWARNFLAGS) $(UDEV_CFLAGS) +@UNITTESTS_TRUE@TEST_LDADD = libwacom-test.la @UNITTESTS_TRUE@COMMON_SOURCES = fake-symbols.c fake-symbols.h -@UNITTESTS_TRUE@wacom_tests_LDADD = $(TEST_LDADD) +@UNITTESTS_TRUE@wacom_tests_LDADD = $(TEST_LDADD) $(UDEV_LIBS) @UNITTESTS_TRUE@wacom_tests_SOURCES = wacom-tests.c $(COMMON_SOURCES) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/../src/Makefile.am $(am__configure_deps) +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/../src/common.mk $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ @@ -372,39 +319,17 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): -install-@DRIVER_NAME@_drv_laLTLIBRARIES: $(@DRIVER_NAME@_drv_la_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(@DRIVER_NAME@_drv_ladir)" || $(MKDIR_P) "$(DESTDIR)$(@DRIVER_NAME@_drv_ladir)" - @list='$(@DRIVER_NAME@_drv_la_LTLIBRARIES)'; test -n "$(@DRIVER_NAME@_drv_ladir)" || list=; \ - list2=; for p in $$list; do \ - if test -f $$p; then \ - list2="$$list2 $$p"; \ - else :; fi; \ - done; \ - test -z "$$list2" || { \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(@DRIVER_NAME@_drv_ladir)'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(@DRIVER_NAME@_drv_ladir)"; \ - } - -uninstall-@DRIVER_NAME@_drv_laLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(@DRIVER_NAME@_drv_la_LTLIBRARIES)'; test -n "$(@DRIVER_NAME@_drv_ladir)" || list=; \ - for p in $$list; do \ - $(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(@DRIVER_NAME@_drv_ladir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(@DRIVER_NAME@_drv_ladir)/$$f"; \ - done -clean-@DRIVER_NAME@_drv_laLTLIBRARIES: - -test -z "$(@DRIVER_NAME@_drv_la_LTLIBRARIES)" || rm -f $(@DRIVER_NAME@_drv_la_LTLIBRARIES) - @list='$(@DRIVER_NAME@_drv_la_LTLIBRARIES)'; for p in $$list; do \ +clean-checkLTLIBRARIES: + -test -z "$(check_LTLIBRARIES)" || rm -f $(check_LTLIBRARIES) + @list='$(check_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -@DRIVER_NAME@_drv.la: $(@DRIVER_NAME@_drv_la_OBJECTS) $(@DRIVER_NAME@_drv_la_DEPENDENCIES) - $(AM_V_CCLD)$(@DRIVER_NAME@_drv_la_LINK) $(am_@DRIVER_NAME@_drv_la_rpath) $(@DRIVER_NAME@_drv_la_OBJECTS) $(@DRIVER_NAME@_drv_la_LIBADD) $(LIBS) +libwacom-test.la: $(libwacom_test_la_OBJECTS) $(libwacom_test_la_DEPENDENCIES) + $(AM_V_CCLD)$(libwacom_test_la_LINK) $(am_libwacom_test_la_rpath) $(libwacom_test_la_OBJECTS) $(libwacom_test_la_LIBADD) $(LIBS) clean-checkPROGRAMS: @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ @@ -424,16 +349,16 @@ distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/@DRIVER_NAME@_drv_la-wcmCommon.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/@DRIVER_NAME@_drv_la-wcmConfig.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/@DRIVER_NAME@_drv_la-wcmFilter.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/@DRIVER_NAME@_drv_la-wcmISDV4.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/@DRIVER_NAME@_drv_la-wcmTouchFilter.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/@DRIVER_NAME@_drv_la-wcmUSB.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/@DRIVER_NAME@_drv_la-wcmValidateDevice.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/@DRIVER_NAME@_drv_la-wcmXCommand.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/@DRIVER_NAME@_drv_la-xf86Wacom.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fake-symbols.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwacom_test_la-wcmCommon.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwacom_test_la-wcmConfig.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwacom_test_la-wcmFilter.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwacom_test_la-wcmISDV4.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwacom_test_la-wcmTouchFilter.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwacom_test_la-wcmUSB.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwacom_test_la-wcmValidateDevice.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwacom_test_la-wcmXCommand.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwacom_test_la-xf86Wacom.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wacom-tests.Po@am__quote@ .c.o: @@ -460,77 +385,77 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< -@DRIVER_NAME@_drv_la-xf86Wacom.lo: $(top_srcdir)/src/xf86Wacom.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(@DRIVER_NAME@_drv_la_CFLAGS) $(CFLAGS) -MT @DRIVER_NAME@_drv_la-xf86Wacom.lo -MD -MP -MF $(DEPDIR)/@DRIVER_NAME@_drv_la-xf86Wacom.Tpo -c -o @DRIVER_NAME@_drv_la-xf86Wacom.lo `test -f '$(top_srcdir)/src/xf86Wacom.c' || echo '$(srcdir)/'`$(top_srcdir)/src/xf86Wacom.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/@DRIVER_NAME@_drv_la-xf86Wacom.Tpo $(DEPDIR)/@DRIVER_NAME@_drv_la-xf86Wacom.Plo +libwacom_test_la-xf86Wacom.lo: $(top_srcdir)/src/xf86Wacom.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwacom_test_la_CFLAGS) $(CFLAGS) -MT libwacom_test_la-xf86Wacom.lo -MD -MP -MF $(DEPDIR)/libwacom_test_la-xf86Wacom.Tpo -c -o libwacom_test_la-xf86Wacom.lo `test -f '$(top_srcdir)/src/xf86Wacom.c' || echo '$(srcdir)/'`$(top_srcdir)/src/xf86Wacom.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libwacom_test_la-xf86Wacom.Tpo $(DEPDIR)/libwacom_test_la-xf86Wacom.Plo @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/src/xf86Wacom.c' object='@DRIVER_NAME@_drv_la-xf86Wacom.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/src/xf86Wacom.c' object='libwacom_test_la-xf86Wacom.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(@DRIVER_NAME@_drv_la_CFLAGS) $(CFLAGS) -c -o @DRIVER_NAME@_drv_la-xf86Wacom.lo `test -f '$(top_srcdir)/src/xf86Wacom.c' || echo '$(srcdir)/'`$(top_srcdir)/src/xf86Wacom.c +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwacom_test_la_CFLAGS) $(CFLAGS) -c -o libwacom_test_la-xf86Wacom.lo `test -f '$(top_srcdir)/src/xf86Wacom.c' || echo '$(srcdir)/'`$(top_srcdir)/src/xf86Wacom.c -@DRIVER_NAME@_drv_la-wcmCommon.lo: $(top_srcdir)/src/wcmCommon.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(@DRIVER_NAME@_drv_la_CFLAGS) $(CFLAGS) -MT @DRIVER_NAME@_drv_la-wcmCommon.lo -MD -MP -MF $(DEPDIR)/@DRIVER_NAME@_drv_la-wcmCommon.Tpo -c -o @DRIVER_NAME@_drv_la-wcmCommon.lo `test -f '$(top_srcdir)/src/wcmCommon.c' || echo '$(srcdir)/'`$(top_srcdir)/src/wcmCommon.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/@DRIVER_NAME@_drv_la-wcmCommon.Tpo $(DEPDIR)/@DRIVER_NAME@_drv_la-wcmCommon.Plo +libwacom_test_la-wcmCommon.lo: $(top_srcdir)/src/wcmCommon.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwacom_test_la_CFLAGS) $(CFLAGS) -MT libwacom_test_la-wcmCommon.lo -MD -MP -MF $(DEPDIR)/libwacom_test_la-wcmCommon.Tpo -c -o libwacom_test_la-wcmCommon.lo `test -f '$(top_srcdir)/src/wcmCommon.c' || echo '$(srcdir)/'`$(top_srcdir)/src/wcmCommon.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libwacom_test_la-wcmCommon.Tpo $(DEPDIR)/libwacom_test_la-wcmCommon.Plo @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/src/wcmCommon.c' object='@DRIVER_NAME@_drv_la-wcmCommon.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/src/wcmCommon.c' object='libwacom_test_la-wcmCommon.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(@DRIVER_NAME@_drv_la_CFLAGS) $(CFLAGS) -c -o @DRIVER_NAME@_drv_la-wcmCommon.lo `test -f '$(top_srcdir)/src/wcmCommon.c' || echo '$(srcdir)/'`$(top_srcdir)/src/wcmCommon.c +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwacom_test_la_CFLAGS) $(CFLAGS) -c -o libwacom_test_la-wcmCommon.lo `test -f '$(top_srcdir)/src/wcmCommon.c' || echo '$(srcdir)/'`$(top_srcdir)/src/wcmCommon.c -@DRIVER_NAME@_drv_la-wcmConfig.lo: $(top_srcdir)/src/wcmConfig.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(@DRIVER_NAME@_drv_la_CFLAGS) $(CFLAGS) -MT @DRIVER_NAME@_drv_la-wcmConfig.lo -MD -MP -MF $(DEPDIR)/@DRIVER_NAME@_drv_la-wcmConfig.Tpo -c -o @DRIVER_NAME@_drv_la-wcmConfig.lo `test -f '$(top_srcdir)/src/wcmConfig.c' || echo '$(srcdir)/'`$(top_srcdir)/src/wcmConfig.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/@DRIVER_NAME@_drv_la-wcmConfig.Tpo $(DEPDIR)/@DRIVER_NAME@_drv_la-wcmConfig.Plo +libwacom_test_la-wcmConfig.lo: $(top_srcdir)/src/wcmConfig.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwacom_test_la_CFLAGS) $(CFLAGS) -MT libwacom_test_la-wcmConfig.lo -MD -MP -MF $(DEPDIR)/libwacom_test_la-wcmConfig.Tpo -c -o libwacom_test_la-wcmConfig.lo `test -f '$(top_srcdir)/src/wcmConfig.c' || echo '$(srcdir)/'`$(top_srcdir)/src/wcmConfig.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libwacom_test_la-wcmConfig.Tpo $(DEPDIR)/libwacom_test_la-wcmConfig.Plo @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/src/wcmConfig.c' object='@DRIVER_NAME@_drv_la-wcmConfig.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/src/wcmConfig.c' object='libwacom_test_la-wcmConfig.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(@DRIVER_NAME@_drv_la_CFLAGS) $(CFLAGS) -c -o @DRIVER_NAME@_drv_la-wcmConfig.lo `test -f '$(top_srcdir)/src/wcmConfig.c' || echo '$(srcdir)/'`$(top_srcdir)/src/wcmConfig.c +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwacom_test_la_CFLAGS) $(CFLAGS) -c -o libwacom_test_la-wcmConfig.lo `test -f '$(top_srcdir)/src/wcmConfig.c' || echo '$(srcdir)/'`$(top_srcdir)/src/wcmConfig.c -@DRIVER_NAME@_drv_la-wcmISDV4.lo: $(top_srcdir)/src/wcmISDV4.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(@DRIVER_NAME@_drv_la_CFLAGS) $(CFLAGS) -MT @DRIVER_NAME@_drv_la-wcmISDV4.lo -MD -MP -MF $(DEPDIR)/@DRIVER_NAME@_drv_la-wcmISDV4.Tpo -c -o @DRIVER_NAME@_drv_la-wcmISDV4.lo `test -f '$(top_srcdir)/src/wcmISDV4.c' || echo '$(srcdir)/'`$(top_srcdir)/src/wcmISDV4.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/@DRIVER_NAME@_drv_la-wcmISDV4.Tpo $(DEPDIR)/@DRIVER_NAME@_drv_la-wcmISDV4.Plo +libwacom_test_la-wcmISDV4.lo: $(top_srcdir)/src/wcmISDV4.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwacom_test_la_CFLAGS) $(CFLAGS) -MT libwacom_test_la-wcmISDV4.lo -MD -MP -MF $(DEPDIR)/libwacom_test_la-wcmISDV4.Tpo -c -o libwacom_test_la-wcmISDV4.lo `test -f '$(top_srcdir)/src/wcmISDV4.c' || echo '$(srcdir)/'`$(top_srcdir)/src/wcmISDV4.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libwacom_test_la-wcmISDV4.Tpo $(DEPDIR)/libwacom_test_la-wcmISDV4.Plo @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/src/wcmISDV4.c' object='@DRIVER_NAME@_drv_la-wcmISDV4.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/src/wcmISDV4.c' object='libwacom_test_la-wcmISDV4.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(@DRIVER_NAME@_drv_la_CFLAGS) $(CFLAGS) -c -o @DRIVER_NAME@_drv_la-wcmISDV4.lo `test -f '$(top_srcdir)/src/wcmISDV4.c' || echo '$(srcdir)/'`$(top_srcdir)/src/wcmISDV4.c +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwacom_test_la_CFLAGS) $(CFLAGS) -c -o libwacom_test_la-wcmISDV4.lo `test -f '$(top_srcdir)/src/wcmISDV4.c' || echo '$(srcdir)/'`$(top_srcdir)/src/wcmISDV4.c -@DRIVER_NAME@_drv_la-wcmFilter.lo: $(top_srcdir)/src/wcmFilter.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(@DRIVER_NAME@_drv_la_CFLAGS) $(CFLAGS) -MT @DRIVER_NAME@_drv_la-wcmFilter.lo -MD -MP -MF $(DEPDIR)/@DRIVER_NAME@_drv_la-wcmFilter.Tpo -c -o @DRIVER_NAME@_drv_la-wcmFilter.lo `test -f '$(top_srcdir)/src/wcmFilter.c' || echo '$(srcdir)/'`$(top_srcdir)/src/wcmFilter.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/@DRIVER_NAME@_drv_la-wcmFilter.Tpo $(DEPDIR)/@DRIVER_NAME@_drv_la-wcmFilter.Plo +libwacom_test_la-wcmFilter.lo: $(top_srcdir)/src/wcmFilter.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwacom_test_la_CFLAGS) $(CFLAGS) -MT libwacom_test_la-wcmFilter.lo -MD -MP -MF $(DEPDIR)/libwacom_test_la-wcmFilter.Tpo -c -o libwacom_test_la-wcmFilter.lo `test -f '$(top_srcdir)/src/wcmFilter.c' || echo '$(srcdir)/'`$(top_srcdir)/src/wcmFilter.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libwacom_test_la-wcmFilter.Tpo $(DEPDIR)/libwacom_test_la-wcmFilter.Plo @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/src/wcmFilter.c' object='@DRIVER_NAME@_drv_la-wcmFilter.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/src/wcmFilter.c' object='libwacom_test_la-wcmFilter.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(@DRIVER_NAME@_drv_la_CFLAGS) $(CFLAGS) -c -o @DRIVER_NAME@_drv_la-wcmFilter.lo `test -f '$(top_srcdir)/src/wcmFilter.c' || echo '$(srcdir)/'`$(top_srcdir)/src/wcmFilter.c +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwacom_test_la_CFLAGS) $(CFLAGS) -c -o libwacom_test_la-wcmFilter.lo `test -f '$(top_srcdir)/src/wcmFilter.c' || echo '$(srcdir)/'`$(top_srcdir)/src/wcmFilter.c -@DRIVER_NAME@_drv_la-wcmUSB.lo: $(top_srcdir)/src/wcmUSB.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(@DRIVER_NAME@_drv_la_CFLAGS) $(CFLAGS) -MT @DRIVER_NAME@_drv_la-wcmUSB.lo -MD -MP -MF $(DEPDIR)/@DRIVER_NAME@_drv_la-wcmUSB.Tpo -c -o @DRIVER_NAME@_drv_la-wcmUSB.lo `test -f '$(top_srcdir)/src/wcmUSB.c' || echo '$(srcdir)/'`$(top_srcdir)/src/wcmUSB.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/@DRIVER_NAME@_drv_la-wcmUSB.Tpo $(DEPDIR)/@DRIVER_NAME@_drv_la-wcmUSB.Plo +libwacom_test_la-wcmUSB.lo: $(top_srcdir)/src/wcmUSB.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwacom_test_la_CFLAGS) $(CFLAGS) -MT libwacom_test_la-wcmUSB.lo -MD -MP -MF $(DEPDIR)/libwacom_test_la-wcmUSB.Tpo -c -o libwacom_test_la-wcmUSB.lo `test -f '$(top_srcdir)/src/wcmUSB.c' || echo '$(srcdir)/'`$(top_srcdir)/src/wcmUSB.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libwacom_test_la-wcmUSB.Tpo $(DEPDIR)/libwacom_test_la-wcmUSB.Plo @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/src/wcmUSB.c' object='@DRIVER_NAME@_drv_la-wcmUSB.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/src/wcmUSB.c' object='libwacom_test_la-wcmUSB.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(@DRIVER_NAME@_drv_la_CFLAGS) $(CFLAGS) -c -o @DRIVER_NAME@_drv_la-wcmUSB.lo `test -f '$(top_srcdir)/src/wcmUSB.c' || echo '$(srcdir)/'`$(top_srcdir)/src/wcmUSB.c +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwacom_test_la_CFLAGS) $(CFLAGS) -c -o libwacom_test_la-wcmUSB.lo `test -f '$(top_srcdir)/src/wcmUSB.c' || echo '$(srcdir)/'`$(top_srcdir)/src/wcmUSB.c -@DRIVER_NAME@_drv_la-wcmXCommand.lo: $(top_srcdir)/src/wcmXCommand.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(@DRIVER_NAME@_drv_la_CFLAGS) $(CFLAGS) -MT @DRIVER_NAME@_drv_la-wcmXCommand.lo -MD -MP -MF $(DEPDIR)/@DRIVER_NAME@_drv_la-wcmXCommand.Tpo -c -o @DRIVER_NAME@_drv_la-wcmXCommand.lo `test -f '$(top_srcdir)/src/wcmXCommand.c' || echo '$(srcdir)/'`$(top_srcdir)/src/wcmXCommand.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/@DRIVER_NAME@_drv_la-wcmXCommand.Tpo $(DEPDIR)/@DRIVER_NAME@_drv_la-wcmXCommand.Plo +libwacom_test_la-wcmXCommand.lo: $(top_srcdir)/src/wcmXCommand.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwacom_test_la_CFLAGS) $(CFLAGS) -MT libwacom_test_la-wcmXCommand.lo -MD -MP -MF $(DEPDIR)/libwacom_test_la-wcmXCommand.Tpo -c -o libwacom_test_la-wcmXCommand.lo `test -f '$(top_srcdir)/src/wcmXCommand.c' || echo '$(srcdir)/'`$(top_srcdir)/src/wcmXCommand.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libwacom_test_la-wcmXCommand.Tpo $(DEPDIR)/libwacom_test_la-wcmXCommand.Plo @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/src/wcmXCommand.c' object='@DRIVER_NAME@_drv_la-wcmXCommand.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/src/wcmXCommand.c' object='libwacom_test_la-wcmXCommand.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(@DRIVER_NAME@_drv_la_CFLAGS) $(CFLAGS) -c -o @DRIVER_NAME@_drv_la-wcmXCommand.lo `test -f '$(top_srcdir)/src/wcmXCommand.c' || echo '$(srcdir)/'`$(top_srcdir)/src/wcmXCommand.c +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwacom_test_la_CFLAGS) $(CFLAGS) -c -o libwacom_test_la-wcmXCommand.lo `test -f '$(top_srcdir)/src/wcmXCommand.c' || echo '$(srcdir)/'`$(top_srcdir)/src/wcmXCommand.c -@DRIVER_NAME@_drv_la-wcmValidateDevice.lo: $(top_srcdir)/src/wcmValidateDevice.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(@DRIVER_NAME@_drv_la_CFLAGS) $(CFLAGS) -MT @DRIVER_NAME@_drv_la-wcmValidateDevice.lo -MD -MP -MF $(DEPDIR)/@DRIVER_NAME@_drv_la-wcmValidateDevice.Tpo -c -o @DRIVER_NAME@_drv_la-wcmValidateDevice.lo `test -f '$(top_srcdir)/src/wcmValidateDevice.c' || echo '$(srcdir)/'`$(top_srcdir)/src/wcmValidateDevice.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/@DRIVER_NAME@_drv_la-wcmValidateDevice.Tpo $(DEPDIR)/@DRIVER_NAME@_drv_la-wcmValidateDevice.Plo +libwacom_test_la-wcmValidateDevice.lo: $(top_srcdir)/src/wcmValidateDevice.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwacom_test_la_CFLAGS) $(CFLAGS) -MT libwacom_test_la-wcmValidateDevice.lo -MD -MP -MF $(DEPDIR)/libwacom_test_la-wcmValidateDevice.Tpo -c -o libwacom_test_la-wcmValidateDevice.lo `test -f '$(top_srcdir)/src/wcmValidateDevice.c' || echo '$(srcdir)/'`$(top_srcdir)/src/wcmValidateDevice.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libwacom_test_la-wcmValidateDevice.Tpo $(DEPDIR)/libwacom_test_la-wcmValidateDevice.Plo @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/src/wcmValidateDevice.c' object='@DRIVER_NAME@_drv_la-wcmValidateDevice.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/src/wcmValidateDevice.c' object='libwacom_test_la-wcmValidateDevice.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(@DRIVER_NAME@_drv_la_CFLAGS) $(CFLAGS) -c -o @DRIVER_NAME@_drv_la-wcmValidateDevice.lo `test -f '$(top_srcdir)/src/wcmValidateDevice.c' || echo '$(srcdir)/'`$(top_srcdir)/src/wcmValidateDevice.c +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwacom_test_la_CFLAGS) $(CFLAGS) -c -o libwacom_test_la-wcmValidateDevice.lo `test -f '$(top_srcdir)/src/wcmValidateDevice.c' || echo '$(srcdir)/'`$(top_srcdir)/src/wcmValidateDevice.c -@DRIVER_NAME@_drv_la-wcmTouchFilter.lo: $(top_srcdir)/src/wcmTouchFilter.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(@DRIVER_NAME@_drv_la_CFLAGS) $(CFLAGS) -MT @DRIVER_NAME@_drv_la-wcmTouchFilter.lo -MD -MP -MF $(DEPDIR)/@DRIVER_NAME@_drv_la-wcmTouchFilter.Tpo -c -o @DRIVER_NAME@_drv_la-wcmTouchFilter.lo `test -f '$(top_srcdir)/src/wcmTouchFilter.c' || echo '$(srcdir)/'`$(top_srcdir)/src/wcmTouchFilter.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/@DRIVER_NAME@_drv_la-wcmTouchFilter.Tpo $(DEPDIR)/@DRIVER_NAME@_drv_la-wcmTouchFilter.Plo +libwacom_test_la-wcmTouchFilter.lo: $(top_srcdir)/src/wcmTouchFilter.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwacom_test_la_CFLAGS) $(CFLAGS) -MT libwacom_test_la-wcmTouchFilter.lo -MD -MP -MF $(DEPDIR)/libwacom_test_la-wcmTouchFilter.Tpo -c -o libwacom_test_la-wcmTouchFilter.lo `test -f '$(top_srcdir)/src/wcmTouchFilter.c' || echo '$(srcdir)/'`$(top_srcdir)/src/wcmTouchFilter.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libwacom_test_la-wcmTouchFilter.Tpo $(DEPDIR)/libwacom_test_la-wcmTouchFilter.Plo @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/src/wcmTouchFilter.c' object='@DRIVER_NAME@_drv_la-wcmTouchFilter.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/src/wcmTouchFilter.c' object='libwacom_test_la-wcmTouchFilter.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(@DRIVER_NAME@_drv_la_CFLAGS) $(CFLAGS) -c -o @DRIVER_NAME@_drv_la-wcmTouchFilter.lo `test -f '$(top_srcdir)/src/wcmTouchFilter.c' || echo '$(srcdir)/'`$(top_srcdir)/src/wcmTouchFilter.c +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwacom_test_la_CFLAGS) $(CFLAGS) -c -o libwacom_test_la-wcmTouchFilter.lo `test -f '$(top_srcdir)/src/wcmTouchFilter.c' || echo '$(srcdir)/'`$(top_srcdir)/src/wcmTouchFilter.c mostlyclean-libtool: -rm -f *.lo @@ -713,14 +638,11 @@ fi; \ done check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) $(check_LTLIBRARIES) $(check_PROGRAMS) $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am -all-am: Makefile $(LTLIBRARIES) +all-am: Makefile installdirs: - for dir in "$(DESTDIR)$(@DRIVER_NAME@_drv_ladir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done install: install-am install-exec: install-exec-am install-data: install-data-am @@ -748,8 +670,8 @@ @echo "it deletes files that may require special tools to rebuild." clean: clean-am -clean-am: clean-@DRIVER_NAME@_drv_laLTLIBRARIES clean-checkPROGRAMS \ - clean-generic clean-libtool mostlyclean-am +clean-am: clean-checkLTLIBRARIES clean-checkPROGRAMS clean-generic \ + clean-libtool mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) @@ -769,7 +691,7 @@ info-am: -install-data-am: install-@DRIVER_NAME@_drv_laLTLIBRARIES +install-data-am: install-dvi: install-dvi-am @@ -815,16 +737,15 @@ ps-am: -uninstall-am: uninstall-@DRIVER_NAME@_drv_laLTLIBRARIES +uninstall-am: .MAKE: check-am install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ - clean-@DRIVER_NAME@_drv_laLTLIBRARIES clean-checkPROGRAMS \ - clean-generic clean-libtool ctags distclean distclean-compile \ + clean-checkLTLIBRARIES clean-checkPROGRAMS clean-generic \ + clean-libtool ctags distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ - dvi-am html html-am info info-am install \ - install-@DRIVER_NAME@_drv_laLTLIBRARIES install-am \ + dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ @@ -832,8 +753,7 @@ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-@DRIVER_NAME@_drv_laLTLIBRARIES \ - uninstall-am + tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff -Nru xf86-input-wacom-0.10.11/test/wacom-tests.c xf86-input-wacom-0.11.0/test/wacom-tests.c --- xf86-input-wacom-0.10.11/test/wacom-tests.c 2011-02-15 04:27:40.000000000 +0000 +++ xf86-input-wacom-0.11.0/test/wacom-tests.c 2011-04-19 04:04:00.000000000 +0000 @@ -1,11 +1,33 @@ +/* + * Copyright 2011 © Red Hat, Inc. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + #ifdef HAVE_CONFIG_H #include #endif -#include #include "fake-symbols.h" #include +/** + * NOTE: this file may not contain tests that require static variables. The + * current compiler undef static magic makes them local variables and thus + * change the behaviour. + */ /** * Test refcounting of the common struct. @@ -13,132 +35,504 @@ static void test_common_ref(void) { - WacomCommonPtr common; - WacomCommonPtr second; + WacomCommonPtr common; + WacomCommonPtr second; - common = wcmNewCommon(); - g_assert(common); - g_assert(common->refcnt == 1); - - second = wcmRefCommon(common); - - g_assert(second == common); - g_assert(second->refcnt == 2); - - wcmFreeCommon(&second); - g_assert(common); - g_assert(!second); - g_assert(common->refcnt == 1); - - second = wcmRefCommon(NULL); - g_assert(common != second); - g_assert(second->refcnt == 1); - g_assert(common->refcnt == 1); - - wcmFreeCommon(&second); - wcmFreeCommon(&common); - g_assert(!second && !common); + common = wcmNewCommon(); + assert(common); + assert(common->refcnt == 1); + + second = wcmRefCommon(common); + + assert(second == common); + assert(second->refcnt == 2); + + wcmFreeCommon(&second); + assert(common); + assert(!second); + assert(common->refcnt == 1); + + second = wcmRefCommon(NULL); + assert(common != second); + assert(second->refcnt == 1); + assert(common->refcnt == 1); + + wcmFreeCommon(&second); + wcmFreeCommon(&common); + assert(!second && !common); } static void test_rebase_pressure(void) { - WacomDeviceRec priv = {0}; - WacomDeviceRec base = {0}; - WacomDeviceState ds = {0}; - int pressure; + WacomDeviceRec priv = {0}; + WacomDeviceRec base = {0}; + WacomDeviceState ds = {0}; + int pressure; - priv.minPressure = 4; - ds.pressure = 10; + priv.minPressure = 4; + ds.pressure = 10; - /* Pressure in out-of-proximity means get new preloaded pressure */ - priv.oldProximity = 0; + /* Pressure in out-of-proximity means get new preloaded pressure */ + priv.oldProximity = 0; - /* make sure we don't touch priv, not really needed, the compiler should - * honor the consts but... */ - base = priv; + /* make sure we don't touch priv, not really needed, the compiler should + * honor the consts but... */ + base = priv; - pressure = rebasePressure(&priv, &ds); - g_assert(pressure == ds.pressure); + pressure = rebasePressure(&priv, &ds); + assert(pressure == ds.pressure); - g_assert(memcmp(&priv, &base, sizeof(priv)) == 0); + assert(memcmp(&priv, &base, sizeof(priv)) == 0); - /* Pressure in-proximity means rebase to new minimum */ - priv.oldProximity = 1; + /* Pressure in-proximity means rebase to new minimum */ + priv.oldProximity = 1; - base = priv; + base = priv; - pressure = rebasePressure(&priv, &ds); - g_assert(pressure == priv.minPressure); - g_assert(memcmp(&priv, &base, sizeof(priv)) == 0); + pressure = rebasePressure(&priv, &ds); + assert(pressure == priv.minPressure); + assert(memcmp(&priv, &base, sizeof(priv)) == 0); } static void test_normalize_pressure(void) { - InputInfoRec pInfo = {0}; - WacomDeviceRec priv = {0}; - WacomCommonRec common = {0}; - WacomDeviceState ds = {0}; - int pressure, prev_pressure = -1; - int i, j; - - priv.common = &common; - priv.pInfo = &pInfo; - pInfo.name = "Wacom test device"; - - priv.minPressure = 0; - - /* Some random loop to check various maxZ pressure values. Starting at - * 1, because if wcmMaxZ is 0 we have other problems. */ - for (j = 1; j <= 256; j += 17) - { - common.wcmMaxZ = j; - prev_pressure = -1; - - for (i = 0; i <= common.wcmMaxZ; i++) - { - ds.pressure = i; - - pressure = normalizePressure(&priv, &ds); - g_assert(pressure >= 0); - g_assert(pressure <= FILTER_PRESSURE_RES); - - /* we count up, so assume normalised pressure goes up too */ - g_assert(prev_pressure < pressure); - prev_pressure = pressure; - } - - g_assert(pressure == FILTER_PRESSURE_RES); - } - - /* If minPressure is higher than ds->pressure, normalizePressure takes - * minPressure and ignores actual pressure. This would be a bug in the - * driver code, but we might as well test for it. */ - priv.minPressure = 10; - ds.pressure = 0; - - prev_pressure = normalizePressure(&priv, &ds); - for (i = 0; i < priv.minPressure; i++) - { - ds.pressure = i; - - pressure = normalizePressure(&priv, &ds); - - g_assert(pressure >= 0); - g_assert(pressure < FILTER_PRESSURE_RES); - - /* we count up, so assume normalised pressure goes up too */ - g_assert(prev_pressure == pressure); - } + InputInfoRec pInfo = {0}; + WacomDeviceRec priv = {0}; + WacomCommonRec common = {0}; + WacomDeviceState ds = {0}; + int pressure, prev_pressure = -1; + int i, j; + + priv.common = &common; + priv.pInfo = &pInfo; + pInfo.name = "Wacom test device"; + + priv.minPressure = 0; + + /* Some random loop to check various maxZ pressure values. Starting at + * 1, because if wcmMaxZ is 0 we have other problems. */ + for (j = 1; j <= 256; j += 17) + { + common.wcmMaxZ = j; + prev_pressure = -1; + + for (i = 0; i <= common.wcmMaxZ; i++) + { + ds.pressure = i; + + pressure = normalizePressure(&priv, &ds); + assert(pressure >= 0); + assert(pressure <= FILTER_PRESSURE_RES); + + /* we count up, so assume normalised pressure goes up too */ + assert(prev_pressure < pressure); + prev_pressure = pressure; + } + + assert(pressure == FILTER_PRESSURE_RES); + } + + /* If minPressure is higher than ds->pressure, normalizePressure takes + * minPressure and ignores actual pressure. This would be a bug in the + * driver code, but we might as well test for it. */ + priv.minPressure = 10; + ds.pressure = 0; + + prev_pressure = normalizePressure(&priv, &ds); + for (i = 0; i < priv.minPressure; i++) + { + ds.pressure = i; + + pressure = normalizePressure(&priv, &ds); + + assert(pressure >= 0); + assert(pressure < FILTER_PRESSURE_RES); + + /* we count up, so assume normalised pressure goes up too */ + assert(prev_pressure == pressure); + } +} + +/** + * After a call to wcmInitialToolSize, the min/max and resolution must be + * set up correctly. + * + * wcmInitialToolSize takes the data from the common rec, so test that the + * priv has all the values of the common. + */ +static void +test_initial_size(void) +{ + InputInfoRec info = {0}; + WacomDeviceRec priv = {0}; + WacomCommonRec common = {0}; + + int minx, maxx, miny, maxy, xres, yres; + + info.private = &priv; + priv.common = &common; + + /* FIXME: we currently assume min of 0 in the driver. we cannot cope + * with non-zero devices */ + minx = miny = 0; + + common.wcmMaxX = maxx; + common.wcmMaxY = maxy; + common.wcmResolX = xres; + common.wcmResolY = yres; + + wcmInitialToolSize(&info); + + assert(priv.topX == minx); + assert(priv.topY == minx); + assert(priv.bottomX == maxx); + assert(priv.bottomY == maxy); + assert(priv.resolX == xres); + assert(priv.resolY == yres); + + /* Same thing for a touch-enabled device */ + memset(&common, 0, sizeof(common)); + + priv.flags = TOUCH_ID; + assert(IsTouch(&priv)); + + common.wcmMaxTouchX = maxx; + common.wcmMaxTouchY = maxy; + common.wcmTouchResolX = xres; + common.wcmTouchResolY = yres; + + wcmInitialToolSize(&info); + + assert(priv.topX == minx); + assert(priv.topY == minx); + assert(priv.bottomX == maxx); + assert(priv.bottomY == maxy); + assert(priv.resolX == xres); + assert(priv.resolY == yres); + +} + +static void +test_suppress(void) +{ + enum WacomSuppressMode rc; + WacomCommonRec common = {0}; + WacomDeviceState old = {0}, + new = {0}; + + common.wcmSuppress = 2; + + rc = wcmCheckSuppress(&common, &old, &new); + assert(rc == SUPPRESS_ALL); + + /* proximity, buttons and strip send for any change */ + +#define test_any_suppress(field) \ + old.field = 1; \ + rc = wcmCheckSuppress(&common, &old, &new); \ + assert(rc == SUPPRESS_NONE); \ + new.field = old.field; + + test_any_suppress(proximity); + test_any_suppress(buttons); + test_any_suppress(stripx); + test_any_suppress(stripy); + +#undef test_any_suppress + + /* pressure, capacity, throttle, rotation, abswheel only when + * difference is above suppress */ + + /* test negative and positive transition */ +#define test_above_suppress(field) \ + old.field = common.wcmSuppress; \ + rc = wcmCheckSuppress(&common, &old, &new); \ + assert(rc == SUPPRESS_ALL); \ + old.field = common.wcmSuppress + 1; \ + rc = wcmCheckSuppress(&common, &old, &new); \ + assert(rc == SUPPRESS_NONE); \ + old.field = -common.wcmSuppress; \ + rc = wcmCheckSuppress(&common, &old, &new); \ + assert(rc == SUPPRESS_ALL); \ + old.field = -common.wcmSuppress - 1; \ + rc = wcmCheckSuppress(&common, &old, &new); \ + assert(rc == SUPPRESS_NONE); \ + new.field = old.field; + + test_above_suppress(pressure); + test_above_suppress(capacity); + test_above_suppress(throttle); + test_above_suppress(rotation); + test_above_suppress(abswheel); + +#undef test_above_suppress + + /* any movement on relwheel counts */ + new.relwheel = 1; + rc = wcmCheckSuppress(&common, &old, &new); + assert(rc == SUPPRESS_NONE); + new.relwheel = 0; + + /* x axis movement */ + + /* not enough movement */ + new.x = common.wcmSuppress; + rc = wcmCheckSuppress(&common, &old, &new); + assert(rc == SUPPRESS_ALL); + assert(old.x == new.x); + assert(old.y == new.y); + + /* only x axis above thresh */ + new.x = common.wcmSuppress + 1; + rc = wcmCheckSuppress(&common, &old, &new); + assert(rc == SUPPRESS_NON_MOTION); + + /* x and other field above thres */ + new.pressure = ~old.pressure; + rc = wcmCheckSuppress(&common, &old, &new); + assert(rc == SUPPRESS_NONE); + + new.pressure = old.pressure; + new.x = old.x; + + /* y axis movement */ + new.y = common.wcmSuppress; + rc = wcmCheckSuppress(&common, &old, &new); + assert(rc == SUPPRESS_ALL); + assert(old.x == new.x); + assert(old.y == new.y); + + new.y = common.wcmSuppress + 1; + rc = wcmCheckSuppress(&common, &old, &new); + assert(rc == SUPPRESS_NON_MOTION); + + new.pressure = ~old.pressure; + rc = wcmCheckSuppress(&common, &old, &new); + assert(rc == SUPPRESS_NONE); + new.pressure = old.pressure; +} + +static void +test_tilt_to_rotation(void) +{ +#if 0 + This table below was generated from wcmTilt2R with the following code + + for (angle = 0; angle < 360; angle++) + { + double rad = angle * M_PI / 180.0; + double x, y; + x = sin(rad); + y = cos(rad); + + /* wcmTilt2R only uses it for the angle anyway, let's try to + get as precise as possible */ + ds.tiltx = x * 1000; + ds.tilty = y * 1000; + ds.rotation = 0; + + wcmTilt2R(&ds); + + printf("{ %d, %d, %d},\n", ds.tiltx, ds.tilty, ds.rotation); + } +#endif + + int rotation_table[][3] = { + { 17, 999, 20}, { 34, 999, 15}, { 52, 998, 10}, { 69, 997, 5}, { 87, 996, 0}, + { 104, 994, -5}, { 121, 992, -10}, { 139, 990, -15}, { 156, 987, -20}, { 173, 984, -25}, + { 190, 981, -30}, { 207, 978, -35}, { 224, 974, -40}, { 241, 970, -45}, { 258, 965, -50}, + { 275, 961, -55}, { 292, 956, -60}, { 309, 951, -65}, { 325, 945, -70}, { 342, 939, -75}, + { 358, 933, -80}, { 374, 927, -85}, { 390, 920, -90}, { 406, 913, -95}, { 422, 906, -100}, + { 438, 898, -105}, { 453, 891, -110}, { 469, 882, -115}, { 484, 874, -120}, { 499, 866, -125}, + { 515, 857, -130}, { 529, 848, -135}, { 544, 838, -140}, { 559, 829, -145}, { 573, 819, -150}, + { 587, 809, -155}, { 601, 798, -160}, { 615, 788, -165}, { 629, 777, -170}, { 642, 766, -175}, + { 656, 754, -180}, { 669, 743, -185}, { 681, 731, -190}, { 694, 719, -195}, { 707, 707, -200}, + { 719, 694, -205}, { 731, 681, -210}, { 743, 669, -215}, { 754, 656, -220}, { 766, 642, -225}, + { 777, 629, -230}, { 788, 615, -235}, { 798, 601, -240}, { 809, 587, -245}, { 819, 573, -250}, + { 829, 559, -255}, { 838, 544, -260}, { 848, 529, -265}, { 857, 515, -270}, { 866, 500, -275}, + { 874, 484, -280}, { 882, 469, -285}, { 891, 453, -290}, { 898, 438, -295}, { 906, 422, -300}, + { 913, 406, -305}, { 920, 390, -310}, { 927, 374, -315}, { 933, 358, -320}, { 939, 342, -325}, + { 945, 325, -330}, { 951, 309, -335}, { 956, 292, -340}, { 961, 275, -345}, { 965, 258, -350}, + { 970, 241, -355}, { 974, 224, -360}, { 978, 207, -365}, { 981, 190, -370}, { 984, 173, -375}, + { 987, 156, -380}, { 990, 139, -385}, { 992, 121, -390}, { 994, 104, -395}, { 996, 87, -400}, + { 997, 69, -405}, { 998, 52, -410}, { 999, 34, -415}, { 999, 17, -420}, { 1000, 0, -425}, + { 999, -17, -430}, { 999, -34, -435}, { 998, -52, -440}, { 997, -69, -445}, { 996, -87, -450}, + { 994, -104, -455}, { 992, -121, -460}, { 990, -139, -465}, { 987, -156, -470}, { 984, -173, -475}, + { 981, -190, -480}, { 978, -207, -485}, { 974, -224, -490}, { 970, -241, -495}, { 965, -258, -500}, + { 961, -275, -505}, { 956, -292, -510}, { 951, -309, -515}, { 945, -325, -520}, { 939, -342, -525}, + { 933, -358, -530}, { 927, -374, -535}, { 920, -390, -540}, { 913, -406, -545}, { 906, -422, -550}, + { 898, -438, -555}, { 891, -453, -560}, { 882, -469, -565}, { 874, -484, -570}, { 866, -499, -575}, + { 857, -515, -580}, { 848, -529, -585}, { 838, -544, -590}, { 829, -559, -595}, { 819, -573, -600}, + { 809, -587, -605}, { 798, -601, -610}, { 788, -615, -615}, { 777, -629, -620}, { 766, -642, -625}, + { 754, -656, -630}, { 743, -669, -635}, { 731, -681, -640}, { 719, -694, -645}, { 707, -707, -650}, + { 694, -719, -655}, { 681, -731, -660}, { 669, -743, -665}, { 656, -754, -670}, { 642, -766, -675}, + { 629, -777, -680}, { 615, -788, -685}, { 601, -798, -690}, { 587, -809, -695}, { 573, -819, -700}, + { 559, -829, -705}, { 544, -838, -710}, { 529, -848, -715}, { 515, -857, -720}, { 499, -866, -725}, + { 484, -874, -730}, { 469, -882, -735}, { 453, -891, -740}, { 438, -898, -745}, { 422, -906, -750}, + { 406, -913, -755}, { 390, -920, -760}, { 374, -927, -765}, { 358, -933, -770}, { 342, -939, -775}, + { 325, -945, -780}, { 309, -951, -785}, { 292, -956, -790}, { 275, -961, -795}, { 258, -965, -800}, + { 241, -970, -805}, { 224, -974, -810}, { 207, -978, -815}, { 190, -981, -820}, { 173, -984, -825}, + { 156, -987, -830}, { 139, -990, -835}, { 121, -992, -840}, { 104, -994, -845}, { 87, -996, -850}, + { 69, -997, -855}, { 52, -998, -860}, { 34, -999, -865}, { 17, -999, -870}, { 0, -1000, -875}, + { -17, -999, -880}, { -34, -999, -885}, { -52, -998, -890}, { -69, -997, -895}, { -87, -996, -900}, + { -104, -994, 895}, { -121, -992, 890}, { -139, -990, 885}, { -156, -987, 880}, { -173, -984, 875}, + { -190, -981, 870}, { -207, -978, 865}, { -224, -974, 860}, { -241, -970, 855}, { -258, -965, 850}, + { -275, -961, 845}, { -292, -956, 840}, { -309, -951, 835}, { -325, -945, 830}, { -342, -939, 825}, + { -358, -933, 820}, { -374, -927, 815}, { -390, -920, 810}, { -406, -913, 805}, { -422, -906, 800}, + { -438, -898, 795}, { -453, -891, 790}, { -469, -882, 785}, { -484, -874, 780}, { -500, -866, 775}, + { -515, -857, 770}, { -529, -848, 765}, { -544, -838, 760}, { -559, -829, 755}, { -573, -819, 750}, + { -587, -809, 745}, { -601, -798, 740}, { -615, -788, 735}, { -629, -777, 730}, { -642, -766, 725}, + { -656, -754, 720}, { -669, -743, 715}, { -681, -731, 710}, { -694, -719, 705}, { -707, -707, 700}, + { -719, -694, 695}, { -731, -681, 690}, { -743, -669, 685}, { -754, -656, 680}, { -766, -642, 675}, + { -777, -629, 670}, { -788, -615, 665}, { -798, -601, 660}, { -809, -587, 655}, { -819, -573, 650}, + { -829, -559, 645}, { -838, -544, 640}, { -848, -529, 635}, { -857, -515, 630}, { -866, -500, 625}, + { -874, -484, 620}, { -882, -469, 615}, { -891, -453, 610}, { -898, -438, 605}, { -906, -422, 600}, + { -913, -406, 595}, { -920, -390, 590}, { -927, -374, 585}, { -933, -358, 580}, { -939, -342, 575}, + { -945, -325, 570}, { -951, -309, 565}, { -956, -292, 560}, { -961, -275, 555}, { -965, -258, 550}, + { -970, -241, 545}, { -974, -224, 540}, { -978, -207, 535}, { -981, -190, 530}, { -984, -173, 525}, + { -987, -156, 520}, { -990, -139, 515}, { -992, -121, 510}, { -994, -104, 505}, { -996, -87, 500}, + { -997, -69, 495}, { -998, -52, 490}, { -999, -34, 485}, { -999, -17, 480}, { -1000, 0, 475}, + { -999, 17, 470}, { -999, 34, 465}, { -998, 52, 460}, { -997, 69, 455}, { -996, 87, 450}, + { -994, 104, 445}, { -992, 121, 440}, { -990, 139, 435}, { -987, 156, 430}, { -984, 173, 425}, + { -981, 190, 420}, { -978, 207, 415}, { -974, 224, 410}, { -970, 241, 405}, { -965, 258, 400}, + { -961, 275, 395}, { -956, 292, 390}, { -951, 309, 385}, { -945, 325, 380}, { -939, 342, 375}, + { -933, 358, 370}, { -927, 374, 365}, { -920, 390, 360}, { -913, 406, 355}, { -906, 422, 350}, + { -898, 438, 345}, { -891, 453, 340}, { -882, 469, 335}, { -874, 484, 330}, { -866, 500, 325}, + { -857, 515, 320}, { -848, 529, 315}, { -838, 544, 310}, { -829, 559, 305}, { -819, 573, 300}, + { -809, 587, 295}, { -798, 601, 290}, { -788, 615, 285}, { -777, 629, 280}, { -766, 642, 275}, + { -754, 656, 270}, { -743, 669, 265}, { -731, 681, 260}, { -719, 694, 255}, { -707, 707, 250}, + { -694, 719, 245}, { -681, 731, 240}, { -669, 743, 235}, { -656, 754, 230}, { -642, 766, 225}, + { -629, 777, 220}, { -615, 788, 215}, { -601, 798, 210}, { -587, 809, 205}, { -573, 819, 200}, + { -559, 829, 195}, { -544, 838, 190}, { -529, 848, 185}, { -515, 857, 180}, { -500, 866, 175}, + { -484, 874, 170}, { -469, 882, 165}, { -453, 891, 160}, { -438, 898, 155}, { -422, 906, 150}, + { -406, 913, 145}, { -390, 920, 140}, { -374, 927, 135}, { -358, 933, 130}, { -342, 939, 125}, + { -325, 945, 120}, { -309, 951, 115}, { -292, 956, 110}, { -275, 961, 105}, { -258, 965, 100}, + { -241, 970, 95}, { -224, 974, 90}, { -207, 978, 85}, { -190, 981, 80}, { -173, 984, 75}, + { -156, 987, 70}, { -139, 990, 65}, { -121, 992, 60}, { -104, 994, 55}, { -87, 996, 50}, + { -69, 997, 45}, { -52, 998, 40}, { -34, 999, 35}, { -17, 999, 30}, + }; + int i; + + for (i = 0; i < ARRAY_SIZE(rotation_table); i++) + { + int rotation; + int x, y; + x = rotation_table[i][0]; + y = rotation_table[i][1]; + rotation = wcmTilt2R(x, y, INTUOS4_CURSOR_ROTATION_OFFSET); + assert(rotation == rotation_table[i][2]); + } +} + + +static void +test_mod_buttons(void) +{ + int i; + for (i = 0; i < sizeof(int) * 8; i++) + { + int buttons = mod_buttons(0, i, 1); + assert(buttons == (1 << i)); + buttons = mod_buttons(0, i, 0); + assert(buttons == 0); + } + + assert(mod_buttons(0, sizeof(int) * 8, 1) == 0); +} + +static void test_set_type(void) +{ + InputInfoRec info = {0}; + WacomDeviceRec priv = {0}; + WacomTool tool = {0}; + WacomCommonRec common = {0}; + int rc; + +#define reset(_info, _priv, _tool, _common) \ + memset(&(_info), 0, sizeof(_info)); \ + memset(&(_priv), 0, sizeof(_priv)); \ + memset(&(_tool), 0, sizeof(_tool)); \ + (_info).private = &(_priv); \ + (_priv).tool = &(_tool); \ + (_priv).common = &(_common); + + + reset(info, priv, tool, common); + rc = wcmSetType(&info, NULL); + assert(rc == 0); + + reset(info, priv, tool, common); + rc = wcmSetType(&info, "stylus"); + assert(rc == 1); + assert(is_absolute(&info)); + assert(IsStylus(&priv)); + assert(!IsTouch(&priv)); + assert(!IsEraser(&priv)); + assert(!IsCursor(&priv)); + assert(!IsPad(&priv)); + + reset(info, priv, tool, common); + rc = wcmSetType(&info, "touch"); + assert(rc == 1); + /* only some touch screens are absolute */ + assert(!is_absolute(&info)); + assert(!IsStylus(&priv)); + assert(IsTouch(&priv)); + assert(!IsEraser(&priv)); + assert(!IsCursor(&priv)); + assert(!IsPad(&priv)); + + reset(info, priv, tool, common); + rc = wcmSetType(&info, "eraser"); + assert(rc == 1); + assert(is_absolute(&info)); + assert(!IsStylus(&priv)); + assert(!IsTouch(&priv)); + assert(IsEraser(&priv)); + assert(!IsCursor(&priv)); + assert(!IsPad(&priv)); + + reset(info, priv, tool, common); + rc = wcmSetType(&info, "cursor"); + assert(rc == 1); + assert(!is_absolute(&info)); + assert(!IsStylus(&priv)); + assert(!IsTouch(&priv)); + assert(!IsEraser(&priv)); + assert(IsCursor(&priv)); + assert(!IsPad(&priv)); + + reset(info, priv, tool, common); + rc = wcmSetType(&info, "pad"); + assert(rc == 1); + assert(is_absolute(&info)); + assert(!IsStylus(&priv)); + assert(!IsTouch(&priv)); + assert(!IsEraser(&priv)); + assert(!IsCursor(&priv)); + assert(IsPad(&priv)); + + reset(info, priv, tool, common); + rc = wcmSetType(&info, "foobar"); + assert(rc == 0); + +#undef reset } int main(int argc, char** argv) { - g_test_init(&argc, &argv, NULL); - g_test_add_func("/common/refcounting", test_common_ref); - g_test_add_func("/common/rebase_pressure", test_rebase_pressure); - g_test_add_func("/common/normalize_pressure", test_normalize_pressure); - return g_test_run(); + test_common_ref(); + test_rebase_pressure(); + test_normalize_pressure(); + test_suppress(); + test_initial_size(); + test_tilt_to_rotation(); + test_mod_buttons(); + test_set_type(); + return 0; } + +/* vim: set noexpandtab tabstop=8 shiftwidth=8: */ diff -Nru xf86-input-wacom-0.10.11/tools/isdv4-serial-debugger.c xf86-input-wacom-0.11.0/tools/isdv4-serial-debugger.c --- xf86-input-wacom-0.10.11/tools/isdv4-serial-debugger.c 2011-01-30 23:10:30.000000000 +0000 +++ xf86-input-wacom-0.11.0/tools/isdv4-serial-debugger.c 2011-04-14 04:06:47.000000000 +0000 @@ -138,6 +138,10 @@ } rc = tcgetattr(fd, &t); + + if (rc) + return rc; + cfsetispeed(&t, baud); cfsetospeed(&t, baud); diff -Nru xf86-input-wacom-0.10.11/tools/Makefile.am xf86-input-wacom-0.11.0/tools/Makefile.am --- xf86-input-wacom-0.10.11/tools/Makefile.am 2011-02-15 00:56:57.000000000 +0000 +++ xf86-input-wacom-0.11.0/tools/Makefile.am 2011-04-07 05:22:34.000000000 +0000 @@ -23,3 +23,12 @@ AM_CPPFLAGS = -I$(top_srcdir)/include AM_CFLAGS = $(XORG_CFLAGS) $(X11_CFLAGS) AM_LDFLAGS = $(X11_LIBS) + + +if UNITTESTS +check_PROGRAMS = xsetwacom-test +xsetwacom_test_SOURCES=xsetwacom.c +xsetwacom_test_CFLAGS=-DBUILD_TEST $(X11_CFLAGS) + +TESTS=$(check_PROGRAMS) +endif diff -Nru xf86-input-wacom-0.10.11/tools/Makefile.in xf86-input-wacom-0.11.0/tools/Makefile.in --- xf86-input-wacom-0.10.11/tools/Makefile.in 2011-02-16 04:26:35.000000000 +0000 +++ xf86-input-wacom-0.11.0/tools/Makefile.in 2011-04-19 04:07:03.000000000 +0000 @@ -55,6 +55,7 @@ build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = xsetwacom$(EXEEXT) isdv4-serial-debugger$(EXEEXT) +@UNITTESTS_TRUE@check_PROGRAMS = xsetwacom-test$(EXEEXT) subdir = tools DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -76,6 +77,15 @@ xsetwacom_SOURCES = xsetwacom.c xsetwacom_OBJECTS = xsetwacom.$(OBJEXT) xsetwacom_LDADD = $(LDADD) +am__xsetwacom_test_SOURCES_DIST = xsetwacom.c +@UNITTESTS_TRUE@am_xsetwacom_test_OBJECTS = \ +@UNITTESTS_TRUE@ xsetwacom_test-xsetwacom.$(OBJEXT) +xsetwacom_test_OBJECTS = $(am_xsetwacom_test_OBJECTS) +xsetwacom_test_LDADD = $(LDADD) +xsetwacom_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(xsetwacom_test_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o \ + $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @@ -102,10 +112,14 @@ AM_V_GEN = $(am__v_GEN_$(V)) am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) am__v_GEN_0 = @echo " GEN " $@; -SOURCES = isdv4-serial-debugger.c xsetwacom.c -DIST_SOURCES = isdv4-serial-debugger.c xsetwacom.c +SOURCES = isdv4-serial-debugger.c xsetwacom.c \ + $(xsetwacom_test_SOURCES) +DIST_SOURCES = isdv4-serial-debugger.c xsetwacom.c \ + $(am__xsetwacom_test_SOURCES_DIST) ETAGS = etags CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ @@ -129,6 +143,7 @@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DOXYGEN = @DOXYGEN@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRIVER_NAME = @DRIVER_NAME@ @@ -142,8 +157,6 @@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ -GLIB_CFLAGS = @GLIB_CFLAGS@ -GLIB_LIBS = @GLIB_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ @@ -189,6 +202,8 @@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ +UDEV_CFLAGS = @UDEV_CFLAGS@ +UDEV_LIBS = @UDEV_LIBS@ VERSION = @VERSION@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ @@ -252,6 +267,9 @@ AM_CPPFLAGS = -I$(top_srcdir)/include AM_CFLAGS = $(XORG_CFLAGS) $(X11_CFLAGS) AM_LDFLAGS = $(X11_LIBS) +@UNITTESTS_TRUE@xsetwacom_test_SOURCES = xsetwacom.c +@UNITTESTS_TRUE@xsetwacom_test_CFLAGS = -DBUILD_TEST $(X11_CFLAGS) +@UNITTESTS_TRUE@TESTS = $(check_PROGRAMS) all: all-am .SUFFIXES: @@ -329,12 +347,24 @@ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list isdv4-serial-debugger$(EXEEXT): $(isdv4_serial_debugger_OBJECTS) $(isdv4_serial_debugger_DEPENDENCIES) @rm -f isdv4-serial-debugger$(EXEEXT) $(AM_V_CCLD)$(LINK) $(isdv4_serial_debugger_OBJECTS) $(isdv4_serial_debugger_LDADD) $(LIBS) xsetwacom$(EXEEXT): $(xsetwacom_OBJECTS) $(xsetwacom_DEPENDENCIES) @rm -f xsetwacom$(EXEEXT) $(AM_V_CCLD)$(LINK) $(xsetwacom_OBJECTS) $(xsetwacom_LDADD) $(LIBS) +xsetwacom-test$(EXEEXT): $(xsetwacom_test_OBJECTS) $(xsetwacom_test_DEPENDENCIES) + @rm -f xsetwacom-test$(EXEEXT) + $(AM_V_CCLD)$(xsetwacom_test_LINK) $(xsetwacom_test_OBJECTS) $(xsetwacom_test_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -344,6 +374,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isdv4-serial-debugger.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xsetwacom.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xsetwacom_test-xsetwacom.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -369,6 +400,22 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< +xsetwacom_test-xsetwacom.o: xsetwacom.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xsetwacom_test_CFLAGS) $(CFLAGS) -MT xsetwacom_test-xsetwacom.o -MD -MP -MF $(DEPDIR)/xsetwacom_test-xsetwacom.Tpo -c -o xsetwacom_test-xsetwacom.o `test -f 'xsetwacom.c' || echo '$(srcdir)/'`xsetwacom.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xsetwacom_test-xsetwacom.Tpo $(DEPDIR)/xsetwacom_test-xsetwacom.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='xsetwacom.c' object='xsetwacom_test-xsetwacom.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xsetwacom_test_CFLAGS) $(CFLAGS) -c -o xsetwacom_test-xsetwacom.o `test -f 'xsetwacom.c' || echo '$(srcdir)/'`xsetwacom.c + +xsetwacom_test-xsetwacom.obj: xsetwacom.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xsetwacom_test_CFLAGS) $(CFLAGS) -MT xsetwacom_test-xsetwacom.obj -MD -MP -MF $(DEPDIR)/xsetwacom_test-xsetwacom.Tpo -c -o xsetwacom_test-xsetwacom.obj `if test -f 'xsetwacom.c'; then $(CYGPATH_W) 'xsetwacom.c'; else $(CYGPATH_W) '$(srcdir)/xsetwacom.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xsetwacom_test-xsetwacom.Tpo $(DEPDIR)/xsetwacom_test-xsetwacom.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='xsetwacom.c' object='xsetwacom_test-xsetwacom.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xsetwacom_test_CFLAGS) $(CFLAGS) -c -o xsetwacom_test-xsetwacom.obj `if test -f 'xsetwacom.c'; then $(CYGPATH_W) 'xsetwacom.c'; else $(CYGPATH_W) '$(srcdir)/xsetwacom.c'; fi` + mostlyclean-libtool: -rm -f *.lo @@ -427,6 +474,98 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ @@ -458,6 +597,8 @@ fi; \ done check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile $(PROGRAMS) installdirs: @@ -491,7 +632,8 @@ @echo "it deletes files that may require special tools to rebuild." clean: clean-am -clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am +clean-am: clean-binPROGRAMS clean-checkPROGRAMS clean-generic \ + clean-libtool mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) @@ -559,10 +701,11 @@ uninstall-am: uninstall-binPROGRAMS -.MAKE: install-am install-strip +.MAKE: check-am install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ - clean-generic clean-libtool ctags distclean distclean-compile \ +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-binPROGRAMS clean-checkPROGRAMS clean-generic \ + clean-libtool ctags distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-binPROGRAMS install-data install-data-am install-dvi \ diff -Nru xf86-input-wacom-0.10.11/tools/xsetwacom.c xf86-input-wacom-0.11.0/tools/xsetwacom.c --- xf86-input-wacom-0.10.11/tools/xsetwacom.c 2011-02-15 04:27:40.000000000 +0000 +++ xf86-input-wacom-0.11.0/tools/xsetwacom.c 2011-04-14 04:06:47.000000000 +0000 @@ -24,6 +24,8 @@ #include #include "Xwacom.h" +#include +#include #include #include #include @@ -53,7 +55,8 @@ enum prop_flags { PROP_FLAG_BOOLEAN = 1, PROP_FLAG_READONLY = 2, - PROP_FLAG_WRITEONLY = 4 + PROP_FLAG_WRITEONLY = 4, + PROP_FLAG_INVERTED = 8, /* only valid with PROP_FLAG_BOOLEAN */ }; @@ -84,7 +87,7 @@ const char *prop_name; /* property name */ const int prop_format; /* property format */ const int prop_offset; /* offset (index) into the property values */ - const int prop_extra; /* extra number of items after first one */ + const int arg_count; /* extra number of items after first one */ const unsigned int prop_flags; void (*set_func)(Display *dpy, XDevice *dev, struct _param *param, int argc, char **argv); /* handler function, if appropriate */ void (*get_func)(Display *dpy, XDevice *dev, struct _param *param, int argc, char **argv); /* handler function for getting, if appropriate */ @@ -96,11 +99,10 @@ /* get_func/set_func calls for special parameters */ -static void map_button(Display *dpy, XDevice *dev, param_t *param, int argc, char **argv); -static void map_wheels(Display *dpy, XDevice *dev, param_t* param, int argc, char **argv); +static void map_actions(Display *dpy, XDevice *dev, param_t *param, int argc, char **argv); static void set_mode(Display *dpy, XDevice *dev, param_t *param, int argc, char **argv); static void get_mode(Display *dpy, XDevice *dev, param_t *param, int argc, char **argv); -static void get_button(Display *dpy, XDevice *dev, param_t *param, int argc, char **argv); +static void get_map(Display *dpy, XDevice *dev, param_t *param, int argc, char **argv); static void set_rotate(Display *dpy, XDevice *dev, param_t *param, int argc, char **argv); static void get_rotate(Display *dpy, XDevice *dev, param_t *param, int argc, char **argv); static void set_xydefault(Display *dpy, XDevice *dev, param_t *param, int argc, char **argv); @@ -115,89 +117,99 @@ { { .name = "Area", - .desc = "Valid tablet area in device coordinates.", + .desc = "Valid tablet area in device coordinates. ", .prop_name = WACOM_PROP_TABLET_AREA, .prop_format = 32, .prop_offset = 0, - .prop_extra = 3 + .arg_count = 4, }, { .name = "Button", .desc = "X11 event to which the given button should be mapped. ", - .set_func = map_button, - .get_func = get_button, + .prop_name = WACOM_PROP_BUTTON_ACTIONS, + .arg_count = 1, + .set_func = map_actions, + .get_func = get_map, }, { .name = "ToolDebugLevel", - .desc = "Level of debugging trace for individual tools, " - "default is 0 (off). ", + .desc = "Level of debugging trace for individual tools " + "(default is 0 [off]). ", .prop_name = WACOM_PROP_DEBUGLEVELS, .prop_format = 8, .prop_offset = 0, + .arg_count = 1, }, { .name = "TabletDebugLevel", .desc = "Level of debugging statements applied to shared " "code paths between all tools " - "associated with the same tablet. default is 0 (off). ", + "associated with the same tablet (default is 0 [off]). ", .prop_name = WACOM_PROP_DEBUGLEVELS, .prop_format = 8, .prop_offset = 1, + .arg_count = 1, }, { .name = "Suppress", - .desc = "Number of points trimmed, default is 2. ", + .desc = "Number of points trimmed (default is 2). ", .prop_name = WACOM_PROP_SAMPLE, .prop_format = 32, - .prop_offset = 1, + .prop_offset = 0, + .arg_count = 1, }, { .name = "RawSample", - .desc = "Number of raw data used to filter the points, " - "default is 4. ", + .desc = "Number of raw data used to filter the points " + "(default is 4). ", .prop_name = WACOM_PROP_SAMPLE, .prop_format = 32, - .prop_offset = 0, + .prop_offset = 1, + .arg_count = 1, }, { .name = "PressureCurve", - .desc = "Bezier curve for pressure (default is 0 0 100 100). ", + .desc = "Bezier curve for pressure (default is 0 0 100 100 [linear]). ", .prop_name = WACOM_PROP_PRESSURECURVE, .prop_format = 32, .prop_offset = 0, - .prop_extra = 3, + .arg_count = 4, }, { .name = "Mode", - .desc = "Switches cursor movement mode (default is absolute/on). ", + .desc = "Switches cursor movement mode (default is absolute). ", + .arg_count = 1, .set_func = set_mode, .get_func = get_mode, }, { .name = "TabletPCButton", - .desc = "Turns on/off Tablet PC buttons. " - "default is off for regular tablets, " - "on for Tablet PC. ", + .desc = "Turns on/off Tablet PC buttons " + "(default is off for regular tablets, " + "on for Tablet PC). ", .prop_name = WACOM_PROP_HOVER, .prop_format = 8, .prop_offset = 0, - .prop_flags = PROP_FLAG_BOOLEAN + .arg_count = 1, + .prop_flags = PROP_FLAG_BOOLEAN | PROP_FLAG_INVERTED }, { .name = "Touch", - .desc = "Turns on/off Touch events (default is enable/on). ", + .desc = "Turns on/off Touch events (default is on). ", .prop_name = WACOM_PROP_TOUCH, .prop_format = 8, .prop_offset = 0, + .arg_count = 1, .prop_flags = PROP_FLAG_BOOLEAN }, { .name = "Gesture", .desc = "Turns on/off multi-touch gesture events " - "(default is enable/on). ", + "(default is on). ", .prop_name = WACOM_PROP_ENABLE_GESTURE, .prop_format = 8, .prop_offset = 0, + .arg_count = 1, .prop_flags = PROP_FLAG_BOOLEAN }, { @@ -207,6 +219,7 @@ .prop_name = WACOM_PROP_GESTURE_PARAMETERS, .prop_format = 32, .prop_offset = 0, + .arg_count = 1, }, { .name = "ScrollDistance", @@ -215,6 +228,7 @@ .prop_name = WACOM_PROP_GESTURE_PARAMETERS, .prop_format = 32, .prop_offset = 1, + .arg_count = 1, }, { .name = "TapTime", @@ -223,32 +237,36 @@ .prop_name = WACOM_PROP_GESTURE_PARAMETERS, .prop_format = 32, .prop_offset = 2, + .arg_count = 1, }, { .name = "Capacity", - .desc = "Touch sensitivity level (default is 3, " - "-1 for non-capacitive tools).", + .desc = "Touch sensitivity level (default is 3 for capacitive tools, " + "-1 for others). ", .prop_name = WACOM_PROP_CAPACITY, .prop_format = 32, .prop_offset = 0, + .arg_count = 1, }, { .name = "CursorProximity", .desc = "Sets cursor distance for proximity-out " - "in distance from the tablet. " + "in distance from the tablet " "(default is 10 for Intuos series, " - "42 for Graphire series).", + "42 for Graphire series). ", .prop_name = WACOM_PROP_PROXIMITY_THRESHOLD, .prop_format = 32, .prop_offset = 0, + .arg_count = 1, }, { .name = "Rotate", .desc = "Sets the rotation of the tablet. " - "Values = none, cw, ccw, half (default is none).", + "Values = none, cw, ccw, half (default is none). ", .prop_name = WACOM_PROP_ROTATION, .set_func = set_rotate, .get_func = get_rotate, + .arg_count = 1, }, { .name = "RelWheelUp", @@ -256,7 +274,9 @@ .prop_name = WACOM_PROP_WHEELBUTTONS, .prop_format = 8, .prop_offset = 0, - .set_func = map_wheels, + .arg_count = 0, + .set_func = map_actions, + .get_func = get_map, }, { .name = "RelWheelDown", @@ -264,7 +284,9 @@ .prop_name = WACOM_PROP_WHEELBUTTONS, .prop_format = 8, .prop_offset = 1, - .set_func = map_wheels, + .arg_count = 0, + .set_func = map_actions, + .get_func = get_map, }, { .name = "AbsWheelUp", @@ -272,7 +294,9 @@ .prop_name = WACOM_PROP_WHEELBUTTONS, .prop_format = 8, .prop_offset = 2, - .set_func = map_wheels, + .arg_count = 0, + .set_func = map_actions, + .get_func = get_map, }, { .name = "AbsWheelDown", @@ -280,7 +304,9 @@ .prop_name = WACOM_PROP_WHEELBUTTONS, .prop_format = 8, .prop_offset = 3, - .set_func = map_wheels, + .arg_count = 0, + .set_func = map_actions, + .get_func = get_map, }, { .name = "StripLeftUp", @@ -288,7 +314,9 @@ .prop_name = WACOM_PROP_STRIPBUTTONS, .prop_format = 8, .prop_offset = 0, - .set_func = map_wheels, + .arg_count = 0, + .set_func = map_actions, + .get_func = get_map, }, { .name = "StripLeftDown", @@ -296,7 +324,9 @@ .prop_name = WACOM_PROP_STRIPBUTTONS, .prop_format = 8, .prop_offset = 1, - .set_func = map_wheels, + .arg_count = 0, + .set_func = map_actions, + .get_func = get_map, }, { .name = "StripRightUp", @@ -304,7 +334,9 @@ .prop_name = WACOM_PROP_STRIPBUTTONS, .prop_format = 8, .prop_offset = 2, - .set_func = map_wheels, + .arg_count = 0, + .set_func = map_actions, + .get_func = get_map, }, { .name = "StripRightDown", @@ -312,24 +344,18 @@ .prop_name = WACOM_PROP_STRIPBUTTONS, .prop_format = 8, .prop_offset = 3, - .set_func = map_wheels, - }, - { - .name = "RawFilter", - .desc = "Enables and disables filtering of raw data, " - "default is true/on.", - .prop_name = WACOM_PROP_SAMPLE, - .prop_format = 8, - .prop_offset = 0, - .prop_flags = PROP_FLAG_BOOLEAN + .arg_count = 0, + .set_func = map_actions, + .get_func = get_map, }, { .name = "Threshold", .desc = "Sets tip/eraser pressure threshold " - "(default is 27)", + "(default is 27). ", .prop_name = WACOM_PROP_PRESSURE_THRESHOLD, .prop_format = 32, .prop_offset = 0, + .arg_count = 1, }, { .name = "ResetArea", @@ -337,6 +363,7 @@ .prop_name = WACOM_PROP_TABLET_AREA, .prop_format = 32, .prop_offset = 0, + .arg_count = 0, .prop_flags = PROP_FLAG_WRITEONLY, .set_func = set_xydefault, }, @@ -368,11 +395,12 @@ .name = "MapToOutput", .desc = "Map the device to the given output. ", .set_func = set_output, + .arg_count = 1, .prop_flags = PROP_FLAG_WRITEONLY }, { .name = "all", - .desc = "Get value for all parameters.", + .desc = "Get value for all parameters. ", .get_func = get_all, .prop_flags = PROP_FLAG_READONLY, }, @@ -402,6 +430,7 @@ {"CursorProx", "CursorProximity"}, {"xyDefault", "ResetArea"}, {"ClickForce", "Threshold"}, + {"RawFilter", NULL}, {NULL, NULL} }; @@ -427,8 +456,13 @@ } if (is_deprecated) - printf("Paramater '%s' is no longer in use. " - "It was replaced with '%s'.\n", name, d->replacement); + { + printf("Parameter '%s' is no longer in use. ", name); + if (d->replacement != NULL) + printf("It was replaced with '%s'.\n", d->replacement); + else + printf("Its use has been deprecated.\n"); + } return is_deprecated; @@ -492,6 +526,8 @@ {"tab", "Tab"}, + {"PgUp", "Prior"}, {"PgDn", "Next"}, + { NULL, NULL } }; @@ -539,7 +575,7 @@ " -h, --help - usage\n" " -v, --verbose - verbose output\n" " -V, --version - version info\n" - " -d, --display \"display\" - override default display\n" + " -d, --display \"display\" - override default display\n" " -s, --shell - generate shell commands for 'get'\n" " -x, --xconf - generate xorg.conf lines for 'get'\n"); @@ -762,55 +798,48 @@ else printf("unknown argument to list.\n"); } -/* + +/** * Convert a list of random special keys to strings that can be passed into * XStringToKeysym + * @param special A special key, e.g. a modifier or one of the keys in + * specialkeys. + * @return The X Keysym representing specialkey. */ -static char *convert_specialkey(const char *modifier) +static char *convert_specialkey(const char *specialkey) { struct modifier *m = modifiers; - while(m->name && strcasecmp(modifier, m->name)) + while(m->name && strcasecmp(specialkey, m->name)) m++; if (!m->name) { m = specialkeys; - while(m->name && strcasecmp(modifier, m->name)) + while(m->name && strcasecmp(specialkey, m->name)) m++; } - return m->converted ? m->converted : (char*)modifier; + return m->converted ? m->converted : (char*)specialkey; } -static int is_modifier(const char* modifier) +/** + * @param keysym An X Keysym + * @return nonzero if the given keysym is a modifier (as per the modifiers + * list) or zero otherwise. + */ +static int is_modifier(const char* keysym) { - const char *modifiers[] = { - "Control_L", - "Control_R", - "Alt_L", - "Alt_R", - "Shift_L", - "Shift_R", - "Meta_L", - "Meta_R", - "Super_L", - "Super_R", - "Hyper_L", - "Hyper_R", - NULL, - }; - - const char **m = modifiers; + struct modifier *m = modifiers; - while(*m) + while(m->name) { - if (strcmp(modifier, *m) == 0) - return 1; + if (strcmp(keysym, m->converted) == 0) + break; m++; } - return 0; + return (m->name != NULL); } static int special_map_keystrokes(Display *dpy, int argc, char **argv, unsigned long *ndata, unsigned long* data); @@ -932,14 +961,12 @@ { static XkbDescPtr xkb = NULL; XkbStateRec state; - int group; int kc = 0; if (!xkb) xkb = XkbGetKeyboard(dpy, XkbAllComponentsMask, XkbUseCoreKbd); XkbGetState(dpy, XkbUseCoreKbd, &state); - group = state.group; for (kc = xkb->min_key_code; kc <= xkb->max_key_code; kc++) { @@ -1065,120 +1092,52 @@ return words; } -static const char *wheel_act_prop[] = { - "Wacom Rel Wheel Up Action", - "Wacom Rel Wheel Down Action", - "Wacom Abs Wheel Up Action", - "Wacom Abs Wheel Down Action", -}; - /** - * Convert the given property from an 8 bit integer property into an action - * atom property. In the default case, this means that a property with - * values "4 5 4 5" ends up to have the values - * "Wacom RHU Action" "Wacom RHW Action" "Wacom AWU Action" "Wacom AWD - * Action" - * with each of the properties having : - * AC_BUTTON | AC_KEYBTNPRESS | 4 (or 5) - * AC_BUTTON | 4 (or 5) + * This function parses the given strings to produce a list of actions that + * the driver can carry out. We first combine the strings and then split + * on spaces to produce a wordlist. Begining with the first word, we let each + * registered keyword parser try to parse the string; if one succeeds in + * parsing a portion, we jump ahead to the first word it could not parse + * and repeat the process. Each parser builds up the list of actions with + * those commands it can interpret. * - * return 0 on success or 1 on failure. + * @param dpy X11 display to query + * @param argc Length of argv + * @param argv String data to be parsed + * @param data Parsed action data + * @return 'true' if the whole string was parsed sucessfully, else 'false' */ -static int convert_wheel_prop(Display *dpy, XDevice *dev, Atom btnact_prop) -{ - int i; - Atom type; - int format; - unsigned long btnact_nitems, bytes_after; - unsigned char *btnact_data; /* current values (button mappings) */ - unsigned long *btnact_new_data; /* new values (action atoms) */ - - XGetDeviceProperty(dpy, dev, btnact_prop, 0, 100, False, - AnyPropertyType, &type, &format, &btnact_nitems, - &bytes_after, (unsigned char**)&btnact_data); - - btnact_new_data = calloc(btnact_nitems, sizeof(Atom)); - if (!btnact_new_data) - return 1; - - for (i = 0; i < btnact_nitems; i++) { - unsigned long action_data[2]; - Atom prop = XInternAtom(dpy, wheel_act_prop[i], False); - - action_data[0] = AC_BUTTON | AC_KEYBTNPRESS | btnact_data[i]; - action_data[1] = AC_BUTTON | btnact_data[i]; - - XChangeDeviceProperty(dpy, dev, prop, XA_INTEGER, 32, - PropModeReplace, - (unsigned char*)action_data, 2); - - btnact_new_data[i] = prop; - } - - XChangeDeviceProperty(dpy, dev, btnact_prop, XA_ATOM, 32, - PropModeReplace, - (unsigned char*)btnact_new_data, btnact_nitems); - return 0; -} - - -static void special_map_property(Display *dpy, XDevice *dev, Atom btnact_prop, int offset, int argc, char **argv) +static Bool parse_actions(Display *dpy, int argc, char **argv, unsigned long* data, unsigned long *nitems) { - unsigned long *data, *btnact_data; - Atom type, prop = 0; - int format; - unsigned long btnact_nitems, nitems, bytes_after; - int need_update = 0; - int i; - int nwords = 0; + int i = 0; + int nwords = 0; char **words = NULL; - XGetDeviceProperty(dpy, dev, btnact_prop, 0, 100, False, - AnyPropertyType, &type, &format, &btnact_nitems, - &bytes_after, (unsigned char**)&btnact_data); - - if (offset > btnact_nitems) - return; - - /* Prop is currently 8 bit integer, i.e. plain button - * mappings. Convert to 32 bit Atom actions first. - */ - if (format == 8 && type == XA_INTEGER) - { - if (convert_wheel_prop(dpy, dev, btnact_prop)) - return; + /* translate cmdline commands */ + words = strjoinsplit(argc, argv, &nwords); - XGetDeviceProperty(dpy, dev, btnact_prop, 0, 100, False, - AnyPropertyType, &type, &format, - &btnact_nitems, &bytes_after, - (unsigned char**)&btnact_data); - } + if (nwords==1 && sscanf(words[0], "%d", &i) == 1) + { /* Mangle "simple" button maps into proper actions */ + char **new_words = realloc(words, 2); + if (new_words == NULL) + { + fprintf(stderr, "Unable to reallocate memory.\n"); + return False; + } - if (argc == 0) /* unset property */ - { - prop = btnact_data[offset]; - btnact_data[offset] = 0; - } else if (btnact_data[offset]) - /* some atom already assigned, modify that */ - prop = btnact_data[offset]; - else - { - char buff[64]; - sprintf(buff, "Wacom button action %d", (offset + 1)); - prop = XInternAtom(dpy, buff, False); + sprintf(new_words[0], "+%d", i); + new_words[1] = new_words[0]; + new_words[0] = "button"; - btnact_data[offset] = prop; - need_update = 1; + words = new_words; + nwords = 2; } - data = calloc(sizeof(long), 256); - nitems = 0; - - /* translate cmdline commands */ - words = strjoinsplit(argc, argv, &nwords); for (i = 0; i < nwords; i++) { int j = 0; + int keyword_found = 0; + while (keywords[j].keyword && i < nwords) { int parsed = 0; @@ -1186,123 +1145,164 @@ { parsed = keywords[j].func(dpy, nwords - i - 1, &words[i + 1], - &nitems, data); + nitems, data); i += parsed; + keyword_found = 1; } if (parsed) j = parsed = 0; /* restart with first keyword */ else j++; } - } - - if (argc > 0) /* unset property */ - XChangeDeviceProperty(dpy, dev, prop, XA_INTEGER, 32, - PropModeReplace, - (unsigned char*)data, nitems); - XChangeDeviceProperty(dpy, dev, btnact_prop, XA_ATOM, 32, - PropModeReplace, - (unsigned char*)btnact_data, - btnact_nitems); + if (!keyword_found) + { + fprintf(stderr, "Cannot parse keyword '%s' at position %d\n", words[i], i+1); + return False; + } + } - if (argc == 0 && prop) - XDeleteDeviceProperty(dpy, dev, prop); + free(words); - XFlush(dpy); + return True; } - -static void special_map_wheels(Display *dpy, XDevice *dev, param_t* param, int argc, char **argv) +/** + * Maps sub-properties (e.g. the 3rd button in WACOM_PROP_BUTTON_ACTIONS) + * to actions. This function leverages the several available parsing + * functions to convert plain-text descriptions into a list of actions + * the driver can understand. + * + * Once we have a list of actions, we can store it in the appropriate + * child property. If none exists, we must first create one and update + * the parent list. If we want no action to occur, we can delete the + * child property and have the parent point to '0' instead. + * + * @param dpy X display we want to query + * @param dev X device we want to modify + * @param btnact_prop Parent property + * @param offset Offset into the parent's list of child properties + * @param argc Number of command line arguments we've been passed + * @param argv Command line arguments we need to parse + */ +static void special_map_property(Display *dpy, XDevice *dev, Atom btnact_prop, int offset, int argc, char **argv) { - Atom wheel_prop; + unsigned long *data, *btnact_data; + Atom type, prop = 0; + int format; + unsigned long btnact_nitems, bytes_after; + unsigned long nitems = 0; - wheel_prop = XInternAtom(dpy, param->prop_name, True); - if (!wheel_prop) + data = calloc(256, sizeof(long)); + if (!parse_actions(dpy, argc, argv, data, &nitems)) return; - TRACE("Wheel property %s (%ld)\n", param->prop_name, wheel_prop); - - special_map_property(dpy, dev, wheel_prop, param->prop_offset, argc, argv); -} + /* obtain the button actions Atom */ + XGetDeviceProperty(dpy, dev, btnact_prop, 0, 100, False, + AnyPropertyType, &type, &format, &btnact_nitems, + &bytes_after, (unsigned char**)&btnact_data); -static void map_wheels(Display *dpy, XDevice *dev, param_t* param, int argc, char **argv) -{ - if (argc <= 0) + if (offset > btnact_nitems) + { + fprintf(stderr, "Invalid offset into %s property.\n", XGetAtomName(dpy, btnact_prop)); return; + } - TRACE("Mapping wheel %s for device %ld.\n", param->name, dev->device_id); - - /* FIXME: - if value is simple number, change back to 8 bit integer - */ + if (format != 32 || type != XA_ATOM) + { + fprintf(stderr, "Property '%s' in an unexpected format. This is a bug.\n", + XGetAtomName(dpy, btnact_prop)); + return; + } - special_map_wheels(dpy, dev, param, argc, argv); -} + /* set or unset the property */ + prop = btnact_data[offset]; + if (nitems > 0) + { /* Setting a new or existing property */ + if (!prop) + { + char buff[64]; + sprintf(buff, "Wacom button action %d", (offset + 1)); + prop = XInternAtom(dpy, buff, False); + btnact_data[offset] = prop; + } -/* Handles complex button mappings through button actions. */ -static void special_map_buttons(Display *dpy, XDevice *dev, param_t* param, - int button, int argc, char **argv) -{ - Atom btnact_prop; + /* FIXME: the property containing the key sequence must be + * set before updating the button action properties */ + XChangeDeviceProperty(dpy, dev, prop, XA_INTEGER, 32, + PropModeReplace, + (unsigned char*)data, nitems); - TRACE("Special %s map for device %ld.\n", param->name, dev->device_id); + XChangeDeviceProperty(dpy, dev, btnact_prop, XA_ATOM, 32, + PropModeReplace, + (unsigned char*)btnact_data, + btnact_nitems); + } + else if (prop) + { /* Unsetting a property that exists */ + btnact_data[offset] = 0; - btnact_prop = XInternAtom(dpy, "Wacom Button Actions", True); - if (!btnact_prop) - return; + XChangeDeviceProperty(dpy, dev, btnact_prop, XA_ATOM, 32, + PropModeReplace, + (unsigned char*)btnact_data, + btnact_nitems); - button--; /* property is zero-indexed, button numbers are 1-indexed */ + XDeleteDeviceProperty(dpy, dev, prop); + } - special_map_property(dpy, dev, btnact_prop, button, argc, argv); + XFlush(dpy); } - -static void map_button_simple(Display *dpy, XDevice *dev, param_t* param, - int button, int mapping) +/** + * Maps "actions" to certain properties. Actions allow for complex tasks to + * be performed when the driver recieves certain events. For example you + * could have an action of "key +alt f2" to open the run-application dialog + * in Gnome, or "button 4 4 4 4 4" to have applications scroll by 5 lines + * instead of 1. + * + * Buttons, wheels, and strips all support actions. Note that button actions + * require the button to modify as the first argument to this function. + * + * @param dpy X11 display to query + * @param dev Device to modify + * @param param Info about parameter to modify + * @param argc Dize of argv + * @param argv Arguments to parse + */ +static void map_actions(Display *dpy, XDevice *dev, param_t* param, int argc, char **argv) { - int nmap = 256; - unsigned char map[nmap]; + Atom action_prop; + int offset = param->prop_offset; + + TRACE("Mapping %s for device %ld.\n", param->name, dev->device_id); - nmap = XGetDeviceButtonMapping(dpy, dev, map, nmap); - if (button > nmap) + action_prop = XInternAtom(dpy, param->prop_name, True); + if (!action_prop) { - fprintf(stderr, "Button number does not exist on device.\n"); + fprintf(stderr, "Unable to locate property '%s'\n", param->prop_name); return; } - TRACE("Mapping button %d to %d.\n", button, mapping); - - map[button - 1] = mapping; - XSetDeviceButtonMapping(dpy, dev, map, nmap); - XFlush(dpy); - - /* If there's a property set, unset it */ - special_map_buttons(dpy, dev, param, button, 0, NULL); -} -/* - Supports two variations, simple mapping and special mapping: - xsetwacom set device Button1 1 - - maps button 1 to logical button 1 - xsetwacom set device Button1 "key a b c d" - - maps button 1 to key events a b c d - */ -static void map_button(Display *dpy, XDevice *dev, param_t* param, int argc, char **argv) -{ - int button, /* button to be mapped */ - mapping; - - if (argc <= 1 || (sscanf(argv[0], "%d", &button) != 1)) + if (argc < param->arg_count) + { + fprintf(stderr, "Too few arguments provided.\n"); return; + } - TRACE("Mapping %s for device %ld.\n", param->name, dev->device_id); + if (strcmp(param->prop_name, WACOM_PROP_BUTTON_ACTIONS) == 0) + { + if (sscanf(argv[0], "%d", &offset) != 1) + { + fprintf(stderr, "'%s' is not a valid button number.\n", argv[0]); + return; + } + offset--; /* Property is 0-indexed, X buttons are 1-indexed */ + argc--; /* Trim off the target button argument */ + argv = &argv[1]; /* ... ditto ... */ + } - /* --set "device" Button1 3 */ - if (sscanf(argv[1], "%d", &mapping) == 1) - map_button_simple(dpy, dev, param, button, mapping); - else - special_map_buttons(dpy, dev, param, button, argc - 1, &argv[1]); + special_map_property(dpy, dev, action_prop, offset, argc, argv); } static void set_xydefault(Display *dpy, XDevice *dev, param_t* param, int argc, char **argv) @@ -1313,6 +1313,13 @@ unsigned long nitems, bytes_after; long *ldata; + if (argc != param->arg_count) + { + fprintf(stderr, "'%s' requires exactly %d value(s).\n", param->name, + param->arg_count); + return; + } + prop = XInternAtom(dpy, param->prop_name, True); if (!prop) { @@ -1346,9 +1353,11 @@ static void set_mode(Display *dpy, XDevice *dev, param_t* param, int argc, char **argv) { int mode = Absolute; - if (argc < 1) + + if (argc != param->arg_count) { - usage(); + fprintf(stderr, "'%s' requires exactly %d value(s).\n", param->name, + param->arg_count); return; } @@ -1377,24 +1386,28 @@ unsigned char* data; unsigned long nitems, bytes_after; - if (argc != 1) - goto error; + if (argc != param->arg_count) + { + fprintf(stderr, "'%s' requires exactly %d value(s).\n", param->name, + param->arg_count); + return; + } TRACE("Rotate '%s' for device %ld.\n", argv[0], dev->device_id); - if (strcasecmp(argv[0], "cw") == 0) + if (strcasecmp(argv[0], "cw") == 0 || strcasecmp(argv[0], "1") == 0) rotation = 1; - else if (strcasecmp(argv[0], "cww") == 0) + else if (strcasecmp(argv[0], "ccw") == 0 || strcasecmp(argv[0], "2") == 0) rotation = 2; - else if (strcasecmp(argv[0], "half") == 0) + else if (strcasecmp(argv[0], "half") == 0 || strcasecmp(argv[0], "3") == 0) rotation = 3; - else if (strcasecmp(argv[0], "none") == 0) + else if (strcasecmp(argv[0], "none") == 0 || strcasecmp(argv[0], "0") == 0) rotation = 0; - else if (strlen(argv[0]) == 1) + else { - rotation = atoi(argv[0]); - if (rotation < 0 || rotation > 3) - goto error; + fprintf(stderr, "'%s' is not a valid value for the '%s' property.\n", + argv[0], param->name); + return; } prop = XInternAtom(dpy, param->prop_name, True); @@ -1421,24 +1434,47 @@ XFlush(dpy); return; - -error: - fprintf(stderr, "Usage: xsetwacom Rotate [none | cw | ccw | half]\n"); - return; } -static int convert_value_from_user(param_t *param, char *value) + +/** + * Performs intelligent string->int conversion. In addition to converting strings + * of digits into their corresponding integer values, it converts special string + * constants such as "off" or "false" (0) and "on" or "true" (1). + * + * The caller is expected to allocate and free memory for return_value. + * + * @param param the property paramaters + * @param value the string to be converted + * @param[out] return_value the integer representation of the 'value' parameter + * @return TRUE if the conversion succeeded, FALSE otherwise + */ +static Bool convert_value_from_user(const param_t *param, const char *value, int *return_value) { - int val; + if (param->prop_flags & PROP_FLAG_BOOLEAN) + { + if (strcasecmp(value, "off") == 0 || strcasecmp(value, "false") == 0) + *return_value = 0; + else if (strcasecmp(value, "on") == 0 || strcasecmp(value, "true") == 0) + *return_value = 1; + else + return False; - if ((param->prop_flags & PROP_FLAG_BOOLEAN) && strcmp(value, "off") == 0) - val = 0; - else if ((param->prop_flags & PROP_FLAG_BOOLEAN) && strcmp(value, "on") == 0) - val = 1; + if (param->prop_flags & PROP_FLAG_INVERTED) + *return_value = !(*return_value); + } else - val = atoi(value); + { + char *end; + long conversion = strtol(value, &end, 10); + if (end == value || *end != '\0' || errno == ERANGE || + conversion < INT_MIN || conversion > INT_MAX) + return False; - return val; + *return_value = (int)conversion; + } + + return True; } static void set(Display *dpy, int argc, char **argv) @@ -1449,14 +1485,13 @@ int format; unsigned char* data = NULL; unsigned long nitems, bytes_after; - double val; long *n; char *b; int i; char **values; int nvals; - if (argc < 3) + if (argc < 2) { usage(); return; @@ -1512,9 +1547,25 @@ values = strjoinsplit(argc - 2, &argv[2], &nvals); + if (nvals != param->arg_count) + { + fprintf(stderr, "'%s' requires exactly %d value(s).\n", param->name, + param->arg_count); + goto out; + } + for (i = 0; i < nvals; i++) { - val = convert_value_from_user(param, values[i]); + Bool success; + int val; + + success = convert_value_from_user(param, values[i], &val); + if (!success) + { + fprintf(stderr, "'%s' is not a valid value for the '%s' property.\n", + values[i], param->name); + goto out; + } switch(param->prop_format) { @@ -1566,7 +1617,10 @@ } if (!ndevices) /* device id 0 is reserved and can't be our device */ + { + fprintf(stderr, "Unable to locate device.\n"); return; + } TRACE("Getting mode for device %ld.\n", dev->device_id); @@ -1592,6 +1646,12 @@ unsigned char* data; unsigned long nitems, bytes_after; + if (argc != 0) + { + fprintf(stderr, "Incorrect number of arguments supplied.\n"); + return; + } + prop = XInternAtom(dpy, param->prop_name, True); if (!prop) { @@ -1633,50 +1693,57 @@ return; } -static int get_special_button_map(Display *dpy, XDevice *dev, - param_t *param, int btn_no) +/** + * Try to print the value of the action mapped to the given parameter's + * property. If the property contains data in the wrong format/type then + * nothing will be printed. + * + * @param dpy X11 display to connect to + * @param dev Device to query + * @param param Info about parameter to query + * @param offset Offset into property specified in param + * @return 0 on failure, 1 otherwise + */ +static int get_actions(Display *dpy, XDevice *dev, + param_t *param, int offset) { - Atom btnact_prop, action_prop; - unsigned long *btnact_data; - Atom type; + Atom prop, type; int format; - unsigned long btnact_nitems, bytes_after; + unsigned long nitems, bytes_after, *data; int i; char buff[1024] = {0}; - btnact_prop = XInternAtom(dpy, "Wacom Button Actions", True); + prop = XInternAtom(dpy, param->prop_name, True); - if (!btnact_prop) + if (!prop) return 0; - XGetDeviceProperty(dpy, dev, btnact_prop, 0, 100, False, - AnyPropertyType, &type, &format, &btnact_nitems, - &bytes_after, (unsigned char**)&btnact_data); + XGetDeviceProperty(dpy, dev, prop, 0, 100, False, + AnyPropertyType, &type, &format, &nitems, + &bytes_after, (unsigned char**)&data); - /* button numbers start at 1, property is zero-indexed */ - if (btn_no >= btnact_nitems) + if (offset >= nitems) + { + XFree(data); return 0; + } - /* FIXME: doesn't cover wheels/strips at the moment, they can be 8 - * bits (plain buttons) or 32 bits (complex actions) */ + prop = data[offset]; + XFree(data); - action_prop = btnact_data[btn_no - 1]; - if (!action_prop) + if (format != 32 || type != XA_ATOM || !prop) + { return 0; + } - XFree(btnact_data); - - XGetDeviceProperty(dpy, dev, action_prop, 0, 100, False, - AnyPropertyType, &type, &format, &btnact_nitems, - &bytes_after, (unsigned char**)&btnact_data); - - if (format != 32 && type != XA_ATOM) - return 0; + XGetDeviceProperty(dpy, dev, prop, 0, 100, False, + AnyPropertyType, &type, &format, &nitems, + &bytes_after, (unsigned char**)&data); - for (i = 0; i < btnact_nitems; i++) + for (i = 0; i < nitems; i++) { - static int last_type, last_press; - unsigned long action = btnact_data[i]; + static int last_type; + unsigned long action = data[i]; int current_type; int detail; int is_press = -1; @@ -1719,46 +1786,123 @@ sprintf(str, "%c%d ", press_str, detail); strcat(buff, str); last_type = current_type; - last_press = is_press; } TRACE("%s\n", buff); - XFree(btnact_data); + XFree(data); print_value(param, "%s", buff); return 1; } -static void get_button(Display *dpy, XDevice *dev, param_t *param, int argc, - char **argv) +/** + * Try to print the value of the raw button mapped to the given parameter's + * property. If the property contains data in the wrong format/type then + * nothing will be printed. + * + * @param dpy X11 display to connect to + * @param dev Device to query + * @param param Info about parameter to query + * @param offset Offset into the property specified in param + * @return 0 on failure, 1 otherwise + */ +static int get_button(Display *dpy, XDevice *dev, param_t *param, int offset) { - int nmap = 256; - unsigned char map[nmap]; - int button = 0; + Atom prop, type; + int format; + unsigned long nitems, bytes_after; + unsigned char *data; - if (argc < 1 || (sscanf(argv[0], "%d", &button) != 1)) - return; + prop = XInternAtom(dpy, param->prop_name, True); - TRACE("Getting button map for device %ld.\n", dev->device_id); + if (!prop) + return 0; - /* if there's a special map, print it and return */ - if (get_special_button_map(dpy, dev, param, button)) - return; + XGetDeviceProperty(dpy, dev, prop, 0, 100, False, + AnyPropertyType, &type, &format, &nitems, + &bytes_after, (unsigned char**)&data); - nmap = XGetDeviceButtonMapping(dpy, dev, map, nmap); + if (offset >= nitems) + { + XFree(data); + return 0; + } - if (button > nmap) + prop = data[offset]; + XFree(data); + + if (format != 8 || type != XA_INTEGER || !prop) + { + return 0; + } + + print_value(param, "%d", prop); + + return 1; +} + +/** + * Print the current button/wheel/strip mapping, be it a raw button or + * an action. Button map requests require the button number as the first + * argument in argv. + * + * @param dpy X11 display to connect to + * @param dev Device to query + * @param param Info about parameter to query + * @param argc Length of argv + * @param argv Command-line arguments + */ +static void get_map(Display *dpy, XDevice *dev, param_t *param, int argc, char** argv) +{ + int offset = param->prop_offset; + + TRACE("Getting button map for device %ld.\n", dev->device_id); + + if (argc != param->arg_count) { - fprintf(stderr, "Button number does not exist on device.\n"); + fprintf(stderr, "'%s' requires exactly %d value(s).\n", param->name, + param->arg_count); return; } - print_value(param, "%d", map[button - 1]); + if (strcmp(param->prop_name, WACOM_PROP_BUTTON_ACTIONS) == 0) + { + if (sscanf(argv[0], "%d", &offset) != 1) + { + fprintf(stderr, "'%s' is not a valid button number.\n", argv[0]); + return; + } + + offset--; /* Property is 0-indexed, X buttons are 1-indexed */ + argc--; /* Trim off the target button argument */ + argv = &argv[1]; /*... ditto ... */ + } + - XSetDeviceButtonMapping(dpy, dev, map, nmap); - XFlush(dpy); + if (get_actions(dpy, dev, param, offset)) + return; + else if (get_button(dpy, dev, param, offset)) + return; + else + { + int nmap = 256; + unsigned char map[nmap]; + + nmap = XGetDeviceButtonMapping(dpy, dev, map, nmap); + + if (offset >= nmap) + { + fprintf(stderr, "Button number does not exist on device.\n"); + return; + } + + print_value(param, "%d", map[offset]); + + XSetDeviceButtonMapping(dpy, dev, map, nmap); + XFlush(dpy); + } } static void _set_matrix_prop(Display *dpy, XDevice *dev, const float fmatrix[9]) @@ -1787,7 +1931,11 @@ &bytes_after, (unsigned char**)&data); if (format != 32 || type != XInternAtom(dpy, "FLOAT", True)) + { + fprintf(stderr, "Property for '%s' has unexpected type - this is a bug.\n", + "Coordinate Transformation Matrix"); return; + } XChangeDeviceProperty(dpy, dev, matrix_prop, type, format, PropModeReplace, (unsigned char*)matrix, 9); @@ -1804,6 +1952,13 @@ XRROutputInfo *output_info; XRRCrtcInfo *crtc_info; + if (argc != param->arg_count) + { + fprintf(stderr, "'%s' requires exactly %d value(s).\n", param->name, + param->arg_count); + return; + } + output_name = argv[0]; if (!XRRQueryExtension(dpy, &maj, &min)) /* using min/maj as dummy */ @@ -1978,7 +2133,7 @@ switch(param->prop_format) { case 8: - for (i = 0; i < 1 + param->prop_extra; i++) + for (i = 0; i < param->arg_count; i++) { int val = data[param->prop_offset + i]; @@ -1987,18 +2142,18 @@ else sprintf(&str[strlen(str)], "%d", val); - if (i < param->prop_extra) + if (i < param->arg_count - 1) strcat(str, " "); } print_value(param, "%s", str); break; case 32: - for (i = 0; i < 1 + param->prop_extra; i++) + for (i = 0; i < param->arg_count; i++) { long *ldata = (long*)data; sprintf(&str[strlen(str)], "%ld", ldata[param->prop_offset + i]); - if (i < param->prop_extra) + if (i < param->arg_count - 1) strcat(str, " "); } print_value(param, "%s", str); @@ -2007,6 +2162,7 @@ } +#ifndef BUILD_TEST int main (int argc, char **argv) { int c; @@ -2071,7 +2227,7 @@ break; case 'V': version(); - break; + return 0; case 'h': default: usage(); @@ -2121,6 +2277,161 @@ XCloseDisplay(dpy); return 0; } +#endif + +#ifdef BUILD_TEST +#include +/** + * Below are unit-tests to ensure xsetwacom continues to work as expected. + */ + +static void test_is_modifier(void) +{ + char i; + char buff[5]; + + + assert(is_modifier("Control_L")); + assert(is_modifier("Control_R")); + assert(is_modifier("Alt_L")); + assert(is_modifier("Alt_R")); + assert(is_modifier("Shift_L")); + assert(is_modifier("Shift_R")); + assert(is_modifier("Meta_L")); + assert(is_modifier("Meta_R")); + assert(is_modifier("Super_L")); + assert(is_modifier("Super_R")); + assert(is_modifier("Hyper_L")); + assert(is_modifier("Hyper_R")); + + assert(!is_modifier("")); + + /* make sure at least the default keys (ascii 33 - 126) aren't + * modifiers */ + for (i = '!'; i <= '~'; i++) + { + sprintf(buff, "%c", i); + assert(!is_modifier(buff)); + } +} + +static void test_convert_specialkey(void) +{ + char i; + char *converted; + char buff[5]; + struct modifier *m; + + /* make sure at least the default keys (ascii 33 - 126) aren't + * specialkeys */ + for (i = '!'; i <= '~'; i++) + { + sprintf(buff, "%c", i); + converted = convert_specialkey(buff); + assert(strcmp(converted, buff) == 0); + } + + for (m = specialkeys; m->name; m++) + { + converted = convert_specialkey(m->name); + assert(strcmp(converted, m->converted) == 0); + } +} +static void test_parameter_number(void) +{ + /* If either of those two fails, a parameter was added or removed. + * This test simply exists so that we remember to properly + * deprecated them. + * Numbers include trailing NULL entry. + */ + assert(ArrayLength(parameters) == 33); + assert(ArrayLength(deprecated_parameters) == 16); +} + +/** + * For the given parameter, test all words against conversion success and + * expected value. + * + * @param param The parameter of type PROP_FLAG_BOOLEAN. + * @param words NULL-terminated word list to parse + * @param success True if conversion success for the words is expected or + * False overwise + * @param expected Expected converted value. If success is False, this value + * is omitted. + */ +static void _test_conversion(const param_t *param, const char **words, + Bool success, Bool expected) +{ + + assert(param->prop_flags & PROP_FLAG_BOOLEAN); + + while(*words) + { + int val; + int rc; + rc = convert_value_from_user(param, *words, &val); + assert(rc == success); + if (success) + assert(val == expected); + words++; + } +} + +static void test_convert_value_from_user(void) +{ + param_t test_nonbool = + { + .name = "Test", + .desc = "NOT A REAL PARAMETER", + .prop_flags = 0, + }; + + param_t test_bool = + { + .name = "Test", + .desc = "NOT A REAL PARAMETER", + .prop_flags = PROP_FLAG_BOOLEAN, + }; + + param_t test_bool_inverted = + { + .name = "Test", + .desc = "NOT A REAL PARAMETER", + .prop_flags = PROP_FLAG_BOOLEAN | PROP_FLAG_INVERTED, + }; + + const char *bool_true[] = { "true", "TRUE", "True", "On", "on", "ON", NULL }; + const char *bool_false[] = { "false", "FALSE", "False", "Off", "off", "OFF", NULL }; + const char *bool_garbage[] = { "0", "1", " on", "on ", " off", " off", NULL}; + + int val; + + assert(convert_value_from_user(&test_nonbool, "1", &val) == True); + assert(convert_value_from_user(&test_nonbool, "-8", &val) == True); + assert(convert_value_from_user(&test_nonbool, "+314", &val) == True); + assert(convert_value_from_user(&test_nonbool, "36893488147419103232", &val) == False); //2^65 > MAX_INT + assert(convert_value_from_user(&test_nonbool, "123abc", &val) == False); + assert(convert_value_from_user(&test_nonbool, "123 abc", &val) == False); + + _test_conversion(&test_bool, bool_true, True, True); + _test_conversion(&test_bool, bool_false, True, False); + _test_conversion(&test_bool, bool_garbage, False, False); + + _test_conversion(&test_bool_inverted, bool_true, True, False); + _test_conversion(&test_bool_inverted, bool_false, True, True); + _test_conversion(&test_bool_inverted, bool_garbage, False, False); +} + + +int main(int argc, char** argv) +{ + test_parameter_number(); + test_is_modifier(); + test_convert_specialkey(); + test_convert_value_from_user(); + return 0; +} +#endif /* vim: set noexpandtab tabstop=8 shiftwidth=8: */