summaryrefslogtreecommitdiff
path: root/driver
diff options
context:
space:
mode:
Diffstat (limited to 'driver')
-rw-r--r--driver/xf86-video-nv/ChangeLog864
-rw-r--r--driver/xf86-video-nv/Makefile.in5
-rw-r--r--driver/xf86-video-nv/aclocal.m4727
-rw-r--r--driver/xf86-video-nv/compat/Makefile.am1
-rw-r--r--driver/xf86-video-nv/compat/Makefile.in6
-rw-r--r--driver/xf86-video-nv/compat/modes/xf86Crtc.c676
-rw-r--r--driver/xf86-video-nv/compat/modes/xf86Crtc.h15
-rw-r--r--driver/xf86-video-nv/compat/modes/xf86Cursors.c10
-rw-r--r--driver/xf86-video-nv/compat/modes/xf86EdidModes.c446
-rw-r--r--driver/xf86-video-nv/compat/modes/xf86Modes.c132
-rw-r--r--driver/xf86-video-nv/compat/modes/xf86Modes.h12
-rw-r--r--driver/xf86-video-nv/compat/modes/xf86RandR12.c128
-rw-r--r--driver/xf86-video-nv/compat/modes/xf86Rotate.c7
-rw-r--r--driver/xf86-video-nv/compat/modes/xf86cvt.c9
-rw-r--r--driver/xf86-video-nv/compat/parser/xf86Parser.h2
-rw-r--r--driver/xf86-video-nv/configure1692
-rw-r--r--driver/xf86-video-nv/configure.ac80
-rw-r--r--driver/xf86-video-nv/ltmain.sh277
-rw-r--r--driver/xf86-video-nv/man/Makefile.in6
-rw-r--r--driver/xf86-video-nv/man/nv.man126
-rw-r--r--driver/xf86-video-nv/src/Makefile.am54
-rw-r--r--driver/xf86-video-nv/src/Makefile.in17
-rw-r--r--driver/xf86-video-nv/src/g80_dac.c19
-rw-r--r--driver/xf86-video-nv/src/g80_display.c8
-rw-r--r--driver/xf86-video-nv/src/g80_driver.c350
-rw-r--r--driver/xf86-video-nv/src/g80_output.c190
-rw-r--r--driver/xf86-video-nv/src/g80_sor.c82
-rw-r--r--driver/xf86-video-nv/src/g80_type.h54
-rw-r--r--driver/xf86-video-nv/src/nv_const.h20
-rw-r--r--driver/xf86-video-nv/src/nv_cursor.c68
-rw-r--r--driver/xf86-video-nv/src/nv_dac.c68
-rw-r--r--driver/xf86-video-nv/src/nv_dma.h63
-rw-r--r--driver/xf86-video-nv/src/nv_driver.c50
-rw-r--r--driver/xf86-video-nv/src/nv_hw.c121
-rw-r--r--driver/xf86-video-nv/src/nv_local.h64
-rw-r--r--driver/xf86-video-nv/src/nv_setup.c111
-rw-r--r--driver/xf86-video-nv/src/nv_xaa.c63
-rw-r--r--driver/xf86-video-nv/src/riva_cursor.c6
-rw-r--r--driver/xf86-video-nv/src/riva_hw.c64
-rw-r--r--driver/xf86-video-nv/src/riva_hw.h63
-rw-r--r--driver/xf86-video-nv/src/riva_local.h64
-rw-r--r--driver/xf86-video-nv/src/riva_tbl.h63
-rw-r--r--driver/xf86-video-nv/src/riva_xaa.c63
43 files changed, 4879 insertions, 2067 deletions
diff --git a/driver/xf86-video-nv/ChangeLog b/driver/xf86-video-nv/ChangeLog
index abb367d4a..8f4316521 100644
--- a/driver/xf86-video-nv/ChangeLog
+++ b/driver/xf86-video-nv/ChangeLog
@@ -1,3 +1,866 @@
+commit 6cd80057fadbb8d63d3e1a623515206800fefc8e
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Mon Jun 30 16:26:09 2008 -0700
+
+ Bump to 2.1.10.
+
+commit 3f43093cf0c0338a1a479ed4ba2fad3f5f04ad69
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Mon Jun 30 16:25:54 2008 -0700
+
+ More G8x chips.
+
+commit 69aa963d7ab8256d0e932e1a5a98599f168b8836
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Mon Jun 30 13:30:07 2008 -0700
+
+ Fix build by using CARD32 instead of uint32_t, like we do everywhere else.
+
+commit 91d8778176f1db54c8222a95315610a043198648
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Sun Jun 29 21:26:57 2008 -0700
+
+ G80: Handle extended I2C ports and LVDS panels with DDC-based EDIDs.
+
+commit db768cf105956fbea39383a2214227782bf827b0
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Sun Jun 22 13:01:21 2008 -0700
+
+ Add a note that MODE_PANEL really means "larger than BIOS-programmed panel size".
+
+ Bug #16085.
+
+commit fb10793d2607d30077a9861b575c108b6c4101ca
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Sun Jun 22 12:55:10 2008 -0700
+
+ Add new chips to the man page and fix capitalization of "Quadro".
+
+commit 2fdcda8ea62eba1b7885f0a75249884715936247
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Sun Jun 22 12:45:31 2008 -0700
+
+ Replace copyright notices with stock MIT X11 boilerplate.
+
+commit 2df11aafe4eae33aab06d902ddeed6bd996b1575
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Mon Jun 16 10:07:07 2008 -0700
+
+ GeForce GTX 280 and 260 chip names.
+
+ Note: These GPUs already worked with this driver, this change just adds their
+ names to the table.
+
+commit 745a1d2d318eef0a6195fe08e4a43471b6d0a662
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Thu Jun 5 20:41:43 2008 -0700
+
+ GeForce 9 mobile chips.
+
+commit cca0a00c89730c8338af44e62438babc93f078fb
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Fri May 9 18:45:46 2008 -0700
+
+ Bump to 2.1.9.
+
+commit 9c98d2ca942049322688b5796a2ed041fd48282d
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Fri May 9 18:44:57 2008 -0700
+
+ Yet more G80s.
+
+ Sometimes I wish we made fewer products.
+
+commit cb83fbdfa22aa408e6692256cd44b78fef53e801
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Fri May 9 18:31:07 2008 -0700
+
+ Add an option to allow validation of dual-link DVI modes.
+
+ These modes don't work at bootup (i.e. power saving) configuration on all GPUs,
+ so they're still disabled by default. This option allows users to enable them
+ in case they actually work.
+
+commit 8db2d4e63508f59299098e092ae85e543cf61d03
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Sun Apr 27 16:23:40 2008 -0700
+
+ More G80s.
+
+commit 4aa43a2b66e473f9154f1582f5cf0e4b4596e485
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Sun Apr 27 16:23:28 2008 -0700
+
+ Fix a few startup bugs.
+
+commit 0ddee2347109e8c64bd2cb4693b97c3fa3aab94b
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Tue Mar 25 16:35:05 2008 -0700
+
+ Sort the IsSupported table.
+
+commit c0c7d610800161976fd7dce064beae05d2d4195b
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Mon Apr 28 14:43:12 2008 -0700
+
+ I win at C.
+
+commit b62a7cf70db356918aa04fb3f30bf1fd1142b9d5
+Author: Matthieu Herrb <matthieu.herrb@laas.fr>
+Date: Sat Mar 8 23:43:58 2008 +0100
+
+ Makefile.am: nuke RCS Id
+
+commit f88ef390985babdb2b489cf52bfa587e1879db38
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Fri Mar 7 12:32:40 2008 -0800
+
+ Bug #14885: Add missing static keywords.
+
+commit 4965498f238fbe3d8a0d0b84bf8bceb9237e472a
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Thu Mar 6 13:53:54 2008 -0800
+
+ Bump to 2.1.8.
+
+commit 806331f411df991dcd1a48108f9ff4e9bb480969
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Thu Mar 6 14:31:16 2008 -0800
+
+ Add xf86gtf.c to the compat file list.
+
+commit 09d154246ab55846878e34bc133b08c11765c45b
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Thu Mar 6 12:40:23 2008 -0800
+
+ More new chip names.
+
+commit fa97c4c2c69f91ac5a034ef2f62287b7cd5b2bde
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Tue Feb 26 12:24:05 2008 -0800
+
+ GeForce 9600 GT.
+
+ Note that the 9600 GT should already work in 2.1.7. This change just adds its
+ name to the list.
+
+commit a87b93d5c5b4d1a65a60dad271b06a2d560b71b8
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Tue Feb 19 14:17:57 2008 -0800
+
+ G80: Fix connector mapping and TMDS initialization on certain GPUs.
+
+commit 3f2a1898fedbada151da31fc163ae54daac0e896
+Author: Søren Sandmann Pedersen <sandmann@redhat.com>
+Date: Wed Feb 13 10:43:28 2008 -0800
+
+ [PATCH] Bug #14484: Fix G80SorSetProperty return value.
+
+ Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
+
+commit f8b24e5c729c9d3321282b065f4ef79b177f928d
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Fri Jan 25 18:23:48 2008 -0800
+
+ Bump to 2.1.7.
+
+commit d2367140ad1fe96bce5e780332d21999e5aa31bf
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Fri Jan 25 18:15:12 2008 -0800
+
+ Fix warning.
+
+commit e844f10c7b5e41330f2bcb884ab448641dd5bb06
+Author: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
+Date: Thu Sep 27 00:22:04 2007 +0200
+
+ [PATCH] Enable backlight toggling for Dell Inspiron 8200 GeForce2 Go
+
+ GeForce2 Go and similar cards are explicitly excluded from the
+ NVBacklightEnable() code (purposedly, as the code used for the other
+ chipsets on x86 has no effect.) This causes the backlight to remain
+ active on laptops equipped with such a card, even when DPMS modes were
+ active.
+
+ Fix the issue for Dell Inspiron 8200 by introducing the proper
+ registry writes to toggle the backlight.
+
+ Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
+ Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
+
+commit 02e431eb0969cabb67f3e4b1cb1a2d7fc5f697f0
+Author: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
+Date: Thu Sep 27 00:08:28 2007 +0200
+
+ [PATCH] Add macros to retrieve the subsystem vendor/device
+
+ Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
+ Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
+
+commit 3449da7a7baf7365c247caa9b4344316a961ec41
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Thu Jan 24 20:51:29 2008 -0800
+
+ Update know card list date and add G92 to the manpage.
+
+commit 62ff129257161db99dc4056cf16aa196ccfbc921
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Wed Jan 23 21:32:51 2008 -0800
+
+ Fix more load detection false positives.
+
+commit 28f34db87cefdc6b327a98db43da5b4fefe3bdd8
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Wed Jan 23 20:23:32 2008 -0800
+
+ New chips.
+
+commit 64721629c3908556fcf8c9941feea1e3b961bf00
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Sat Dec 1 16:02:37 2007 -0800
+
+ G80Create{Dac,Sor} return pointers, not Bools.
+
+commit 7f281be7e53ac274016a6af6b2b5dc6f8bddb810
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Fri Nov 30 17:37:20 2007 -0800
+
+ Bug #7309: Delay after disabling cursor to avoid wedging the cursor hardware on GeForce 6150.
+
+commit 100f5e24da2cbc79ed761083daa9a00b107008ab
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date: Mon Nov 26 13:14:40 2007 -0800
+
+ xcalloc needs 2 args, Xcalloc takes one - yay for inconsistency!
+
+commit e9ada35b4d24abd44bc5d811b59c6f25af5984f4
+Author: Ian Romanick <idr@us.ibm.com>
+Date: Wed Nov 21 15:35:06 2007 -0800
+
+ Build fix for recent removal of ALLOCATE_LOCAL and DEALLOCATE_LOCAL
+
+commit d483ecd851bb84014f1fa86f0ada4540b3ad801e
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Tue Nov 13 17:18:10 2007 -0800
+
+ G80: Reduce load detection false positives.
+
+commit 4da88cb3dd13a86c477389c5b2d42d7d40ce2023
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Fri Nov 2 16:56:35 2007 -0700
+
+ GeForce 8800 GT.
+
+commit 58dbd31953d0e2f30d06b3fc5118a016a17666fe
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Tue Oct 23 13:17:27 2007 -0700
+
+ Bump to 2.1.6.
+
+commit 0887084730af8428e902dabc6e00c505f383f57f
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Sun Oct 14 14:15:07 2007 -0700
+
+ G80 bug #12397: Fix LVDS detection on certain laptops.
+
+commit 1003bcbe4381201f1d7b34dc1af72f57b2943b67
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Sat Oct 13 14:36:49 2007 -0700
+
+ G80 bug #12637: Unwedge the hardware if the BIOS left it stuck.
+
+commit 1e12277650dff10b1083915cb73961525e21a471
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Sat Oct 13 13:50:04 2007 -0700
+
+ Remove unused headers.
+
+commit 7a124edd1fcc0be6bdad489b0e8d7db3efe44b14
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Fri Sep 21 18:55:21 2007 -0700
+
+ Bump to 2.1.5.
+
+commit fee39378ee291a715c607b8600c5380dfa80d97e
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Fri Sep 21 15:08:46 2007 -0700
+
+ Fix stupid, stupid typos reported by Alan Coopersmith.
+
+ Thanks!
+
+commit 5ca45e600dcea17dba7cf078de49aef3821ea687
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Fri Sep 21 12:16:56 2007 -0700
+
+ Bump to 2.1.4.
+
+commit e58504defab08492cc60c36d5dae4f5c4c8c1caa
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Mon Sep 17 15:44:52 2007 -0700
+
+ Fix uninitialized variable warning.
+
+commit 5b56964a29b326d28bcf3a51e98443d426df58bd
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Mon Sep 17 15:41:26 2007 -0700
+
+ New products.
+
+commit deff2965ef35260b4b7c4bc23718833bec7143b3
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Mon Sep 17 01:12:02 2007 -0700
+
+ libpciaccess support.
+
+commit b2db7d414400d80a5567d71eed9a7e94f1043a20
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Tue Sep 11 22:51:20 2007 -0700
+
+ G80: Fix LVDS detection on some laptops.
+
+commit 07fb9f0b00fafe18bd33bddff23cbb4325eb50f8
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Mon Aug 27 12:12:44 2007 -0700
+
+ Add release.sh to .gitignore.
+
+commit 69f7a57cd9baabbbee7b7665c3c2c2b91c056a04
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Wed Aug 15 17:12:11 2007 -0700
+
+ Bump to 2.1.3.
+
+commit 3bb842cb55fd201a559bef19c06db4aee0485d26
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Tue Jul 24 21:21:06 2007 -0700
+
+ Nuke old RCS tags.
+
+ Fix the ends of files. Update the known cards date.
+
+commit 08b68473351081fe1ed96ba7e206ed0d301b8a91
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Tue Jul 24 20:36:04 2007 -0700
+
+ G80: Allow DVI scaling.
+
+ Revamp how the scaling code works. When a mode is set on a DVI output,
+ determine the current preferred mode and scale to that. Add a new scaling
+ option, "off", which disables scaling and scans out the actual timings in the
+ mode to be set.
+
+commit f0ebb42ee94eac4b294d12d02f4406a444b347ff
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Fri Jul 13 13:17:52 2007 -0700
+
+ G80: Add an LVDS flat panel scaling property.
+
+ This property controls how non-native resolutions are scaled to the native
+ resolution. Valid values are:
+ * center: 1:1 pixel ratio with black borders to center the image.
+ * fill: Scale image to the native resolution.
+ * aspect: Scale image to fit the screen, adding black bars to preserve
+ square pixels.
+ Defaults to "aspect". Change with "xrandr --output LVDS --set scale <foo>".
+
+commit ec78618d685759a39d386e9929661037b167fe68
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Tue Jul 10 11:54:33 2007 -0700
+
+ Bug #4686: Fix a minor GeForceFX + flatpanel + video overlay corruption issue.
+
+ This change was originally in XFree86 CVS, nv_dac.c version 1.36 but got
+ reverted accidentally.
+
+commit 493822998184a1d79d6774686983cbd41930f253
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Tue Jul 10 09:58:46 2007 -0700
+
+ Bump to 2.1.2.
+
+commit d0d4e37accc697108e03c2ee7fdc0edf1f309620
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Tue Jul 10 09:48:19 2007 -0700
+
+ More GeForce 8 series mobile chips.
+
+commit e77a2d9b62bc65062e7e2167642be5ab75ac4864
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Tue Jul 10 00:41:21 2007 -0700
+
+ G80: Add a dithering property and corresponding config file option.
+
+commit c1503c864d495f8a3e5380fed5cb8ca5e21a3750
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Sun Jul 8 01:28:42 2007 -0700
+
+ GeForce 8600M GT.
+
+commit 42dffde988176a3f85b0586ecb8d672b74050760
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Sun Jul 8 00:53:00 2007 -0700
+
+ Work around more MacBook wackiness.
+
+ Turn off more corrupt the framebuffer mode. Don't mess with the pixel clock for
+ LVDS as long as we're trusting the VBIOS-programmed timings.
+
+commit bc439899f323410b0549068cd88348e7fb62866b
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Tue Jul 3 14:03:59 2007 -0700
+
+ Put the GPU into don't corrupt the framebuffer mode to work around MacBook wackiness.
+
+commit 0f93ad0e2af26b4e2381f337b58d3a5e50302664
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Mon Jul 2 09:01:12 2007 -0700
+
+ Bump to 2.1.1.
+
+commit 4ff01787a6640bf76cc34a51c99227845dc4678e
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Sat Jun 30 21:52:08 2007 -0700
+
+ GeForce 8400M G.
+
+commit 63eb1a4aa402ac3bf117634c3c9270261c6a4258
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Sat Jun 30 21:51:15 2007 -0700
+
+ Support configs with BAR1 < total RAM < 256 MB.
+
+commit 209c84e788faf3c4d0ce053e5f29ff5f5b798628
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Mon Jun 18 13:08:31 2007 -0700
+
+ Bump to 2.1.0.
+
+commit 24770ccf880f056bc0db9464249caca10692fb56
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Mon Jun 18 12:36:29 2007 -0700
+
+ Fix some random colormap corruption on DFPs with certain pre-G80 GPUs.
+
+commit 4e56465a79587c4df6bf1dfd7cc87a4f22707a8f
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Thu Jun 7 18:28:56 2007 -0700
+
+ G80: Mode validation.
+
+ Disable LVDS modes larger than the native resolution.
+ Disable dual-link TMDS modes for now since they don't work reliably.
+
+commit 6b71721439802bffd715602af3036083ff442449
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Mon Jun 4 23:15:42 2007 -0700
+
+ G80: LVDS support.
+
+commit 70b304cd0df0af515ce8414559f28a7ca7825517
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Mon Jun 4 22:38:14 2007 -0700
+
+ G80: Rearrange HW video timing computations.
+
+ Compute the HW parameters in G80CrtcModeFixup and stash them in adjusted_mode.
+ Move some register writes into G80CreateSor.
+
+commit 402b1d1526f0dacd2e3a2564cc89958c32d3100e
+Merge: 1f4790a... 9b8470e...
+Author: Benjamin Herrenschmidt <benh@kernel.crashing.org>
+Date: Sun Jun 3 11:18:50 2007 +1000
+
+ Merge branch 'master' of git://anongit.freedesktop.org/git/xorg/driver/xf86-video-nv
+
+commit 1f4790adcafd402c84a4a761c870a26a5178a4ff
+Author: Benjamin Herrenschmidt <benh@kernel.crashing.org>
+Date: Sun Jun 3 11:16:55 2007 +1000
+
+ Fix build. Including xf86DDC.h before we include xf86.h doesn't fly
+ and it's not necessary anyway as it's pulled in by g80_type.h
+
+ Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
+
+commit 9b8470e9c81e6ce2c8cd69942fb2ffd2d4c06102
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Wed May 16 14:45:36 2007 -0700
+
+ Bump to 2.0.96.
+
+commit 51c6425bea6e4ef02f7b76e58e759f99b0e993e8
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Thu May 10 17:09:36 2007 -0700
+
+ Add rudimentary VBE-based dual head support for pre-G80.
+
+commit 0415ecaead518123ac6774300241867883a6dd57
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Thu May 3 11:54:28 2007 -0700
+
+ Bump to 2.0.95.
+
+commit c511debc07e96e66335cfa82f1db8207ff5bb690
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Wed May 2 15:23:14 2007 -0700
+
+ Fix some harmless warnings.
+
+commit 100d7c7393eda92e5b26ac4f4cc33a8dce86c364
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Wed May 2 09:33:33 2007 -0700
+
+ GeForce 8800 Ultra
+
+commit ed9f98853a781344c10cb801214917e13bddf27c
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Tue Apr 24 20:57:43 2007 -0700
+
+ Remove some old stuff from README.G80.
+
+commit 88d44d5e4fd0025c30e9d67b55c603c59bd1c0c1
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Tue Apr 24 20:45:52 2007 -0700
+
+ Get EXA resizing working and document it.
+
+commit 29433b76969b73a2a22081bf965bb0cdbaad75af
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Sat Apr 21 21:43:06 2007 -0700
+
+ EXA: Add solid, copy, and UTS hooks.
+
+commit 339e30cb49a48344ec7b0dfd701b958b07ed32e5
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Mon Apr 16 02:23:26 2007 -0700
+
+ G80: EXA infrastructure.
+
+ No acceleration yet.
+
+commit c6e4105ce40ef053e026cc0ffe4925ab568ea700
+Merge: 5d9b75b... 4ff648c...
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Tue Apr 24 15:43:48 2007 -0700
+
+ Merge branch 'randr-1.2'
+
+ Conflicts:
+
+ configure.ac
+ man/Makefile.am
+ man/nv.man
+ src/g80_display.h
+ src/g80_output.c
+ src/nv_driver.c
+
+commit 4ff648c85f8aa90b343b7e2df176c0511b3cdaa5
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Fri Apr 20 16:24:15 2007 -0700
+
+ Depend on server 1.2 or higher.
+
+ Remove support for building with the libc wrapper or without the Drawable XV
+ argument.
+
+commit 48f9a6f94550acea4fce81d2539a6508049c1551
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Fri Apr 20 15:37:09 2007 -0700
+
+ G80: Remove AdjustFrame printout.
+
+commit 5d9b75b432dbc525e10c1c00436a1820456f6fb4
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Fri Apr 20 15:23:26 2007 -0700
+
+ GeForce 8300 GS and GeForce 8400 GS.
+
+commit 7a07a765c2a3816e8cd0487e8f66bc767024142d
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Fri Apr 20 14:30:45 2007 -0700
+
+ Steal RandR1.2 compat code from the Intel driver.
+
+ Spruce it up a bit so that --with-xserver-source works even if there's a local
+ compat copy.
+
+commit 2971fd0a18e947c5d39d6af78b0b77d6e4fe00d8
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Fri Apr 20 13:40:33 2007 -0700
+
+ Remove unused g80_ddc.h.
+
+commit 1261f12714746dcb2b58bc04c373594ace4f053b
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Fri Apr 20 09:01:02 2007 -0700
+
+ Add new chips to the manpage.
+
+commit ae582bdd2107d7e0106d1d5a9a9d6b9e39f1c901
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Fri Apr 20 00:13:31 2007 -0700
+
+ Always support G80.
+
+commit b4e26dfcc01b2816b6f8445fa8e9388b5e254df9
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Tue Apr 17 15:00:24 2007 -0700
+
+ Bump to 2.0.2.
+
+commit b23eeec2bebbbe1939366a8296565ae0120ea6da
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Tue Apr 17 14:59:41 2007 -0700
+
+ G80: Add a basic README.
+
+commit b68f3ada7bd857095c7652c175a0ba18bf45801f
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Tue Apr 17 12:47:11 2007 -0700
+
+ Add GeForce 8600 and 8500 PCI IDs.
+
+commit f7c62016f8bf9ced7d56f74ce26e13b6df040379
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Fri Apr 13 23:02:35 2007 -0700
+
+ G80: Get rid of debug printouts.
+
+commit f1cda5eaba9cbbfeb913d249d014586a6e8fd7a6
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Fri Apr 13 22:29:57 2007 -0700
+
+ G80: Get DPMS working with RandR 1.2.
+
+ Work around xf86DisableUnusedFunctions lameness by forcing DPMSModeOn at modeset
+ time.
+
+commit 550af781bd9f7cb7256b298281c2c27febfc4722
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Mon Apr 2 09:42:11 2007 -0700
+
+ G80: Use the right mode struct when setting up an SOR.
+
+commit 5c03bd8acfcc814890fb13c891be4f135ea800d4
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Mon Apr 2 01:37:38 2007 -0700
+
+ G80: Get HW cursor working with RandR 1.2.
+
+commit 0126c809544cb3a0242fc3bce7ad82d4962aaf1c
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Sun Apr 1 01:17:31 2007 -0700
+
+ Remove extraneous DisplayModeRec allocation.
+
+ Thanks to Luc Verhaegen for pointing this out.
+
+commit d569934c3de326483347db00d34268b02101599c
+Author: Henry Zhao <henryz@localhost.localdomain>
+Date: Sat Mar 31 18:47:30 2007 -0800
+
+ 10360: Need to inject a mode corresponding panel width/height for validation
+
+commit 8f7769aadf175e8298f27387428214d6de49e6a5
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Wed Mar 28 14:10:41 2007 -0700
+
+ G80: Use xf86CrtcScreenInit and xf86SetDesiredModes.
+
+commit 2d8d5bd597d760968b683d41ced6a0a76518ec26
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Tue Mar 27 17:12:21 2007 -0700
+
+ G80: Improve output detection.
+
+ Detect output status for paired outputs together and cache status until the
+ BlockHandler to avoid redundantly probing for EDIDs or performing load
+ detection.
+
+commit 4d929d383abe064b5334847eb466321a6bf30999
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Tue Mar 27 15:56:52 2007 -0700
+
+ REALLY bump to 2.0.1.
+
+ I need more caffeine, or something.
+
+commit 0953f081d1592b123dc27fb82d1cfecca079d5de
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Tue Mar 27 15:46:38 2007 -0700
+
+ Fix warnings and bump to 2.0.1.
+
+commit 4b8ed8497a9ab6ef1316bfcce9f31d96dd4b3540
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Tue Mar 27 13:33:11 2007 -0700
+
+ G80: Create output partners.
+
+ Each pair of outputs shares an I2C rec. This will be used in a future change
+ for the detect and get_modes routines.
+
+commit ad4abba20b8a6db7b52898bc7159809539cbed43
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Tue Mar 27 14:49:30 2007 -0700
+
+ Fix warnings.
+
+commit 7c2a31dec3d04111eaee5292c156753c316d52a9
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Tue Mar 27 14:45:17 2007 -0700
+
+ Fix broken prototype.
+
+commit 16f51977d49e52079754b62f4a13754e56da1c9c
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Mon Mar 19 12:00:36 2007 -0700
+
+ NVSync hangs in EnterVT, so don't call it there.
+
+commit ac84f228de689c6cb85eae827ec2443fabe67786
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Sun Mar 18 20:53:46 2007 -0700
+
+ Bump to 2.0.0.
+
+commit 4d15dd2c490cce739f2eb1474019c723da8ce32b
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Fri Mar 16 16:14:00 2007 -0700
+
+ Avoid hanging when switching modes on some nv4x cards.
+
+ SUSE bug #235171.
+
+commit 90c53c5322e50bce06996e3c857e6bf7531235d4
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Thu Mar 15 17:07:25 2007 -0700
+
+ Fix GXxor corruption on nv4x.
+
+ SUSE bug #246421.
+
+commit 9763b9dcef144f649ccbcfd302601769bc940ffb
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Thu Mar 15 14:39:07 2007 -0700
+
+ Hide the cursor in CloseScreen.
+
+ Otherwise, if we're restoring a graphical framebuffer mode the cursor will still
+ be visible.
+
+commit 9d65abab153cdf3ab2b7e3e2843d573b22ea6769
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Wed Mar 14 21:16:04 2007 -0700
+
+ Fix VGA output with vesafb on nv4x and G7x GPUs.
+
+ SuSE bug #160812.
+
+commit 26a9f1fa5a92eba7d4b6ddfa47c0517e604be130
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Mon Mar 12 14:56:10 2007 -0700
+
+ Get rid of non-portable := assignments.
+
+commit 7e0e5c1fb38922add99db33f282baf2ee1531685
+Author: root <root@treble.(none)>
+Date: Sun Mar 11 00:38:11 2007 -0800
+
+ Initial RandR 1.2 support for G80.
+
+ Mostly just rearranging code.
+
+commit 636adcd57f1c5b33edf2d8fbf9e7fa9aac1ccb1a
+Author: root <root@treble.(none)>
+Date: Sat Mar 10 22:12:39 2007 -0800
+
+ Get rid of BackendMode and disable hw cursor for now.
+
+commit 8b2c7bc457d34b7ed59cd08719bec8754ebf6fb8
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Fri Mar 9 12:43:12 2007 -0800
+
+ Use DAC load detection to decide which OR to use instead of trusting the EDID.
+
+commit 06b168ced3cc4aa47cdad21a2351cca674fa26e0
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Thu Mar 8 18:12:43 2007 -0800
+
+ Enable G80 support by default.
+
+commit 23383c2c2e1aa590f69197b1860053d5cb710cf7
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Fri Feb 16 16:11:13 2007 -0800
+
+ Initial G80 support. Bump to 1.99.1.
+
+commit dd305c3f64f9267d54324d734f1028bfc00e474f
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Wed Jan 17 21:41:06 2007 -0800
+
+ Remove the riva128 submodule. Link Riva support into nv_drv.so directly.
+
+commit 96bd57b0597dbbda0ca5c46c2135e5813c80d79f
+Author: Daniel Stone <daniel@fooishbar.org>
+Date: Sun Dec 24 06:34:31 2006 +0200
+
+ configure.ac: bump to 1.2.2.1 (respin)
+ No code changes, just built with an updated util-macros.
+
+commit 10c7c54888d1dd4198c79e852c57420e8d52ccc5
+Author: Daniel Stone <daniel@fooishbar.org>
+Date: Sat Dec 16 01:47:42 2006 +0200
+
+ bump to 1.2.2
+
+commit 6d02bdb71bb34205955e76a99939a7be34c676c7
+Author: Daniel Stone <daniel@fooishbar.org>
+Date: Wed Dec 6 18:48:37 2006 +0200
+
+ Makefile.am: make ChangeLog hook safer
+ Make ChangeLog hook as safe as possible.
+
+commit 33e10132a87409bdfa77d5eef9f7044cb9ce1ac9
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Mon Dec 4 12:52:55 2006 -0800
+
+ Remove redundant XORG_RELEASE_VERSION.
+
+commit 2d4b4bb06029e60e5c7b96d94b31c8aadac91843
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Thu Nov 30 17:41:41 2006 -0800
+
+ Bump to 1.2.1.
+
+commit 558ef7e26e361529a05360610abc3cbcdb04fd67
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Thu Nov 30 17:36:29 2006 -0800
+
+ Save and restore DAC0 register 608 when probing for connected CRTs.
+
+ Adapted from a patch by Egbert Eich for Novell bug #220197.
+
+commit 08bb966abbca11c4581d666af3249e4922156e03
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Thu Nov 30 17:14:38 2006 -0800
+
+ Use XORG_RELEASE_VERSION.
+
+commit 162391f8fb640184db3917f3842fbff0bc9ce606
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date: Thu Oct 26 19:08:29 2006 -0700
+
+ Handle more than 1 digit in the version numbers.
+
+ Based on a change by George Sapountzis <gsap7@yahoo.gr>.
+
+commit 98372d0f94a9d658a7257d2199ef37a2449b9961
+Author: Adam Jackson <ajax@benzedrine.nwnk.net>
+Date: Fri Aug 11 16:02:28 2006 -0400
+
+ Replace panel message + MODE_BAD with MODE_PANEL.
+
commit 43ec66396f805aba87017d193d97a03372c29909
Author: Aaron Plattner <aplattner@nvidia.com>
Date: Fri Jun 30 12:54:44 2006 -0700
@@ -560,4 +1423,3 @@ Author: Kaleb Keithley <kaleb@freedesktop.org>
Date: Fri Nov 14 15:54:48 2003 +0000
R6.6 is the Xorg base-line
-
diff --git a/driver/xf86-video-nv/Makefile.in b/driver/xf86-video-nv/Makefile.in
index 00ff4d66d..8ae44a011 100644
--- a/driver/xf86-video-nv/Makefile.in
+++ b/driver/xf86-video-nv/Makefile.in
@@ -121,6 +121,7 @@ DEPDIR = @DEPDIR@
DRIVER_MAN_DIR = @DRIVER_MAN_DIR@
DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
DRIVER_NAME = @DRIVER_NAME@
+DSYMUTIL = @DSYMUTIL@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
@@ -149,6 +150,7 @@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
MISC_MAN_DIR = @MISC_MAN_DIR@
MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
+NMEDIT = @NMEDIT@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@@ -161,6 +163,7 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@
PCIACCESS_LIBS = @PCIACCESS_LIBS@
PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
@@ -171,7 +174,9 @@ XORG_LIBS = @XORG_LIBS@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DSYMUTIL = @ac_ct_DSYMUTIL@
ac_ct_F77 = @ac_ct_F77@
+ac_ct_NMEDIT = @ac_ct_NMEDIT@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
diff --git a/driver/xf86-video-nv/aclocal.m4 b/driver/xf86-video-nv/aclocal.m4
index 6543017d8..a3a3008cb 100644
--- a/driver/xf86-video-nv/aclocal.m4
+++ b/driver/xf86-video-nv/aclocal.m4
@@ -13,7 +13,7 @@
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
-# serial 48 AC_PROG_LIBTOOL
+# serial 52 AC_PROG_LIBTOOL
# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
@@ -101,7 +101,6 @@ AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
AC_REQUIRE([AC_OBJEXT])dnl
AC_REQUIRE([AC_EXEEXT])dnl
dnl
-
AC_LIBTOOL_SYS_MAX_CMD_LEN
AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
AC_LIBTOOL_OBJDIR
@@ -176,7 +175,7 @@ test -z "$STRIP" && STRIP=:
test -z "$ac_objext" && ac_objext=o
# Determine commands to create old-style static archives.
-old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
old_postinstall_cmds='chmod 644 $oldlib'
old_postuninstall_cmds=
@@ -203,6 +202,8 @@ file_magic*)
;;
esac
+_LT_REQUIRED_DARWIN_CHECKS
+
AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
enable_win32_dll=yes, enable_win32_dll=no)
@@ -263,8 +264,9 @@ cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
# Check for compiler boilerplate output or warnings with
# the simple compiler test code.
AC_DEFUN([_LT_COMPILER_BOILERPLATE],
-[ac_outfile=conftest.$ac_objext
-printf "$lt_simple_compile_test_code" >conftest.$ac_ext
+[AC_REQUIRE([LT_AC_PROG_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*
@@ -276,13 +278,85 @@ $rm conftest*
# Check for linker boilerplate output or warnings with
# the simple link test code.
AC_DEFUN([_LT_LINKER_BOILERPLATE],
-[ac_outfile=conftest.$ac_objext
-printf "$lt_simple_link_test_code" >conftest.$ac_ext
+[AC_REQUIRE([LT_AC_PROG_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 conftest*
+$rm -r conftest*
])# _LT_LINKER_BOILERPLATE
+# _LT_REQUIRED_DARWIN_CHECKS
+# --------------------------
+# Check for some things on darwin
+AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS],[
+ case $host_os in
+ rhapsody* | darwin*)
+ AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
+ AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
+
+ 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.
+ echo "int foo(void){return 1;}" > conftest.c
+ $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+ -dynamiclib ${wl}-single_module conftest.c
+ if test -f libconftest.dylib; then
+ lt_cv_apple_cc_single_mod=yes
+ rm -rf libconftest.dylib*
+ fi
+ rm conftest.c
+ 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.[[0123]])
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
+ darwin1.*)
+ _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+ darwin*)
+ # 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_AC_SYS_LIBPATH_AIX
# ----------------------
@@ -293,12 +367,20 @@ $rm conftest*
# If we don't find anything, use the default library path according
# to the aix ld manual.
AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
-[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`
+[AC_REQUIRE([LT_AC_PROG_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 '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`; fi],[])
+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_AC_SYS_LIBPATH_AIX
@@ -529,13 +611,17 @@ ia64-*-hpux*)
rm -rf conftest*
;;
-x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+s390*-*linux*|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"
;;
@@ -552,6 +638,9 @@ x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
;;
*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"
;;
@@ -592,7 +681,11 @@ sparc*-*solaris*)
*64-bit*)
case $lt_cv_prog_gnu_ld in
yes*) LD="${LD-ld} -m elf64_sparc" ;;
- *) LD="${LD-ld} -64" ;;
+ *)
+ if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
+ LD="${LD-ld} -64"
+ fi
+ ;;
esac
;;
esac
@@ -623,7 +716,7 @@ AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
AC_CACHE_CHECK([$1], [$2],
[$2=no
ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ 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.
@@ -664,11 +757,12 @@ fi
# ------------------------------------------------------------
# Check whether the given compiler option works
AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
-[AC_CACHE_CHECK([$1], [$2],
+[AC_REQUIRE([LT_AC_PROG_SED])dnl
+AC_CACHE_CHECK([$1], [$2],
[$2=no
save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS $3"
- printf "$lt_simple_link_test_code" > conftest.$ac_ext
+ 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
@@ -684,7 +778,7 @@ AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
$2=yes
fi
fi
- $rm conftest*
+ $rm -r conftest*
LDFLAGS="$save_LDFLAGS"
])
@@ -782,24 +876,27 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
fi
;;
*)
- # 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.
- SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
- while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
+ 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
+ SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+ while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
= "XX$teststring") >/dev/null 2>&1 &&
- new_result=`expr "X$teststring" : ".*" 2>&1` &&
- lt_cv_sys_max_cmd_len=$new_result &&
- test $i != 17 # 1/2 MB should be enough
- do
- i=`expr $i + 1`
- teststring=$teststring$teststring
- done
- 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`
+ new_result=`expr "X$teststring" : ".*" 2>&1` &&
+ lt_cv_sys_max_cmd_len=$new_result &&
+ test $i != 17 # 1/2 MB should be enough
+ do
+ i=`expr $i + 1`
+ teststring=$teststring$teststring
+ done
+ 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
])
@@ -952,7 +1049,7 @@ else
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="-dld"],
+ [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
[AC_CHECK_FUNC([dlopen],
[lt_cv_dlopen="dlopen"],
[AC_CHECK_LIB([dl], [dlopen],
@@ -960,7 +1057,7 @@ else
[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="-dld"])
+ [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
])
])
])
@@ -1026,7 +1123,8 @@ fi
# ---------------------------------
# Check to see if options -c and -o are simultaneously supported by compiler
AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
-[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
+[AC_REQUIRE([LT_AC_PROG_SED])dnl
+AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
[_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
[_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
@@ -1034,7 +1132,7 @@ AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
mkdir conftest
cd conftest
mkdir out
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ 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
@@ -1174,6 +1272,7 @@ else
darwin*)
if test -n "$STRIP" ; then
striplib="$STRIP -x"
+ old_striplib="$STRIP -S"
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
@@ -1191,7 +1290,8 @@ fi
# -----------------------------
# PORTME Fill in your ld.so characteristics
AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
-[AC_MSG_CHECKING([dynamic linker characteristics])
+[AC_REQUIRE([LT_AC_PROG_SED])dnl
+AC_MSG_CHECKING([dynamic linker characteristics])
library_names_spec=
libname_spec='lib$name'
soname_spec=
@@ -1205,20 +1305,58 @@ shlibpath_overrides_runpath=unknown
version_type=none
dynamic_linker="$host_os ld.so"
sys_lib_dlsearch_path_spec="/lib /usr/lib"
+m4_if($1,[],[
if test "$GCC" = yes; then
- 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 ';' >/dev/null ; 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.
- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+ lt_search_path_spec=`echo "$lt_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"`
+ 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
+fi])
need_lib_prefix=unknown
hardcode_into_libs=no
@@ -1236,7 +1374,7 @@ aix3*)
soname_spec='${libname}${release}${shared_ext}$major'
;;
-aix4* | aix5*)
+aix[[4-9]]*)
version_type=linux
need_lib_prefix=no
need_version=no
@@ -1375,12 +1513,8 @@ darwin* | rhapsody*)
shlibpath_overrides_runpath=yes
shlibpath_var=DYLD_LIBRARY_PATH
shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
- # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
- if test "$GCC" = yes; then
- sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
- else
- sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
- fi
+ 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'
;;
@@ -1397,18 +1531,6 @@ freebsd1*)
dynamic_linker=no
;;
-kfreebsd*-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='GNU ld.so'
- ;;
-
freebsd* | dragonfly*)
# DragonFly does not have aout. When/if they implement a new
# versioning mechanism, adjust this.
@@ -1446,7 +1568,7 @@ freebsd* | dragonfly*)
shlibpath_overrides_runpath=no
hardcode_into_libs=yes
;;
- freebsd*) # from 4.6 on
+ *) # from 4.6 on, and DragonFly
shlibpath_overrides_runpath=yes
hardcode_into_libs=yes
;;
@@ -1509,7 +1631,7 @@ hpux9* | hpux10* | hpux11*)
postinstall_cmds='chmod 555 $lib'
;;
-interix3*)
+interix[[3-9]]*)
version_type=linux
need_lib_prefix=no
need_version=no
@@ -1564,7 +1686,7 @@ linux*oldld* | linux*aout* | linux*coff*)
;;
# This must be Linux ELF.
-linux*)
+linux* | k*bsd*-gnu)
version_type=linux
need_lib_prefix=no
need_version=no
@@ -1580,7 +1702,7 @@ linux*)
# 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)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+ 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
@@ -1593,18 +1715,6 @@ linux*)
dynamic_linker='GNU/Linux ld.so'
;;
-knetbsd*-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='GNU ld.so'
- ;;
-
netbsd*)
version_type=sunos
need_lib_prefix=no
@@ -1686,6 +1796,10 @@ osf3* | osf4* | osf5*)
sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
;;
+rdos*)
+ dynamic_linker=no
+ ;;
+
solaris*)
version_type=linux
need_lib_prefix=no
@@ -1781,6 +1895,13 @@ esac
AC_MSG_RESULT([$dynamic_linker])
test "$dynamic_linker" = no && can_build_shared=no
+AC_CACHE_VAL([lt_cv_sys_lib_search_path_spec],
+[lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"])
+sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+AC_CACHE_VAL([lt_cv_sys_lib_dlsearch_path_spec],
+[lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"])
+sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+
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"
@@ -1791,7 +1912,8 @@ fi
# _LT_AC_TAGCONFIG
# ----------------
AC_DEFUN([_LT_AC_TAGCONFIG],
-[AC_ARG_WITH([tags],
+[AC_REQUIRE([LT_AC_PROG_SED])dnl
+AC_ARG_WITH([tags],
[AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
[include additional configurations @<:@automatic@:>@])],
[tagnames="$withval"])
@@ -2052,7 +2174,7 @@ m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
# AC_PATH_TOOL_PREFIX
# -------------------
-# find a file program which can recognise shared library
+# find a file program which can recognize shared library
AC_DEFUN([AC_PATH_TOOL_PREFIX],
[AC_REQUIRE([AC_PROG_EGREP])dnl
AC_MSG_CHECKING([for $1])
@@ -2115,7 +2237,7 @@ fi
# AC_PATH_MAGIC
# -------------
-# find a file program which can recognise a shared library
+# find a file program which can recognize a shared library
AC_DEFUN([AC_PATH_MAGIC],
[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
if test -z "$lt_cv_path_MAGIC_CMD"; then
@@ -2262,7 +2384,7 @@ esac
# how to check for library dependencies
# -- PORTME fill in with the dynamic library characteristics
AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
-[AC_CACHE_CHECK([how to recognise dependent libraries],
+[AC_CACHE_CHECK([how to recognize dependent libraries],
lt_cv_deplibs_check_method,
[lt_cv_file_magic_cmd='$MAGIC_CMD'
lt_cv_file_magic_test_file=
@@ -2279,7 +2401,7 @@ lt_cv_deplibs_check_method='unknown'
# whether `pass_all' will *always* work, you probably want this one.
case $host_os in
-aix4* | aix5*)
+aix[[4-9]]*)
lt_cv_deplibs_check_method=pass_all
;;
@@ -2301,16 +2423,22 @@ cygwin*)
mingw* | pw32*)
# Base MSYS/MinGW do not provide the 'file' command needed by
- # func_win32_libid shell function, so use a weaker test based on 'objdump'.
- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
- lt_cv_file_magic_cmd='$OBJDUMP -f'
+ # func_win32_libid shell function, so use a weaker test based on 'objdump',
+ # unless we find 'file', for example because we are cross-compiling.
+ if ( file / ) >/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
;;
darwin* | rhapsody*)
lt_cv_deplibs_check_method=pass_all
;;
-freebsd* | kfreebsd*-gnu | dragonfly*)
+freebsd* | dragonfly*)
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
case $host_cpu in
i*86 )
@@ -2348,7 +2476,7 @@ hpux10.20* | hpux11*)
esac
;;
-interix3*)
+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)$'
;;
@@ -2364,7 +2492,7 @@ irix5* | irix6* | nonstopux*)
;;
# This must be Linux ELF.
-linux*)
+linux* | k*bsd*-gnu)
lt_cv_deplibs_check_method=pass_all
;;
@@ -2398,6 +2526,10 @@ 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
;;
@@ -2450,7 +2582,7 @@ AC_DEFUN([AC_PROG_NM],
lt_cv_path_NM="$NM"
else
lt_nm_to_check="${ac_tool_prefix}nm"
- if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
+ 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
@@ -2666,10 +2798,10 @@ objext=o
_LT_AC_TAGVAR(objext, $1)=$objext
# Code to be used in simple compile tests
-lt_simple_compile_test_code="int some_variable = 0;\n"
+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);}\n'
+lt_simple_link_test_code='int main(){return(0);}'
_LT_AC_SYS_COMPILER
@@ -2705,7 +2837,7 @@ aix3*)
fi
;;
-aix4* | aix5*)
+aix[[4-9]]*)
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
test "$enable_shared" = yes && enable_static=no
fi
@@ -2762,6 +2894,7 @@ _LT_AC_TAGVAR(postdep_objects, $1)=
_LT_AC_TAGVAR(predeps, $1)=
_LT_AC_TAGVAR(postdeps, $1)=
_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
+_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=
# Source file extension for C++ test sources.
ac_ext=cpp
@@ -2771,10 +2904,10 @@ objext=o
_LT_AC_TAGVAR(objext, $1)=$objext
# Code to be used in simple compile tests
-lt_simple_compile_test_code="int some_variable = 0;\n"
+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); }\n'
+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_AC_SYS_COMPILER
@@ -2871,7 +3004,7 @@ case $host_os in
# FIXME: insert proper C++ library support
_LT_AC_TAGVAR(ld_shlibs, $1)=no
;;
- aix4* | aix5*)
+ 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.
@@ -2884,7 +3017,7 @@ case $host_os in
# 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]].*|aix5*)
+ case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
for ld_flag in $LDFLAGS; do
case $ld_flag in
*-brtl*)
@@ -2920,7 +3053,7 @@ case $host_os in
strings "$collect2name" | grep resolve_lib_name >/dev/null
then
# We have reworked collect2
- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ :
else
# We have old collect2
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
@@ -3030,59 +3163,31 @@ case $host_os in
fi
;;
darwin* | rhapsody*)
- case $host_os in
- rhapsody* | darwin1.[[012]])
- _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
- ;;
- *) # Darwin 1.3 on
- if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
- _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
- else
- case ${MACOSX_DEPLOYMENT_TARGET} in
- 10.[[012]])
- _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
- ;;
- 10.*)
- _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
- ;;
- esac
- fi
- ;;
- esac
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
_LT_AC_TAGVAR(hardcode_direct, $1)=no
_LT_AC_TAGVAR(hardcode_automatic, $1)=yes
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
-
- if test "$GXX" = yes ; then
- lt_int_apple_cc_single_mod=no
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
+ if test "$GXX" = yes ; then
output_verbose_link_cmd='echo'
- if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
- lt_int_apple_cc_single_mod=yes
+ _LT_AC_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_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+ _LT_AC_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_AC_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}"
+ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
+ _LT_AC_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_AC_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
- if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
- else
- _LT_AC_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'
- fi
- _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
- # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
- if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- else
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "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~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- fi
- _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
else
case $cc_basename in
xlc*)
output_verbose_link_cmd='echo'
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
_LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
_LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
;;
*)
@@ -3116,7 +3221,7 @@ case $host_os in
freebsd-elf*)
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
;;
- freebsd* | kfreebsd*-gnu | dragonfly*)
+ freebsd* | dragonfly*)
# FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
# conventions
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
@@ -3165,9 +3270,7 @@ case $host_os in
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
case $host_cpu in
- hppa*64*|ia64*)
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
- ;;
+ hppa*64*|ia64*) ;;
*)
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
;;
@@ -3235,7 +3338,7 @@ case $host_os in
;;
esac
;;
- interix3*)
+ interix[[3-9]]*)
_LT_AC_TAGVAR(hardcode_direct, $1)=no
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
@@ -3275,7 +3378,7 @@ case $host_os in
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
;;
- linux*)
+ linux* | k*bsd*-gnu)
case $cc_basename in
KCC*)
# Kuck and Associates, Inc. (KAI) C++ Compiler
@@ -3327,7 +3430,7 @@ case $host_os in
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
;;
- pgCC*)
+ pgCC* | pgcpp*)
# Portland Group C++ compiler
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
_LT_AC_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'
@@ -3355,6 +3458,29 @@ case $host_os in
# dependencies.
output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "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 $list'
;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+ _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_AC_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'
+
+ # 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_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
+ ;;
+ esac
+ ;;
esac
;;
lynxos*)
@@ -3399,9 +3525,9 @@ case $host_os in
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
_LT_AC_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_AC_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_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ _LT_AC_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_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
fi
output_verbose_link_cmd='echo'
else
@@ -3568,15 +3694,10 @@ case $host_os in
case $host_os in
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
*)
- # The C++ compiler is used as linker so we must use $wl
- # flag to pass the commands to the underlying system
- # linker. We must also pass each convience library through
- # to the system linker between allextract/defaultextract.
- # The C++ compiler will combine linker options so we
- # cannot just pass the convience library names through
- # without $wl.
+ # The compiler driver will combine and reorder linker options,
+ # but understands `-z linker_flag'.
# Supported since Solaris 2.6 (maybe 2.5.1?)
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
;;
esac
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
@@ -3623,6 +3744,12 @@ case $host_os in
fi
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
+ case $host_os in
+ solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+ *)
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ ;;
+ esac
fi
;;
esac
@@ -3738,7 +3865,8 @@ lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
# compiler output when linking a shared library.
# Parse the compiler output and extract the necessary
# objects, libraries and library flags.
-AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
+AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],
+[AC_REQUIRE([LT_AC_PROG_SED])dnl
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
@@ -3863,10 +3991,15 @@ fi
$rm -f confest.$objext
+_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=
+if test -n "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
+ _LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_AC_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
+fi
+
# PORTME: override above test on systems where it is broken
ifelse([$1],[CXX],
[case $host_os in
-interix3*)
+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_AC_TAGVAR(predep_objects,$1)=
@@ -3874,19 +4007,51 @@ interix3*)
_LT_AC_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_AC_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.
- _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun'
+ if test "$solaris_use_stlport4" != yes; then
+ _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
+ fi
;;
esac
;;
esac
])
-
case " $_LT_AC_TAGVAR(postdeps, $1) " in
*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
esac
@@ -3929,10 +4094,17 @@ objext=o
_LT_AC_TAGVAR(objext, $1)=$objext
# Code to be used in simple compile tests
-lt_simple_compile_test_code=" subroutine t\n return\n end\n"
+lt_simple_compile_test_code="\
+ subroutine t
+ return
+ end
+"
# Code to be used in simple link tests
-lt_simple_link_test_code=" program t\n end\n"
+lt_simple_link_test_code="\
+ program t
+ end
+"
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
_LT_AC_SYS_COMPILER
@@ -3964,7 +4136,7 @@ aix3*)
postinstall_cmds='$RANLIB $lib'
fi
;;
-aix4* | aix5*)
+aix[[4-9]]*)
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
test "$enable_shared" = yes && enable_static=no
fi
@@ -4011,10 +4183,10 @@ objext=o
_LT_AC_TAGVAR(objext, $1)=$objext
# Code to be used in simple compile tests
-lt_simple_compile_test_code="class foo {}\n"
+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) {}; }\n'
+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_AC_SYS_COMPILER
@@ -4067,7 +4239,7 @@ objext=o
_LT_AC_TAGVAR(objext, $1)=$objext
# Code to be used in simple compile tests
-lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
+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"
@@ -4141,6 +4313,7 @@ if test -f "$ltmain"; then
_LT_AC_TAGVAR(predeps, $1) \
_LT_AC_TAGVAR(postdeps, $1) \
_LT_AC_TAGVAR(compiler_lib_search_path, $1) \
+ _LT_AC_TAGVAR(compiler_lib_search_dirs, $1) \
_LT_AC_TAGVAR(archive_cmds, $1) \
_LT_AC_TAGVAR(archive_expsym_cmds, $1) \
_LT_AC_TAGVAR(postinstall_cmds, $1) \
@@ -4156,6 +4329,7 @@ if test -f "$ltmain"; then
_LT_AC_TAGVAR(module_cmds, $1) \
_LT_AC_TAGVAR(module_expsym_cmds, $1) \
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
+ _LT_AC_TAGVAR(fix_srcfile_path, $1) \
_LT_AC_TAGVAR(exclude_expsyms, $1) \
_LT_AC_TAGVAR(include_expsyms, $1); do
@@ -4202,7 +4376,7 @@ ifelse([$1], [],
# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
#
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
# Free Software Foundation, Inc.
#
# This file is part of GNU Libtool:
@@ -4439,6 +4613,10 @@ predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
# shared library.
postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
+# The directories searched by this compiler when creating a shared
+# library
+compiler_lib_search_dirs=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)
+
# The library search path used internally by the compiler when linking
# a shared library.
compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
@@ -4527,7 +4705,7 @@ sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
+fix_srcfile_path=$lt_fix_srcfile_path
# Set to yes if exported symbols are required.
always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
@@ -4610,6 +4788,7 @@ fi
# ---------------------------------
AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
[AC_REQUIRE([AC_CANONICAL_HOST])
+AC_REQUIRE([LT_AC_PROG_SED])
AC_REQUIRE([AC_PROG_NM])
AC_REQUIRE([AC_OBJEXT])
# Check for command to grab the raw symbol name followed by C symbol from nm.
@@ -4646,7 +4825,7 @@ hpux*) # Its linker distinguishes data from code symbols
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
;;
-linux*)
+linux* | k*bsd*-gnu)
if test "$host_cpu" = ia64; then
symcode='[[ABCDGIRSTW]]'
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
@@ -4787,7 +4966,7 @@ EOF
echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
cat conftest.$ac_ext >&5
fi
- rm -f conftest* conftst*
+ rm -rf conftest* conftst*
# Do not use the global_symbol_pipe unless it works.
if test "$pipe_works" = yes; then
@@ -4836,13 +5015,16 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
# like `-m68040'.
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
;;
- beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
# PIC is the default for these OSes.
;;
- mingw* | os2* | pw32*)
+ mingw* | cygwin* | os2* | pw32*)
# 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).
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
+ # (--disable-auto-import) libraries
+ m4_if([$1], [GCJ], [],
+ [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
;;
darwin* | rhapsody*)
# PIC is the default on this platform
@@ -4853,7 +5035,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
# DJGPP does not support shared libraries at all
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
;;
- interix3*)
+ interix[[3-9]]*)
# Interix 3.x gcc -fpic/-fPIC options generate broken code.
# Instead, we relocate shared libraries at runtime.
;;
@@ -4879,7 +5061,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
esac
else
case $host_os in
- aix4* | aix5*)
+ aix[[4-9]]*)
# All AIX code is PIC.
if test "$host_cpu" = ia64; then
# AIX 5 now supports IA64 processor
@@ -4919,7 +5101,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
;;
esac
;;
- freebsd* | kfreebsd*-gnu | dragonfly*)
+ freebsd* | dragonfly*)
# FreeBSD uses GNU C++
;;
hpux9* | hpux10* | hpux11*)
@@ -4962,7 +5144,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
;;
esac
;;
- linux*)
+ linux* | k*bsd*-gnu)
case $cc_basename in
KCC*)
# KAI C++ Compiler
@@ -4975,7 +5157,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
;;
- pgCC*)
+ pgCC* | pgcpp*)
# Portland Group C++ compiler.
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
@@ -4989,6 +5171,14 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
;;
*)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+ ;;
+ esac
;;
esac
;;
@@ -5109,14 +5299,17 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
;;
- beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
# PIC is the default for these OSes.
;;
- mingw* | pw32* | os2*)
+ mingw* | cygwin* | pw32* | os2*)
# 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).
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
+ # (--disable-auto-import) libraries
+ m4_if([$1], [GCJ], [],
+ [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
;;
darwin* | rhapsody*)
@@ -5125,7 +5318,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
;;
- interix3*)
+ interix[[3-9]]*)
# Interix 3.x gcc -fpic/-fPIC options generate broken code.
# Instead, we relocate shared libraries at runtime.
;;
@@ -5183,10 +5376,11 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
esac
;;
- mingw* | pw32* | os2*)
+ mingw* | cygwin* | pw32* | os2*)
# 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).
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
+ m4_if([$1], [GCJ], [],
+ [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
;;
hpux9* | hpux10* | hpux11*)
@@ -5216,7 +5410,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
;;
- linux*)
+ linux* | k*bsd*-gnu)
case $cc_basename in
icc* | ecc*)
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
@@ -5235,6 +5429,22 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
# All Alpha code is PIC.
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C 5.9
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ ;;
+ *Sun\ F*)
+ # Sun Fortran 8.3 passes all unrecognized flags to the linker
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=''
+ ;;
+ esac
+ ;;
esac
;;
@@ -5244,6 +5454,10 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
;;
+ rdos*)
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+
solaris*)
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
@@ -5303,7 +5517,7 @@ AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
#
if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
- _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
+ _LT_AC_TAGVAR(lt_cv_prog_compiler_pic_works, $1),
[$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
[case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
"" | " "*) ;;
@@ -5327,7 +5541,7 @@ esac
#
wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
- _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
+ _LT_AC_TAGVAR(lt_cv_prog_compiler_static_works, $1),
$lt_tmp_static_flag,
[],
[_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
@@ -5338,11 +5552,12 @@ AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
# ------------------------------------
# See if the linker supports building shared libraries.
AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
-[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+[AC_REQUIRE([LT_AC_PROG_SED])dnl
+AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
ifelse([$1],[CXX],[
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
case $host_os in
- aix4* | aix5*)
+ 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
@@ -5355,12 +5570,13 @@ ifelse([$1],[CXX],[
_LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
;;
cygwin* | mingw*)
- _LT_AC_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'
+ _LT_AC_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'
;;
*)
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
;;
esac
+ _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
],[
runpath_var=
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
@@ -5391,12 +5607,14 @@ ifelse([$1],[CXX],[
# 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_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
+ _LT_AC_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=
# Just being paranoid about ensuring that cc_basename is set.
_LT_CC_BASENAME([$compiler])
@@ -5446,7 +5664,7 @@ ifelse([$1],[CXX],[
# See if GNU ld supports shared libraries.
case $host_os in
- aix3* | aix4* | aix5*)
+ aix[[3-9]]*)
# On AIX/PPC, the GNU linker is very broken
if test "$host_cpu" != ia64; then
_LT_AC_TAGVAR(ld_shlibs, $1)=no
@@ -5494,7 +5712,7 @@ EOF
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
_LT_AC_TAGVAR(always_export_symbols, $1)=no
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
- _LT_AC_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'
+ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
@@ -5512,7 +5730,7 @@ EOF
fi
;;
- interix3*)
+ interix[[3-9]]*)
_LT_AC_TAGVAR(hardcode_direct, $1)=no
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
@@ -5527,7 +5745,7 @@ EOF
_LT_AC_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'
;;
- linux*)
+ gnu* | linux* | k*bsd*-gnu)
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
tmp_addflag=
case $cc_basename,$host_cpu in
@@ -5545,13 +5763,22 @@ EOF
ifc* | ifort*) # Intel Fortran compiler
tmp_addflag=' -nofor_main' ;;
esac
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*) # Sun C 5.9
+ _LT_AC_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'
+ tmp_sharedflag='-G' ;;
+ *Sun\ F*) # Sun Fortran 8.3
+ tmp_sharedflag='-G' ;;
+ *)
+ tmp_sharedflag='-shared' ;;
+ esac
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
if test $supports_anon_versioning = yes; then
_LT_AC_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 -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
fi
else
_LT_AC_TAGVAR(ld_shlibs, $1)=no
@@ -5591,7 +5818,7 @@ EOF
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
case `$LD -v 2>&1` in
- *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
+ *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
_LT_AC_TAGVAR(ld_shlibs, $1)=no
cat <<_LT_EOF 1>&2
@@ -5656,7 +5883,7 @@ _LT_EOF
fi
;;
- aix4* | aix5*)
+ 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.
@@ -5676,7 +5903,7 @@ _LT_EOF
# 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]].*|aix5*)
+ 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
@@ -5710,7 +5937,7 @@ _LT_EOF
strings "$collect2name" | grep resolve_lib_name >/dev/null
then
# We have reworked collect2
- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ :
else
# We have old collect2
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
@@ -5803,7 +6030,7 @@ _LT_EOF
# The linker will automatically build a .lib file if we build a DLL.
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
# FIXME: Should let the user specify the lib program.
- _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
+ _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
_LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
;;
@@ -5836,19 +6063,18 @@ _LT_EOF
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
if test "$GCC" = yes ; then
output_verbose_link_cmd='echo'
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
- _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
- # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ _LT_AC_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_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+ _LT_AC_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_AC_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}"
else
case $cc_basename in
xlc*)
output_verbose_link_cmd='echo'
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
_LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
_LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
;;
*)
@@ -5888,7 +6114,7 @@ _LT_EOF
;;
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
- freebsd* | kfreebsd*-gnu | dragonfly*)
+ freebsd* | dragonfly*)
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
@@ -6011,15 +6237,15 @@ _LT_EOF
openbsd*)
if test -f /usr/libexec/ld.so; then
- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
- else
- case $host_os in
+ else
+ case $host_os in
openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
@@ -6028,10 +6254,10 @@ _LT_EOF
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
;;
- esac
+ esac
fi
else
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
fi
;;
@@ -6090,17 +6316,16 @@ _LT_EOF
case $host_os in
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
*)
- # The compiler driver will combine linker options so we
- # cannot just pass the convience library names through
- # without $wl, iff we do not link with $LD.
- # Luckily, gcc supports the same syntax we need for Sun Studio.
+ # 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?)
- case $wlarc in
- '')
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
- *)
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
- esac ;;
+ if test "$GCC" = yes; then
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ else
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
+ fi
+ ;;
esac
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
;;
@@ -6157,7 +6382,7 @@ _LT_EOF
fi
;;
- sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*)
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
_LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
@@ -6232,7 +6457,7 @@ x|xyes)
# to ld, don't add -lc before -lgcc.
AC_MSG_CHECKING([whether -lc should be explicitly linked in])
$rm conftest*
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
soname=conftest
@@ -6335,6 +6560,30 @@ AC_DEFUN([LT_AC_PROG_RC],
[AC_CHECK_TOOL(RC, windres, no)
])
+
+# Cheap backport of AS_EXECUTABLE_P and required macros
+# from Autoconf 2.59; we should not use $as_executable_p directly.
+
+# _AS_TEST_PREPARE
+# ----------------
+m4_ifndef([_AS_TEST_PREPARE],
+[m4_defun([_AS_TEST_PREPARE],
+[if test -x / >/dev/null 2>&1; then
+ as_executable_p='test -x'
+else
+ as_executable_p='test -f'
+fi
+])])# _AS_TEST_PREPARE
+
+# AS_EXECUTABLE_P
+# ---------------
+# Check whether a file is executable.
+m4_ifndef([AS_EXECUTABLE_P],
+[m4_defun([AS_EXECUTABLE_P],
+[AS_REQUIRE([_AS_TEST_PREPARE])dnl
+$as_executable_p $1[]dnl
+])])# AS_EXECUTABLE_P
+
# 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 #
@@ -6355,12 +6604,13 @@ do
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
+ 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
@@ -6393,6 +6643,7 @@ for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
done
])
SED=$lt_cv_path_SED
+AC_SUBST([SED])
AC_MSG_RESULT([$SED])
])
@@ -7427,7 +7678,7 @@ AC_DEFUN([XORG_MACROS_VERSION],[
XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'`
XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}])
- [XORG_MACROS_version=1.1.5
+ [XORG_MACROS_version=1.1.6
XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'`
XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then
@@ -7576,7 +7827,11 @@ AC_DEFUN([XORG_CHECK_LINUXDOC],[
XORG_SGML_PATH=$prefix/share/sgml
HAVE_DEFS_ENT=
-AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
+if test x"$cross_compiling" = x"yes" ; then
+ HAVE_DEFS_ENT=no
+else
+ AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
+fi
AC_PATH_PROG(LINUXDOC, linuxdoc)
AC_PATH_PROG(PS2PDF, ps2pdf)
@@ -7897,14 +8152,14 @@ AC_DEFUN([XORG_RELEASE_VERSION],[
AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
[`echo $PACKAGE_VERSION | cut -d . -f 1`],
[Major version of this package])
- PVM=`echo $PACKAGE_VERSION | cut -d . -f 2`
+ PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
if test "x$PVM" = "x"; then
PVM="0"
fi
AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
[$PVM],
[Minor version of this package])
- PVP=`echo $PACKAGE_VERSION | cut -d . -f 3`
+ PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
if test "x$PVP" = "x"; then
PVP="0"
fi
diff --git a/driver/xf86-video-nv/compat/Makefile.am b/driver/xf86-video-nv/compat/Makefile.am
index f5f8d936d..de17f9332 100644
--- a/driver/xf86-video-nv/compat/Makefile.am
+++ b/driver/xf86-video-nv/compat/Makefile.am
@@ -7,6 +7,7 @@ EXTRA_DIST = \
modes/xf86cvt.c \
modes/xf86DiDGA.c \
modes/xf86EdidModes.c \
+ modes/xf86gtf.c \
modes/xf86Modes.c \
modes/xf86Modes.h \
modes/xf86RandR12.c \
diff --git a/driver/xf86-video-nv/compat/Makefile.in b/driver/xf86-video-nv/compat/Makefile.in
index 858efc555..6b95d3103 100644
--- a/driver/xf86-video-nv/compat/Makefile.in
+++ b/driver/xf86-video-nv/compat/Makefile.in
@@ -77,6 +77,7 @@ DEPDIR = @DEPDIR@
DRIVER_MAN_DIR = @DRIVER_MAN_DIR@
DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
DRIVER_NAME = @DRIVER_NAME@
+DSYMUTIL = @DSYMUTIL@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
@@ -105,6 +106,7 @@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
MISC_MAN_DIR = @MISC_MAN_DIR@
MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
+NMEDIT = @NMEDIT@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@@ -117,6 +119,7 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@
PCIACCESS_LIBS = @PCIACCESS_LIBS@
PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
@@ -127,7 +130,9 @@ XORG_LIBS = @XORG_LIBS@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DSYMUTIL = @ac_ct_DSYMUTIL@
ac_ct_F77 = @ac_ct_F77@
+ac_ct_NMEDIT = @ac_ct_NMEDIT@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
@@ -180,6 +185,7 @@ EXTRA_DIST = \
modes/xf86cvt.c \
modes/xf86DiDGA.c \
modes/xf86EdidModes.c \
+ modes/xf86gtf.c \
modes/xf86Modes.c \
modes/xf86Modes.h \
modes/xf86RandR12.c \
diff --git a/driver/xf86-video-nv/compat/modes/xf86Crtc.c b/driver/xf86-video-nv/compat/modes/xf86Crtc.c
index d375da897..855d646da 100644
--- a/driver/xf86-video-nv/compat/modes/xf86Crtc.c
+++ b/driver/xf86-video-nv/compat/modes/xf86Crtc.c
@@ -1,5 +1,6 @@
/*
* Copyright © 2006 Keith Packard
+ * Copyright © 2008 Red Hat, Inc.
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
@@ -36,6 +37,7 @@
#include "xf86DDC.h"
#include "xf86Crtc.h"
#include "xf86Modes.h"
+#include "xf86Priv.h"
#include "xf86RandR12.h"
#include "X11/extensions/render.h"
#define DPMS_SERVER
@@ -235,6 +237,9 @@ xf86CrtcSetMode (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation,
int saved_x, saved_y;
Rotation saved_rotation;
+ if (crtc->funcs->set_mode_major)
+ return crtc->funcs->set_mode_major(crtc, mode, rotation, x, y);
+
crtc->enabled = xf86CrtcInUse (crtc);
if (!crtc->enabled)
@@ -259,6 +264,30 @@ xf86CrtcSetMode (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation,
crtc->y = y;
crtc->rotation = rotation;
+ /* Shift offsets that move us out of virtual size */
+ if (x + mode->HDisplay > xf86_config->maxWidth ||
+ y + mode->VDisplay > xf86_config->maxHeight)
+ {
+ if (x + mode->HDisplay > xf86_config->maxWidth)
+ crtc->x = xf86_config->maxWidth - mode->HDisplay;
+ if (y + mode->VDisplay > xf86_config->maxHeight)
+ crtc->y = xf86_config->maxHeight - mode->VDisplay;
+ if (crtc->x < 0 || crtc->y < 0)
+ {
+ xf86DrvMsg (scrn->scrnIndex, X_ERROR,
+ "Mode %dx%d does not fit virtual size %dx%d - "
+ "internal error\n", mode->HDisplay, mode->VDisplay,
+ xf86_config->maxWidth, xf86_config->maxHeight);
+ goto done;
+ }
+ xf86DrvMsg (scrn->scrnIndex, X_ERROR,
+ "Mode %dx%d+%d+%d does not fit virtual size %dx%d - "
+ "offset updated to +%d+%d\n",
+ mode->HDisplay, mode->VDisplay, x, y,
+ xf86_config->maxWidth, xf86_config->maxHeight,
+ crtc->x, crtc->y);
+ }
+
/* XXX short-circuit changes to base location only */
/* Pass our mode to the outputs and the CRTC to give them a chance to
@@ -300,7 +329,7 @@ xf86CrtcSetMode (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation,
/* Set up the DPLL and any output state that needs to adjust or depend
* on the DPLL.
*/
- crtc->funcs->mode_set(crtc, mode, adjusted_mode, x, y);
+ crtc->funcs->mode_set(crtc, mode, adjusted_mode, crtc->x, crtc->y);
for (i = 0; i < xf86_config->num_output; i++)
{
xf86OutputPtr output = xf86_config->output[i];
@@ -438,7 +467,7 @@ xf86OutputSetMonitor (xf86OutputPtr output)
}
static Bool
-xf86OutputEnabled (xf86OutputPtr output)
+xf86OutputEnabled (xf86OutputPtr output, Bool strict)
{
Bool enable, disable;
@@ -456,8 +485,16 @@ xf86OutputEnabled (xf86OutputPtr output)
"Output %s disabled by config file\n", output->name);
return FALSE;
}
- /* otherwise, enable if it is not disconnected */
- enable = output->status != XF86OutputStatusDisconnected;
+
+ /* If not, try to only light up the ones we know are connected */
+ if (strict) {
+ enable = output->status == XF86OutputStatusConnected;
+ }
+ /* But if that fails, try to light up even outputs we're unsure of */
+ else {
+ enable = output->status != XF86OutputStatusDisconnected;
+ }
+
xf86DrvMsg (output->scrn->scrnIndex, X_INFO,
"Output %s %sconnected\n", output->name, enable ? "" : "dis");
return enable;
@@ -704,14 +741,15 @@ xf86DefaultMode (xf86OutputPtr output, int width, int height)
mm_height = output->mm_height;
if (!mm_height)
- mm_height = 203; /* 768 pixels at 96dpi */
+ mm_height = (768 * 25.4) / DEFAULT_DPI;
/*
- * Pick a mode closest to 96dpi
+ * Pick a mode closest to DEFAULT_DPI
*/
for (mode = output->probed_modes; mode; mode = mode->next)
{
int dpi;
- int preferred = (mode->type & M_T_PREFERRED) != 0;
+ int preferred = (((mode->type & M_T_PREFERRED) != 0) +
+ ((mode->type & M_T_USERPREF) != 0));
int diff;
if (xf86ModeWidth (mode, output->initial_rotation) > width ||
@@ -720,7 +758,7 @@ xf86DefaultMode (xf86OutputPtr output, int width, int height)
/* yes, use VDisplay here, not xf86ModeHeight */
dpi = (mode->VDisplay * 254) / (mm_height * 10);
- diff = dpi - 96;
+ diff = dpi - DEFAULT_DPI;
diff = diff < 0 ? -diff : diff;
if (target_mode == NULL || (preferred > target_preferred) ||
(preferred == target_preferred && diff < target_diff))
@@ -771,7 +809,7 @@ xf86ClosestMode (xf86OutputPtr output,
return target_mode;
}
-static Bool
+static DisplayModePtr
xf86OutputHasPreferredMode (xf86OutputPtr output, int width, int height)
{
DisplayModePtr mode;
@@ -783,9 +821,21 @@ xf86OutputHasPreferredMode (xf86OutputPtr output, int width, int height)
continue;
if (mode->type & M_T_PREFERRED)
- return TRUE;
+ return mode;
}
- return FALSE;
+ return NULL;
+}
+
+static DisplayModePtr
+xf86OutputHasUserPreferredMode (xf86OutputPtr output)
+{
+ DisplayModePtr mode, first = output->probed_modes;
+
+ for (mode = first; mode && mode->next != first; mode = mode->next)
+ if (mode->type & M_T_USERPREF)
+ return mode;
+
+ return NULL;
}
static int
@@ -1053,6 +1103,16 @@ xf86InitialOutputPositions (ScrnInfoPtr scrn, DisplayModePtr *modes)
any_set = TRUE;
continue;
}
+ if (!modes[or])
+ {
+ xf86DrvMsg (scrn->scrnIndex, X_ERROR,
+ "Cannot position output %s relative to output %s without modes\n",
+ output->name, relative_name);
+ output->initial_x = 0;
+ output->initial_y = 0;
+ any_set = TRUE;
+ continue;
+ }
if (relative->initial_x == POSITION_UNSET)
{
keep_going = TRUE;
@@ -1068,10 +1128,10 @@ xf86InitialOutputPositions (ScrnInfoPtr scrn, DisplayModePtr *modes)
output->initial_x += xf86ModeWidth (modes[or], relative->initial_rotation);
break;
case OPTION_ABOVE:
- output->initial_y -= xf86ModeHeight (modes[or], relative->initial_rotation);
+ output->initial_y -= xf86ModeHeight (modes[o], relative->initial_rotation);
break;
case OPTION_LEFT_OF:
- output->initial_x -= xf86ModeWidth (modes[or], relative->initial_rotation);
+ output->initial_x -= xf86ModeWidth (modes[o], relative->initial_rotation);
break;
default:
break;
@@ -1214,6 +1274,67 @@ xf86SortModes (DisplayModePtr input)
return output;
}
+static char *
+preferredMode(ScrnInfoPtr pScrn, xf86OutputPtr output)
+{
+ char *preferred_mode = NULL;
+
+ /* Check for a configured preference for a particular mode */
+ preferred_mode = xf86GetOptValString (output->options,
+ OPTION_PREFERRED_MODE);
+ if (preferred_mode)
+ return preferred_mode;
+
+ if (pScrn->display->modes && *pScrn->display->modes)
+ preferred_mode = *pScrn->display->modes;
+
+ return preferred_mode;
+}
+
+static void
+GuessRangeFromModes(MonPtr mon, DisplayModePtr mode)
+{
+ if (!mon || !mode)
+ return;
+
+ mon->nHsync = 1;
+ mon->hsync[0].lo = 1024.0;
+ mon->hsync[0].hi = 0.0;
+
+ mon->nVrefresh = 1;
+ mon->vrefresh[0].lo = 1024.0;
+ mon->vrefresh[0].hi = 0.0;
+
+ while (mode) {
+ if (!mode->HSync)
+ mode->HSync = ((float) mode->Clock ) / ((float) mode->HTotal);
+
+ if (!mode->VRefresh)
+ mode->VRefresh = (1000.0 * ((float) mode->Clock)) /
+ ((float) (mode->HTotal * mode->VTotal));
+
+ if (mode->HSync < mon->hsync[0].lo)
+ mon->hsync[0].lo = mode->HSync;
+
+ if (mode->HSync > mon->hsync[0].hi)
+ mon->hsync[0].hi = mode->HSync;
+
+ if (mode->VRefresh < mon->vrefresh[0].lo)
+ mon->vrefresh[0].lo = mode->VRefresh;
+
+ if (mode->VRefresh > mon->vrefresh[0].hi)
+ mon->vrefresh[0].hi = mode->VRefresh;
+
+ mode = mode->next;
+ }
+
+ /* stretch out the bottom to fit 640x480@60 */
+ if (mon->hsync[0].lo > 31.0)
+ mon->hsync[0].lo = 31.0;
+ if (mon->vrefresh[0].lo > 58.0)
+ mon->vrefresh[0].lo = 58.0;
+}
+
_X_EXPORT void
xf86ProbeOutputModes (ScrnInfoPtr scrn, int maxX, int maxY)
{
@@ -1318,8 +1439,8 @@ xf86ProbeOutputModes (ScrnInfoPtr scrn, int maxX, int maxY)
if (sync_source == sync_default)
sync_source = sync_edid;
}
- if (ranges->max_clock > max_clock)
- max_clock = ranges->max_clock;
+ if (ranges->max_clock * 1000 > max_clock)
+ max_clock = ranges->max_clock * 1000;
}
}
}
@@ -1331,6 +1452,10 @@ xf86ProbeOutputModes (ScrnInfoPtr scrn, int maxX, int maxY)
OPTUNITS_KHZ, &clock))
max_clock = (int) clock;
+ /* If we still don't have a sync range, guess wildly */
+ if (!mon_rec.nHsync || !mon_rec.nVrefresh)
+ GuessRangeFromModes(&mon_rec, output_modes);
+
/*
* These limits will end up setting a 1024x768@60Hz mode by default,
* which seems like a fairly good mode to use when nothing else is
@@ -1350,7 +1475,14 @@ xf86ProbeOutputModes (ScrnInfoPtr scrn, int maxX, int maxY)
}
default_modes = xf86GetDefaultModes (output->interlaceAllowed,
output->doubleScanAllowed);
-
+
+ /*
+ * If this is not an RB monitor, remove RB modes from the default
+ * pool. RB modes from the config or the monitor itself are fine.
+ */
+ if (!mon_rec.reducedblanking)
+ xf86ValidateModesReducedBlanking (scrn, default_modes);
+
if (sync_source == sync_config)
{
/*
@@ -1366,9 +1498,12 @@ xf86ProbeOutputModes (ScrnInfoPtr scrn, int maxX, int maxY)
/*
* Check default modes against monitor max clock
*/
- if (max_clock)
+ if (max_clock) {
xf86ValidateModesClocks(scrn, default_modes,
&min_clock, &max_clock, 1);
+ xf86ValidateModesClocks(scrn, output_modes,
+ &min_clock, &max_clock, 1);
+ }
output->probed_modes = NULL;
output->probed_modes = xf86ModesAdd (output->probed_modes, config_modes);
@@ -1395,8 +1530,7 @@ xf86ProbeOutputModes (ScrnInfoPtr scrn, int maxX, int maxY)
output->probed_modes = xf86SortModes (output->probed_modes);
/* Check for a configured preference for a particular mode */
- preferred_mode = xf86GetOptValString (output->options,
- OPTION_PREFERRED_MODE);
+ preferred_mode = preferredMode(scrn, output);
if (preferred_mode)
{
@@ -1415,10 +1549,9 @@ xf86ProbeOutputModes (ScrnInfoPtr scrn, int maxX, int maxY)
mode->prev = NULL;
output->probed_modes = mode;
}
- mode->type |= M_T_PREFERRED;
+ mode->type |= (M_T_PREFERRED|M_T_USERPREF);
+ break;
}
- else
- mode->type &= ~M_T_PREFERRED;
}
}
@@ -1458,7 +1591,98 @@ xf86ProbeOutputModes (ScrnInfoPtr scrn, int maxX, int maxY)
_X_EXPORT void
xf86RandR12GetOriginalVirtualSize(ScrnInfoPtr scrn, int *x, int *y);
-_X_EXPORT void
+static DisplayModePtr
+biggestMode(DisplayModePtr a, DisplayModePtr b)
+{
+ int A, B;
+
+ if (!a)
+ return b;
+ if (!b)
+ return a;
+
+ A = a->HDisplay * a->VDisplay;
+ B = b->HDisplay * b->VDisplay;
+
+ if (A > B)
+ return a;
+
+ return b;
+}
+
+static xf86OutputPtr
+SetCompatOutput(xf86CrtcConfigPtr config)
+{
+ xf86OutputPtr output = NULL, test = NULL;
+ DisplayModePtr maxmode = NULL, testmode, mode;
+ int o, compat = -1, count, mincount = 0;
+
+ /* Look for one that's definitely connected */
+ for (o = 0; o < config->num_output; o++)
+ {
+ test = config->output[o];
+ if (!test->crtc)
+ continue;
+ if (test->status != XF86OutputStatusConnected)
+ continue;
+ if (!test->probed_modes)
+ continue;
+
+ testmode = mode = test->probed_modes;
+ for (count = 0; mode; mode = mode->next, count++)
+ testmode = biggestMode(testmode, mode);
+
+ if (!output) {
+ output = test;
+ compat = o;
+ maxmode = testmode;
+ mincount = count;
+ } else if (maxmode == biggestMode(maxmode, testmode)) {
+ output = test;
+ compat = o;
+ maxmode = testmode;
+ mincount = count;
+ } else if ((maxmode->HDisplay == testmode->HDisplay) &&
+ (maxmode->VDisplay == testmode->VDisplay) &&
+ count <= mincount) {
+ output = test;
+ compat = o;
+ maxmode = testmode;
+ mincount = count;
+ }
+ }
+
+ /* If we didn't find one, take anything we can get */
+ if (!output)
+ {
+ for (o = 0; o < config->num_output; o++)
+ {
+ test = config->output[o];
+ if (!test->crtc)
+ continue;
+ if (!test->probed_modes)
+ continue;
+
+ if (!output) {
+ output = test;
+ compat = o;
+ } else if (test->probed_modes->HDisplay < output->probed_modes->HDisplay) {
+ output = test;
+ compat = o;
+ }
+ }
+ }
+
+ if (compat >= 0) {
+ config->compat_output = compat;
+ } else {
+ /* Don't change the compat output when no valid outputs found */
+ output = config->output[config->compat_output];
+ }
+
+ return output;
+}
+
xf86SetScrnInfoModes (ScrnInfoPtr scrn)
{
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn);
@@ -1466,23 +1690,11 @@ xf86SetScrnInfoModes (ScrnInfoPtr scrn)
xf86CrtcPtr crtc;
DisplayModePtr last, mode;
- output = config->output[config->compat_output];
- if (!output->crtc)
- {
- int o;
+ output = SetCompatOutput(config);
+
+ if (!output)
+ return; /* punt */
- output = NULL;
- for (o = 0; o < config->num_output; o++)
- if (config->output[o]->crtc)
- {
- config->compat_output = o;
- output = config->output[o];
- break;
- }
- /* no outputs are active, punt and leave things as they are */
- if (!output)
- return;
- }
crtc = output->crtc;
/* Clear any existing modes from scrn->modes */
@@ -1512,6 +1724,271 @@ xf86SetScrnInfoModes (ScrnInfoPtr scrn)
scrn->currentMode = scrn->modes;
}
+static void
+xf86EnableOutputs(ScrnInfoPtr scrn, xf86CrtcConfigPtr config, Bool *enabled)
+{
+ Bool any_enabled = FALSE;
+ int o;
+
+ for (o = 0; o < config->num_output; o++)
+ any_enabled |= enabled[o] = xf86OutputEnabled(config->output[o], TRUE);
+
+ if (!any_enabled) {
+ xf86DrvMsg(scrn->scrnIndex, X_WARNING,
+ "No outputs definitely connected, trying again...\n");
+
+ for (o = 0; o < config->num_output; o++)
+ enabled[o] = xf86OutputEnabled(config->output[o], FALSE);
+ }
+}
+
+static Bool
+nextEnabledOutput(xf86CrtcConfigPtr config, Bool *enabled, int *index)
+{
+ int o = *index;
+
+ for (o++; o < config->num_output; o++) {
+ if (enabled[o]) {
+ *index = o;
+ return TRUE;
+ }
+ }
+
+ return FALSE;
+}
+
+static Bool
+xf86TargetPreferred(ScrnInfoPtr scrn, xf86CrtcConfigPtr config,
+ DisplayModePtr *modes, Bool *enabled,
+ int width, int height)
+{
+ int o, p;
+ int max_pref_width = 0, max_pref_height = 0;
+ DisplayModePtr *preferred, *preferred_match;
+ Bool ret = FALSE;
+
+ preferred = xnfcalloc(config->num_output, sizeof(DisplayModePtr));
+ preferred_match = xnfcalloc(config->num_output, sizeof(DisplayModePtr));
+
+ /* Check if the preferred mode is available on all outputs */
+ for (p = -1; nextEnabledOutput(config, enabled, &p); ) {
+ Rotation r = config->output[p]->initial_rotation;
+ DisplayModePtr mode;
+ if ((preferred[p] = xf86OutputHasPreferredMode(config->output[p],
+ width, height))) {
+ int pref_width = xf86ModeWidth(preferred[p], r);
+ int pref_height = xf86ModeHeight(preferred[p], r);
+ Bool all_match = TRUE;
+
+ for (o = -1; nextEnabledOutput(config, enabled, &o); ) {
+ Bool match = FALSE;
+ xf86OutputPtr output = config->output[o];
+ if (o == p)
+ continue;
+
+ for (mode = output->probed_modes; mode; mode = mode->next) {
+ Rotation r = output->initial_rotation;
+ if (xf86ModeWidth(mode, r) == pref_width &&
+ xf86ModeHeight(mode, r) == pref_height) {
+ preferred[o] = mode;
+ match = TRUE;
+ }
+ }
+
+ all_match &= match;
+ }
+
+ if (all_match &&
+ (pref_width*pref_height > max_pref_width*max_pref_height)) {
+ for (o = -1; nextEnabledOutput(config, enabled, &o); )
+ preferred_match[o] = preferred[o];
+ max_pref_width = pref_width;
+ max_pref_height = pref_height;
+ ret = TRUE;
+ }
+ }
+ }
+
+ if (ret) {
+ /* oh good, there is a match. stash the selected modes and return. */
+ memcpy(modes, preferred_match,
+ config->num_output * sizeof(DisplayModePtr));
+ }
+
+ xfree(preferred);
+ xfree(preferred_match);
+ return ret;
+}
+
+static Bool
+aspectMatch(float a, float b)
+{
+ return fabs(1 - (a / b)) < 0.05;
+}
+
+static DisplayModePtr
+nextAspectMode(xf86OutputPtr o, DisplayModePtr last, float aspect)
+{
+ DisplayModePtr m = NULL;
+
+ if (!o)
+ return NULL;
+
+ if (!last)
+ m = o->probed_modes;
+ else
+ m = last->next;
+
+ for (; m; m = m->next)
+ if (aspectMatch(aspect, (float)m->HDisplay / (float)m->VDisplay))
+ return m;
+
+ return NULL;
+}
+
+static DisplayModePtr
+bestModeForAspect(xf86CrtcConfigPtr config, Bool *enabled, float aspect)
+{
+ int o = -1, p;
+ DisplayModePtr mode = NULL, test = NULL, match = NULL;
+
+ nextEnabledOutput(config, enabled, &o);
+ while ((mode = nextAspectMode(config->output[o], mode, aspect))) {
+ for (p = o; nextEnabledOutput(config, enabled, &p); ) {
+ test = xf86OutputFindClosestMode(config->output[p], mode);
+ if (!test)
+ break;
+ if (test->HDisplay != mode->HDisplay ||
+ test->VDisplay != mode->VDisplay) {
+ test = NULL;
+ break;
+ }
+ }
+
+ /* if we didn't match it on all outputs, try the next one */
+ if (!test)
+ continue;
+
+ /* if it's bigger than the last one, save it */
+ if (!match || (test->HDisplay > match->HDisplay))
+ match = test;
+ }
+
+ /* return the biggest one found */
+ return match;
+}
+
+static Bool
+xf86TargetAspect(ScrnInfoPtr scrn, xf86CrtcConfigPtr config,
+ DisplayModePtr *modes, Bool *enabled,
+ int width, int height)
+{
+ int o;
+ float aspect = 0.0, *aspects;
+ xf86OutputPtr output;
+ Bool ret = FALSE;
+ DisplayModePtr guess = NULL, aspect_guess = NULL, base_guess = NULL;
+
+ aspects = xnfcalloc(config->num_output, sizeof(float));
+
+ /* collect the aspect ratios */
+ for (o = -1; nextEnabledOutput(config, enabled, &o); ) {
+ output = config->output[o];
+ if (output->mm_height)
+ aspects[o] = (float)output->mm_width / (float)output->mm_height;
+ else
+ aspects[o] = 4.0 / 3.0;
+ }
+
+ /* check that they're all the same */
+ for (o = -1; nextEnabledOutput(config, enabled, &o); ) {
+ output = config->output[o];
+ if (!aspect) {
+ aspect = aspects[o];
+ } else if (!aspectMatch(aspect, aspects[o])) {
+ goto no_aspect_match;
+ }
+ }
+
+ /* if they're all 4:3, just skip ahead and save effort */
+ if (!aspectMatch(aspect, 4.0/3.0))
+ aspect_guess = bestModeForAspect(config, enabled, aspect);
+
+no_aspect_match:
+ base_guess = bestModeForAspect(config, enabled, 4.0/3.0);
+
+ guess = biggestMode(base_guess, aspect_guess);
+
+ if (!guess)
+ goto out;
+
+ /* found a mode that works everywhere, now apply it */
+ for (o = -1; nextEnabledOutput(config, enabled, &o); ) {
+ modes[o] = xf86OutputFindClosestMode(config->output[o], guess);
+ }
+ ret = TRUE;
+
+out:
+ xfree(aspects);
+ return ret;
+}
+
+static Bool
+xf86TargetFallback(ScrnInfoPtr scrn, xf86CrtcConfigPtr config,
+ DisplayModePtr *modes, Bool *enabled,
+ int width, int height)
+{
+ DisplayModePtr target_mode = NULL;
+ Rotation target_rotation = RR_Rotate_0;
+ DisplayModePtr default_mode;
+ int default_preferred, target_preferred = 0, o;
+
+ /* User preferred > preferred > other modes */
+ for (o = -1; nextEnabledOutput(config, enabled, &o); ) {
+ default_mode = xf86DefaultMode (config->output[o], width, height);
+ if (!default_mode)
+ continue;
+
+ default_preferred = (((default_mode->type & M_T_PREFERRED) != 0) +
+ ((default_mode->type & M_T_USERPREF) != 0));
+
+ if (default_preferred > target_preferred || !target_mode) {
+ target_mode = default_mode;
+ target_preferred = default_preferred;
+ target_rotation = config->output[o]->initial_rotation;
+ config->compat_output = o;
+ }
+ }
+
+ if (target_mode)
+ modes[config->compat_output] = target_mode;
+
+ /* Fill in other output modes */
+ for (o = -1; nextEnabledOutput(config, enabled, &o); ) {
+ if (!modes[o])
+ modes[o] = xf86ClosestMode(config->output[o], target_mode,
+ target_rotation, width, height);
+ }
+
+ return (target_mode != NULL);
+}
+
+static Bool
+xf86TargetUserpref(ScrnInfoPtr scrn, xf86CrtcConfigPtr config,
+ DisplayModePtr *modes, Bool *enabled,
+ int width, int height)
+{
+ int o;
+
+ for (o = -1; nextEnabledOutput(config, enabled, &o); )
+ if (xf86OutputHasUserPreferredMode(config->output[o]))
+ return
+ xf86TargetFallback(scrn, config, modes, enabled, width, height);
+
+ return FALSE;
+}
+
+
/**
* Construct default screen configuration
*
@@ -1531,13 +2008,11 @@ xf86InitialConfiguration (ScrnInfoPtr scrn, Bool canGrow)
{
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn);
int o, c;
- DisplayModePtr target_mode = NULL;
- Rotation target_rotation = RR_Rotate_0;
xf86CrtcPtr *crtcs;
DisplayModePtr *modes;
Bool *enabled;
- int width;
- int height;
+ int width, height;
+ int i = scrn->scrnIndex;
/* Set up the device options */
config->options = xnfalloc (sizeof (xf86DeviceOptions));
@@ -1563,70 +2038,28 @@ xf86InitialConfiguration (ScrnInfoPtr scrn, Bool canGrow)
modes = xnfcalloc (config->num_output, sizeof (DisplayModePtr));
enabled = xnfcalloc (config->num_output, sizeof (Bool));
- for (o = 0; o < config->num_output; o++)
- {
- xf86OutputPtr output = config->output[o];
-
- modes[o] = NULL;
- enabled[o] = xf86OutputEnabled (output);
- }
-
- /*
- * Let outputs with preferred modes drive screen size
- */
- for (o = 0; o < config->num_output; o++)
- {
- xf86OutputPtr output = config->output[o];
+ xf86EnableOutputs(scrn, config, enabled);
+
+ if (xf86TargetUserpref(scrn, config, modes, enabled, width, height))
+ xf86DrvMsg(i, X_INFO, "Using user preference for initial modes\n");
+ else if (xf86TargetPreferred(scrn, config, modes, enabled, width, height))
+ xf86DrvMsg(i, X_INFO, "Using exact sizes for initial modes\n");
+ else if (xf86TargetAspect(scrn, config, modes, enabled, width, height))
+ xf86DrvMsg(i, X_INFO, "Using fuzzy aspect match for initial modes\n");
+ else if (xf86TargetFallback(scrn, config, modes, enabled, width, height))
+ xf86DrvMsg(i, X_INFO, "Using sloppy heuristic for initial modes\n");
+ else
+ xf86DrvMsg(i, X_WARNING, "Unable to find initial modes\n");
- if (enabled[o] &&
- xf86OutputHasPreferredMode (output, width, height))
- {
- target_mode = xf86DefaultMode (output, width, height);
- target_rotation = output->initial_rotation;
- if (target_mode)
- {
- modes[o] = target_mode;
- config->compat_output = o;
- break;
- }
- }
- }
- if (!target_mode)
- {
- for (o = 0; o < config->num_output; o++)
- {
- xf86OutputPtr output = config->output[o];
- if (enabled[o])
- {
- target_mode = xf86DefaultMode (output, width, height);
- target_rotation = output->initial_rotation;
- if (target_mode)
- {
- modes[o] = target_mode;
- config->compat_output = o;
- break;
- }
- }
- }
- }
- for (o = 0; o < config->num_output; o++)
- {
- xf86OutputPtr output = config->output[o];
-
- if (enabled[o])
- {
- if (!modes[o])
- modes[o] = xf86ClosestMode (output, target_mode,
- target_rotation, width, height);
- if (!modes[o])
- xf86DrvMsg (scrn->scrnIndex, X_ERROR,
- "Output %s enabled but has no modes\n",
- output->name);
- else
- xf86DrvMsg (scrn->scrnIndex, X_INFO,
- "Output %s using initial mode %s\n",
- output->name, modes[o]->name);
- }
+ for (o = -1; nextEnabledOutput(config, enabled, &o); ) {
+ if (!modes[o])
+ xf86DrvMsg (scrn->scrnIndex, X_ERROR,
+ "Output %s enabled but has no modes\n",
+ config->output[o]->name);
+ else
+ xf86DrvMsg (scrn->scrnIndex, X_INFO,
+ "Output %s using initial mode %s\n",
+ config->output[o]->name, modes[o]->name);
}
/*
@@ -1681,6 +2114,8 @@ xf86InitialConfiguration (ScrnInfoPtr scrn, Bool canGrow)
crtc->x = output->initial_x;
crtc->y = output->initial_y;
output->crtc = crtc;
+ } else {
+ output->crtc = NULL;
}
}
@@ -1760,6 +2195,10 @@ xf86SetDesiredModes (ScrnInfoPtr scrn)
xf86OutputPtr output = NULL;
int o;
+ /* Skip disabled CRTCs */
+ if (!crtc->enabled)
+ continue;
+
if (config->output[config->compat_output]->crtc == crtc)
output = config->output[config->compat_output];
else
@@ -1771,9 +2210,7 @@ xf86SetDesiredModes (ScrnInfoPtr scrn)
break;
}
}
- /*
- * Skip disabled crtcs
- */
+ /* paranoia */
if (!output)
continue;
@@ -2134,13 +2571,21 @@ _X_EXPORT xf86MonPtr
xf86OutputGetEDID (xf86OutputPtr output, I2CBusPtr pDDCBus)
{
ScrnInfoPtr scrn = output->scrn;
+ xf86MonPtr mon;
+
+ mon = xf86DoEDID_DDC2 (scrn->scrnIndex, pDDCBus);
+ if (mon)
+ xf86DDCApplyQuirks (scrn->scrnIndex, mon);
- return xf86DoEDID_DDC2 (scrn->scrnIndex, pDDCBus);
+ return mon;
}
-static char *_xf86ConnectorNames[] = { "None", "VGA", "DVI-I", "DVI-D",
- "DVI-A", "Composite", "S-Video",
- "Component", "LFP", "Proprietary" };
+static char *_xf86ConnectorNames[] = {
+ "None", "VGA", "DVI-I", "DVI-D",
+ "DVI-A", "Composite", "S-Video",
+ "Component", "LFP", "Proprietary",
+ "HDMI", "DisplayPort",
+ };
_X_EXPORT char *
xf86ConnectorGetName(xf86ConnectorType connector)
{
@@ -2220,7 +2665,10 @@ xf86_covering_crtc(ScrnInfoPtr pScrn,
/*
* For overlay video, compute the relevant CRTC and
- * clip video to that
+ * clip video to that.
+ *
+ * returning FALSE means there was a memory failure of some kind,
+ * not that the video shouldn't be displayed
*/
_X_EXPORT Bool
diff --git a/driver/xf86-video-nv/compat/modes/xf86Crtc.h b/driver/xf86-video-nv/compat/modes/xf86Crtc.h
index 9693e12bb..cc045b229 100644
--- a/driver/xf86-video-nv/compat/modes/xf86Crtc.h
+++ b/driver/xf86-video-nv/compat/modes/xf86Crtc.h
@@ -29,6 +29,7 @@
#endif
#include "xf86Modes.h"
#include "xf86Cursor.h"
+#include "xf86i2c.h"
#include "damage.h"
#include "picturestr.h"
@@ -39,6 +40,9 @@
#ifndef M_T_DRIVER
#define M_T_DRIVER 0x40
#endif
+#ifndef M_T_USERPREF
+#define M_T_USERPREF 0x80
+#endif
#ifndef HARDWARE_CURSOR_ARGB
#define HARDWARE_CURSOR_ARGB 0x00004000
#endif
@@ -58,12 +62,14 @@ typedef enum _xf86ConnectorType {
XF86ConnectorComponent,
XF86ConnectorLFP,
XF86ConnectorProprietary,
+ XF86ConnectorHDMI,
+ XF86ConnectorDisplayPort,
} xf86ConnectorType;
typedef enum _xf86OutputStatus {
XF86OutputStatusConnected,
XF86OutputStatusDisconnected,
- XF86OutputStatusUnknown,
+ XF86OutputStatusUnknown
} xf86OutputStatus;
typedef struct _xf86CrtcFuncs {
@@ -200,6 +206,13 @@ typedef struct _xf86CrtcFuncs {
*/
void
(*destroy) (xf86CrtcPtr crtc);
+
+ /**
+ * Less fine-grained mode setting entry point for kernel modesetting
+ */
+ Bool
+ (*set_mode_major)(xf86CrtcPtr crtc, DisplayModePtr mode,
+ Rotation rotation, int x, int y);
} xf86CrtcFuncsRec, *xf86CrtcFuncsPtr;
struct _xf86Crtc {
diff --git a/driver/xf86-video-nv/compat/modes/xf86Cursors.c b/driver/xf86-video-nv/compat/modes/xf86Cursors.c
index b5101642b..cb93dc6ba 100644
--- a/driver/xf86-video-nv/compat/modes/xf86Cursors.c
+++ b/driver/xf86-video-nv/compat/modes/xf86Cursors.c
@@ -137,7 +137,8 @@ cursor_bitpos (int flags, int x, Bool mask)
mask = !mask;
if (flags & HARDWARE_CURSOR_NIBBLE_SWAPPED)
x = (x & ~3) | (3 - (x & 3));
- if (flags & HARDWARE_CURSOR_BIT_ORDER_MSBFIRST)
+ if (((flags & HARDWARE_CURSOR_BIT_ORDER_MSBFIRST) == 0) ==
+ (X_BYTE_ORDER == X_BIG_ENDIAN))
x = (x & ~7) | (7 - (x & 7));
if (flags & HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_1)
x = (x << 1) + mask;
@@ -226,7 +227,8 @@ xf86_set_cursor_colors (ScrnInfoPtr scrn, int bg, int fg)
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
CursorPtr cursor = xf86_config->cursor;
int c;
- CARD8 *bits = cursor ? cursor->devPriv[screen->myNum] : NULL;
+ CARD8 *bits = cursor ? dixLookupPrivate(&cursor->devPrivates,
+ screen) : NULL;
/* Save ARGB versions of these colors */
xf86_config->cursor_fg = (CARD32) fg | 0xff000000;
@@ -399,7 +401,7 @@ xf86_crtc_load_cursor_image (xf86CrtcPtr crtc, CARD8 *src)
int flags = cursor_info->Flags;
cursor_image = xf86_config->cursor_image;
- memset(cursor_image, 0, cursor_info->MaxWidth * stride);
+ memset(cursor_image, 0, cursor_info->MaxHeight * stride);
for (y = 0; y < cursor_info->MaxHeight; y++)
for (x = 0; x < cursor_info->MaxWidth; x++)
@@ -612,7 +614,7 @@ xf86_reload_cursors (ScreenPtr screen)
else
#endif
(*cursor_info->LoadCursorImage)(cursor_info->pScrn,
- cursor->devPriv[screen->myNum]);
+ dixLookupPrivate(&cursor->devPrivates, screen));
(*cursor_info->SetCursorPosition)(cursor_info->pScrn, x, y);
(*cursor_info->ShowCursor)(cursor_info->pScrn);
diff --git a/driver/xf86-video-nv/compat/modes/xf86EdidModes.c b/driver/xf86-video-nv/compat/modes/xf86EdidModes.c
index 8b5e69d9a..bf0ea3f64 100644
--- a/driver/xf86-video-nv/compat/modes/xf86EdidModes.c
+++ b/driver/xf86-video-nv/compat/modes/xf86EdidModes.c
@@ -54,13 +54,28 @@ typedef enum {
DDC_QUIRK_PREFER_LARGE_60 = 1 << 0,
/* 135MHz clock is too high, drop a bit */
DDC_QUIRK_135_CLOCK_TOO_HIGH = 1 << 1,
+ /* Prefer the largest mode at 75 Hz */
+ DDC_QUIRK_PREFER_LARGE_75 = 1 << 2,
+ /* Convert detailed timing's horizontal from units of cm to mm */
+ DDC_QUIRK_DETAILED_H_IN_CM = 1 << 3,
+ /* Convert detailed timing's vertical from units of cm to mm */
+ DDC_QUIRK_DETAILED_V_IN_CM = 1 << 4,
+ /* Detailed timing descriptors have bogus size values, so just take the
+ * maximum size and use that.
+ */
+ DDC_QUIRK_DETAILED_USE_MAXIMUM_SIZE = 1 << 5,
+ /* Monitor forgot to set the first detailed is preferred bit. */
+ DDC_QUIRK_FIRST_DETAILED_PREFERRED = 1 << 6,
+ /* use +hsync +vsync for detailed mode */
+ DDC_QUIRK_DETAILED_SYNC_PP = 1 << 7,
} ddc_quirk_t;
static Bool quirk_prefer_large_60 (int scrnIndex, xf86MonPtr DDC)
{
/* Belinea 10 15 55 */
if (memcmp (DDC->vendor.name, "MAX", 4) == 0 &&
- DDC->vendor.prod_id == 1516)
+ ((DDC->vendor.prod_id == 1516) ||
+ (DDC->vendor.prod_id == 0x77e)))
return TRUE;
/* Acer AL1706 */
@@ -78,6 +93,52 @@ static Bool quirk_prefer_large_60 (int scrnIndex, xf86MonPtr DDC)
DDC->vendor.prod_id == 638)
return TRUE;
+ /* Acer F51 */
+ if (memcmp (DDC->vendor.name, "API", 4) == 0 &&
+ DDC->vendor.prod_id == 0x7602)
+ return TRUE;
+
+
+ return FALSE;
+}
+
+static Bool quirk_prefer_large_75 (int scrnIndex, xf86MonPtr DDC)
+{
+ /* Bug #11603: Funai Electronics PM36B */
+ if (memcmp (DDC->vendor.name, "FCM", 4) == 0 &&
+ DDC->vendor.prod_id == 13600)
+ return TRUE;
+
+ return FALSE;
+}
+
+static Bool quirk_detailed_h_in_cm (int scrnIndex, xf86MonPtr DDC)
+{
+ /* Bug #11603: Funai Electronics PM36B */
+ if (memcmp (DDC->vendor.name, "FCM", 4) == 0 &&
+ DDC->vendor.prod_id == 13600)
+ return TRUE;
+
+ return FALSE;
+}
+
+static Bool quirk_detailed_v_in_cm (int scrnIndex, xf86MonPtr DDC)
+{
+ /* Bug #11603: Funai Electronics PM36B */
+ if (memcmp (DDC->vendor.name, "FCM", 4) == 0 &&
+ DDC->vendor.prod_id == 13600)
+ return TRUE;
+
+ return FALSE;
+}
+
+static Bool quirk_detailed_use_maximum_size (int scrnIndex, xf86MonPtr DDC)
+{
+ /* Bug #10304: LGPhilipsLCD LP154W01-A5 */
+ if (memcmp (DDC->vendor.name, "LPL", 4) == 0 &&
+ (DDC->vendor.prod_id == 0 || DDC->vendor.prod_id == 0x2a00))
+ return TRUE;
+
return FALSE;
}
@@ -91,6 +152,35 @@ static Bool quirk_135_clock_too_high (int scrnIndex, xf86MonPtr DDC)
return FALSE;
}
+static Bool quirk_first_detailed_preferred (int scrnIndex, xf86MonPtr DDC)
+{
+ /* Philips 107p5 CRT. Reported on xorg@ with pastebin. */
+ if (memcmp (DDC->vendor.name, "PHL", 4) == 0 &&
+ DDC->vendor.prod_id == 57364)
+ return TRUE;
+
+ /* Proview AY765C 17" LCD. See bug #15160*/
+ if (memcmp (DDC->vendor.name, "PTS", 4) == 0 &&
+ DDC->vendor.prod_id == 765)
+ return TRUE;
+
+ /* ACR of some sort RH #284231 */
+ if (memcmp (DDC->vendor.name, "ACR", 4) == 0 &&
+ DDC->vendor.prod_id == 2423)
+ return TRUE;
+
+ return FALSE;
+}
+
+static Bool quirk_detailed_sync_pp(int scrnIndex, xf86MonPtr DDC)
+{
+ /* Bug #12439: Samsung SyncMaster 205BW */
+ if (memcmp (DDC->vendor.name, "SAM", 4) == 0 &&
+ DDC->vendor.prod_id == 541)
+ return TRUE;
+ return FALSE;
+}
+
typedef struct {
Bool (*detect) (int scrnIndex, xf86MonPtr DDC);
ddc_quirk_t quirk;
@@ -106,6 +196,30 @@ static const ddc_quirk_map_t ddc_quirks[] = {
quirk_135_clock_too_high, DDC_QUIRK_135_CLOCK_TOO_HIGH,
"Recommended 135MHz pixel clock is too high"
},
+ {
+ quirk_prefer_large_75, DDC_QUIRK_PREFER_LARGE_75,
+ "Detailed timing is not preferred, use largest mode at 75Hz"
+ },
+ {
+ quirk_detailed_h_in_cm, DDC_QUIRK_DETAILED_H_IN_CM,
+ "Detailed timings give horizontal size in cm."
+ },
+ {
+ quirk_detailed_v_in_cm, DDC_QUIRK_DETAILED_V_IN_CM,
+ "Detailed timings give vertical size in cm."
+ },
+ {
+ quirk_detailed_use_maximum_size, DDC_QUIRK_DETAILED_USE_MAXIMUM_SIZE,
+ "Detailed timings give sizes in cm."
+ },
+ {
+ quirk_first_detailed_preferred, DDC_QUIRK_FIRST_DETAILED_PREFERRED,
+ "First detailed timing was not marked as preferred."
+ },
+ {
+ quirk_detailed_sync_pp, DDC_QUIRK_DETAILED_SYNC_PP,
+ "Use +hsync +vsync for detailed timing."
+ },
{
NULL, DDC_QUIRK_NONE,
"No known quirks"
@@ -116,27 +230,27 @@ static const ddc_quirk_map_t ddc_quirks[] = {
* TODO:
* - for those with access to the VESA DMT standard; review please.
*/
-#define MODEPREFIX(name) NULL, NULL, name, 0,M_T_DRIVER
-#define MODESUFFIX 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,FALSE,FALSE,0,NULL,0,0.0,0.0
-
-static DisplayModeRec DDCEstablishedModes[17] = {
- { MODEPREFIX("800x600"), 40000, 800, 840, 968, 1056, 0, 600, 601, 605, 628, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX }, /* 800x600@60Hz */
- { MODEPREFIX("800x600"), 36000, 800, 824, 896, 1024, 0, 600, 601, 603, 625, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX }, /* 800x600@56Hz */
- { MODEPREFIX("640x480"), 31500, 640, 656, 720, 840, 0, 480, 481, 484, 500, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX }, /* 640x480@75Hz */
- { MODEPREFIX("640x480"), 31500, 640, 664, 704, 832, 0, 480, 489, 491, 520, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX }, /* 640x480@72Hz */
- { MODEPREFIX("640x480"), 30240, 640, 704, 768, 864, 0, 480, 483, 486, 525, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX }, /* 640x480@67Hz */
- { MODEPREFIX("640x480"), 25200, 640, 656, 752, 800, 0, 480, 490, 492, 525, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX }, /* 640x480@60Hz */
- { MODEPREFIX("720x400"), 35500, 720, 738, 846, 900, 0, 400, 421, 423, 449, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX }, /* 720x400@88Hz */
- { MODEPREFIX("720x400"), 28320, 720, 738, 846, 900, 0, 400, 412, 414, 449, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX }, /* 720x400@70Hz */
- { MODEPREFIX("1280x1024"), 135000, 1280, 1296, 1440, 1688, 0, 1024, 1025, 1028, 1066, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX }, /* 1280x1024@75Hz */
- { MODEPREFIX("1024x768"), 78800, 1024, 1040, 1136, 1312, 0, 768, 769, 772, 800, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX }, /* 1024x768@75Hz */
- { MODEPREFIX("1024x768"), 75000, 1024, 1048, 1184, 1328, 0, 768, 771, 777, 806, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX }, /* 1024x768@70Hz */
- { MODEPREFIX("1024x768"), 65000, 1024, 1048, 1184, 1344, 0, 768, 771, 777, 806, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX }, /* 1024x768@60Hz */
- { MODEPREFIX("1024x768"), 44900, 1024, 1032, 1208, 1264, 0, 768, 768, 776, 817, 0, V_PHSYNC | V_PVSYNC | V_INTERLACE, MODESUFFIX }, /* 1024x768@43Hz */
- { MODEPREFIX("832x624"), 57284, 832, 864, 928, 1152, 0, 624, 625, 628, 667, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX }, /* 832x624@75Hz */
- { MODEPREFIX("800x600"), 49500, 800, 816, 896, 1056, 0, 600, 601, 604, 625, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX }, /* 800x600@75Hz */
- { MODEPREFIX("800x600"), 50000, 800, 856, 976, 1040, 0, 600, 637, 643, 666, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX }, /* 800x600@72Hz */
- { MODEPREFIX("1152x864"), 108000, 1152, 1216, 1344, 1600, 0, 864, 865, 868, 900, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX }, /* 1152x864@75Hz */
+#define MODEPREFIX NULL, NULL, NULL, 0, M_T_DRIVER
+#define MODESUFFIX 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,FALSE,FALSE,0,NULL,0,0.0,0.0
+
+static const DisplayModeRec DDCEstablishedModes[17] = {
+ { MODEPREFIX, 40000, 800, 840, 968, 1056, 0, 600, 601, 605, 628, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX }, /* 800x600@60Hz */
+ { MODEPREFIX, 36000, 800, 824, 896, 1024, 0, 600, 601, 603, 625, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX }, /* 800x600@56Hz */
+ { MODEPREFIX, 31500, 640, 656, 720, 840, 0, 480, 481, 484, 500, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX }, /* 640x480@75Hz */
+ { MODEPREFIX, 31500, 640, 664, 704, 832, 0, 480, 489, 491, 520, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX }, /* 640x480@72Hz */
+ { MODEPREFIX, 30240, 640, 704, 768, 864, 0, 480, 483, 486, 525, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX }, /* 640x480@67Hz */
+ { MODEPREFIX, 25200, 640, 656, 752, 800, 0, 480, 490, 492, 525, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX }, /* 640x480@60Hz */
+ { MODEPREFIX, 35500, 720, 738, 846, 900, 0, 400, 421, 423, 449, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX }, /* 720x400@88Hz */
+ { MODEPREFIX, 28320, 720, 738, 846, 900, 0, 400, 412, 414, 449, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX }, /* 720x400@70Hz */
+ { MODEPREFIX, 135000, 1280, 1296, 1440, 1688, 0, 1024, 1025, 1028, 1066, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX }, /* 1280x1024@75Hz */
+ { MODEPREFIX, 78800, 1024, 1040, 1136, 1312, 0, 768, 769, 772, 800, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX }, /* 1024x768@75Hz */
+ { MODEPREFIX, 75000, 1024, 1048, 1184, 1328, 0, 768, 771, 777, 806, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX }, /* 1024x768@70Hz */
+ { MODEPREFIX, 65000, 1024, 1048, 1184, 1344, 0, 768, 771, 777, 806, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX }, /* 1024x768@60Hz */
+ { MODEPREFIX, 44900, 1024, 1032, 1208, 1264, 0, 768, 768, 776, 817, 0, V_PHSYNC | V_PVSYNC | V_INTERLACE, MODESUFFIX }, /* 1024x768@43Hz */
+ { MODEPREFIX, 57284, 832, 864, 928, 1152, 0, 624, 625, 628, 667, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX }, /* 832x624@75Hz */
+ { MODEPREFIX, 49500, 800, 816, 896, 1056, 0, 600, 601, 604, 625, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX }, /* 800x600@75Hz */
+ { MODEPREFIX, 50000, 800, 856, 976, 1040, 0, 600, 637, 643, 666, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX }, /* 800x600@72Hz */
+ { MODEPREFIX, 108000, 1152, 1216, 1344, 1600, 0, 864, 865, 868, 900, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX }, /* 1152x864@75Hz */
};
static DisplayModePtr
@@ -158,20 +272,57 @@ DDCModesFromEstablished(int scrnIndex, struct established_timings *timing,
return Modes;
}
+#define LEVEL_DMT 0
+#define LEVEL_GTF 1
+#define LEVEL_CVT 2
+
+static int
+MonitorStandardTimingLevel(xf86MonPtr DDC)
+{
+ if (DDC->ver.revision >= 2) {
+ if (DDC->ver.revision >= 4 && CVT_SUPPORTED(DDC->features.msc)) {
+ return LEVEL_CVT;
+ }
+ return LEVEL_GTF;
+ }
+ return LEVEL_DMT;
+}
+
/*
+ * This is not really correct. Appendix B of the EDID 1.4 spec defines
+ * the right thing to do here. If the timing given here matches a mode
+ * defined in the VESA DMT standard, we _must_ use that. If the device
+ * supports CVT modes, then we should generate a CVT timing. If both
+ * of the above fail, use GTF.
+ *
+ * There are some wrinkles here. EDID 1.1 and 1.0 sinks can't really
+ * "support" GTF, since it wasn't a standard yet; so if they ask for a
+ * timing in this section that isn't defined in DMT, returning a GTF mode
+ * may not actually be valid. EDID 1.3 sinks often report support for
+ * some CVT modes, but they are not required to support CVT timings for
+ * modes in the standard timing descriptor, so we should _not_ treat them
+ * as CVT-compliant (unless specified in an extension block I suppose).
*
+ * EDID 1.4 requires that all sink devices support both GTF and CVT timings
+ * for modes in this section, but does say that CVT is preferred.
*/
static DisplayModePtr
-DDCModesFromStandardTiming(int scrnIndex, struct std_timings *timing,
- ddc_quirk_t quirks)
+DDCModesFromStandardTiming(struct std_timings *timing, ddc_quirk_t quirks,
+ int timing_level)
{
DisplayModePtr Modes = NULL, Mode = NULL;
int i;
for (i = 0; i < STD_TIMINGS; i++) {
if (timing[i].hsize && timing[i].vsize && timing[i].refresh) {
- Mode = xf86CVTMode(timing[i].hsize, timing[i].vsize,
- timing[i].refresh, FALSE, FALSE);
+ /* XXX check for DMT first, else... */
+ if (timing_level == LEVEL_CVT)
+ Mode = xf86CVTMode(timing[i].hsize, timing[i].vsize,
+ timing[i].refresh, FALSE, FALSE);
+ else
+ Mode = xf86GTFMode(timing[i].hsize, timing[i].vsize,
+ timing[i].refresh, FALSE, FALSE);
+
Mode->type = M_T_DRIVER;
Modes = xf86ModesAdd(Modes, Mode);
}
@@ -185,7 +336,7 @@ DDCModesFromStandardTiming(int scrnIndex, struct std_timings *timing,
*/
static DisplayModePtr
DDCModeFromDetailedTiming(int scrnIndex, struct detailed_timings *timing,
- int preferred, ddc_quirk_t quirks)
+ Bool preferred, ddc_quirk_t quirks)
{
DisplayModePtr Mode;
@@ -216,8 +367,7 @@ DDCModeFromDetailedTiming(int scrnIndex, struct detailed_timings *timing,
" sync.\n", __func__, timing->h_active, timing->v_active);
}
- Mode = xnfalloc(sizeof(DisplayModeRec));
- memset(Mode, 0, sizeof(DisplayModeRec));
+ Mode = xnfcalloc(1, sizeof(DisplayModeRec));
Mode->type = M_T_DRIVER;
if (preferred)
@@ -239,6 +389,12 @@ DDCModeFromDetailedTiming(int scrnIndex, struct detailed_timings *timing,
Mode->VSyncEnd = Mode->VSyncStart + timing->v_sync_width;
Mode->VTotal = timing->v_active + timing->v_blanking;
+ /* perform basic check on the detail timing */
+ if (Mode->HSyncEnd > Mode->HTotal || Mode->VSyncEnd > Mode->VTotal) {
+ xfree(Mode);
+ return NULL;
+ }
+
xf86SetModeDefaultName(Mode);
/* We ignore h/v_size and h/v_border for now. */
@@ -246,21 +402,59 @@ DDCModeFromDetailedTiming(int scrnIndex, struct detailed_timings *timing,
if (timing->interlaced)
Mode->Flags |= V_INTERLACE;
- if (timing->misc & 0x02)
- Mode->Flags |= V_PVSYNC;
- else
- Mode->Flags |= V_NVSYNC;
-
- if (timing->misc & 0x01)
- Mode->Flags |= V_PHSYNC;
- else
- Mode->Flags |= V_NHSYNC;
+ if (quirks & DDC_QUIRK_DETAILED_SYNC_PP)
+ Mode->Flags |= V_PVSYNC | V_PHSYNC;
+ else {
+ if (timing->misc & 0x02)
+ Mode->Flags |= V_PVSYNC;
+ else
+ Mode->Flags |= V_NVSYNC;
+
+ if (timing->misc & 0x01)
+ Mode->Flags |= V_PHSYNC;
+ else
+ Mode->Flags |= V_NHSYNC;
+ }
return Mode;
}
+static DisplayModePtr
+DDCModesFromCVT(int scrnIndex, struct cvt_timings *t)
+{
+ DisplayModePtr modes = NULL;
+ int i;
+
+ for (i = 0; i < 4; i++) {
+ if (t[i].height) {
+ if (t[i].rates & 0x10)
+ modes = xf86ModesAdd(modes,
+ xf86CVTMode(t[i].width, t[i].height, 50, 0, 0));
+ if (t[i].rates & 0x08)
+ modes = xf86ModesAdd(modes,
+ xf86CVTMode(t[i].width, t[i].height, 60, 0, 0));
+ if (t[i].rates & 0x04)
+ modes = xf86ModesAdd(modes,
+ xf86CVTMode(t[i].width, t[i].height, 75, 0, 0));
+ if (t[i].rates & 0x02)
+ modes = xf86ModesAdd(modes,
+ xf86CVTMode(t[i].width, t[i].height, 85, 0, 0));
+ if (t[i].rates & 0x01)
+ modes = xf86ModesAdd(modes,
+ xf86CVTMode(t[i].width, t[i].height, 60, 1, 0));
+ } else break;
+ }
+
+ return modes;
+}
+
+
/*
- *
+ * This is only valid when the sink claims to be continuous-frequency
+ * but does not supply a detailed range descriptor. Such sinks are
+ * arguably broken. Currently the mode validation code isn't aware of
+ * this; the non-RANDR code even punts the decision of optional sync
+ * range checking to the driver. Loss.
*/
static void
DDCGuessRangesFromModes(int scrnIndex, MonPtr Monitor, DisplayModePtr Modes)
@@ -303,27 +497,121 @@ DDCGuessRangesFromModes(int scrnIndex, MonPtr Monitor, DisplayModePtr Modes)
}
}
+static ddc_quirk_t
+xf86DDCDetectQuirks(int scrnIndex, xf86MonPtr DDC, Bool verbose)
+{
+ ddc_quirk_t quirks;
+ int i;
+
+ quirks = DDC_QUIRK_NONE;
+ for (i = 0; ddc_quirks[i].detect; i++) {
+ if (ddc_quirks[i].detect (scrnIndex, DDC)) {
+ if (verbose) {
+ xf86DrvMsg (scrnIndex, X_INFO, " EDID quirk: %s\n",
+ ddc_quirks[i].description);
+ }
+ quirks |= ddc_quirks[i].quirk;
+ }
+ }
+
+ return quirks;
+}
+
+/**
+ * Applies monitor-specific quirks to the decoded EDID information.
+ *
+ * Note that some quirks applying to the mode list are still implemented in
+ * xf86DDCGetModes.
+ */
+void
+xf86DDCApplyQuirks(int scrnIndex, xf86MonPtr DDC)
+{
+ ddc_quirk_t quirks = xf86DDCDetectQuirks (scrnIndex, DDC, FALSE);
+ int i;
+
+ for (i = 0; i < DET_TIMINGS; i++) {
+ struct detailed_monitor_section *det_mon = &DDC->det_mon[i];
+
+ if (det_mon->type != DT)
+ continue;
+
+ if (quirks & DDC_QUIRK_DETAILED_H_IN_CM)
+ det_mon->section.d_timings.h_size *= 10;
+
+ if (quirks & DDC_QUIRK_DETAILED_V_IN_CM)
+ det_mon->section.d_timings.v_size *= 10;
+
+ if (quirks & DDC_QUIRK_DETAILED_USE_MAXIMUM_SIZE) {
+ det_mon->section.d_timings.h_size = 10 * DDC->features.hsize;
+ det_mon->section.d_timings.v_size = 10 * DDC->features.vsize;
+ }
+ }
+}
+
+/**
+ * Walks the modes list, finding the mode with the largest area which is
+ * closest to the target refresh rate, and marks it as the only preferred mode.
+*/
+static void
+xf86DDCSetPreferredRefresh(int scrnIndex, DisplayModePtr modes,
+ float target_refresh)
+{
+ DisplayModePtr mode, best = modes;
+
+ for (mode = modes; mode; mode = mode->next)
+ {
+ mode->type &= ~M_T_PREFERRED;
+
+ if (mode == best) continue;
+
+ if (mode->HDisplay * mode->VDisplay >
+ best->HDisplay * best->VDisplay)
+ {
+ best = mode;
+ continue;
+ }
+ if (mode->HDisplay * mode->VDisplay ==
+ best->HDisplay * best->VDisplay)
+ {
+ double mode_refresh = xf86ModeVRefresh (mode);
+ double best_refresh = xf86ModeVRefresh (best);
+ double mode_dist = fabs(mode_refresh - target_refresh);
+ double best_dist = fabs(best_refresh - target_refresh);
+
+ if (mode_dist < best_dist)
+ {
+ best = mode;
+ continue;
+ }
+ }
+ }
+ if (best)
+ best->type |= M_T_PREFERRED;
+}
+
_X_EXPORT DisplayModePtr
xf86DDCGetModes(int scrnIndex, xf86MonPtr DDC)
{
- int preferred, i;
+ int i;
DisplayModePtr Modes = NULL, Mode;
ddc_quirk_t quirks;
+ Bool preferred;
+ int timing_level;
xf86DrvMsg (scrnIndex, X_INFO, "EDID vendor \"%s\", prod id %d\n",
DDC->vendor.name, DDC->vendor.prod_id);
- quirks = DDC_QUIRK_NONE;
- for (i = 0; ddc_quirks[i].detect; i++)
- if (ddc_quirks[i].detect (scrnIndex, DDC))
- {
- xf86DrvMsg (scrnIndex, X_INFO, " EDID quirk: %s\n",
- ddc_quirks[i].description);
- quirks |= ddc_quirks[i].quirk;
- }
-
+
+ quirks = xf86DDCDetectQuirks(scrnIndex, DDC, TRUE);
+
preferred = PREFERRED_TIMING_MODE(DDC->features.msc);
- if (quirks & DDC_QUIRK_PREFER_LARGE_60)
- preferred = 0;
+ if (DDC->ver.revision >= 4)
+ preferred = TRUE;
+ if (quirks & DDC_QUIRK_FIRST_DETAILED_PREFERRED)
+ preferred = TRUE;
+ if (quirks & (DDC_QUIRK_PREFER_LARGE_60 | DDC_QUIRK_PREFER_LARGE_75))
+ preferred = FALSE;
+
+ timing_level = MonitorStandardTimingLevel(DDC);
for (i = 0; i < DET_TIMINGS; i++) {
struct detailed_monitor_section *det_mon = &DDC->det_mon[i];
@@ -334,15 +622,18 @@ xf86DDCGetModes(int scrnIndex, xf86MonPtr DDC)
&det_mon->section.d_timings,
preferred,
quirks);
- preferred = 0;
+ preferred = FALSE;
Modes = xf86ModesAdd(Modes, Mode);
break;
case DS_STD_TIMINGS:
- Mode = DDCModesFromStandardTiming(scrnIndex,
- det_mon->section.std_t,
- quirks);
+ Mode = DDCModesFromStandardTiming(det_mon->section.std_t,
+ quirks, timing_level);
Modes = xf86ModesAdd(Modes, Mode);
break;
+ case DS_CVT:
+ Mode = DDCModesFromCVT(scrnIndex, det_mon->section.cvt);
+ Modes = xf86ModesAdd(Modes, Mode);
+ break;
default:
break;
}
@@ -353,36 +644,15 @@ xf86DDCGetModes(int scrnIndex, xf86MonPtr DDC)
Modes = xf86ModesAdd(Modes, Mode);
/* Add standard timings */
- Mode = DDCModesFromStandardTiming(scrnIndex, DDC->timings2, quirks);
+ Mode = DDCModesFromStandardTiming(DDC->timings2, quirks, timing_level);
Modes = xf86ModesAdd(Modes, Mode);
if (quirks & DDC_QUIRK_PREFER_LARGE_60)
- {
- DisplayModePtr best = Modes;
- for (Mode = Modes; Mode; Mode = Mode->next)
- {
- if (Mode == best) continue;
- if (Mode->HDisplay * Mode->VDisplay > best->HDisplay * best->VDisplay)
- {
- best = Mode;
- continue;
- }
- if (Mode->HDisplay * Mode->VDisplay == best->HDisplay * best->VDisplay)
- {
- double mode_refresh = xf86ModeVRefresh (Mode);
- double best_refresh = xf86ModeVRefresh (best);
- double mode_dist = fabs(mode_refresh - 60.0);
- double best_dist = fabs(best_refresh - 60.0);
- if (mode_dist < best_dist)
- {
- best = Mode;
- continue;
- }
- }
- }
- if (best)
- best->type |= M_T_PREFERRED;
- }
+ xf86DDCSetPreferredRefresh(scrnIndex, Modes, 60);
+
+ if (quirks & DDC_QUIRK_PREFER_LARGE_75)
+ xf86DDCSetPreferredRefresh(scrnIndex, Modes, 75);
+
return Modes;
}
@@ -401,13 +671,17 @@ xf86DDCMonitorSet(int scrnIndex, MonPtr Monitor, xf86MonPtr DDC)
Monitor->DDC = DDC;
- Monitor->widthmm = 10 * DDC->features.hsize;
- Monitor->heightmm = 10 * DDC->features.vsize;
+ if (Monitor->widthmm <= 0 && Monitor->heightmm <= 0) {
+ Monitor->widthmm = 10 * DDC->features.hsize;
+ Monitor->heightmm = 10 * DDC->features.vsize;
+ }
- /* If this is a digital display, then we can use reduced blanking */
+ /*
+ * If this is a digital display, then we can use reduced blanking.
+ * XXX This is a 1.3 heuristic. 1.4 explicitly defines rb support.
+ */
if (DDC->features.input_type)
Monitor->reducedblanking = TRUE;
- /* Allow the user to also enable this through config */
Modes = xf86DDCGetModes(scrnIndex, DDC);
diff --git a/driver/xf86-video-nv/compat/modes/xf86Modes.c b/driver/xf86-video-nv/compat/modes/xf86Modes.c
index f49c2921c..ea398ad81 100644
--- a/driver/xf86-video-nv/compat/modes/xf86Modes.c
+++ b/driver/xf86-video-nv/compat/modes/xf86Modes.c
@@ -38,12 +38,14 @@
extern XF86ConfigPtr xf86configptr;
-/**
- * @file this file contains symbols from xf86Mode.c and friends that are static
- * there but we still want to use. We need to come up with better API here.
+/*
+ * This is the version number where we epoched. These files get copied
+ * into drivers that want to use this setup infrastructure on pre-1.3
+ * servers, so when that happens they need to define these symbols
+ * themselves. However, _in_ the server, we basically always define them now.
*/
-
#if XORG_VERSION_CURRENT <= XORG_VERSION_NUMERIC(7,2,99,2,0)
+
/**
* Calculates the horizontal sync rate of a mode.
*
@@ -116,6 +118,24 @@ xf86ModeHeight (DisplayModePtr mode, Rotation rotation)
}
}
+/** Calculates the memory bandwidth (in MiB/sec) of a mode. */
+_X_EXPORT unsigned int
+xf86ModeBandwidth(DisplayModePtr mode, int depth)
+{
+ float a_active, a_total, active_percent, pixels_per_second;
+ int bytes_per_pixel = (depth + 7) / 8;
+
+ if (!mode->HTotal || !mode->VTotal || !mode->Clock)
+ return 0;
+
+ a_active = mode->HDisplay * mode->VDisplay;
+ a_total = mode->HTotal * mode->VTotal;
+ active_percent = a_active / a_total;
+ pixels_per_second = active_percent * mode->Clock * 1000.0;
+
+ return (unsigned int)(pixels_per_second * bytes_per_pixel / (1024 * 1024));
+}
+
/** Sets a default mode name of <width>x<height> on a mode. */
_X_EXPORT void
xf86SetModeDefaultName(DisplayModePtr mode)
@@ -194,11 +214,11 @@ xf86DuplicateMode(DisplayModePtr pMode)
*pNew = *pMode;
pNew->next = NULL;
pNew->prev = NULL;
- if (pNew->name == NULL) {
- xf86SetModeDefaultName(pMode);
- } else {
+
+ if (pMode->name == NULL)
+ xf86SetModeDefaultName(pNew);
+ else
pNew->name = xnfstrdup(pMode->name);
- }
return pNew;
}
@@ -320,12 +340,10 @@ xf86PrintModeline(int scrnIndex,DisplayModePtr mode)
/**
* Marks as bad any modes with unsupported flags.
*
- * \param modeList doubly-linked or circular list of modes.
+ * \param modeList doubly-linked list of modes.
* \param flags flags supported by the driver.
*
* \bug only V_INTERLACE and V_DBLSCAN are supported. Is that enough?
- *
- * This is not in xf86Modes.c, but would be part of the proposed new API.
*/
_X_EXPORT void
xf86ValidateModesFlags(ScrnInfoPtr pScrn, DisplayModePtr modeList,
@@ -344,9 +362,7 @@ xf86ValidateModesFlags(ScrnInfoPtr pScrn, DisplayModePtr modeList,
/**
* Marks as bad any modes extending beyond the given max X, Y, or pitch.
*
- * \param modeList doubly-linked or circular list of modes.
- *
- * This is not in xf86Modes.c, but would be part of the proposed new API.
+ * \param modeList doubly-linked list of modes.
*/
_X_EXPORT void
xf86ValidateModesSize(ScrnInfoPtr pScrn, DisplayModePtr modeList,
@@ -373,9 +389,7 @@ xf86ValidateModesSize(ScrnInfoPtr pScrn, DisplayModePtr modeList,
* Marks as bad any modes that aren't supported by the given monitor's
* hsync and vrefresh ranges.
*
- * \param modeList doubly-linked or circular list of modes.
- *
- * This is not in xf86Modes.c, but would be part of the proposed new API.
+ * \param modeList doubly-linked list of modes.
*/
_X_EXPORT void
xf86ValidateModesSync(ScrnInfoPtr pScrn, DisplayModePtr modeList,
@@ -389,8 +403,8 @@ xf86ValidateModesSync(ScrnInfoPtr pScrn, DisplayModePtr modeList,
bad = TRUE;
for (i = 0; i < mon->nHsync; i++) {
- if (xf86ModeHSync(mode) >= mon->hsync[i].lo &&
- xf86ModeHSync(mode) <= mon->hsync[i].hi)
+ if (xf86ModeHSync(mode) >= mon->hsync[i].lo * (1-SYNC_TOLERANCE) &&
+ xf86ModeHSync(mode) <= mon->hsync[i].hi * (1+SYNC_TOLERANCE))
{
bad = FALSE;
}
@@ -400,8 +414,8 @@ xf86ValidateModesSync(ScrnInfoPtr pScrn, DisplayModePtr modeList,
bad = TRUE;
for (i = 0; i < mon->nVrefresh; i++) {
- if (xf86ModeVRefresh(mode) >= mon->vrefresh[i].lo &&
- xf86ModeVRefresh(mode) <= mon->vrefresh[i].hi)
+ if (xf86ModeVRefresh(mode) >= mon->vrefresh[i].lo * (1-SYNC_TOLERANCE) &&
+ xf86ModeVRefresh(mode) <= mon->vrefresh[i].hi * (1+SYNC_TOLERANCE))
{
bad = FALSE;
}
@@ -417,12 +431,10 @@ xf86ValidateModesSync(ScrnInfoPtr pScrn, DisplayModePtr modeList,
/**
* Marks as bad any modes extending beyond outside of the given clock ranges.
*
- * \param modeList doubly-linked or circular list of modes.
+ * \param modeList doubly-linked list of modes.
* \param min pointer to minimums of clock ranges
* \param max pointer to maximums of clock ranges
* \param n_ranges number of ranges.
- *
- * This is not in xf86Modes.c, but would be part of the proposed new API.
*/
_X_EXPORT void
xf86ValidateModesClocks(ScrnInfoPtr pScrn, DisplayModePtr modeList,
@@ -434,7 +446,8 @@ xf86ValidateModesClocks(ScrnInfoPtr pScrn, DisplayModePtr modeList,
for (mode = modeList; mode != NULL; mode = mode->next) {
Bool good = FALSE;
for (i = 0; i < n_ranges; i++) {
- if (mode->Clock >= min[i] && mode->Clock <= max[i]) {
+ if (mode->Clock >= min[i] * (1-SYNC_TOLERANCE) &&
+ mode->Clock <= max[i] * (1+SYNC_TOLERANCE)) {
good = TRUE;
break;
}
@@ -454,9 +467,7 @@ xf86ValidateModesClocks(ScrnInfoPtr pScrn, DisplayModePtr modeList,
*
* MODE_BAD is used as the rejection flag, for lack of a better flag.
*
- * \param modeList doubly-linked or circular list of modes.
- *
- * This is not in xf86Modes.c, but would be part of the proposed new API.
+ * \param modeList doubly-linked list of modes.
*/
_X_EXPORT void
xf86ValidateModesUserConfig(ScrnInfoPtr pScrn, DisplayModePtr modeList)
@@ -484,13 +495,52 @@ xf86ValidateModesUserConfig(ScrnInfoPtr pScrn, DisplayModePtr modeList)
/**
+ * Marks as bad any modes exceeding the given bandwidth.
+ *
+ * \param modeList doubly-linked list of modes.
+ * \param bandwidth bandwidth in MHz.
+ * \param depth color depth.
+ */
+_X_EXPORT void
+xf86ValidateModesBandwidth(ScrnInfoPtr pScrn, DisplayModePtr modeList,
+ unsigned int bandwidth, int depth)
+{
+ DisplayModePtr mode;
+
+ for (mode = modeList; mode != NULL; mode = mode->next) {
+ if (xf86ModeBandwidth(mode, depth) > bandwidth)
+ mode->status = MODE_BANDWIDTH;
+ }
+}
+
+/**
+ * Marks as bad any reduced-blanking modes.
+ *
+ * \param modeList doubly-linked list of modes.
+ */
+_X_EXPORT void
+xf86ValidateModesReducedBlanking(ScrnInfoPtr pScrn, DisplayModePtr modeList)
+{
+ Bool mode_is_reduced = FALSE;
+ DisplayModePtr mode;
+
+ for (mode = modeList; mode != NULL; mode = mode->next) {
+ /* gratuitous duplication from pre-randr validation code */
+ if ((((mode->HDisplay * 5 / 4) & ~0x07) > mode->HTotal) &&
+ ((mode->HTotal - mode->HDisplay) == 160) &&
+ ((mode->HSyncEnd - mode->HDisplay) == 80) &&
+ ((mode->HSyncEnd - mode->HSyncStart) == 32) &&
+ ((mode->VSyncStart - mode->VDisplay) == 3))
+ mode->status = MODE_NO_REDUCED;
+ }
+}
+
+/**
* Frees any modes from the list with a status other than MODE_OK.
*
* \param modeList pointer to a doubly-linked or circular list of modes.
* \param verbose determines whether the reason for mode invalidation is
* printed.
- *
- * This is not in xf86Modes.c, but would be part of the proposed new API.
*/
_X_EXPORT void
xf86PruneInvalidModes(ScrnInfoPtr pScrn, DisplayModePtr *modeList,
@@ -630,7 +680,7 @@ xf86GetDefaultModes (Bool interlaceAllowed, Bool doubleScanAllowed)
DisplayModePtr head = NULL, prev = NULL, mode;
int i;
- for (i = 0; xf86DefaultModes[i].name != NULL; i++)
+ for (i = 0; i < xf86NumDefaultModes; i++)
{
DisplayModePtr defMode = &xf86DefaultModes[i];
@@ -639,23 +689,9 @@ xf86GetDefaultModes (Bool interlaceAllowed, Bool doubleScanAllowed)
if (!doubleScanAllowed && (defMode->Flags & V_DBLSCAN))
continue;
- mode = xalloc(sizeof(DisplayModeRec));
- if (!mode)
- continue;
- memcpy(mode,&xf86DefaultModes[i],sizeof(DisplayModeRec));
- mode->name = xstrdup(xf86DefaultModes[i].name);
- if (!mode->name)
- {
- xfree (mode);
- continue;
- }
- mode->prev = prev;
- mode->next = NULL;
- if (prev)
- prev->next = mode;
- else
- head = mode;
- prev = mode;
+ mode = xf86DuplicateMode(defMode);
+
+ head = xf86ModesAdd(head, mode);
}
return head;
}
diff --git a/driver/xf86-video-nv/compat/modes/xf86Modes.h b/driver/xf86-video-nv/compat/modes/xf86Modes.h
index 2bd4edeba..acdea65d8 100644
--- a/driver/xf86-video-nv/compat/modes/xf86Modes.h
+++ b/driver/xf86-video-nv/compat/modes/xf86Modes.h
@@ -42,6 +42,7 @@
double xf86ModeHSync(DisplayModePtr mode);
double xf86ModeVRefresh(DisplayModePtr mode);
+unsigned int xf86ModeBandwidth(DisplayModePtr mode, int depth);
int
xf86ModeWidth (DisplayModePtr mode, Rotation rotation);
@@ -61,6 +62,7 @@ DisplayModePtr xf86ModesAdd(DisplayModePtr modes, DisplayModePtr new);
DisplayModePtr xf86DDCGetModes(int scrnIndex, xf86MonPtr DDC);
DisplayModePtr xf86CVTMode(int HDisplay, int VDisplay, float VRefresh,
Bool Reduced, Bool Interlaced);
+DisplayModePtr xf86GTFMode(int h_pixels, int v_lines, float freq, int interlaced, int margins);
void
xf86ValidateModesFlags(ScrnInfoPtr pScrn, DisplayModePtr modeList,
@@ -79,6 +81,13 @@ xf86ValidateModesSync(ScrnInfoPtr pScrn, DisplayModePtr modeList,
MonPtr mon);
void
+xf86ValidateModesBandwidth(ScrnInfoPtr pScrn, DisplayModePtr modeList,
+ unsigned int bandwidth, int depth);
+
+void
+xf86ValidateModesReducedBlanking(ScrnInfoPtr pScrn, DisplayModePtr modeList);
+
+void
xf86PruneInvalidModes(ScrnInfoPtr pScrn, DisplayModePtr *modeList,
Bool verbose);
@@ -95,4 +104,7 @@ xf86GetMonitorModes (ScrnInfoPtr pScrn, XF86ConfMonitorPtr conf_monitor);
DisplayModePtr
xf86GetDefaultModes (Bool interlaceAllowed, Bool doubleScanAllowed);
+void
+xf86DDCApplyQuirks(int scrnIndex, xf86MonPtr DDC);
+
#endif /* _XF86MODES_H_ */
diff --git a/driver/xf86-video-nv/compat/modes/xf86RandR12.c b/driver/xf86-video-nv/compat/modes/xf86RandR12.c
index 38435c924..6f8ccdf84 100644
--- a/driver/xf86-video-nv/compat/modes/xf86RandR12.c
+++ b/driver/xf86-video-nv/compat/modes/xf86RandR12.c
@@ -59,11 +59,11 @@ static Bool xf86RandR12Init12 (ScreenPtr pScreen);
static Bool xf86RandR12CreateScreenResources12 (ScreenPtr pScreen);
#endif
-static int xf86RandR12Index;
-static int xf86RandR12Generation;
+static int xf86RandR12Generation;
+static DevPrivateKey xf86RandR12Key;
-#define XF86RANDRINFO(p) \
- ((XF86RandRInfoPtr)(p)->devPrivates[xf86RandR12Index].ptr)
+#define XF86RANDRINFO(p) ((XF86RandRInfoPtr) \
+ dixLookupPrivate(&(p)->devPrivates, xf86RandR12Key))
static int
xf86RandR12ModeRefresh (DisplayModePtr mode)
@@ -119,9 +119,7 @@ xf86RandR12GetInfo (ScreenPtr pScreen, Rotation *rotations)
return FALSE;
RRRegisterRate (pScreen, pSize, refresh);
- if (xf86ModesEqual(mode, scrp->currentMode) &&
- mode->HDisplay == scrp->virtualX &&
- mode->VDisplay == scrp->virtualY)
+ if (xf86ModesEqual(mode, scrp->currentMode))
{
RRSetCurrentConfig (pScreen, randrp->rotation, refresh, pSize);
}
@@ -135,23 +133,6 @@ xf86RandR12GetInfo (ScreenPtr pScreen, Rotation *rotations)
randrp->maxY = maxY;
}
- if (scrp->currentMode->HDisplay != randrp->virtualX ||
- scrp->currentMode->VDisplay != randrp->virtualY)
- {
- pSize = RRRegisterSize (pScreen,
- randrp->virtualX, randrp->virtualY,
- randrp->mmWidth,
- randrp->mmHeight);
- if (!pSize)
- return FALSE;
- RRRegisterRate (pScreen, pSize, refresh0);
- if (scrp->virtualX == randrp->virtualX &&
- scrp->virtualY == randrp->virtualY)
- {
- RRSetCurrentConfig (pScreen, randrp->rotation, refresh0, pSize);
- }
- }
-
return TRUE;
}
@@ -340,10 +321,12 @@ xf86RandR12ScreenSetSize (ScreenPtr pScreen,
PixmapPtr pScrnPix = (*pScreen->GetScreenPixmap)(pScreen);
Bool ret = FALSE;
- if (randrp->virtualX == -1 || randrp->virtualY == -1)
- {
- randrp->virtualX = pScrn->virtualX;
- randrp->virtualY = pScrn->virtualY;
+ if (xf86RandR12Key) {
+ if (randrp->virtualX == -1 || randrp->virtualY == -1)
+ {
+ randrp->virtualX = pScrn->virtualX;
+ randrp->virtualY = pScrn->virtualY;
+ }
}
if (pRoot && pScrn->vtSema)
(*pScrn->EnableDisableFBAccess) (pScreen->myNum, FALSE);
@@ -356,8 +339,8 @@ xf86RandR12ScreenSetSize (ScreenPtr pScreen,
pScreen->width = pScrnPix->drawable.width = width;
pScreen->height = pScrnPix->drawable.height = height;
- pScreen->mmWidth = mmWidth;
- pScreen->mmHeight = mmHeight;
+ randrp->mmWidth = pScreen->mmWidth = mmWidth;
+ randrp->mmHeight = pScreen->mmHeight = mmHeight;
xf86SetViewport (pScreen, pScreen->width-1, pScreen->height-1);
xf86SetViewport (pScreen, 0, 0);
@@ -366,7 +349,7 @@ finish:
if (pRoot && pScrn->vtSema)
(*pScrn->EnableDisableFBAccess) (pScreen->myNum, TRUE);
#if RANDR_12_INTERFACE
- if (WindowTable[pScreen->myNum] && ret)
+ if (xf86RandR12Key && WindowTable[pScreen->myNum] && ret)
RRScreenSizeNotify (pScreen);
#endif
return ret;
@@ -426,8 +409,18 @@ xf86RandR12CreateScreenResources (ScreenPtr pScreen)
xf86OutputPtr output = config->output[config->compat_output];
xf86CrtcPtr crtc = output->crtc;
- if (crtc && crtc->mode.HDisplay &&
- output->mm_width && output->mm_height)
+ if (output->conf_monitor &&
+ (output->conf_monitor->mon_width > 0 &&
+ output->conf_monitor->mon_height > 0))
+ {
+ /*
+ * Prefer user configured DisplaySize
+ */
+ mmWidth = output->conf_monitor->mon_width;
+ mmHeight = output->conf_monitor->mon_height;
+ }
+ else if (crtc && crtc->mode.HDisplay &&
+ output->mm_width && output->mm_height)
{
/*
* If the output has a mode and a declared size, use that
@@ -440,10 +433,10 @@ xf86RandR12CreateScreenResources (ScreenPtr pScreen)
else
{
/*
- * Otherwise, just set the screen to 96dpi
+ * Otherwise, just set the screen to DEFAULT_DPI
*/
- mmWidth = width * 25.4 / 96;
- mmHeight = height * 25.4 / 96;
+ mmWidth = width * 25.4 / DEFAULT_DPI;
+ mmHeight = height * 25.4 / DEFAULT_DPI;
}
}
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
@@ -456,6 +449,9 @@ xf86RandR12CreateScreenResources (ScreenPtr pScreen)
mmHeight);
}
+ if (xf86RandR12Key == NULL)
+ return TRUE;
+
if (randrp->virtualX == -1 || randrp->virtualY == -1)
{
randrp->virtualX = pScrn->virtualX;
@@ -481,11 +477,11 @@ xf86RandR12Init (ScreenPtr pScreen)
if (!noPanoramiXExtension)
return TRUE;
#endif
+
if (xf86RandR12Generation != serverGeneration)
- {
- xf86RandR12Index = AllocateScreenPrivateIndex();
xf86RandR12Generation = serverGeneration;
- }
+
+ xf86RandR12Key = &xf86RandR12Key;
randrp = xalloc (sizeof (XF86RandRInfoRec));
if (!randrp)
@@ -511,7 +507,7 @@ xf86RandR12Init (ScreenPtr pScreen)
randrp->maxX = randrp->maxY = 0;
- pScreen->devPrivates[xf86RandR12Index].ptr = randrp;
+ dixSetPrivate(&pScreen->devPrivates, xf86RandR12Key, randrp);
#if RANDR_12_INTERFACE
if (!xf86RandR12Init12 (pScreen))
@@ -523,12 +519,18 @@ xf86RandR12Init (ScreenPtr pScreen)
_X_EXPORT void
xf86RandR12SetRotations (ScreenPtr pScreen, Rotation rotations)
{
- XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen);
+ XF86RandRInfoPtr randrp;
#if RANDR_12_INTERFACE
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
int c;
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
+#endif
+
+ if (xf86RandR12Key == NULL)
+ return;
+ randrp = XF86RANDRINFO(pScreen);
+#if RANDR_12_INTERFACE
for (c = 0; c < config->num_crtc; c++) {
xf86CrtcPtr crtc = config->crtc[c];
@@ -626,7 +628,7 @@ xf86RandR12CrtcNotify (RRCrtcPtr randr_crtc)
DisplayModePtr mode = &crtc->mode;
Bool ret;
- randr_outputs = ALLOCATE_LOCAL(config->num_output * sizeof (RROutputPtr));
+ randr_outputs = xalloc(config->num_output * sizeof (RROutputPtr));
if (!randr_outputs)
return FALSE;
x = crtc->x;
@@ -661,7 +663,7 @@ xf86RandR12CrtcNotify (RRCrtcPtr randr_crtc)
}
ret = RRCrtcNotify (randr_crtc, randr_mode, x, y,
rotation, numOutputs, randr_outputs);
- DEALLOCATE_LOCAL(randr_outputs);
+ xfree(randr_outputs);
return ret;
}
@@ -673,11 +675,8 @@ xf86RandRModeConvert (ScrnInfoPtr scrn,
RRModePtr randr_mode,
DisplayModePtr mode)
{
- mode->prev = NULL;
- mode->next = NULL;
- mode->name = NULL;
+ memset(mode, 0, sizeof(DisplayModeRec));
mode->status = MODE_OK;
- mode->type = 0;
mode->Clock = randr_mode->mode.dotClock / 1000;
@@ -716,7 +715,10 @@ xf86RandR12CrtcSet (ScreenPtr pScreen,
xf86CrtcPtr *save_crtcs;
Bool save_enabled = crtc->enabled;
- save_crtcs = ALLOCATE_LOCAL(config->num_output * sizeof (xf86CrtcPtr));
+ if (!crtc->scrn->vtSema)
+ return FALSE;
+
+ save_crtcs = xalloc(config->num_output * sizeof (xf86CrtcPtr));
if ((randr_mode != NULL) != crtc->enabled)
changed = TRUE;
else if (randr_mode && !xf86RandRModeMatches (randr_mode, &crtc->mode))
@@ -772,7 +774,7 @@ xf86RandR12CrtcSet (ScreenPtr pScreen,
xf86OutputPtr output = config->output[o];
output->crtc = save_crtcs[o];
}
- DEALLOCATE_LOCAL(save_crtcs);
+ xfree(save_crtcs);
return FALSE;
}
/*
@@ -785,7 +787,7 @@ xf86RandR12CrtcSet (ScreenPtr pScreen,
}
xf86DisableUnusedFunctions (pScrn);
}
- DEALLOCATE_LOCAL(save_crtcs);
+ xfree(save_crtcs);
return xf86RandR12CrtcNotify (randr_crtc);
}
@@ -928,8 +930,8 @@ xf86RandR12SetInfo12 (ScreenPtr pScreen)
RRCrtcPtr randr_crtc;
int nclone;
- clones = ALLOCATE_LOCAL(config->num_output * sizeof (RROutputPtr));
- crtcs = ALLOCATE_LOCAL (config->num_crtc * sizeof (RRCrtcPtr));
+ clones = xalloc(config->num_output * sizeof (RROutputPtr));
+ crtcs = xalloc (config->num_crtc * sizeof (RRCrtcPtr));
for (o = 0; o < config->num_output; o++)
{
xf86OutputPtr output = config->output[o];
@@ -946,8 +948,8 @@ xf86RandR12SetInfo12 (ScreenPtr pScreen)
if (!RROutputSetCrtcs (output->randr_output, crtcs, ncrtc))
{
- DEALLOCATE_LOCAL (crtcs);
- DEALLOCATE_LOCAL (clones);
+ xfree (crtcs);
+ xfree (clones);
return FALSE;
}
@@ -983,13 +985,13 @@ xf86RandR12SetInfo12 (ScreenPtr pScreen)
}
if (!RROutputSetClones (output->randr_output, clones, nclone))
{
- DEALLOCATE_LOCAL (crtcs);
- DEALLOCATE_LOCAL (clones);
+ xfree (crtcs);
+ xfree (clones);
return FALSE;
}
}
- DEALLOCATE_LOCAL (crtcs);
- DEALLOCATE_LOCAL (clones);
+ xfree (crtcs);
+ xfree (clones);
return TRUE;
}
@@ -1058,9 +1060,11 @@ xf86RandR12CreateScreenResources12 (ScreenPtr pScreen)
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
+ if (xf86RandR12Key == NULL)
+ return TRUE;
+
for (c = 0; c < config->num_crtc; c++)
- xf86RandR12CrtcNotify (config->crtc[c]->randr_crtc);
-
+ xf86RandR12CrtcNotify (config->crtc[c]->randr_crtc);
RRScreenSetSizeRange (pScreen, config->minWidth, config->minHeight,
config->maxWidth, config->maxHeight);
@@ -1077,11 +1081,11 @@ xf86RandR12TellChanged (ScreenPtr pScreen)
{
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
- XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen);
int c;
- if (!randrp)
+ if (xf86RandR12Key == NULL)
return;
+
xf86RandR12SetInfo12 (pScreen);
for (c = 0; c < config->num_crtc; c++)
xf86RandR12CrtcNotify (config->crtc[c]->randr_crtc);
diff --git a/driver/xf86-video-nv/compat/modes/xf86Rotate.c b/driver/xf86-video-nv/compat/modes/xf86Rotate.c
index 380478f7f..e2d6295b9 100644
--- a/driver/xf86-video-nv/compat/modes/xf86Rotate.c
+++ b/driver/xf86-video-nv/compat/modes/xf86Rotate.c
@@ -494,7 +494,8 @@ xf86CrtcRotate (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation)
{
ScrnInfoPtr pScrn = crtc->scrn;
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
- ScreenPtr pScreen = pScrn->pScreen;
+ /* if this is called during ScreenInit() we don't have pScrn->pScreen yet */
+ ScreenPtr pScreen = screenInfo.screens[pScrn->scrnIndex];
PictTransform crtc_to_fb, fb_to_crtc;
PictureTransformIdentity (&crtc_to_fb);
@@ -579,9 +580,9 @@ xf86CrtcRotate (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation)
}
else
{
- PictureTransformTranslate (&crtc_to_fb, &fb_to_crtc, crtc->x, crtc->y);
+ PictureTransformTranslate (&crtc_to_fb, &fb_to_crtc, F(crtc->x), F(crtc->y));
PictureTransformIsInverse ("offset", &crtc_to_fb, &fb_to_crtc);
-
+
/*
* these are the size of the shadow pixmap, which
* matches the mode, not the pre-rotated copy in the
diff --git a/driver/xf86-video-nv/compat/modes/xf86cvt.c b/driver/xf86-video-nv/compat/modes/xf86cvt.c
index 69ccc4259..e9c74aa62 100644
--- a/driver/xf86-video-nv/compat/modes/xf86cvt.c
+++ b/driver/xf86-video-nv/compat/modes/xf86cvt.c
@@ -20,11 +20,6 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/
-/**
- * @file This is a copy of xf86cvt.c from the X Server, for compatibility with
- * old servers (pre-1.2).
- */
-
/*
* The reason for having this function in a file of its own is
* so that ../utils/cvt/cvt can link to it, and that xf86CVTMode
@@ -72,7 +67,7 @@ _X_EXPORT DisplayModePtr
xf86CVTMode(int HDisplay, int VDisplay, float VRefresh, Bool Reduced,
Bool Interlaced)
{
- DisplayModeRec *Mode = xnfalloc(sizeof(DisplayModeRec));
+ DisplayModeRec *Mode = xnfcalloc(1, sizeof(DisplayModeRec));
/* 1) top/bottom margin size (% of height) - default: 1.8 */
#define CVT_MARGIN_PERCENTAGE 1.8
@@ -95,8 +90,6 @@ xf86CVTMode(int HDisplay, int VDisplay, float VRefresh, Bool Reduced,
int VDisplayRnd, VMargin, VSync;
float Interlace; /* Please rename this */
- memset(Mode, 0, sizeof(DisplayModeRec));
-
/* CVT default is 60.0Hz */
if (!VRefresh)
VRefresh = 60.0;
diff --git a/driver/xf86-video-nv/compat/parser/xf86Parser.h b/driver/xf86-video-nv/compat/parser/xf86Parser.h
index dc30823cc..fd6cc530b 100644
--- a/driver/xf86-video-nv/compat/parser/xf86Parser.h
+++ b/driver/xf86-video-nv/compat/parser/xf86Parser.h
@@ -71,7 +71,6 @@
typedef struct
{
char *file_logfile;
- char *file_rgbpath;
char *file_modulepath;
char *file_inputdevs;
char *file_fontpath;
@@ -308,6 +307,7 @@ typedef struct
XF86ConfDisplayPtr scrn_display_lst;
XF86OptionPtr scrn_option_lst;
char *scrn_comment;
+ int scrn_virtualX, scrn_virtualY;
}
XF86ConfScreenRec, *XF86ConfScreenPtr;
diff --git a/driver/xf86-video-nv/configure b/driver/xf86-video-nv/configure
index 073778fdb..25383a893 100644
--- a/driver/xf86-video-nv/configure
+++ b/driver/xf86-video-nv/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59 for xf86-video-nv 2.1.6.
+# Generated by GNU Autoconf 2.59 for xf86-video-nv 2.1.10.
#
# Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
#
@@ -423,8 +423,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='xf86-video-nv'
PACKAGE_TARNAME='xf86-video-nv'
-PACKAGE_VERSION='2.1.6'
-PACKAGE_STRING='xf86-video-nv 2.1.6'
+PACKAGE_VERSION='2.1.10'
+PACKAGE_STRING='xf86-video-nv 2.1.10'
PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg'
ac_unique_file="Makefile.am"
@@ -465,7 +465,7 @@ ac_includes_default="\
# include <unistd.h>
#endif"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL PKG_CONFIG ac_pt_PKG_CONFIG XORG_CFLAGS XORG_LIBS PCIACCESS_CFLAGS PCIACCESS_LIBS BUILD_XMODES_TRUE BUILD_XMODES_FALSE XMODES_CFLAGS parser_dir modes_dir moduledir DRIVER_NAME APP_MAN_SUFFIX LIB_MAN_SUFFIX FILE_MAN_SUFFIX MISC_MAN_SUFFIX DRIVER_MAN_SUFFIX ADMIN_MAN_SUFFIX APP_MAN_DIR LIB_MAN_DIR FILE_MAN_DIR MISC_MAN_DIR DRIVER_MAN_DIR ADMIN_MAN_DIR LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE SED EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB DSYMUTIL ac_ct_DSYMUTIL NMEDIT ac_ct_NMEDIT CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL PKG_CONFIG ac_pt_PKG_CONFIG XORG_CFLAGS XORG_LIBS PCIACCESS_CFLAGS PCIACCESS_LIBS BUILD_XMODES_TRUE BUILD_XMODES_FALSE XMODES_CFLAGS parser_dir modes_dir moduledir DRIVER_NAME APP_MAN_SUFFIX LIB_MAN_SUFFIX FILE_MAN_SUFFIX MISC_MAN_SUFFIX DRIVER_MAN_SUFFIX ADMIN_MAN_SUFFIX APP_MAN_DIR LIB_MAN_DIR FILE_MAN_DIR MISC_MAN_DIR DRIVER_MAN_DIR ADMIN_MAN_DIR LIBOBJS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@@ -974,7 +974,7 @@ if test "$ac_init_help" = "long"; then
# 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-video-nv 2.1.6 to adapt to many kinds of systems.
+\`configure' configures xf86-video-nv 2.1.10 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1040,7 +1040,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of xf86-video-nv 2.1.6:";;
+ short | recursive ) echo "Configuration of xf86-video-nv 2.1.10:";;
esac
cat <<\_ACEOF
@@ -1195,7 +1195,7 @@ fi
test -n "$ac_init_help" && exit 0
if $ac_init_version; then
cat <<\_ACEOF
-xf86-video-nv configure 2.1.6
+xf86-video-nv configure 2.1.10
generated by GNU Autoconf 2.59
Copyright (C) 2003 Free Software Foundation, Inc.
@@ -1209,7 +1209,7 @@ cat >&5 <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by xf86-video-nv $as_me 2.1.6, which was
+It was created by xf86-video-nv $as_me 2.1.10, which was
generated by GNU Autoconf 2.59. Invocation command line was
$ $0 $@
@@ -1812,7 +1812,7 @@ fi
# Define the identity of the package.
PACKAGE='xf86-video-nv'
- VERSION='2.1.6'
+ VERSION='2.1.10'
cat >>confdefs.h <<_ACEOF
@@ -3220,6 +3220,7 @@ do
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
@@ -3254,6 +3255,7 @@ done
fi
SED=$lt_cv_path_SED
+
echo "$as_me:$LINENO: result: $SED" >&5
echo "${ECHO_T}$SED" >&6
@@ -3468,8 +3470,8 @@ else
echo "${ECHO_T}no, using $LN_S" >&6
fi
-echo "$as_me:$LINENO: checking how to recognise dependent libraries" >&5
-echo $ECHO_N "checking how to recognise dependent libraries... $ECHO_C" >&6
+echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5
+echo $ECHO_N "checking how to recognize dependent libraries... $ECHO_C" >&6
if test "${lt_cv_deplibs_check_method+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
@@ -3488,7 +3490,7 @@ lt_cv_deplibs_check_method='unknown'
# whether `pass_all' will *always* work, you probably want this one.
case $host_os in
-aix4* | aix5*)
+aix[4-9]*)
lt_cv_deplibs_check_method=pass_all
;;
@@ -3510,16 +3512,22 @@ cygwin*)
mingw* | pw32*)
# Base MSYS/MinGW do not provide the 'file' command needed by
- # func_win32_libid shell function, so use a weaker test based on 'objdump'.
- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
- lt_cv_file_magic_cmd='$OBJDUMP -f'
+ # func_win32_libid shell function, so use a weaker test based on 'objdump',
+ # unless we find 'file', for example because we are cross-compiling.
+ if ( file / ) >/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
;;
darwin* | rhapsody*)
lt_cv_deplibs_check_method=pass_all
;;
-freebsd* | kfreebsd*-gnu | dragonfly*)
+freebsd* | dragonfly*)
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
case $host_cpu in
i*86 )
@@ -3557,7 +3565,7 @@ hpux10.20* | hpux11*)
esac
;;
-interix3*)
+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)$'
;;
@@ -3573,7 +3581,7 @@ irix5* | irix6* | nonstopux*)
;;
# This must be Linux ELF.
-linux*)
+linux* | k*bsd*-gnu)
lt_cv_deplibs_check_method=pass_all
;;
@@ -3607,6 +3615,10 @@ 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
;;
@@ -3694,7 +3706,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 3697 "configure"' > conftest.$ac_ext
+ echo '#line 3709 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -3729,7 +3741,8 @@ ia64-*-hpux*)
rm -rf conftest*
;;
-x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+s390*-*linux*|sparc*-*linux*)
# Find out which ABI we are using.
echo 'int i;' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
@@ -3740,6 +3753,9 @@ x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
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"
;;
@@ -3756,6 +3772,9 @@ x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
;;
*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"
;;
@@ -3862,7 +3881,11 @@ sparc*-*solaris*)
*64-bit*)
case $lt_cv_prog_gnu_ld in
yes*) LD="${LD-ld} -m elf64_sparc" ;;
- *) LD="${LD-ld} -64" ;;
+ *)
+ if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
+ LD="${LD-ld} -64"
+ fi
+ ;;
esac
;;
esac
@@ -5293,7 +5316,7 @@ fi
# Provide some information about the compiler.
-echo "$as_me:5296:" \
+echo "$as_me:5319:" \
"checking for Fortran 77 compiler version" >&5
ac_compiler=`set X $ac_compile; echo $2`
{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
@@ -5440,7 +5463,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
-
# find the maximum length of command line arguments
echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5
echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6
@@ -5527,24 +5549,27 @@ else
fi
;;
*)
- # 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.
- SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
- while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \
+ 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
+ SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+ while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \
= "XX$teststring") >/dev/null 2>&1 &&
- new_result=`expr "X$teststring" : ".*" 2>&1` &&
- lt_cv_sys_max_cmd_len=$new_result &&
- test $i != 17 # 1/2 MB should be enough
- do
- i=`expr $i + 1`
- teststring=$teststring$teststring
- done
- 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`
+ new_result=`expr "X$teststring" : ".*" 2>&1` &&
+ lt_cv_sys_max_cmd_len=$new_result &&
+ test $i != 17 # 1/2 MB should be enough
+ do
+ i=`expr $i + 1`
+ teststring=$teststring$teststring
+ done
+ 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
@@ -5561,6 +5586,7 @@ fi
+
# Check for command to grab the raw symbol name followed by C symbol from nm.
echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5
echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6
@@ -5598,7 +5624,7 @@ hpux*) # Its linker distinguishes data from code symbols
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
;;
-linux*)
+linux* | k*bsd*-gnu)
if test "$host_cpu" = ia64; then
symcode='[ABCDGIRSTW]'
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
@@ -5751,7 +5777,7 @@ EOF
echo "$progname: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
- rm -f conftest* conftst*
+ rm -rf conftest* conftst*
# Do not use the global_symbol_pipe unless it works.
if test "$pipe_works" = yes; then
@@ -6101,7 +6127,7 @@ test -z "$STRIP" && STRIP=:
test -z "$ac_objext" && ac_objext=o
# Determine commands to create old-style static archives.
-old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
old_postinstall_cmds='chmod 644 $oldlib'
old_postuninstall_cmds=
@@ -6263,6 +6289,289 @@ fi
;;
esac
+
+ case $host_os in
+ rhapsody* | darwin*)
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
+set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_DSYMUTIL+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$DSYMUTIL"; then
+ ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
+else
+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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+DSYMUTIL=$ac_cv_prog_DSYMUTIL
+if test -n "$DSYMUTIL"; then
+ echo "$as_me:$LINENO: result: $DSYMUTIL" >&5
+echo "${ECHO_T}$DSYMUTIL" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_DSYMUTIL"; then
+ ac_ct_DSYMUTIL=$DSYMUTIL
+ # Extract the first word of "dsymutil", so it can be a program name with args.
+set dummy dsymutil; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_DSYMUTIL"; then
+ ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
+else
+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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ test -z "$ac_cv_prog_ac_ct_DSYMUTIL" && ac_cv_prog_ac_ct_DSYMUTIL=":"
+fi
+fi
+ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
+if test -n "$ac_ct_DSYMUTIL"; then
+ echo "$as_me:$LINENO: result: $ac_ct_DSYMUTIL" >&5
+echo "${ECHO_T}$ac_ct_DSYMUTIL" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ DSYMUTIL=$ac_ct_DSYMUTIL
+else
+ DSYMUTIL="$ac_cv_prog_DSYMUTIL"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
+set dummy ${ac_tool_prefix}nmedit; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_NMEDIT+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$NMEDIT"; then
+ ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
+else
+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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+NMEDIT=$ac_cv_prog_NMEDIT
+if test -n "$NMEDIT"; then
+ echo "$as_me:$LINENO: result: $NMEDIT" >&5
+echo "${ECHO_T}$NMEDIT" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_NMEDIT"; then
+ ac_ct_NMEDIT=$NMEDIT
+ # Extract the first word of "nmedit", so it can be a program name with args.
+set dummy nmedit; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_NMEDIT"; then
+ ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
+else
+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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_NMEDIT="nmedit"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ test -z "$ac_cv_prog_ac_ct_NMEDIT" && ac_cv_prog_ac_ct_NMEDIT=":"
+fi
+fi
+ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
+if test -n "$ac_ct_NMEDIT"; then
+ echo "$as_me:$LINENO: result: $ac_ct_NMEDIT" >&5
+echo "${ECHO_T}$ac_ct_NMEDIT" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ NMEDIT=$ac_ct_NMEDIT
+else
+ NMEDIT="$ac_cv_prog_NMEDIT"
+fi
+
+
+ echo "$as_me:$LINENO: checking for -single_module linker flag" >&5
+echo $ECHO_N "checking for -single_module linker flag... $ECHO_C" >&6
+if test "${lt_cv_apple_cc_single_mod+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ 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.
+ echo "int foo(void){return 1;}" > conftest.c
+ $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+ -dynamiclib ${wl}-single_module conftest.c
+ if test -f libconftest.dylib; then
+ lt_cv_apple_cc_single_mod=yes
+ rm -rf libconftest.dylib*
+ fi
+ rm conftest.c
+ fi
+fi
+echo "$as_me:$LINENO: result: $lt_cv_apple_cc_single_mod" >&5
+echo "${ECHO_T}$lt_cv_apple_cc_single_mod" >&6
+ echo "$as_me:$LINENO: checking for -exported_symbols_list linker flag" >&5
+echo $ECHO_N "checking for -exported_symbols_list linker flag... $ECHO_C" >&6
+if test "${lt_cv_ld_exported_symbols_list+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_cv_ld_exported_symbols_list=no
+ save_LDFLAGS=$LDFLAGS
+ echo "_main" > conftest.sym
+ LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ lt_cv_ld_exported_symbols_list=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+lt_cv_ld_exported_symbols_list=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS="$save_LDFLAGS"
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_ld_exported_symbols_list" >&5
+echo "${ECHO_T}$lt_cv_ld_exported_symbols_list" >&6
+ case $host_os in
+ rhapsody* | darwin1.[0123])
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
+ darwin1.*)
+ _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+ darwin*)
+ # 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
+
+
enable_dlopen=no
enable_win32_dll=no
@@ -6301,10 +6610,10 @@ objext=o
objext=$objext
# Code to be used in simple compile tests
-lt_simple_compile_test_code="int some_variable = 0;\n"
+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);}\n'
+lt_simple_link_test_code='int main(){return(0);}'
# If no C compiler was specified, use CC.
@@ -6319,16 +6628,16 @@ compiler=$CC
# save warnings/boilerplate of simple test code
ac_outfile=conftest.$ac_objext
-printf "$lt_simple_compile_test_code" >conftest.$ac_ext
+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*
ac_outfile=conftest.$ac_objext
-printf "$lt_simple_link_test_code" >conftest.$ac_ext
+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 conftest*
+$rm -r conftest*
@@ -6345,7 +6654,7 @@ if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
else
lt_cv_prog_compiler_rtti_exceptions=no
ac_outfile=conftest.$ac_objext
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
lt_compiler_flag="-fno-rtti -fno-exceptions"
# Insert the option either (1) after the last *FLAGS variable, or
# (2) before a word containing "conftest.", or (3) at the end.
@@ -6356,11 +6665,11 @@ else
-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:6359: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:6668: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:6363: \$? = $ac_status" >&5
+ echo "$as_me:6672: \$? = $ac_status" >&5
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.
@@ -6411,13 +6720,15 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
;;
- beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
# PIC is the default for these OSes.
;;
- mingw* | pw32* | os2*)
+ mingw* | cygwin* | pw32* | os2*)
# 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
lt_prog_compiler_pic='-DDLL_EXPORT'
;;
@@ -6427,7 +6738,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
lt_prog_compiler_pic='-fno-common'
;;
- interix3*)
+ interix[3-9]*)
# Interix 3.x gcc -fpic/-fPIC options generate broken code.
# Instead, we relocate shared libraries at runtime.
;;
@@ -6485,7 +6796,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
esac
;;
- mingw* | pw32* | os2*)
+ mingw* | cygwin* | pw32* | os2*)
# 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).
lt_prog_compiler_pic='-DDLL_EXPORT'
@@ -6518,7 +6829,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
lt_prog_compiler_static='-Bstatic'
;;
- linux*)
+ linux* | k*bsd*-gnu)
case $cc_basename in
icc* | ecc*)
lt_prog_compiler_wl='-Wl,'
@@ -6537,6 +6848,22 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
# All Alpha code is PIC.
lt_prog_compiler_static='-non_shared'
;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C 5.9
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ lt_prog_compiler_wl='-Wl,'
+ ;;
+ *Sun\ F*)
+ # Sun Fortran 8.3 passes all unrecognized flags to the linker
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ lt_prog_compiler_wl=''
+ ;;
+ esac
+ ;;
esac
;;
@@ -6546,6 +6873,10 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
lt_prog_compiler_static='-non_shared'
;;
+ rdos*)
+ lt_prog_compiler_static='-non_shared'
+ ;;
+
solaris*)
lt_prog_compiler_pic='-KPIC'
lt_prog_compiler_static='-Bstatic'
@@ -6608,12 +6939,12 @@ if test -n "$lt_prog_compiler_pic"; then
echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6
-if test "${lt_prog_compiler_pic_works+set}" = set; then
+if test "${lt_cv_prog_compiler_pic_works+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- lt_prog_compiler_pic_works=no
+ lt_cv_prog_compiler_pic_works=no
ac_outfile=conftest.$ac_objext
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
# Insert the option either (1) after the last *FLAGS variable, or
# (2) before a word containing "conftest.", or (3) at the end.
@@ -6624,27 +6955,27 @@ else
-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:6627: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:6958: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:6631: \$? = $ac_status" >&5
+ echo "$as_me:6962: \$? = $ac_status" >&5
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
- lt_prog_compiler_pic_works=yes
+ lt_cv_prog_compiler_pic_works=yes
fi
fi
$rm conftest*
fi
-echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5
-echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6
+echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_pic_works" >&6
-if test x"$lt_prog_compiler_pic_works" = xyes; then
+if test x"$lt_cv_prog_compiler_pic_works" = xyes; then
case $lt_prog_compiler_pic in
"" | " "*) ;;
*) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
@@ -6671,13 +7002,13 @@ esac
wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6
-if test "${lt_prog_compiler_static_works+set}" = set; then
+if test "${lt_cv_prog_compiler_static_works+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- lt_prog_compiler_static_works=no
+ lt_cv_prog_compiler_static_works=no
save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
- printf "$lt_simple_link_test_code" > conftest.$ac_ext
+ 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
@@ -6687,20 +7018,20 @@ else
$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
- lt_prog_compiler_static_works=yes
+ lt_cv_prog_compiler_static_works=yes
fi
else
- lt_prog_compiler_static_works=yes
+ lt_cv_prog_compiler_static_works=yes
fi
fi
- $rm conftest*
+ $rm -r conftest*
LDFLAGS="$save_LDFLAGS"
fi
-echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5
-echo "${ECHO_T}$lt_prog_compiler_static_works" >&6
+echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_static_works" >&6
-if test x"$lt_prog_compiler_static_works" = xyes; then
+if test x"$lt_cv_prog_compiler_static_works" = xyes; then
:
else
lt_prog_compiler_static=
@@ -6717,7 +7048,7 @@ else
mkdir conftest
cd conftest
mkdir out
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ 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
@@ -6728,11 +7059,11 @@ else
-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:6731: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:7062: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:6735: \$? = $ac_status" >&5
+ echo "$as_me:7066: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -6812,12 +7143,13 @@ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared librar
# 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'.
- exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
+ exclude_expsyms='_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.
extract_expsyms_cmds=
# Just being paranoid about ensuring that cc_basename is set.
for cc_temp in $compiler""; do
@@ -6876,7 +7208,7 @@ cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
# See if GNU ld supports shared libraries.
case $host_os in
- aix3* | aix4* | aix5*)
+ aix[3-9]*)
# On AIX/PPC, the GNU linker is very broken
if test "$host_cpu" != ia64; then
ld_shlibs=no
@@ -6924,7 +7256,7 @@ EOF
allow_undefined_flag=unsupported
always_export_symbols=no
enable_shared_with_static_runtimes=yes
- export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
@@ -6942,7 +7274,7 @@ EOF
fi
;;
- interix3*)
+ interix[3-9]*)
hardcode_direct=no
hardcode_shlibpath_var=no
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
@@ -6957,7 +7289,7 @@ EOF
archive_expsym_cmds='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'
;;
- linux*)
+ gnu* | linux* | k*bsd*-gnu)
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
tmp_addflag=
case $cc_basename,$host_cpu in
@@ -6975,13 +7307,22 @@ EOF
ifc* | ifort*) # Intel Fortran compiler
tmp_addflag=' -nofor_main' ;;
esac
- archive_cmds='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*) # Sun C 5.9
+ whole_archive_flag_spec='${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'
+ tmp_sharedflag='-G' ;;
+ *Sun\ F*) # Sun Fortran 8.3
+ tmp_sharedflag='-G' ;;
+ *)
+ tmp_sharedflag='-shared' ;;
+ esac
+ archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
if test $supports_anon_versioning = yes; then
archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~
cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
$echo "local: *; };" >> $output_objdir/$libname.ver~
- $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
fi
else
ld_shlibs=no
@@ -7086,7 +7427,7 @@ _LT_EOF
fi
;;
- aix4* | aix5*)
+ 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.
@@ -7106,7 +7447,7 @@ _LT_EOF
# 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].*|aix5*)
+ 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
@@ -7140,7 +7481,7 @@ _LT_EOF
strings "$collect2name" | grep resolve_lib_name >/dev/null
then
# We have reworked collect2
- hardcode_direct=yes
+ :
else
# We have old collect2
hardcode_direct=unsupported
@@ -7218,11 +7559,18 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`
+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 '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`; fi
+if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
@@ -7279,11 +7627,18 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`
+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 '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`; fi
+if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
@@ -7335,7 +7690,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
# The linker will automatically build a .lib file if we build a DLL.
old_archive_From_new_cmds='true'
# FIXME: Should let the user specify the lib program.
- old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
+ old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
fix_srcfile_path='`cygpath -w "$srcfile"`'
enable_shared_with_static_runtimes=yes
;;
@@ -7368,19 +7723,18 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
link_all_deplibs=yes
if test "$GCC" = yes ; then
output_verbose_link_cmd='echo'
- archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
- module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
- # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
- archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+ module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+ archive_expsym_cmds="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}"
+ module_expsym_cmds="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}"
else
case $cc_basename in
xlc*)
output_verbose_link_cmd='echo'
- archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
+ archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
- archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
;;
*)
@@ -7420,7 +7774,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
;;
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
- freebsd* | kfreebsd*-gnu | dragonfly*)
+ freebsd* | dragonfly*)
archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
@@ -7543,15 +7897,15 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
openbsd*)
if test -f /usr/libexec/ld.so; then
- hardcode_direct=yes
- hardcode_shlibpath_var=no
- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
export_dynamic_flag_spec='${wl}-E'
- else
- case $host_os in
+ else
+ case $host_os in
openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
hardcode_libdir_flag_spec='-R$libdir'
@@ -7560,10 +7914,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
;;
- esac
+ esac
fi
else
- ld_shlibs=no
+ ld_shlibs=no
fi
;;
@@ -7622,17 +7976,16 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
case $host_os in
solaris2.[0-5] | solaris2.[0-5].*) ;;
*)
- # The compiler driver will combine linker options so we
- # cannot just pass the convience library names through
- # without $wl, iff we do not link with $LD.
- # Luckily, gcc supports the same syntax we need for Sun Studio.
+ # 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?)
- case $wlarc in
- '')
- whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
- *)
- whole_archive_flag_spec='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
- esac ;;
+ if test "$GCC" = yes; then
+ whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ else
+ whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
+ fi
+ ;;
esac
link_all_deplibs=yes
;;
@@ -7689,7 +8042,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
fi
;;
- sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*)
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
no_undefined_flag='${wl}-z,text'
archive_cmds_need_lc=no
hardcode_shlibpath_var=no
@@ -7766,7 +8119,7 @@ x|xyes)
echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
$rm conftest*
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
@@ -7824,17 +8177,55 @@ shlibpath_overrides_runpath=unknown
version_type=none
dynamic_linker="$host_os ld.so"
sys_lib_dlsearch_path_spec="/lib /usr/lib"
+
if test "$GCC" = yes; then
- 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 ';' >/dev/null ; 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.
- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+ lt_search_path_spec=`echo "$lt_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"`
+ 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
@@ -7855,7 +8246,7 @@ aix3*)
soname_spec='${libname}${release}${shared_ext}$major'
;;
-aix4* | aix5*)
+aix[4-9]*)
version_type=linux
need_lib_prefix=no
need_version=no
@@ -7994,12 +8385,8 @@ darwin* | rhapsody*)
shlibpath_overrides_runpath=yes
shlibpath_var=DYLD_LIBRARY_PATH
shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
- # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
- if test "$GCC" = yes; then
- sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
- else
- sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
- fi
+
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
;;
@@ -8016,18 +8403,6 @@ freebsd1*)
dynamic_linker=no
;;
-kfreebsd*-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='GNU ld.so'
- ;;
-
freebsd* | dragonfly*)
# DragonFly does not have aout. When/if they implement a new
# versioning mechanism, adjust this.
@@ -8065,7 +8440,7 @@ freebsd* | dragonfly*)
shlibpath_overrides_runpath=no
hardcode_into_libs=yes
;;
- freebsd*) # from 4.6 on
+ *) # from 4.6 on, and DragonFly
shlibpath_overrides_runpath=yes
hardcode_into_libs=yes
;;
@@ -8128,7 +8503,7 @@ hpux9* | hpux10* | hpux11*)
postinstall_cmds='chmod 555 $lib'
;;
-interix3*)
+interix[3-9]*)
version_type=linux
need_lib_prefix=no
need_version=no
@@ -8183,7 +8558,7 @@ linux*oldld* | linux*aout* | linux*coff*)
;;
# This must be Linux ELF.
-linux*)
+linux* | k*bsd*-gnu)
version_type=linux
need_lib_prefix=no
need_version=no
@@ -8199,7 +8574,7 @@ linux*)
# 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)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+ 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
@@ -8212,18 +8587,6 @@ linux*)
dynamic_linker='GNU/Linux ld.so'
;;
-knetbsd*-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='GNU ld.so'
- ;;
-
netbsd*)
version_type=sunos
need_lib_prefix=no
@@ -8305,6 +8668,10 @@ osf3* | osf4* | osf5*)
sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
;;
+rdos*)
+ dynamic_linker=no
+ ;;
+
solaris*)
version_type=linux
need_lib_prefix=no
@@ -8401,6 +8768,21 @@ echo "$as_me:$LINENO: result: $dynamic_linker" >&5
echo "${ECHO_T}$dynamic_linker" >&6
test "$dynamic_linker" = no && can_build_shared=no
+if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"
+fi
+
+sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"
+fi
+
+sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+
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"
@@ -8458,6 +8840,7 @@ else
darwin*)
if test -n "$STRIP" ; then
striplib="$STRIP -x"
+ old_striplib="$STRIP -S"
echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
@@ -8734,7 +9117,7 @@ fi
echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
if test $ac_cv_lib_dld_shl_load = yes; then
- lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
+ lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
else
echo "$as_me:$LINENO: checking for dlopen" >&5
echo $ECHO_N "checking for dlopen... $ECHO_C" >&6
@@ -9028,7 +9411,7 @@ fi
echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6
if test $ac_cv_lib_dld_dld_link = yes; then
- lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
+ lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
fi
@@ -9077,7 +9460,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 9080 "configure"
+#line 9463 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -9177,7 +9560,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 9180 "configure"
+#line 9563 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -9304,7 +9687,7 @@ aix3*)
fi
;;
-aix4* | aix5*)
+aix[4-9]*)
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
test "$enable_shared" = yes && enable_static=no
fi
@@ -9360,6 +9743,7 @@ if test -f "$ltmain"; then
predeps \
postdeps \
compiler_lib_search_path \
+ compiler_lib_search_dirs \
archive_cmds \
archive_expsym_cmds \
postinstall_cmds \
@@ -9375,6 +9759,7 @@ if test -f "$ltmain"; then
module_cmds \
module_expsym_cmds \
lt_cv_prog_compiler_c_o \
+ fix_srcfile_path \
exclude_expsyms \
include_expsyms; do
@@ -9419,7 +9804,7 @@ echo "$as_me: creating $ofile" >&6;}
# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
#
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
# Free Software Foundation, Inc.
#
# This file is part of GNU Libtool:
@@ -9655,6 +10040,10 @@ predeps=$lt_predeps
# shared library.
postdeps=$lt_postdeps
+# The directories searched by this compiler when creating a shared
+# library
+compiler_lib_search_dirs=$lt_compiler_lib_search_dirs
+
# The library search path used internally by the compiler when linking
# a shared library.
compiler_lib_search_path=$lt_compiler_lib_search_path
@@ -9743,7 +10132,7 @@ sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path="$fix_srcfile_path"
+fix_srcfile_path=$lt_fix_srcfile_path
# Set to yes if exported symbols are required.
always_export_symbols=$always_export_symbols
@@ -9903,6 +10292,7 @@ postdep_objects_CXX=
predeps_CXX=
postdeps_CXX=
compiler_lib_search_path_CXX=
+compiler_lib_search_dirs_CXX=
# Source file extension for C++ test sources.
ac_ext=cpp
@@ -9912,10 +10302,10 @@ objext=o
objext_CXX=$objext
# Code to be used in simple compile tests
-lt_simple_compile_test_code="int some_variable = 0;\n"
+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); }\n'
+lt_simple_link_test_code='int main(int, char *[]) { return(0); }'
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
@@ -9931,16 +10321,16 @@ compiler=$CC
# save warnings/boilerplate of simple test code
ac_outfile=conftest.$ac_objext
-printf "$lt_simple_compile_test_code" >conftest.$ac_ext
+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*
ac_outfile=conftest.$ac_objext
-printf "$lt_simple_link_test_code" >conftest.$ac_ext
+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 conftest*
+$rm -r conftest*
# Allow CC to be a program name with arguments.
@@ -10147,7 +10537,7 @@ case $host_os in
# FIXME: insert proper C++ library support
ld_shlibs_CXX=no
;;
- aix4* | aix5*)
+ 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.
@@ -10160,7 +10550,7 @@ case $host_os in
# 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].*|aix5*)
+ case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
for ld_flag in $LDFLAGS; do
case $ld_flag in
*-brtl*)
@@ -10196,7 +10586,7 @@ case $host_os in
strings "$collect2name" | grep resolve_lib_name >/dev/null
then
# We have reworked collect2
- hardcode_direct_CXX=yes
+ :
else
# We have old collect2
hardcode_direct_CXX=unsupported
@@ -10274,11 +10664,18 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`
+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 '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`; fi
+if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
@@ -10336,11 +10733,18 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`
+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 '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`; fi
+if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
@@ -10408,59 +10812,31 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
fi
;;
darwin* | rhapsody*)
- case $host_os in
- rhapsody* | darwin1.[012])
- allow_undefined_flag_CXX='${wl}-undefined ${wl}suppress'
- ;;
- *) # Darwin 1.3 on
- if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
- allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
- else
- case ${MACOSX_DEPLOYMENT_TARGET} in
- 10.[012])
- allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
- ;;
- 10.*)
- allow_undefined_flag_CXX='${wl}-undefined ${wl}dynamic_lookup'
- ;;
- esac
- fi
- ;;
- esac
archive_cmds_need_lc_CXX=no
hardcode_direct_CXX=no
hardcode_automatic_CXX=yes
hardcode_shlibpath_var_CXX=unsupported
whole_archive_flag_spec_CXX=''
link_all_deplibs_CXX=yes
-
- if test "$GXX" = yes ; then
- lt_int_apple_cc_single_mod=no
+ allow_undefined_flag_CXX="$_lt_dar_allow_undefined"
+ if test "$GXX" = yes ; then
output_verbose_link_cmd='echo'
- if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
- lt_int_apple_cc_single_mod=yes
+ archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+ module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+ archive_expsym_cmds_CXX="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}"
+ module_expsym_cmds_CXX="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}"
+ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
+ archive_cmds_CXX="\$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}"
+ archive_expsym_cmds_CXX="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
- if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
- archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
- else
- archive_cmds_CXX='$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'
- fi
- module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
- # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
- if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
- archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- else
- archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "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~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- fi
- module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
else
case $cc_basename in
xlc*)
output_verbose_link_cmd='echo'
- archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
+ archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
- archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
;;
*)
@@ -10494,7 +10870,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
freebsd-elf*)
archive_cmds_need_lc_CXX=no
;;
- freebsd* | kfreebsd*-gnu | dragonfly*)
+ freebsd* | dragonfly*)
# FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
# conventions
ld_shlibs_CXX=yes
@@ -10543,9 +10919,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
hardcode_libdir_separator_CXX=:
case $host_cpu in
- hppa*64*|ia64*)
- hardcode_libdir_flag_spec_ld_CXX='+b $libdir'
- ;;
+ hppa*64*|ia64*) ;;
*)
export_dynamic_flag_spec_CXX='${wl}-E'
;;
@@ -10613,7 +10987,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
;;
esac
;;
- interix3*)
+ interix[3-9]*)
hardcode_direct_CXX=no
hardcode_shlibpath_var_CXX=no
hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
@@ -10653,7 +11027,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator_CXX=:
;;
- linux*)
+ linux* | k*bsd*-gnu)
case $cc_basename in
KCC*)
# Kuck and Associates, Inc. (KAI) C++ Compiler
@@ -10705,7 +11079,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
;;
- pgCC*)
+ pgCC* | pgcpp*)
# Portland Group C++ compiler
archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
archive_expsym_cmds_CXX='$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'
@@ -10733,6 +11107,29 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
# dependencies.
output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "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 $list'
;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+ no_undefined_flag_CXX=' -zdefs'
+ archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
+ hardcode_libdir_flag_spec_CXX='-R$libdir'
+ whole_archive_flag_spec_CXX='${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'
+
+ # 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.
+ old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
+ ;;
+ esac
+ ;;
esac
;;
lynxos*)
@@ -10777,9 +11174,9 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
- export_dynamic_flag_spec_CXX='${wl}-E'
- whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
+ export_dynamic_flag_spec_CXX='${wl}-E'
+ whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
fi
output_verbose_link_cmd='echo'
else
@@ -10946,15 +11343,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
case $host_os in
solaris2.[0-5] | solaris2.[0-5].*) ;;
*)
- # The C++ compiler is used as linker so we must use $wl
- # flag to pass the commands to the underlying system
- # linker. We must also pass each convience library through
- # to the system linker between allextract/defaultextract.
- # The C++ compiler will combine linker options so we
- # cannot just pass the convience library names through
- # without $wl.
+ # The compiler driver will combine and reorder linker options,
+ # but understands `-z linker_flag'.
# Supported since Solaris 2.6 (maybe 2.5.1?)
- whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
+ whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract'
;;
esac
link_all_deplibs_CXX=yes
@@ -11001,6 +11393,12 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
fi
hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir'
+ case $host_os in
+ solaris2.[0-5] | solaris2.[0-5].*) ;;
+ *)
+ whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ ;;
+ esac
fi
;;
esac
@@ -11088,7 +11486,6 @@ test "$ld_shlibs_CXX" = no && can_build_shared=no
GCC_CXX="$GXX"
LD_CXX="$LD"
-
cat > conftest.$ac_ext <<EOF
class Foo
{
@@ -11190,9 +11587,14 @@ fi
$rm -f confest.$objext
+compiler_lib_search_dirs_CXX=
+if test -n "$compiler_lib_search_path_CXX"; then
+ compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
+fi
+
# PORTME: override above test on systems where it is broken
case $host_os in
-interix3*)
+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.
predep_objects_CXX=
@@ -11200,19 +11602,51 @@ interix3*)
postdeps_CXX=
;;
+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
+ postdeps_CXX='-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.
- postdeps_CXX='-lCstd -lCrun'
+ if test "$solaris_use_stlport4" != yes; then
+ postdeps_CXX='-library=Cstd -library=Crun'
+ fi
;;
esac
;;
esac
-
case " $postdeps_CXX " in
*" -lc "*) archive_cmds_need_lc_CXX=no ;;
esac
@@ -11243,12 +11677,14 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
# like `-m68040'.
lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4'
;;
- beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
# PIC is the default for these OSes.
;;
- mingw* | os2* | pw32*)
+ mingw* | cygwin* | os2* | pw32*)
# 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
lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
;;
darwin* | rhapsody*)
@@ -11260,7 +11696,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
# DJGPP does not support shared libraries at all
lt_prog_compiler_pic_CXX=
;;
- interix3*)
+ interix[3-9]*)
# Interix 3.x gcc -fpic/-fPIC options generate broken code.
# Instead, we relocate shared libraries at runtime.
;;
@@ -11286,7 +11722,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
esac
else
case $host_os in
- aix4* | aix5*)
+ aix[4-9]*)
# All AIX code is PIC.
if test "$host_cpu" = ia64; then
# AIX 5 now supports IA64 processor
@@ -11326,7 +11762,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
;;
esac
;;
- freebsd* | kfreebsd*-gnu | dragonfly*)
+ freebsd* | dragonfly*)
# FreeBSD uses GNU C++
;;
hpux9* | hpux10* | hpux11*)
@@ -11369,7 +11805,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
;;
esac
;;
- linux*)
+ linux* | k*bsd*-gnu)
case $cc_basename in
KCC*)
# KAI C++ Compiler
@@ -11382,7 +11818,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
lt_prog_compiler_pic_CXX='-KPIC'
lt_prog_compiler_static_CXX='-static'
;;
- pgCC*)
+ pgCC* | pgcpp*)
# Portland Group C++ compiler.
lt_prog_compiler_wl_CXX='-Wl,'
lt_prog_compiler_pic_CXX='-fpic'
@@ -11396,6 +11832,14 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
lt_prog_compiler_static_CXX='-non_shared'
;;
*)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+ lt_prog_compiler_pic_CXX='-KPIC'
+ lt_prog_compiler_static_CXX='-Bstatic'
+ lt_prog_compiler_wl_CXX='-Qoption ld '
+ ;;
+ esac
;;
esac
;;
@@ -11505,12 +11949,12 @@ if test -n "$lt_prog_compiler_pic_CXX"; then
echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5
echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6
-if test "${lt_prog_compiler_pic_works_CXX+set}" = set; then
+if test "${lt_cv_prog_compiler_pic_works_CXX+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- lt_prog_compiler_pic_works_CXX=no
+ lt_cv_prog_compiler_pic_works_CXX=no
ac_outfile=conftest.$ac_objext
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC"
# Insert the option either (1) after the last *FLAGS variable, or
# (2) before a word containing "conftest.", or (3) at the end.
@@ -11521,27 +11965,27 @@ else
-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:11524: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:11968: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:11528: \$? = $ac_status" >&5
+ echo "$as_me:11972: \$? = $ac_status" >&5
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
- lt_prog_compiler_pic_works_CXX=yes
+ lt_cv_prog_compiler_pic_works_CXX=yes
fi
fi
$rm conftest*
fi
-echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_CXX" >&5
-echo "${ECHO_T}$lt_prog_compiler_pic_works_CXX" >&6
+echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_CXX" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_pic_works_CXX" >&6
-if test x"$lt_prog_compiler_pic_works_CXX" = xyes; then
+if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then
case $lt_prog_compiler_pic_CXX in
"" | " "*) ;;
*) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;;
@@ -11568,13 +12012,13 @@ esac
wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\"
echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6
-if test "${lt_prog_compiler_static_works_CXX+set}" = set; then
+if test "${lt_cv_prog_compiler_static_works_CXX+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- lt_prog_compiler_static_works_CXX=no
+ lt_cv_prog_compiler_static_works_CXX=no
save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
- printf "$lt_simple_link_test_code" > conftest.$ac_ext
+ 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
@@ -11584,20 +12028,20 @@ else
$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
- lt_prog_compiler_static_works_CXX=yes
+ lt_cv_prog_compiler_static_works_CXX=yes
fi
else
- lt_prog_compiler_static_works_CXX=yes
+ lt_cv_prog_compiler_static_works_CXX=yes
fi
fi
- $rm conftest*
+ $rm -r conftest*
LDFLAGS="$save_LDFLAGS"
fi
-echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_CXX" >&5
-echo "${ECHO_T}$lt_prog_compiler_static_works_CXX" >&6
+echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_CXX" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_static_works_CXX" >&6
-if test x"$lt_prog_compiler_static_works_CXX" = xyes; then
+if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then
:
else
lt_prog_compiler_static_CXX=
@@ -11614,7 +12058,7 @@ else
mkdir conftest
cd conftest
mkdir out
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ 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
@@ -11625,11 +12069,11 @@ else
-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:11628: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:12072: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:11632: \$? = $ac_status" >&5
+ echo "$as_me:12076: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -11682,7 +12126,7 @@ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared librar
export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
case $host_os in
- aix4* | aix5*)
+ 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
@@ -11695,12 +12139,13 @@ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared librar
export_symbols_cmds_CXX="$ltdll_cmds"
;;
cygwin* | mingw*)
- export_symbols_cmds_CXX='$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'
+ export_symbols_cmds_CXX='$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'
;;
*)
export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
;;
esac
+ exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5
echo "${ECHO_T}$ld_shlibs_CXX" >&6
@@ -11726,7 +12171,7 @@ x|xyes)
echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
$rm conftest*
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
@@ -11784,20 +12229,7 @@ shlibpath_overrides_runpath=unknown
version_type=none
dynamic_linker="$host_os ld.so"
sys_lib_dlsearch_path_spec="/lib /usr/lib"
-if test "$GCC" = yes; then
- 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 ';' >/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.
- 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
-else
- sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
-fi
+
need_lib_prefix=unknown
hardcode_into_libs=no
@@ -11815,7 +12247,7 @@ aix3*)
soname_spec='${libname}${release}${shared_ext}$major'
;;
-aix4* | aix5*)
+aix[4-9]*)
version_type=linux
need_lib_prefix=no
need_version=no
@@ -11954,12 +12386,7 @@ darwin* | rhapsody*)
shlibpath_overrides_runpath=yes
shlibpath_var=DYLD_LIBRARY_PATH
shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
- # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
- if test "$GCC" = yes; then
- sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
- else
- sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
- fi
+
sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
;;
@@ -11976,18 +12403,6 @@ freebsd1*)
dynamic_linker=no
;;
-kfreebsd*-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='GNU ld.so'
- ;;
-
freebsd* | dragonfly*)
# DragonFly does not have aout. When/if they implement a new
# versioning mechanism, adjust this.
@@ -12025,7 +12440,7 @@ freebsd* | dragonfly*)
shlibpath_overrides_runpath=no
hardcode_into_libs=yes
;;
- freebsd*) # from 4.6 on
+ *) # from 4.6 on, and DragonFly
shlibpath_overrides_runpath=yes
hardcode_into_libs=yes
;;
@@ -12088,7 +12503,7 @@ hpux9* | hpux10* | hpux11*)
postinstall_cmds='chmod 555 $lib'
;;
-interix3*)
+interix[3-9]*)
version_type=linux
need_lib_prefix=no
need_version=no
@@ -12143,7 +12558,7 @@ linux*oldld* | linux*aout* | linux*coff*)
;;
# This must be Linux ELF.
-linux*)
+linux* | k*bsd*-gnu)
version_type=linux
need_lib_prefix=no
need_version=no
@@ -12159,7 +12574,7 @@ linux*)
# 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)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+ 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
@@ -12172,18 +12587,6 @@ linux*)
dynamic_linker='GNU/Linux ld.so'
;;
-knetbsd*-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='GNU ld.so'
- ;;
-
netbsd*)
version_type=sunos
need_lib_prefix=no
@@ -12265,6 +12668,10 @@ osf3* | osf4* | osf5*)
sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
;;
+rdos*)
+ dynamic_linker=no
+ ;;
+
solaris*)
version_type=linux
need_lib_prefix=no
@@ -12361,6 +12768,21 @@ echo "$as_me:$LINENO: result: $dynamic_linker" >&5
echo "${ECHO_T}$dynamic_linker" >&6
test "$dynamic_linker" = no && can_build_shared=no
+if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"
+fi
+
+sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"
+fi
+
+sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+
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"
@@ -12444,6 +12866,7 @@ if test -f "$ltmain"; then
predeps_CXX \
postdeps_CXX \
compiler_lib_search_path_CXX \
+ compiler_lib_search_dirs_CXX \
archive_cmds_CXX \
archive_expsym_cmds_CXX \
postinstall_cmds_CXX \
@@ -12459,6 +12882,7 @@ if test -f "$ltmain"; then
module_cmds_CXX \
module_expsym_cmds_CXX \
lt_cv_prog_compiler_c_o_CXX \
+ fix_srcfile_path_CXX \
exclude_expsyms_CXX \
include_expsyms_CXX; do
@@ -12691,6 +13115,10 @@ predeps=$lt_predeps_CXX
# shared library.
postdeps=$lt_postdeps_CXX
+# The directories searched by this compiler when creating a shared
+# library
+compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX
+
# The library search path used internally by the compiler when linking
# a shared library.
compiler_lib_search_path=$lt_compiler_lib_search_path_CXX
@@ -12779,7 +13207,7 @@ sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path="$fix_srcfile_path_CXX"
+fix_srcfile_path=$lt_fix_srcfile_path
# Set to yes if exported symbols are required.
always_export_symbols=$always_export_symbols_CXX
@@ -12870,10 +13298,17 @@ objext=o
objext_F77=$objext
# Code to be used in simple compile tests
-lt_simple_compile_test_code=" subroutine t\n return\n end\n"
+lt_simple_compile_test_code="\
+ subroutine t
+ return
+ end
+"
# Code to be used in simple link tests
-lt_simple_link_test_code=" program t\n end\n"
+lt_simple_link_test_code="\
+ program t
+ end
+"
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
@@ -12889,16 +13324,16 @@ compiler=$CC
# save warnings/boilerplate of simple test code
ac_outfile=conftest.$ac_objext
-printf "$lt_simple_compile_test_code" >conftest.$ac_ext
+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*
ac_outfile=conftest.$ac_objext
-printf "$lt_simple_link_test_code" >conftest.$ac_ext
+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 conftest*
+$rm -r conftest*
# Allow CC to be a program name with arguments.
@@ -12936,7 +13371,7 @@ aix3*)
postinstall_cmds='$RANLIB $lib'
fi
;;
-aix4* | aix5*)
+aix[4-9]*)
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
test "$enable_shared" = yes && enable_static=no
fi
@@ -12982,13 +13417,15 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4'
;;
- beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
# PIC is the default for these OSes.
;;
- mingw* | pw32* | os2*)
+ mingw* | cygwin* | pw32* | os2*)
# 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
lt_prog_compiler_pic_F77='-DDLL_EXPORT'
;;
@@ -12998,7 +13435,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
lt_prog_compiler_pic_F77='-fno-common'
;;
- interix3*)
+ interix[3-9]*)
# Interix 3.x gcc -fpic/-fPIC options generate broken code.
# Instead, we relocate shared libraries at runtime.
;;
@@ -13056,7 +13493,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
esac
;;
- mingw* | pw32* | os2*)
+ mingw* | cygwin* | pw32* | os2*)
# 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).
lt_prog_compiler_pic_F77='-DDLL_EXPORT'
@@ -13089,7 +13526,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
lt_prog_compiler_static_F77='-Bstatic'
;;
- linux*)
+ linux* | k*bsd*-gnu)
case $cc_basename in
icc* | ecc*)
lt_prog_compiler_wl_F77='-Wl,'
@@ -13108,6 +13545,22 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
# All Alpha code is PIC.
lt_prog_compiler_static_F77='-non_shared'
;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C 5.9
+ lt_prog_compiler_pic_F77='-KPIC'
+ lt_prog_compiler_static_F77='-Bstatic'
+ lt_prog_compiler_wl_F77='-Wl,'
+ ;;
+ *Sun\ F*)
+ # Sun Fortran 8.3 passes all unrecognized flags to the linker
+ lt_prog_compiler_pic_F77='-KPIC'
+ lt_prog_compiler_static_F77='-Bstatic'
+ lt_prog_compiler_wl_F77=''
+ ;;
+ esac
+ ;;
esac
;;
@@ -13117,6 +13570,10 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
lt_prog_compiler_static_F77='-non_shared'
;;
+ rdos*)
+ lt_prog_compiler_static_F77='-non_shared'
+ ;;
+
solaris*)
lt_prog_compiler_pic_F77='-KPIC'
lt_prog_compiler_static_F77='-Bstatic'
@@ -13179,12 +13636,12 @@ if test -n "$lt_prog_compiler_pic_F77"; then
echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5
echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6
-if test "${lt_prog_compiler_pic_works_F77+set}" = set; then
+if test "${lt_cv_prog_compiler_pic_works_F77+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- lt_prog_compiler_pic_works_F77=no
+ lt_cv_prog_compiler_pic_works_F77=no
ac_outfile=conftest.$ac_objext
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
lt_compiler_flag="$lt_prog_compiler_pic_F77"
# Insert the option either (1) after the last *FLAGS variable, or
# (2) before a word containing "conftest.", or (3) at the end.
@@ -13195,27 +13652,27 @@ else
-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:13198: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:13655: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:13202: \$? = $ac_status" >&5
+ echo "$as_me:13659: \$? = $ac_status" >&5
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
- lt_prog_compiler_pic_works_F77=yes
+ lt_cv_prog_compiler_pic_works_F77=yes
fi
fi
$rm conftest*
fi
-echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_F77" >&5
-echo "${ECHO_T}$lt_prog_compiler_pic_works_F77" >&6
+echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_F77" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_pic_works_F77" >&6
-if test x"$lt_prog_compiler_pic_works_F77" = xyes; then
+if test x"$lt_cv_prog_compiler_pic_works_F77" = xyes; then
case $lt_prog_compiler_pic_F77 in
"" | " "*) ;;
*) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;;
@@ -13242,13 +13699,13 @@ esac
wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\"
echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6
-if test "${lt_prog_compiler_static_works_F77+set}" = set; then
+if test "${lt_cv_prog_compiler_static_works_F77+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- lt_prog_compiler_static_works_F77=no
+ lt_cv_prog_compiler_static_works_F77=no
save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
- printf "$lt_simple_link_test_code" > conftest.$ac_ext
+ 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
@@ -13258,20 +13715,20 @@ else
$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
- lt_prog_compiler_static_works_F77=yes
+ lt_cv_prog_compiler_static_works_F77=yes
fi
else
- lt_prog_compiler_static_works_F77=yes
+ lt_cv_prog_compiler_static_works_F77=yes
fi
fi
- $rm conftest*
+ $rm -r conftest*
LDFLAGS="$save_LDFLAGS"
fi
-echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_F77" >&5
-echo "${ECHO_T}$lt_prog_compiler_static_works_F77" >&6
+echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_F77" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_static_works_F77" >&6
-if test x"$lt_prog_compiler_static_works_F77" = xyes; then
+if test x"$lt_cv_prog_compiler_static_works_F77" = xyes; then
:
else
lt_prog_compiler_static_F77=
@@ -13288,7 +13745,7 @@ else
mkdir conftest
cd conftest
mkdir out
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ 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
@@ -13299,11 +13756,11 @@ else
-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:13302: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:13759: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:13306: \$? = $ac_status" >&5
+ echo "$as_me:13763: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -13383,12 +13840,13 @@ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared librar
# 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'.
- exclude_expsyms_F77="_GLOBAL_OFFSET_TABLE_"
+ exclude_expsyms_F77='_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.
extract_expsyms_cmds=
# Just being paranoid about ensuring that cc_basename is set.
for cc_temp in $compiler""; do
@@ -13447,7 +13905,7 @@ cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
# See if GNU ld supports shared libraries.
case $host_os in
- aix3* | aix4* | aix5*)
+ aix[3-9]*)
# On AIX/PPC, the GNU linker is very broken
if test "$host_cpu" != ia64; then
ld_shlibs_F77=no
@@ -13495,7 +13953,7 @@ EOF
allow_undefined_flag_F77=unsupported
always_export_symbols_F77=no
enable_shared_with_static_runtimes_F77=yes
- export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
+ export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
@@ -13513,7 +13971,7 @@ EOF
fi
;;
- interix3*)
+ interix[3-9]*)
hardcode_direct_F77=no
hardcode_shlibpath_var_F77=no
hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
@@ -13528,7 +13986,7 @@ EOF
archive_expsym_cmds_F77='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'
;;
- linux*)
+ gnu* | linux* | k*bsd*-gnu)
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
tmp_addflag=
case $cc_basename,$host_cpu in
@@ -13546,13 +14004,22 @@ EOF
ifc* | ifort*) # Intel Fortran compiler
tmp_addflag=' -nofor_main' ;;
esac
- archive_cmds_F77='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*) # Sun C 5.9
+ whole_archive_flag_spec_F77='${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'
+ tmp_sharedflag='-G' ;;
+ *Sun\ F*) # Sun Fortran 8.3
+ tmp_sharedflag='-G' ;;
+ *)
+ tmp_sharedflag='-shared' ;;
+ esac
+ archive_cmds_F77='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
if test $supports_anon_versioning = yes; then
archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~
cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
$echo "local: *; };" >> $output_objdir/$libname.ver~
- $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
fi
else
ld_shlibs_F77=no
@@ -13657,7 +14124,7 @@ _LT_EOF
fi
;;
- aix4* | aix5*)
+ 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.
@@ -13677,7 +14144,7 @@ _LT_EOF
# 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].*|aix5*)
+ 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
@@ -13711,7 +14178,7 @@ _LT_EOF
strings "$collect2name" | grep resolve_lib_name >/dev/null
then
# We have reworked collect2
- hardcode_direct_F77=yes
+ :
else
# We have old collect2
hardcode_direct_F77=unsupported
@@ -13779,11 +14246,18 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`
+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 '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`; fi
+if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
@@ -13830,11 +14304,18 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`
+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 '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`; fi
+if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
@@ -13886,7 +14367,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
# The linker will automatically build a .lib file if we build a DLL.
old_archive_From_new_cmds_F77='true'
# FIXME: Should let the user specify the lib program.
- old_archive_cmds_F77='lib /OUT:$oldlib$oldobjs$old_deplibs'
+ old_archive_cmds_F77='lib -OUT:$oldlib$oldobjs$old_deplibs'
fix_srcfile_path_F77='`cygpath -w "$srcfile"`'
enable_shared_with_static_runtimes_F77=yes
;;
@@ -13919,19 +14400,18 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
link_all_deplibs_F77=yes
if test "$GCC" = yes ; then
output_verbose_link_cmd='echo'
- archive_cmds_F77='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
- module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
- # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
- archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ archive_cmds_F77="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+ module_cmds_F77="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+ archive_expsym_cmds_F77="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}"
+ module_expsym_cmds_F77="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}"
else
case $cc_basename in
xlc*)
output_verbose_link_cmd='echo'
- archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
+ archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
- archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
;;
*)
@@ -13971,7 +14451,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
;;
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
- freebsd* | kfreebsd*-gnu | dragonfly*)
+ freebsd* | dragonfly*)
archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
hardcode_libdir_flag_spec_F77='-R$libdir'
hardcode_direct_F77=yes
@@ -14094,15 +14574,15 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
openbsd*)
if test -f /usr/libexec/ld.so; then
- hardcode_direct_F77=yes
- hardcode_shlibpath_var_F77=no
- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ hardcode_direct_F77=yes
+ hardcode_shlibpath_var_F77=no
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
export_dynamic_flag_spec_F77='${wl}-E'
- else
- case $host_os in
+ else
+ case $host_os in
openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
hardcode_libdir_flag_spec_F77='-R$libdir'
@@ -14111,10 +14591,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
;;
- esac
+ esac
fi
else
- ld_shlibs_F77=no
+ ld_shlibs_F77=no
fi
;;
@@ -14173,17 +14653,16 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
case $host_os in
solaris2.[0-5] | solaris2.[0-5].*) ;;
*)
- # The compiler driver will combine linker options so we
- # cannot just pass the convience library names through
- # without $wl, iff we do not link with $LD.
- # Luckily, gcc supports the same syntax we need for Sun Studio.
+ # 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?)
- case $wlarc in
- '')
- whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' ;;
- *)
- whole_archive_flag_spec_F77='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
- esac ;;
+ if test "$GCC" = yes; then
+ whole_archive_flag_spec_F77='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ else
+ whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract'
+ fi
+ ;;
esac
link_all_deplibs_F77=yes
;;
@@ -14240,7 +14719,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
fi
;;
- sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*)
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
no_undefined_flag_F77='${wl}-z,text'
archive_cmds_need_lc_F77=no
hardcode_shlibpath_var_F77=no
@@ -14317,7 +14796,7 @@ x|xyes)
echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
$rm conftest*
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
@@ -14375,20 +14854,7 @@ shlibpath_overrides_runpath=unknown
version_type=none
dynamic_linker="$host_os ld.so"
sys_lib_dlsearch_path_spec="/lib /usr/lib"
-if test "$GCC" = yes; then
- 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 ';' >/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.
- 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
-else
- sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
-fi
+
need_lib_prefix=unknown
hardcode_into_libs=no
@@ -14406,7 +14872,7 @@ aix3*)
soname_spec='${libname}${release}${shared_ext}$major'
;;
-aix4* | aix5*)
+aix[4-9]*)
version_type=linux
need_lib_prefix=no
need_version=no
@@ -14545,12 +15011,7 @@ darwin* | rhapsody*)
shlibpath_overrides_runpath=yes
shlibpath_var=DYLD_LIBRARY_PATH
shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
- # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
- if test "$GCC" = yes; then
- sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
- else
- sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
- fi
+
sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
;;
@@ -14567,18 +15028,6 @@ freebsd1*)
dynamic_linker=no
;;
-kfreebsd*-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='GNU ld.so'
- ;;
-
freebsd* | dragonfly*)
# DragonFly does not have aout. When/if they implement a new
# versioning mechanism, adjust this.
@@ -14616,7 +15065,7 @@ freebsd* | dragonfly*)
shlibpath_overrides_runpath=no
hardcode_into_libs=yes
;;
- freebsd*) # from 4.6 on
+ *) # from 4.6 on, and DragonFly
shlibpath_overrides_runpath=yes
hardcode_into_libs=yes
;;
@@ -14679,7 +15128,7 @@ hpux9* | hpux10* | hpux11*)
postinstall_cmds='chmod 555 $lib'
;;
-interix3*)
+interix[3-9]*)
version_type=linux
need_lib_prefix=no
need_version=no
@@ -14734,7 +15183,7 @@ linux*oldld* | linux*aout* | linux*coff*)
;;
# This must be Linux ELF.
-linux*)
+linux* | k*bsd*-gnu)
version_type=linux
need_lib_prefix=no
need_version=no
@@ -14750,7 +15199,7 @@ linux*)
# 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)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+ 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
@@ -14763,18 +15212,6 @@ linux*)
dynamic_linker='GNU/Linux ld.so'
;;
-knetbsd*-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='GNU ld.so'
- ;;
-
netbsd*)
version_type=sunos
need_lib_prefix=no
@@ -14856,6 +15293,10 @@ osf3* | osf4* | osf5*)
sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
;;
+rdos*)
+ dynamic_linker=no
+ ;;
+
solaris*)
version_type=linux
need_lib_prefix=no
@@ -14952,6 +15393,21 @@ echo "$as_me:$LINENO: result: $dynamic_linker" >&5
echo "${ECHO_T}$dynamic_linker" >&6
test "$dynamic_linker" = no && can_build_shared=no
+if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"
+fi
+
+sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"
+fi
+
+sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+
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"
@@ -15035,6 +15491,7 @@ if test -f "$ltmain"; then
predeps_F77 \
postdeps_F77 \
compiler_lib_search_path_F77 \
+ compiler_lib_search_dirs_F77 \
archive_cmds_F77 \
archive_expsym_cmds_F77 \
postinstall_cmds_F77 \
@@ -15050,6 +15507,7 @@ if test -f "$ltmain"; then
module_cmds_F77 \
module_expsym_cmds_F77 \
lt_cv_prog_compiler_c_o_F77 \
+ fix_srcfile_path_F77 \
exclude_expsyms_F77 \
include_expsyms_F77; do
@@ -15282,6 +15740,10 @@ predeps=$lt_predeps_F77
# shared library.
postdeps=$lt_postdeps_F77
+# The directories searched by this compiler when creating a shared
+# library
+compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_F77
+
# The library search path used internally by the compiler when linking
# a shared library.
compiler_lib_search_path=$lt_compiler_lib_search_path_F77
@@ -15370,7 +15832,7 @@ sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path="$fix_srcfile_path_F77"
+fix_srcfile_path=$lt_fix_srcfile_path
# Set to yes if exported symbols are required.
always_export_symbols=$always_export_symbols_F77
@@ -15429,10 +15891,10 @@ objext=o
objext_GCJ=$objext
# Code to be used in simple compile tests
-lt_simple_compile_test_code="class foo {}\n"
+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) {}; }\n'
+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.
@@ -15448,16 +15910,16 @@ compiler=$CC
# save warnings/boilerplate of simple test code
ac_outfile=conftest.$ac_objext
-printf "$lt_simple_compile_test_code" >conftest.$ac_ext
+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*
ac_outfile=conftest.$ac_objext
-printf "$lt_simple_link_test_code" >conftest.$ac_ext
+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 conftest*
+$rm -r conftest*
# Allow CC to be a program name with arguments.
@@ -15495,7 +15957,7 @@ if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
else
lt_cv_prog_compiler_rtti_exceptions=no
ac_outfile=conftest.$ac_objext
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
lt_compiler_flag="-fno-rtti -fno-exceptions"
# Insert the option either (1) after the last *FLAGS variable, or
# (2) before a word containing "conftest.", or (3) at the end.
@@ -15506,11 +15968,11 @@ else
-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:15509: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:15971: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:15513: \$? = $ac_status" >&5
+ echo "$as_me:15975: \$? = $ac_status" >&5
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.
@@ -15561,14 +16023,16 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
lt_prog_compiler_pic_GCJ='-m68020 -resident32 -malways-restore-a4'
;;
- beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
# PIC is the default for these OSes.
;;
- mingw* | pw32* | os2*)
+ mingw* | cygwin* | pw32* | os2*)
# 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).
- lt_prog_compiler_pic_GCJ='-DDLL_EXPORT'
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
+ # (--disable-auto-import) libraries
+
;;
darwin* | rhapsody*)
@@ -15577,7 +16041,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
lt_prog_compiler_pic_GCJ='-fno-common'
;;
- interix3*)
+ interix[3-9]*)
# Interix 3.x gcc -fpic/-fPIC options generate broken code.
# Instead, we relocate shared libraries at runtime.
;;
@@ -15635,10 +16099,10 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
esac
;;
- mingw* | pw32* | os2*)
+ mingw* | cygwin* | pw32* | os2*)
# 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).
- lt_prog_compiler_pic_GCJ='-DDLL_EXPORT'
+
;;
hpux9* | hpux10* | hpux11*)
@@ -15668,7 +16132,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
lt_prog_compiler_static_GCJ='-Bstatic'
;;
- linux*)
+ linux* | k*bsd*-gnu)
case $cc_basename in
icc* | ecc*)
lt_prog_compiler_wl_GCJ='-Wl,'
@@ -15687,6 +16151,22 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
# All Alpha code is PIC.
lt_prog_compiler_static_GCJ='-non_shared'
;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C 5.9
+ lt_prog_compiler_pic_GCJ='-KPIC'
+ lt_prog_compiler_static_GCJ='-Bstatic'
+ lt_prog_compiler_wl_GCJ='-Wl,'
+ ;;
+ *Sun\ F*)
+ # Sun Fortran 8.3 passes all unrecognized flags to the linker
+ lt_prog_compiler_pic_GCJ='-KPIC'
+ lt_prog_compiler_static_GCJ='-Bstatic'
+ lt_prog_compiler_wl_GCJ=''
+ ;;
+ esac
+ ;;
esac
;;
@@ -15696,6 +16176,10 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
lt_prog_compiler_static_GCJ='-non_shared'
;;
+ rdos*)
+ lt_prog_compiler_static_GCJ='-non_shared'
+ ;;
+
solaris*)
lt_prog_compiler_pic_GCJ='-KPIC'
lt_prog_compiler_static_GCJ='-Bstatic'
@@ -15758,12 +16242,12 @@ if test -n "$lt_prog_compiler_pic_GCJ"; then
echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5
echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6
-if test "${lt_prog_compiler_pic_works_GCJ+set}" = set; then
+if test "${lt_cv_prog_compiler_pic_works_GCJ+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- lt_prog_compiler_pic_works_GCJ=no
+ lt_cv_prog_compiler_pic_works_GCJ=no
ac_outfile=conftest.$ac_objext
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
lt_compiler_flag="$lt_prog_compiler_pic_GCJ"
# Insert the option either (1) after the last *FLAGS variable, or
# (2) before a word containing "conftest.", or (3) at the end.
@@ -15774,27 +16258,27 @@ else
-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:15777: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:16261: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:15781: \$? = $ac_status" >&5
+ echo "$as_me:16265: \$? = $ac_status" >&5
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
- lt_prog_compiler_pic_works_GCJ=yes
+ lt_cv_prog_compiler_pic_works_GCJ=yes
fi
fi
$rm conftest*
fi
-echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_GCJ" >&5
-echo "${ECHO_T}$lt_prog_compiler_pic_works_GCJ" >&6
+echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_GCJ" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_pic_works_GCJ" >&6
-if test x"$lt_prog_compiler_pic_works_GCJ" = xyes; then
+if test x"$lt_cv_prog_compiler_pic_works_GCJ" = xyes; then
case $lt_prog_compiler_pic_GCJ in
"" | " "*) ;;
*) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;;
@@ -15821,13 +16305,13 @@ esac
wl=$lt_prog_compiler_wl_GCJ eval lt_tmp_static_flag=\"$lt_prog_compiler_static_GCJ\"
echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6
-if test "${lt_prog_compiler_static_works_GCJ+set}" = set; then
+if test "${lt_cv_prog_compiler_static_works_GCJ+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- lt_prog_compiler_static_works_GCJ=no
+ lt_cv_prog_compiler_static_works_GCJ=no
save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
- printf "$lt_simple_link_test_code" > conftest.$ac_ext
+ 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
@@ -15837,20 +16321,20 @@ else
$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
- lt_prog_compiler_static_works_GCJ=yes
+ lt_cv_prog_compiler_static_works_GCJ=yes
fi
else
- lt_prog_compiler_static_works_GCJ=yes
+ lt_cv_prog_compiler_static_works_GCJ=yes
fi
fi
- $rm conftest*
+ $rm -r conftest*
LDFLAGS="$save_LDFLAGS"
fi
-echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_GCJ" >&5
-echo "${ECHO_T}$lt_prog_compiler_static_works_GCJ" >&6
+echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_GCJ" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_static_works_GCJ" >&6
-if test x"$lt_prog_compiler_static_works_GCJ" = xyes; then
+if test x"$lt_cv_prog_compiler_static_works_GCJ" = xyes; then
:
else
lt_prog_compiler_static_GCJ=
@@ -15867,7 +16351,7 @@ else
mkdir conftest
cd conftest
mkdir out
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ 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
@@ -15878,11 +16362,11 @@ else
-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:15881: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:16365: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:15885: \$? = $ac_status" >&5
+ echo "$as_me:16369: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -15962,12 +16446,13 @@ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared librar
# 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'.
- exclude_expsyms_GCJ="_GLOBAL_OFFSET_TABLE_"
+ exclude_expsyms_GCJ='_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.
extract_expsyms_cmds=
# Just being paranoid about ensuring that cc_basename is set.
for cc_temp in $compiler""; do
@@ -16026,7 +16511,7 @@ cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
# See if GNU ld supports shared libraries.
case $host_os in
- aix3* | aix4* | aix5*)
+ aix[3-9]*)
# On AIX/PPC, the GNU linker is very broken
if test "$host_cpu" != ia64; then
ld_shlibs_GCJ=no
@@ -16074,7 +16559,7 @@ EOF
allow_undefined_flag_GCJ=unsupported
always_export_symbols_GCJ=no
enable_shared_with_static_runtimes_GCJ=yes
- export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
+ export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
@@ -16092,7 +16577,7 @@ EOF
fi
;;
- interix3*)
+ interix[3-9]*)
hardcode_direct_GCJ=no
hardcode_shlibpath_var_GCJ=no
hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
@@ -16107,7 +16592,7 @@ EOF
archive_expsym_cmds_GCJ='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'
;;
- linux*)
+ gnu* | linux* | k*bsd*-gnu)
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
tmp_addflag=
case $cc_basename,$host_cpu in
@@ -16125,13 +16610,22 @@ EOF
ifc* | ifort*) # Intel Fortran compiler
tmp_addflag=' -nofor_main' ;;
esac
- archive_cmds_GCJ='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*) # Sun C 5.9
+ whole_archive_flag_spec_GCJ='${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'
+ tmp_sharedflag='-G' ;;
+ *Sun\ F*) # Sun Fortran 8.3
+ tmp_sharedflag='-G' ;;
+ *)
+ tmp_sharedflag='-shared' ;;
+ esac
+ archive_cmds_GCJ='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
if test $supports_anon_versioning = yes; then
archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~
cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
$echo "local: *; };" >> $output_objdir/$libname.ver~
- $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
fi
else
ld_shlibs_GCJ=no
@@ -16236,7 +16730,7 @@ _LT_EOF
fi
;;
- aix4* | aix5*)
+ 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.
@@ -16256,7 +16750,7 @@ _LT_EOF
# 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].*|aix5*)
+ 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
@@ -16290,7 +16784,7 @@ _LT_EOF
strings "$collect2name" | grep resolve_lib_name >/dev/null
then
# We have reworked collect2
- hardcode_direct_GCJ=yes
+ :
else
# We have old collect2
hardcode_direct_GCJ=unsupported
@@ -16368,11 +16862,18 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`
+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 '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`; fi
+if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
@@ -16429,11 +16930,18 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`
+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 '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`; fi
+if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
@@ -16485,7 +16993,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
# The linker will automatically build a .lib file if we build a DLL.
old_archive_From_new_cmds_GCJ='true'
# FIXME: Should let the user specify the lib program.
- old_archive_cmds_GCJ='lib /OUT:$oldlib$oldobjs$old_deplibs'
+ old_archive_cmds_GCJ='lib -OUT:$oldlib$oldobjs$old_deplibs'
fix_srcfile_path_GCJ='`cygpath -w "$srcfile"`'
enable_shared_with_static_runtimes_GCJ=yes
;;
@@ -16518,19 +17026,18 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
link_all_deplibs_GCJ=yes
if test "$GCC" = yes ; then
output_verbose_link_cmd='echo'
- archive_cmds_GCJ='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
- module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
- # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
- archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ archive_cmds_GCJ="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+ module_cmds_GCJ="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+ archive_expsym_cmds_GCJ="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}"
+ module_expsym_cmds_GCJ="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}"
else
case $cc_basename in
xlc*)
output_verbose_link_cmd='echo'
- archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
+ archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
- archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
;;
*)
@@ -16570,7 +17077,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
;;
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
- freebsd* | kfreebsd*-gnu | dragonfly*)
+ freebsd* | dragonfly*)
archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
hardcode_libdir_flag_spec_GCJ='-R$libdir'
hardcode_direct_GCJ=yes
@@ -16693,15 +17200,15 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
openbsd*)
if test -f /usr/libexec/ld.so; then
- hardcode_direct_GCJ=yes
- hardcode_shlibpath_var_GCJ=no
- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ hardcode_direct_GCJ=yes
+ hardcode_shlibpath_var_GCJ=no
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
export_dynamic_flag_spec_GCJ='${wl}-E'
- else
- case $host_os in
+ else
+ case $host_os in
openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
hardcode_libdir_flag_spec_GCJ='-R$libdir'
@@ -16710,10 +17217,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
;;
- esac
+ esac
fi
else
- ld_shlibs_GCJ=no
+ ld_shlibs_GCJ=no
fi
;;
@@ -16772,17 +17279,16 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
case $host_os in
solaris2.[0-5] | solaris2.[0-5].*) ;;
*)
- # The compiler driver will combine linker options so we
- # cannot just pass the convience library names through
- # without $wl, iff we do not link with $LD.
- # Luckily, gcc supports the same syntax we need for Sun Studio.
+ # 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?)
- case $wlarc in
- '')
- whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' ;;
- *)
- whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
- esac ;;
+ if test "$GCC" = yes; then
+ whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ else
+ whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract'
+ fi
+ ;;
esac
link_all_deplibs_GCJ=yes
;;
@@ -16839,7 +17345,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
fi
;;
- sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*)
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
no_undefined_flag_GCJ='${wl}-z,text'
archive_cmds_need_lc_GCJ=no
hardcode_shlibpath_var_GCJ=no
@@ -16916,7 +17422,7 @@ x|xyes)
echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
$rm conftest*
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
@@ -16974,20 +17480,7 @@ shlibpath_overrides_runpath=unknown
version_type=none
dynamic_linker="$host_os ld.so"
sys_lib_dlsearch_path_spec="/lib /usr/lib"
-if test "$GCC" = yes; then
- 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 ';' >/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.
- 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
-else
- sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
-fi
+
need_lib_prefix=unknown
hardcode_into_libs=no
@@ -17005,7 +17498,7 @@ aix3*)
soname_spec='${libname}${release}${shared_ext}$major'
;;
-aix4* | aix5*)
+aix[4-9]*)
version_type=linux
need_lib_prefix=no
need_version=no
@@ -17144,12 +17637,7 @@ darwin* | rhapsody*)
shlibpath_overrides_runpath=yes
shlibpath_var=DYLD_LIBRARY_PATH
shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
- # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
- if test "$GCC" = yes; then
- sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
- else
- sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
- fi
+
sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
;;
@@ -17166,18 +17654,6 @@ freebsd1*)
dynamic_linker=no
;;
-kfreebsd*-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='GNU ld.so'
- ;;
-
freebsd* | dragonfly*)
# DragonFly does not have aout. When/if they implement a new
# versioning mechanism, adjust this.
@@ -17215,7 +17691,7 @@ freebsd* | dragonfly*)
shlibpath_overrides_runpath=no
hardcode_into_libs=yes
;;
- freebsd*) # from 4.6 on
+ *) # from 4.6 on, and DragonFly
shlibpath_overrides_runpath=yes
hardcode_into_libs=yes
;;
@@ -17278,7 +17754,7 @@ hpux9* | hpux10* | hpux11*)
postinstall_cmds='chmod 555 $lib'
;;
-interix3*)
+interix[3-9]*)
version_type=linux
need_lib_prefix=no
need_version=no
@@ -17333,7 +17809,7 @@ linux*oldld* | linux*aout* | linux*coff*)
;;
# This must be Linux ELF.
-linux*)
+linux* | k*bsd*-gnu)
version_type=linux
need_lib_prefix=no
need_version=no
@@ -17349,7 +17825,7 @@ linux*)
# 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)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+ 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
@@ -17362,18 +17838,6 @@ linux*)
dynamic_linker='GNU/Linux ld.so'
;;
-knetbsd*-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='GNU ld.so'
- ;;
-
netbsd*)
version_type=sunos
need_lib_prefix=no
@@ -17455,6 +17919,10 @@ osf3* | osf4* | osf5*)
sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
;;
+rdos*)
+ dynamic_linker=no
+ ;;
+
solaris*)
version_type=linux
need_lib_prefix=no
@@ -17551,6 +18019,21 @@ echo "$as_me:$LINENO: result: $dynamic_linker" >&5
echo "${ECHO_T}$dynamic_linker" >&6
test "$dynamic_linker" = no && can_build_shared=no
+if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"
+fi
+
+sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"
+fi
+
+sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+
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"
@@ -17634,6 +18117,7 @@ if test -f "$ltmain"; then
predeps_GCJ \
postdeps_GCJ \
compiler_lib_search_path_GCJ \
+ compiler_lib_search_dirs_GCJ \
archive_cmds_GCJ \
archive_expsym_cmds_GCJ \
postinstall_cmds_GCJ \
@@ -17649,6 +18133,7 @@ if test -f "$ltmain"; then
module_cmds_GCJ \
module_expsym_cmds_GCJ \
lt_cv_prog_compiler_c_o_GCJ \
+ fix_srcfile_path_GCJ \
exclude_expsyms_GCJ \
include_expsyms_GCJ; do
@@ -17881,6 +18366,10 @@ predeps=$lt_predeps_GCJ
# shared library.
postdeps=$lt_postdeps_GCJ
+# The directories searched by this compiler when creating a shared
+# library
+compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_GCJ
+
# The library search path used internally by the compiler when linking
# a shared library.
compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ
@@ -17969,7 +18458,7 @@ sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path="$fix_srcfile_path_GCJ"
+fix_srcfile_path=$lt_fix_srcfile_path
# Set to yes if exported symbols are required.
always_export_symbols=$always_export_symbols_GCJ
@@ -18027,7 +18516,7 @@ objext=o
objext_RC=$objext
# Code to be used in simple compile tests
-lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
+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"
@@ -18046,16 +18535,16 @@ compiler=$CC
# save warnings/boilerplate of simple test code
ac_outfile=conftest.$ac_objext
-printf "$lt_simple_compile_test_code" >conftest.$ac_ext
+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*
ac_outfile=conftest.$ac_objext
-printf "$lt_simple_link_test_code" >conftest.$ac_ext
+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 conftest*
+$rm -r conftest*
# Allow CC to be a program name with arguments.
@@ -18115,6 +18604,7 @@ if test -f "$ltmain"; then
predeps_RC \
postdeps_RC \
compiler_lib_search_path_RC \
+ compiler_lib_search_dirs_RC \
archive_cmds_RC \
archive_expsym_cmds_RC \
postinstall_cmds_RC \
@@ -18130,6 +18620,7 @@ if test -f "$ltmain"; then
module_cmds_RC \
module_expsym_cmds_RC \
lt_cv_prog_compiler_c_o_RC \
+ fix_srcfile_path_RC \
exclude_expsyms_RC \
include_expsyms_RC; do
@@ -18362,6 +18853,10 @@ predeps=$lt_predeps_RC
# shared library.
postdeps=$lt_postdeps_RC
+# The directories searched by this compiler when creating a shared
+# library
+compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_RC
+
# The library search path used internally by the compiler when linking
# a shared library.
compiler_lib_search_path=$lt_compiler_lib_search_path_RC
@@ -18450,7 +18945,7 @@ sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path="$fix_srcfile_path_RC"
+fix_srcfile_path=$lt_fix_srcfile_path
# Set to yes if exported symbols are required.
always_export_symbols=$always_export_symbols_RC
@@ -20444,7 +20939,7 @@ cat >>confdefs.h <<_ACEOF
#define PACKAGE_VERSION_MAJOR `echo $PACKAGE_VERSION | cut -d . -f 1`
_ACEOF
- PVM=`echo $PACKAGE_VERSION | cut -d . -f 2`
+ PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
if test "x$PVM" = "x"; then
PVM="0"
fi
@@ -20453,7 +20948,7 @@ cat >>confdefs.h <<_ACEOF
#define PACKAGE_VERSION_MINOR $PVM
_ACEOF
- PVP=`echo $PACKAGE_VERSION | cut -d . -f 3`
+ PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
if test "x$PVP" = "x"; then
PVP="0"
fi
@@ -20869,7 +21364,7 @@ _ASBOX
} >&5
cat >&5 <<_CSEOF
-This file was extended by xf86-video-nv $as_me 2.1.6, which was
+This file was extended by xf86-video-nv $as_me 2.1.10, which was
generated by GNU Autoconf 2.59. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -20932,7 +21427,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-xf86-video-nv config.status 2.1.6
+xf86-video-nv config.status 2.1.10
configured by $0, generated by GNU Autoconf 2.59,
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
@@ -21182,6 +21677,7 @@ s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t
s,@CCDEPMODE@,$CCDEPMODE,;t t
s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t
s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t
+s,@SED@,$SED,;t t
s,@EGREP@,$EGREP,;t t
s,@LN_S@,$LN_S,;t t
s,@ECHO@,$ECHO,;t t
@@ -21189,6 +21685,10 @@ s,@AR@,$AR,;t t
s,@ac_ct_AR@,$ac_ct_AR,;t t
s,@RANLIB@,$RANLIB,;t t
s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
+s,@DSYMUTIL@,$DSYMUTIL,;t t
+s,@ac_ct_DSYMUTIL@,$ac_ct_DSYMUTIL,;t t
+s,@NMEDIT@,$NMEDIT,;t t
+s,@ac_ct_NMEDIT@,$ac_ct_NMEDIT,;t t
s,@CPP@,$CPP,;t t
s,@CXX@,$CXX,;t t
s,@CXXFLAGS@,$CXXFLAGS,;t t
diff --git a/driver/xf86-video-nv/configure.ac b/driver/xf86-video-nv/configure.ac
index 21435738e..6514aed0d 100644
--- a/driver/xf86-video-nv/configure.ac
+++ b/driver/xf86-video-nv/configure.ac
@@ -22,20 +22,10 @@
AC_PREREQ(2.57)
AC_INIT([xf86-video-nv],
- 1.2.0,
+ 2.1.10,
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
xf86-video-nv)
-AC_DEFINE_UNQUOTED([NV_MAJOR_VERSION],
- [$(echo $PACKAGE_VERSION | sed -e 's/^\([[0-9]]\)\.[[0-9]]\.[[0-9]]/\1/')],
- [Major version])
-AC_DEFINE_UNQUOTED([NV_MINOR_VERSION],
- [$(echo $PACKAGE_VERSION | sed -e 's/^[[0-9]]\.\([[0-9]]\)\.[[0-9]]/\1/')],
- [Minor version])
-AC_DEFINE_UNQUOTED([NV_PATCHLEVEL],
- [$(echo $PACKAGE_VERSION | sed -e 's/^[[0-9]]\.[[0-9]]\.\([[0-9]]\)/\1/')],
- [Patch version])
-
AC_CONFIG_SRCDIR([Makefile.am])
AM_CONFIG_HEADER([config.h])
AC_CONFIG_AUX_DIR(.)
@@ -51,26 +41,26 @@ AC_PROG_CC
AH_TOP([#include "xorg-server.h"])
+# Options
AC_ARG_WITH(xorg-module-dir,
AC_HELP_STRING([--with-xorg-module-dir=DIR],
[Default xorg module directory [[default=$libdir/xorg/modules]]]),
[moduledir="$withval"],
[moduledir="$libdir/xorg/modules"])
+AC_ARG_WITH(xserver-source,AC_HELP_STRING([--with-xserver-source=XSERVER_SOURCE],
+ [Path to X server source tree]),
+ [ XSERVER_SOURCE="$withval" ],
+ [ XSERVER_SOURCE="" ])
+
# Checks for extensions
XORG_DRIVER_CHECK_EXT(RANDR, randrproto)
XORG_DRIVER_CHECK_EXT(RENDER, renderproto)
XORG_DRIVER_CHECK_EXT(XV, videoproto)
XORG_DRIVER_CHECK_EXT(DPMSExtension, xextproto)
-# Determine whether XV PutImage takes a DrawablePtr and whether or not to use
-# the libcwrapper.
-PKG_CHECK_EXISTS([xorg-server >= 1.0.99.901],
- [AC_DEFINE(HAVE_XV_DRAWABLE,1,[XV hooks take a DrawablePtr])],
- [AC_DEFINE(USE_LIBC_WRAPPER,1,[Use the libc wrapper])])
-
# Checks for pkg-config packages
-PKG_CHECK_MODULES(XORG, [xorg-server xproto fontsproto $REQUIRED_MODULES])
+PKG_CHECK_MODULES(XORG, [xorg-server >= 1.2 xproto fontsproto $REQUIRED_MODULES])
sdkdir=$(pkg-config --variable=sdkdir xorg-server)
# Checks for libraries.
@@ -78,6 +68,59 @@ sdkdir=$(pkg-config --variable=sdkdir xorg-server)
# Checks for header files.
AC_HEADER_STDC
+save_CFLAGS="$CFLAGS"
+CFLAGS="$XORG_CFLAGS"
+
+# RandR 1.2
+AC_CHECK_HEADER(xf86Modes.h,[BUILD_XMODES=no],[BUILD_XMODES=yes],[#include "xorg-server.h"])
+
+# PCI rework
+AC_CHECK_DECL(XSERVER_LIBPCIACCESS,
+ [XSERVER_LIBPCIACCESS=yes],[XSERVER_LIBPCIACCESS=no],
+ [#include "xorg-server.h"])
+if test "x$XSERVER_LIBPCIACCESS" = "xyes"; then
+ PKG_CHECK_MODULES(PCIACCESS, [pciaccess >= 0.8.0])
+fi
+
+CFLAGS="$save_CFLAGS"
+
+AM_CONDITIONAL(BUILD_XMODES, test "x$BUILD_XMODES" = xyes)
+if test "x$XSERVER_SOURCE" != x; then
+ if test -d "$XSERVER_SOURCE"; then
+ XSERVER_SOURCE=`cd "$XSERVER_SOURCE" && pwd`
+ if test -f "$XSERVER_SOURCE/hw/xfree86/modes/xf86Modes.h" -a -f "$XSERVER_SOURCE/hw/xfree86/parser/xf86Parser.h"; then
+ :
+ else
+ AC_ERROR([Server source at $XSERVER_SOURCE doesn't have the new mode code])
+ fi
+ else
+ AC_ERROR([Can't find xserver-source path $XSERVER_SOURCE])
+ fi
+fi
+if test "x$BUILD_XMODES" = xno; then
+ AC_MSG_NOTICE([X server has new mode code])
+ XMODES_CFLAGS=
+ parser_dir=
+ modes_dir=
+else
+ if test "x$XSERVER_SOURCE" = x; then
+ AC_MSG_NOTICE([X server is missing new mode code and --with-xserver-source not specified, using local copy])
+ AC_MSG_NOTICE([If you're building from git, please read compat/README])
+ parser_dir='$(top_srcdir)/compat/parser'
+ modes_dir='$(top_srcdir)/compat/modes'
+ else
+ AC_MSG_NOTICE([Using mode code from $XSERVER_SOURCE])
+ parser_dir="$XSERVER_SOURCE/hw/xfree86/parser"
+ modes_dir="$XSERVER_SOURCE/hw/xfree86/modes"
+ fi
+ XMODES_CFLAGS="-DXF86_MODES_RENAME -I\"$modes_dir\" -I\"$parser_dir\""
+ AC_DEFINE(BUILD_XMODES, 1,[X server doesn't have built-in mode code, so we need to build it])
+fi
+AC_SUBST([XMODES_CFLAGS])
+AC_SUBST([parser_dir])
+AC_SUBST([modes_dir])
+
+# Substitutions
AC_SUBST([XORG_CFLAGS])
AC_SUBST([moduledir])
@@ -91,4 +134,5 @@ AC_OUTPUT([
Makefile
src/Makefile
man/Makefile
+ compat/Makefile
])
diff --git a/driver/xf86-video-nv/ltmain.sh b/driver/xf86-video-nv/ltmain.sh
index 85faf0734..248cd4047 100644
--- a/driver/xf86-video-nv/ltmain.sh
+++ b/driver/xf86-video-nv/ltmain.sh
@@ -1,8 +1,8 @@
# ltmain.sh - Provide generalized library-building support services.
# NOTE: Changing this file will not affect anything until you rerun configure.
#
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
-# Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
+# 2007, 2008 Free Software Foundation, Inc.
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
#
# This program is free software; you can redistribute it and/or modify
@@ -43,14 +43,22 @@ EXIT_FAILURE=1
PROGRAM=ltmain.sh
PACKAGE=libtool
-VERSION=1.5.22
-TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)"
-
-# 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
+VERSION=1.5.26
+TIMESTAMP=" (1.1220.2.493 2008/02/01 16:58:18)"
+
+# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
# Check that we have a working $echo.
if test "X$1" = X--no-reexec; then
@@ -105,11 +113,19 @@ esac
# These must not be set unconditionally because not all systems understand
# e.g. LANG=C (notably SCO).
# We save the old values to restore during execute mode.
-if test "${LC_ALL+set}" = set; then
- save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL
-fi
-if test "${LANG+set}" = set; then
- save_LANG="$LANG"; LANG=C; export LANG
+lt_env=
+for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+do
+ eval "if test \"\${$lt_var+set}\" = set; then
+ save_$lt_var=\$$lt_var
+ lt_env=\"$lt_var=\$$lt_var \$lt_env\"
+ $lt_var=C
+ export $lt_var
+ fi"
+done
+
+if test -n "$lt_env"; then
+ lt_env="env $lt_env"
fi
# Make sure IFS has a sensible default
@@ -136,6 +152,8 @@ duplicate_deps=no
preserve_args=
lo2o="s/\\.lo\$/.${objext}/"
o2lo="s/\\.${objext}\$/.lo/"
+extracted_archives=
+extracted_serial=0
#####################################
# Shell function definitions:
@@ -196,7 +214,13 @@ func_win32_libid ()
if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
$EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
win32_nmres=`eval $NM -f posix -A $1 | \
- $SED -n -e '1,100{/ I /{s,.*,import,;p;q;};}'`
+ $SED -n -e '1,100{
+ / I /{
+ s,.*,import,
+ p
+ q
+ }
+ }'`
case $win32_nmres in
import*) win32_libid_type="x86 archive import";;
*) win32_libid_type="x86 archive static";;
@@ -327,7 +351,17 @@ func_extract_archives ()
*) my_xabs=`pwd`"/$my_xlib" ;;
esac
my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
- my_xdir="$my_gentop/$my_xlib"
+ my_xlib_u=$my_xlib
+ while :; do
+ case " $extracted_archives " in
+ *" $my_xlib_u "*)
+ extracted_serial=`expr $extracted_serial + 1`
+ my_xlib_u=lt$extracted_serial-$my_xlib ;;
+ *) break ;;
+ esac
+ done
+ extracted_archives="$extracted_archives $my_xlib_u"
+ my_xdir="$my_gentop/$my_xlib_u"
$show "${rm}r $my_xdir"
$run ${rm}r "$my_xdir"
@@ -454,11 +488,12 @@ do
;;
--version)
- $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
- $echo
- $echo "Copyright (C) 2005 Free Software Foundation, Inc."
- $echo "This is free software; see the source for copying conditions. There is NO"
- $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+ echo "\
+$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP
+
+Copyright (C) 2008 Free Software Foundation, Inc.
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
exit $?
;;
@@ -755,9 +790,11 @@ if test -z "$show_help"; then
*.class) xform=class ;;
*.cpp) xform=cpp ;;
*.cxx) xform=cxx ;;
- *.f90) xform=f90 ;;
+ *.[fF][09]?) xform=[fF][09]. ;;
*.for) xform=for ;;
*.java) xform=java ;;
+ *.obj) xform=obj ;;
+ *.sx) xform=sx ;;
esac
libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
@@ -926,7 +963,7 @@ EOF
$run $rm "$lobj" "$output_obj"
$show "$command"
- if $run eval "$command"; then :
+ if $run eval $lt_env "$command"; then :
else
test -n "$output_obj" && $run $rm $removelist
exit $EXIT_FAILURE
@@ -998,7 +1035,7 @@ EOF
command="$command$suppress_output"
$run $rm "$obj" "$output_obj"
$show "$command"
- if $run eval "$command"; then :
+ if $run eval $lt_env "$command"; then :
else
$run $rm $removelist
exit $EXIT_FAILURE
@@ -1131,6 +1168,7 @@ EOF
thread_safe=no
vinfo=
vinfo_number=no
+ single_module="${wl}-single_module"
func_infer_tag $base_compile
@@ -1138,8 +1176,9 @@ EOF
for arg
do
case $arg in
- -all-static | -static)
- if test "X$arg" = "X-all-static"; then
+ -all-static | -static | -static-libtool-libs)
+ case $arg in
+ -all-static)
if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
$echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
fi
@@ -1147,12 +1186,20 @@ EOF
dlopen_self=$dlopen_self_static
fi
prefer_static_libs=yes
- else
+ ;;
+ -static)
if test -z "$pic_flag" && test -n "$link_static_flag"; then
dlopen_self=$dlopen_self_static
fi
prefer_static_libs=built
- fi
+ ;;
+ -static-libtool-libs)
+ if test -z "$pic_flag" && test -n "$link_static_flag"; then
+ dlopen_self=$dlopen_self_static
+ fi
+ prefer_static_libs=yes
+ ;;
+ esac
build_libtool_libs=no
build_old_libs=yes
break
@@ -1600,7 +1647,7 @@ EOF
continue
;;
- -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
compiler_flags="$compiler_flags $arg"
compile_command="$compile_command $arg"
finalize_command="$finalize_command $arg"
@@ -1608,6 +1655,11 @@ EOF
continue
;;
+ -multi_module)
+ single_module="${wl}-multi_module"
+ continue
+ ;;
+
-module)
module=yes
continue
@@ -1621,10 +1673,11 @@ EOF
# -m* pass through architecture-specific compiler args for GCC
# -m*, -t[45]*, -txscale* pass through architecture-specific
# compiler args for GCC
- # -pg pass through profiling flag for GCC
+ # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
+ # -F/path gives path to uninstalled frameworks, gcc on darwin
# @file GCC response files
- -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*|-pg| \
- -t[45]*|-txscale*|@*)
+ -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
# Unknown arguments in both finalize_command and compile_command need
# to be aesthetically quoted because they are evaled later.
@@ -1652,9 +1705,9 @@ EOF
-no-install)
case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin*)
# The PATH hackery in wrapper scripts is required on Windows
- # in order for the loader to find any dlls it needs.
+ # and Darwin in order for the loader to find any dlls it needs.
$echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
$echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
fast_install=no
@@ -1713,7 +1766,7 @@ EOF
continue
;;
- -static)
+ -static | -static-libtool-libs)
# The effects of -static are defined in a previous loop.
# We used to do the same as -all-static on platforms that
# didn't have a PIC flag, but the assumption that the effects
@@ -2106,7 +2159,7 @@ EOF
lib=
found=no
case $deplib in
- -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
if test "$linkmode,$pass" = "prog,link"; then
compile_deplibs="$deplib $compile_deplibs"
finalize_deplibs="$deplib $finalize_deplibs"
@@ -2122,7 +2175,12 @@ EOF
continue
fi
name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
- for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
+ if test "$linkmode" = lib; then
+ searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path"
+ else
+ searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path"
+ fi
+ for searchdir in $searchdirs; do
for search_ext in .la $std_shrext .so .a; do
# Search the libtool library
lib="$searchdir/lib${name}${search_ext}"
@@ -2503,7 +2561,9 @@ EOF
if test "$linkmode,$pass" = "prog,link"; then
if test -n "$library_names" &&
- { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
+ { { test "$prefer_static_libs" = no ||
+ test "$prefer_static_libs,$installed" = "built,yes"; } ||
+ test -z "$old_library"; }; then
# We need to hardcode the library path
if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
# Make sure the rpath contains only unique directories.
@@ -2916,12 +2976,18 @@ EOF
# we do not want to link against static libs,
# but need to link against shared
eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
+ eval deplibdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
if test -n "$deplibrary_names" ; then
for tmp in $deplibrary_names ; do
depdepl=$tmp
done
- if test -f "$path/$depdepl" ; then
+ if test -f "$deplibdir/$depdepl" ; then
+ depdepl="$deplibdir/$depdepl"
+ elif test -f "$path/$depdepl" ; then
depdepl="$path/$depdepl"
+ else
+ # Can't find it, oh well...
+ depdepl=
fi
# do not add paths which are already there
case " $newlib_search_path " in
@@ -3069,9 +3135,10 @@ EOF
case $linkmode in
oldlib)
- if test -n "$deplibs"; then
- $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
- fi
+ case " $deplibs" in
+ *\ -l* | *\ -L*)
+ $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 ;;
+ esac
if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
$echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
@@ -3199,7 +3266,7 @@ EOF
# which has an extra 1 added just for fun
#
case $version_type in
- darwin|linux|osf|windows)
+ darwin|linux|osf|windows|none)
current=`expr $number_major + $number_minor`
age="$number_minor"
revision="$number_revision"
@@ -3210,9 +3277,10 @@ EOF
age="0"
;;
irix|nonstopux)
- current=`expr $number_major + $number_minor - 1`
+ current=`expr $number_major + $number_minor`
age="$number_minor"
revision="$number_minor"
+ lt_irix_increment=no
;;
esac
;;
@@ -3271,7 +3339,8 @@ EOF
versuffix="$major.$age.$revision"
# Darwin ld doesn't like 0 for these options...
minor_current=`expr $current + 1`
- verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
+ xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
+ verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
;;
freebsd-aout)
@@ -3285,8 +3354,11 @@ EOF
;;
irix | nonstopux)
- major=`expr $current - $age + 1`
-
+ if test "X$lt_irix_increment" = "Xno"; then
+ major=`expr $current - $age`
+ else
+ major=`expr $current - $age + 1`
+ fi
case $version_type in
nonstopux) verstring_prefix=nonstopux ;;
*) verstring_prefix=sgi ;;
@@ -3437,11 +3509,11 @@ EOF
fi
# Eliminate all temporary directories.
- for path in $notinst_path; do
- lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"`
- deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"`
- dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"`
- done
+ #for path in $notinst_path; do
+ # lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"`
+ # deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"`
+ # dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"`
+ #done
if test -n "$xrpath"; then
# If the user specified any rpath flags, then add them.
@@ -3542,13 +3614,12 @@ EOF
int main() { return 0; }
EOF
$rm conftest
- $LTCC $LTCFLAGS -o conftest conftest.c $deplibs
- if test "$?" -eq 0 ; then
+ if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
ldd_output=`ldd conftest`
for i in $deplibs; do
name=`expr $i : '-l\(.*\)'`
# If $name is empty we are operating on a -L argument.
- if test "$name" != "" && test "$name" -ne "0"; then
+ if test "$name" != "" && test "$name" != "0"; then
if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
case " $predeps $postdeps " in
*" $i "*)
@@ -3587,9 +3658,7 @@ EOF
# If $name is empty we are operating on a -L argument.
if test "$name" != "" && test "$name" != "0"; then
$rm conftest
- $LTCC $LTCFLAGS -o conftest conftest.c $i
- # Did it work?
- if test "$?" -eq 0 ; then
+ if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
ldd_output=`ldd conftest`
if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
case " $predeps $postdeps " in
@@ -3621,7 +3690,7 @@ EOF
droppeddeps=yes
$echo
$echo "*** Warning! Library $i is needed by this library but I was not able to"
- $echo "*** make it link in! You will probably need to install it or some"
+ $echo "*** make it link in! You will probably need to install it or some"
$echo "*** library that it depends on before this library will be fully"
$echo "*** functional. Installing it before continuing would be even better."
fi
@@ -3907,7 +3976,10 @@ EOF
test -n "$hardcode_libdirs"; then
libdir="$hardcode_libdirs"
if test -n "$hardcode_libdir_flag_spec_ld"; then
- eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
+ case $archive_cmds in
+ *\$LD*) eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" ;;
+ *) eval dep_rpath=\"$hardcode_libdir_flag_spec\" ;;
+ esac
else
eval dep_rpath=\"$hardcode_libdir_flag_spec\"
fi
@@ -4217,9 +4289,10 @@ EOF
;;
obj)
- if test -n "$deplibs"; then
- $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
- fi
+ case " $deplibs" in
+ *\ -l* | *\ -L*)
+ $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 ;;
+ esac
if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
$echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
@@ -4266,12 +4339,14 @@ EOF
reload_conv_objs=
gentop=
# reload_cmds runs $LD directly, so let us get rid of
- # -Wl from whole_archive_flag_spec
+ # -Wl from whole_archive_flag_spec and hope we can get by with
+ # turning comma into space..
wl=
if test -n "$convenience"; then
if test -n "$whole_archive_flag_spec"; then
- eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
+ eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
+ reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'`
else
gentop="$output_objdir/${obj}x"
generated="$generated $gentop"
@@ -4719,16 +4794,16 @@ static const void *lt_preloaded_setup() {
case $host in
*cygwin* | *mingw* )
if test -f "$output_objdir/${outputname}.def" ; then
- compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"`
- finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"`
+ compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
+ finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
else
- compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
- finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
+ compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
+ finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
fi
;;
* )
- compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
- finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
+ compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
+ finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
;;
esac
;;
@@ -4743,13 +4818,13 @@ static const void *lt_preloaded_setup() {
# really was required.
# Nullify the symbol file.
- compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
- finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
+ compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
+ finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
fi
if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
# Replace the output file specification.
- compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+ compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP`
link_command="$compile_command$compile_rpath"
# We have no uninstalled library dependencies, so finalize right now.
@@ -4836,7 +4911,7 @@ static const void *lt_preloaded_setup() {
if test "$fast_install" != no; then
link_command="$finalize_var$compile_command$finalize_rpath"
if test "$fast_install" = yes; then
- relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
+ relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP`
else
# fast_install is set to needless
relink_command=
@@ -4873,7 +4948,7 @@ static const void *lt_preloaded_setup() {
fi
done
relink_command="(cd `pwd`; $relink_command)"
- relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+ relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
fi
# Quote $echo for shipping.
@@ -5280,6 +5355,20 @@ EOF
Xsed='${SED} -e 1s/^X//'
sed_quote_subst='$sed_quote_subst'
+# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
+if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '\${1+\"\$@\"}'='\"\$@\"'
+ setopt NO_GLOB_SUBST
+else
+ case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
+fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
+
# 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
@@ -5422,7 +5511,7 @@ else
;;
esac
$echo >> $output "\
- \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
+ \$echo \"\$0: cannot exec \$program \$*\"
exit $EXIT_FAILURE
fi
else
@@ -5608,7 +5697,7 @@ fi\
done
# Quote the link command for shipping.
relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
- relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+ relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
if test "$hardcode_automatic" = yes ; then
relink_command=
fi
@@ -5957,9 +6046,9 @@ relink_command=\"$relink_command\""
if test -n "$inst_prefix_dir"; then
# Stick the inst_prefix_dir data into the link command.
- relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
+ relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP`
else
- relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
+ relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP`
fi
$echo "$modename: warning: relinking \`$file'" 1>&2
@@ -6168,7 +6257,7 @@ relink_command=\"$relink_command\""
file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
outputname="$tmpdir/$file"
# Replace the output file specification.
- relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
+ relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP`
$show "$relink_command"
if $run eval "$relink_command"; then :
@@ -6345,8 +6434,10 @@ relink_command=\"$relink_command\""
if test -f "$dir/$objdir/$dlname"; then
dir="$dir/$objdir"
else
- $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
- exit $EXIT_FAILURE
+ if test ! -f "$dir/$dlname"; then
+ $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
+ exit $EXIT_FAILURE
+ fi
fi
;;
@@ -6410,12 +6501,12 @@ relink_command=\"$relink_command\""
fi
# Restore saved environment variables
- if test "${save_LC_ALL+set}" = set; then
- LC_ALL="$save_LC_ALL"; export LC_ALL
- fi
- if test "${save_LANG+set}" = set; then
- LANG="$save_LANG"; export LANG
- fi
+ for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+ do
+ eval "if test \"\${save_$lt_var+set}\" = set; then
+ $lt_var=\$save_$lt_var; export $lt_var
+ fi"
+ done
# Now prepare to actually exec the command.
exec_cmd="\$cmd$args"
@@ -6772,9 +6863,9 @@ The following components of LINK-COMMAND are treated specially:
-dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
-export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
-export-symbols SYMFILE
- try to export only the symbols listed in SYMFILE
+ try to export only the symbols listed in SYMFILE
-export-symbols-regex REGEX
- try to export only the symbols matching REGEX
+ try to export only the symbols matching REGEX
-LLIBDIR search LIBDIR for required installed libraries
-lNAME OUTPUT-FILE requires the installed library libNAME
-module build a library that can dlopened
@@ -6788,9 +6879,11 @@ The following components of LINK-COMMAND are treated specially:
-release RELEASE specify package release information
-rpath LIBDIR the created library will eventually be installed in LIBDIR
-R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
- -static do not do any dynamic linking of libtool libraries
+ -static do not do any dynamic linking of uninstalled libtool libraries
+ -static-libtool-libs
+ do not do any dynamic linking of libtool libraries
-version-info CURRENT[:REVISION[:AGE]]
- specify library version info [each variable defaults to 0]
+ specify library version info [each variable defaults to 0]
All other options (arguments beginning with \`-') are ignored.
diff --git a/driver/xf86-video-nv/man/Makefile.in b/driver/xf86-video-nv/man/Makefile.in
index 4fc2936c5..f81629cb9 100644
--- a/driver/xf86-video-nv/man/Makefile.in
+++ b/driver/xf86-video-nv/man/Makefile.in
@@ -113,6 +113,7 @@ DEPDIR = @DEPDIR@
DRIVER_MAN_DIR = @DRIVER_MAN_DIR@
DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
DRIVER_NAME = @DRIVER_NAME@
+DSYMUTIL = @DSYMUTIL@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
@@ -141,6 +142,7 @@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
MISC_MAN_DIR = @MISC_MAN_DIR@
MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
+NMEDIT = @NMEDIT@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@@ -153,6 +155,7 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@
PCIACCESS_LIBS = @PCIACCESS_LIBS@
PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
+SED = sed
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
@@ -163,7 +166,9 @@ XORG_LIBS = @XORG_LIBS@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DSYMUTIL = @ac_ct_DSYMUTIL@
ac_ct_F77 = @ac_ct_F77@
+ac_ct_NMEDIT = @ac_ct_NMEDIT@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
@@ -212,7 +217,6 @@ driverman_PRE = @DRIVER_NAME@.man
driverman_DATA = $(driverman_PRE:man=@DRIVER_MAN_SUFFIX@)
EXTRA_DIST = @DRIVER_NAME@.man
CLEANFILES = $(driverman_DATA)
-SED = sed
# Strings to replace in man pages
XORGRELSTRING = @PACKAGE_STRING@
diff --git a/driver/xf86-video-nv/man/nv.man b/driver/xf86-video-nv/man/nv.man
index 83d20ae32..2d559e69e 100644
--- a/driver/xf86-video-nv/man/nv.man
+++ b/driver/xf86-video-nv/man/nv.man
@@ -35,22 +35,22 @@ NV4
.B RIVA TNT2
NV5
.TP 22
-.B GeForce 256, QUADRO
+.B GeForce 256, Quadro
NV10
.TP 22
-.B GeForce2, QUADRO2
+.B GeForce2, Quadro2
NV11 & NV15
.TP 22
-.B GeForce3, QUADRO DCC
+.B GeForce3, Quadro DCC
NV20
.TP 22
.B nForce, nForce2
NV1A, NV1F
.TP 22
-.B GeForce4, QUADRO4
+.B GeForce4, Quadro4
NV17, NV18, NV25, NV28
.TP 22
-.B GeForce FX, QUADRO FX
+.B GeForce FX, Quadro FX
NV30, NV31, NV34, NV35, NV36, NV37, NV38
.TP 22
.B GeForce 6XXX
@@ -58,7 +58,13 @@ NV40, NV41, NV43, NV44, NV45, C51
.TP 22
.B GeForce 7XXX
G70, G71, G72, G73
-
+.TP 22
+.B GeForce 8XXX, GeForce 9XXX
+G80, G84, G86, G92, G94, G96, G98
+.TP 22
+.B GeForce GTX
+GT200
+.
.SH CONFIGURATION DETAILS
Please refer to __xconfigfile__(__filemansuffix__) for general configuration
details. This section only covers configuration details specific to this
@@ -69,7 +75,7 @@ present for all chips.
.PP
The following driver
.B Options
-are supported:
+are supported for pre-G80 hardware:
.TP
.BI "Option \*qHWCursor\*q \*q" boolean \*q
Enable or disable the HW cursor. Default: on.
@@ -90,6 +96,11 @@ the wrong one, this option may be used to force usage of a particular output.
The options are "0" or "1".
Default: autodetected.
.TP
+.BI "Option \*qDualhead\*q \*q" boolean \*q
+Enables simple VBE-based dual head mode.
+This sets the same resolution on both outputs and lays them out side-by-side.
+The screens will be panned together as one big metamode if the virtual desktop is larger than both screens combined.
+.TP
.BI "Option \*qFlatPanel\*q \*q" boolean \*q
The driver usually can autodetect the presence of a digital flat panel. In
the case that this fails, this option can be used to force the driver to
@@ -128,42 +139,81 @@ Default: no rotation support.
.TP
.BI "Option \*qShadowFB\*q \*q" boolean \*q
Enable or disable use of the shadow framebuffer layer. Default: off.
+.
+.\" ******************** begin G80 section ********************
+.PP
+The following driver
+.B Options
+are available for G80 and higher:
+.TP
+.BI "Option \*qHWCursor\*q \*q" boolean \*q
+Enable or disable the hardware cursor. Default: on.
+.TP
+.BI "Option \*qNoAccel\*q \*q" boolean \*q
+Disable or enable acceleration. Default: acceleration is enabled.
+.TP
+.BI "Option \*qAccelMethod\*q \*q" string \*q
+Choose acceleration architecture, either \*qXAA\*q or \*qEXA\*q.
+XAA is the old but stable architecture.
+EXA is newer and supports resizing the desktop larger than it started out with RandR 1.2.
+If you choose to use EXA, you might also consider setting
+.B Option \*qMigrationHeuristic\*q \*qgreedy\*q
+to improve performance.
+Default: XAA.
+.TP
+.BI "Option \*qFPDither\*q \*q" boolean \*q
+Enable or disable flat panel dithering by default.
+Dithering can also be enabled or disabled using the RandR 1.2 \*qdither\*q output property.
+Default: off.
+.TP
+.BI "Option \*qAllowDualLinkModes\*q \*q" boolean \*q
+Allow validation of dual-link DVI modes.
+Not all GPUs are configured at boot time to be able to handle dual-link modes, so they are disabled by default.
+.
+.\" RandR 1.2
+.PP
+The following RandR 1.2 properties are available for flat panels on G80 and higher GPUs:
+.TP
+.B dither
+Enable or disable flat panel dithering.
+Valid values:
+.BR 0 " (off), " 1 " (on)."
+.TP
+.B scale
+Control how the image is scaled to fit the flat panel.
+Note that some flat panels perform their own scaling, overriding this option.
+.RB \*q off \*q
+is not valid for laptop flat panels (LVDS).
+Valid values:
+.RB \*q off "\*q, \*q" aspect "\*q, \*q" fill "\*q, and \*q" center \*q.
+Default:
+.RB \*q aspect \*q.
+.\" ******************** end G80 section ********************
+.
.SH "SEE ALSO"
-__xservername__(__appmansuffix__), __xconfigfile__(__filemansuffix__), xorgconfig(__appmansuffix__), Xserver(__appmansuffix__), X(__miscmansuffix__)
+__xservername__(__appmansuffix__), __xconfigfile__(__filemansuffix__), xorgconfig(__appmansuffix__), Xserver(__appmansuffix__), X(__miscmansuffix__), xrandr(__appmansuffix__)
.SH AUTHORS
Authors include: David McKay, Jarno Paananen, Chas Inman, Dave Schmenk,
-Mark Vojkovich
+Mark Vojkovich, Aaron Plattner
.SH COPYRIGHT
.LP
-NOTICE TO USER: The source code is copyrighted under U.S. and
-international laws. Users and possessors of this source code are
-hereby granted a nonexclusive, royalty-free copyright license to
-use this code in individual and commercial software.
+Copyright (c) 2003 - 2008 NVIDIA, Corporation
.LP
-Any use of this source code must include, in the user documentation and
-internal comments to the code, notices to the end user as follows:
+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 the rights to use, copy, modify, merge, publish,
+distribute, sublicense, 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:
.LP
-Copyright 1993-2003 NVIDIA, Corporation. All rights reserved.
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
.LP
-NVIDIA, CORPORATION MAKES NO REPRESENTATION ABOUT THE SUITABILITY
-OF THIS SOURCE CODE FOR ANY PURPOSE. IT IS PROVIDED "AS IS"
-WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND. NVIDIA, CORPORATION
-DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOURCE CODE,
-INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT,
-AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
-NVIDIA, CORPORATION BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL,
-OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM
-LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
-OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOURCE CODE.
-.LP
-U.S. Government End Users. This source code is a "commercial
-item," as that term is defined at 48 C.F.R. 2.101 (OCT 1995),
-consisting of "commercial computer software" and "commercial
-computer software documentation," as such terms are used in
-48 C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Government
-only as a commercial end item. Consistent with 48 C.F.R.
-12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995),
-all U.S. Government End Users acquire the source code with only
-those rights set forth herein.
-
+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 NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 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.
diff --git a/driver/xf86-video-nv/src/Makefile.am b/driver/xf86-video-nv/src/Makefile.am
index 73667b358..2677d9c70 100644
--- a/driver/xf86-video-nv/src/Makefile.am
+++ b/driver/xf86-video-nv/src/Makefile.am
@@ -23,12 +23,14 @@
# -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.
-AM_CFLAGS = @XORG_CFLAGS@
+AM_CFLAGS = @XMODES_CFLAGS@ @XORG_CFLAGS@
nv_drv_la_LTLIBRARIES = nv_drv.la
nv_drv_la_LDFLAGS = -module -avoid-version
nv_drv_ladir = @moduledir@/drivers
-nv_drv_la_SOURCES = \
+nv_drv_la_SOURCES = $(nv_sources) $(riva_sources) $(g80_sources)
+
+nv_sources = \
nv_const.h \
nv_cursor.c \
nv_dac.c \
@@ -39,19 +41,13 @@ nv_drv_la_SOURCES = \
nv_include.h \
nv_local.h \
nv_proto.h \
- nvreg.h \
nv_setup.c \
nv_shadow.c \
nv_type.h \
- nvvga.h \
nv_video.c \
nv_xaa.c
-riva128_la_LTLIBRARIES = riva128.la
-riva128_la_LDFLAGS = -module -avoid-version
-riva128_ladir = @moduledir@/drivers
-
-riva128_la_SOURCES = \
+riva_sources = \
riva_const.h \
riva_cursor.c \
riva_dac.c \
@@ -67,3 +63,43 @@ riva128_la_SOURCES = \
riva_tbl.h \
riva_type.h \
riva_xaa.c
+
+g80_sources = \
+ g80_cursor.c \
+ g80_cursor.h \
+ g80_dac.c \
+ g80_display.c \
+ g80_display.h \
+ g80_dma.c \
+ g80_dma.h \
+ g80_driver.c \
+ g80_exa.c \
+ g80_exa.h \
+ g80_output.c \
+ g80_output.h \
+ g80_sor.c \
+ g80_type.h \
+ g80_xaa.c \
+ g80_xaa.h
+
+xmode_sources = \
+ @parser_dir@/xf86Parser.h \
+ @parser_dir@/xf86Optrec.h \
+ @modes_dir@/xf86Modes.h \
+ @modes_dir@/xf86Modes.c \
+ @modes_dir@/xf86cvt.c \
+ @modes_dir@/xf86Crtc.h \
+ @modes_dir@/xf86Crtc.c \
+ @modes_dir@/xf86Cursors.c \
+ @modes_dir@/xf86EdidModes.c \
+ @modes_dir@/xf86gtf.c \
+ @modes_dir@/xf86RandR12.c \
+ @modes_dir@/xf86RandR12.h \
+ @modes_dir@/xf86Rename.h \
+ @modes_dir@/xf86Rotate.c \
+ @modes_dir@/xf86DiDGA.c
+
+if BUILD_XMODES
+EXTRA_nv_drv_la_SOURCES = local_xf86Rename.h
+nodist_nv_drv_la_SOURCES = $(xmode_sources)
+endif
diff --git a/driver/xf86-video-nv/src/Makefile.in b/driver/xf86-video-nv/src/Makefile.in
index 3c8e24fff..cb951b6ea 100644
--- a/driver/xf86-video-nv/src/Makefile.in
+++ b/driver/xf86-video-nv/src/Makefile.in
@@ -85,7 +85,8 @@ am_nv_drv_la_OBJECTS = $(am__objects_1) $(am__objects_2) \
$(am__objects_3)
am__EXTRA_nv_drv_la_SOURCES_DIST = local_xf86Rename.h
am__objects_4 = xf86Modes.lo xf86cvt.lo xf86Crtc.lo xf86Cursors.lo \
- xf86EdidModes.lo xf86RandR12.lo xf86Rotate.lo xf86DiDGA.lo
+ xf86EdidModes.lo xf86gtf.lo xf86RandR12.lo xf86Rotate.lo \
+ xf86DiDGA.lo
@BUILD_XMODES_TRUE@nodist_nv_drv_la_OBJECTS = $(am__objects_4)
nv_drv_la_OBJECTS = $(am_nv_drv_la_OBJECTS) \
$(nodist_nv_drv_la_OBJECTS)
@@ -137,6 +138,7 @@ DEPDIR = @DEPDIR@
DRIVER_MAN_DIR = @DRIVER_MAN_DIR@
DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
DRIVER_NAME = @DRIVER_NAME@
+DSYMUTIL = @DSYMUTIL@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
@@ -165,6 +167,7 @@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
MISC_MAN_DIR = @MISC_MAN_DIR@
MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
+NMEDIT = @NMEDIT@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@@ -177,6 +180,7 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@
PCIACCESS_LIBS = @PCIACCESS_LIBS@
PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
@@ -187,7 +191,9 @@ XORG_LIBS = @XORG_LIBS@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DSYMUTIL = @ac_ct_DSYMUTIL@
ac_ct_F77 = @ac_ct_F77@
+ac_ct_NMEDIT = @ac_ct_NMEDIT@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
@@ -304,6 +310,7 @@ xmode_sources = \
@modes_dir@/xf86Crtc.c \
@modes_dir@/xf86Cursors.c \
@modes_dir@/xf86EdidModes.c \
+ @modes_dir@/xf86gtf.c \
@modes_dir@/xf86RandR12.c \
@modes_dir@/xf86RandR12.h \
@modes_dir@/xf86Rename.h \
@@ -415,6 +422,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86RandR12.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86Rotate.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86cvt.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86gtf.Plo@am__quote@
.c.o:
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
@@ -472,6 +480,13 @@ xf86EdidModes.lo: @modes_dir@/xf86EdidModes.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xf86EdidModes.lo `test -f '@modes_dir@/xf86EdidModes.c' || echo '$(srcdir)/'`@modes_dir@/xf86EdidModes.c
+xf86gtf.lo: @modes_dir@/xf86gtf.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xf86gtf.lo -MD -MP -MF "$(DEPDIR)/xf86gtf.Tpo" -c -o xf86gtf.lo `test -f '@modes_dir@/xf86gtf.c' || echo '$(srcdir)/'`@modes_dir@/xf86gtf.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/xf86gtf.Tpo" "$(DEPDIR)/xf86gtf.Plo"; else rm -f "$(DEPDIR)/xf86gtf.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='@modes_dir@/xf86gtf.c' object='xf86gtf.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xf86gtf.lo `test -f '@modes_dir@/xf86gtf.c' || echo '$(srcdir)/'`@modes_dir@/xf86gtf.c
+
xf86RandR12.lo: @modes_dir@/xf86RandR12.c
@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xf86RandR12.lo -MD -MP -MF "$(DEPDIR)/xf86RandR12.Tpo" -c -o xf86RandR12.lo `test -f '@modes_dir@/xf86RandR12.c' || echo '$(srcdir)/'`@modes_dir@/xf86RandR12.c; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/xf86RandR12.Tpo" "$(DEPDIR)/xf86RandR12.Plo"; else rm -f "$(DEPDIR)/xf86RandR12.Tpo"; exit 1; fi
diff --git a/driver/xf86-video-nv/src/g80_dac.c b/driver/xf86-video-nv/src/g80_dac.c
index 30413cd50..404f178f5 100644
--- a/driver/xf86-video-nv/src/g80_dac.c
+++ b/driver/xf86-video-nv/src/g80_dac.c
@@ -29,6 +29,7 @@
#define DPMS_SERVER
#include <X11/extensions/dpms.h>
+#include <xf86_OSproc.h>
#include "g80_type.h"
#include "g80_display.h"
@@ -76,7 +77,7 @@ G80DacDPMSSet(xf86OutputPtr output, int mode)
pNv->reg[(0x0061A004+off)/4] = tmp;
}
-Bool
+static Bool
G80DacModeFixup(xf86OutputPtr output, DisplayModePtr mode,
DisplayModePtr adjusted_mode)
{
@@ -134,21 +135,23 @@ G80DacLoadDetect(xf86OutputPtr output)
G80OutputPrivPtr pPriv = output->driver_private;
const int scrnIndex = pScrn->scrnIndex;
const int dacOff = 2048 * pPriv->or;
- CARD32 load, tmp, tmp2;
+ int sigstate;
+ CARD32 load, tmp;
xf86DrvMsg(scrnIndex, X_PROBED, "Trying load detection on VGA%i ... ",
pPriv->or);
pNv->reg[(0x0061A010+dacOff)/4] = 0x00000001;
- tmp2 = pNv->reg[(0x0061A004+dacOff)/4];
+ tmp = pNv->reg[(0x0061A004+dacOff)/4];
pNv->reg[(0x0061A004+dacOff)/4] = 0x80150000;
while(pNv->reg[(0x0061A004+dacOff)/4] & 0x80000000);
- tmp = pNv->architecture == 0x50 ? 420 : 340;
- pNv->reg[(0x0061A00C+dacOff)/4] = tmp | 0x100000;
- usleep(4500);
+ pNv->reg[(0x0061A00C+dacOff)/4] = pNv->loadVal | 0x100000;
+ sigstate = xf86BlockSIGIO();
+ usleep(45000);
+ xf86UnblockSIGIO(sigstate);
load = pNv->reg[(0x0061A00C+dacOff)/4];
pNv->reg[(0x0061A00C+dacOff)/4] = 0;
- pNv->reg[(0x0061A004+dacOff)/4] = 0x80000000 | tmp2;
+ pNv->reg[(0x0061A004+dacOff)/4] = 0x80000000 | tmp;
// Use this DAC if all three channels show load.
if((load & 0x38000000) == 0x38000000) {
@@ -191,7 +194,7 @@ G80CreateDac(ScrnInfoPtr pScrn, ORNum or)
char orName[5];
if(!pPriv)
- return FALSE;
+ return NULL;
snprintf(orName, 5, "VGA%i", or);
output = xf86OutputCreate(pScrn, &G80DacOutputFuncs, orName);
diff --git a/driver/xf86-video-nv/src/g80_display.c b/driver/xf86-video-nv/src/g80_display.c
index dda1c7f02..8b97b8a4d 100644
--- a/driver/xf86-video-nv/src/g80_display.c
+++ b/driver/xf86-video-nv/src/g80_display.c
@@ -407,7 +407,7 @@ G80CrtcBlankScreen(xf86CrtcPtr crtc, Bool blank)
C(0x00000860 + headOff, 0);
C(0x00000864 + headOff, 0);
pNv->reg[0x00610380/4] = 0;
- pNv->reg[0x00610384/4] = pNv->RamAmountKBytes * 1024 - 1;
+ pNv->reg[0x00610384/4] = pNv->videoRam * 1024 - 1;
pNv->reg[0x00610388/4] = 0x150000;
pNv->reg[0x0061038C/4] = 0;
C(0x00000884 + headOff, (pNv->videoRam << 2) - 0x40);
@@ -423,7 +423,7 @@ G80CrtcBlankScreen(xf86CrtcPtr crtc, Bool blank)
}
}
-void
+static void
G80CrtcDPMSSet(xf86CrtcPtr crtc, int mode)
{
}
@@ -442,12 +442,12 @@ static void G80CrtcShowHideCursor(xf86CrtcPtr crtc, Bool show, Bool update)
}
}
-void G80CrtcShowCursor(xf86CrtcPtr crtc)
+static void G80CrtcShowCursor(xf86CrtcPtr crtc)
{
G80CrtcShowHideCursor(crtc, TRUE, TRUE);
}
-void G80CrtcHideCursor(xf86CrtcPtr crtc)
+static void G80CrtcHideCursor(xf86CrtcPtr crtc)
{
G80CrtcShowHideCursor(crtc, FALSE, TRUE);
}
diff --git a/driver/xf86-video-nv/src/g80_driver.c b/driver/xf86-video-nv/src/g80_driver.c
index 2a3120fdb..a0182a16b 100644
--- a/driver/xf86-video-nv/src/g80_driver.c
+++ b/driver/xf86-video-nv/src/g80_driver.c
@@ -30,6 +30,7 @@
#include <xf86_OSproc.h>
#include <xf86Resources.h>
+#include <xf86RandR12.h>
#include <mipointer.h>
#include <mibstore.h>
#include <micmap.h>
@@ -42,8 +43,9 @@
#include "g80_type.h"
#include "g80_cursor.h"
#include "g80_display.h"
-#include "g80_ddc.h"
#include "g80_dma.h"
+#include "g80_output.h"
+#include "g80_exa.h"
#include "g80_xaa.h"
#define G80_REG_SIZE (1024 * 1024 * 16)
@@ -65,6 +67,13 @@ static const char *xaaSymbols[] = {
NULL
};
+static const char *exaSymbols[] = {
+ "exaDriverAlloc",
+ "exaDriverInit",
+ "exaDriverFini",
+ NULL
+};
+
static const char *i2cSymbols[] = {
"xf86CreateI2CBusRec",
"xf86I2CBusInit",
@@ -95,14 +104,18 @@ static const char *int10Symbols[] = {
typedef enum {
OPTION_HW_CURSOR,
OPTION_NOACCEL,
- OPTION_BACKEND_MODE,
+ OPTION_ACCEL_METHOD,
+ OPTION_FP_DITHER,
+ OPTION_ALLOW_DUAL_LINK,
} G80Opts;
static const OptionInfoRec G80Options[] = {
- { OPTION_HW_CURSOR, "HWCursor", OPTV_BOOLEAN, {0}, FALSE },
- { OPTION_NOACCEL, "NoAccel", OPTV_BOOLEAN, {0}, FALSE },
- { OPTION_BACKEND_MODE, "BackendMode", OPTV_ANYSTR, {0}, FALSE },
- { -1, NULL, OPTV_NONE, {0}, FALSE }
+ { OPTION_HW_CURSOR, "HWCursor", OPTV_BOOLEAN, {0}, FALSE },
+ { OPTION_NOACCEL, "NoAccel", OPTV_BOOLEAN, {0}, FALSE },
+ { OPTION_ACCEL_METHOD, "AccelMethod", OPTV_STRING, {0}, FALSE },
+ { OPTION_FP_DITHER, "FPDither", OPTV_BOOLEAN, {0}, FALSE },
+ { OPTION_ALLOW_DUAL_LINK, "AllowDualLinkModes", OPTV_BOOLEAN, {0}, FALSE },
+ { -1, NULL, OPTV_NONE, {0}, FALSE }
};
static Bool
@@ -122,20 +135,76 @@ G80FreeRec(ScrnInfoPtr pScrn)
}
static Bool
+G80ResizeScreen(ScrnInfoPtr pScrn, int width, int height)
+{
+ ScreenPtr pScreen = pScrn->pScreen;
+ G80Ptr pNv = G80PTR(pScrn);
+ xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
+ int pitch = width * (pScrn->bitsPerPixel / 8);
+ int i;
+
+ pitch = (pitch + 255) & ~255;
+
+ pScrn->virtualX = width;
+ pScrn->virtualY = height;
+
+ /* Can resize if XAA is disabled or EXA is enabled */
+ if(!pNv->xaa || pNv->exa) {
+ (*pScrn->pScreen->GetScreenPixmap)(pScrn->pScreen)->devKind = pitch;
+ pScrn->displayWidth = pitch / (pScrn->bitsPerPixel / 8);
+
+ /* Re-set the modes so the new pitch is taken into account */
+ for(i = 0; i < xf86_config->num_crtc; i++) {
+ xf86CrtcPtr crtc = xf86_config->crtc[i];
+ if(crtc->enabled)
+ xf86CrtcSetMode(crtc, &crtc->mode, crtc->rotation, crtc->x, crtc->y);
+ }
+ }
+
+ /*
+ * If EXA is enabled, use exaOffscreenAlloc to carve out a chunk of memory
+ * for the screen.
+ */
+ if(pNv->exa) {
+ if(pNv->exaScreenArea)
+ exaOffscreenFree(pScreen, pNv->exaScreenArea);
+ pNv->exaScreenArea = exaOffscreenAlloc(pScreen, pitch * pScrn->virtualY,
+ 256, TRUE, NULL, NULL);
+ if(!pNv->exaScreenArea || pNv->exaScreenArea->offset != 0) {
+ xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+ "Failed to reserve EXA memory for the screen or EXA "
+ "returned an area with a nonzero offset. Don't be "
+ "surprised if your screen is corrupt.\n");
+ }
+ }
+
+ return TRUE;
+}
+
+static const xf86CrtcConfigFuncsRec randr12_screen_funcs = {
+ .resize = G80ResizeScreen,
+};
+
+static Bool
G80PreInit(ScrnInfoPtr pScrn, int flags)
{
G80Ptr pNv;
EntityInfoPtr pEnt;
+#if XSERVER_LIBPCIACCESS
+ struct pci_device *pPci;
+ int err;
+ void *p;
+#else
pciVideoPtr pPci;
PCITAG pcitag;
- ClockRangePtr clockRanges;
+#endif
MessageType from;
Bool primary;
- int i;
- char *s;
const rgb zeros = {0, 0, 0};
const Gamma gzeros = {0.0, 0.0, 0.0};
+ char *s;
CARD32 tmp;
+ memType BAR1sizeKB;
if(flags & PROBE_DETECT) {
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
@@ -157,13 +226,22 @@ G80PreInit(ScrnInfoPtr pScrn, int flags)
pEnt = xf86GetEntityInfo(pScrn->entityList[0]);
if(pEnt->location.type != BUS_PCI) goto fail;
pPci = xf86GetPciInfoForEntity(pEnt->index);
- pcitag = pciTag(pPci->bus, pPci->device, pPci->func);
+#if XSERVER_LIBPCIACCESS
+ /* Need this to unmap */
+ pNv->pPci = pPci;
+#endif
primary = xf86IsPrimaryPci(pPci);
/* The ROM size sometimes isn't read correctly, so fix it up here. */
+#if XSERVER_LIBPCIACCESS
+ if(pPci->rom_size == 0)
+ /* The BIOS is 64k */
+ pPci->rom_size = 64 * 1024;
+#else
if(pPci->biosSize == 0)
/* The BIOS is 64k */
pPci->biosSize = 16;
+#endif
pNv->int10 = NULL;
pNv->int10Mode = 0;
@@ -243,6 +321,19 @@ G80PreInit(ScrnInfoPtr pScrn, int flags)
pNv->NoAccel = TRUE;
xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "Acceleration disabled\n");
}
+ s = xf86GetOptValString(pNv->Options, OPTION_ACCEL_METHOD);
+ if(!s || !strcasecmp(s, "xaa"))
+ pNv->AccelMethod = XAA;
+ else if(!strcasecmp(s, "exa"))
+ pNv->AccelMethod = EXA;
+ else {
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Unrecognized AccelMethod "
+ "\"%s\".\n", s);
+ goto fail;
+ }
+
+ pNv->Dither = xf86ReturnOptValBool(pNv->Options, OPTION_FP_DITHER, FALSE);
+ pNv->AllowDualLink = xf86ReturnOptValBool(pNv->Options, OPTION_ALLOW_DUAL_LINK, FALSE);
/* Set the bits per RGB for 8bpp mode */
if(pScrn->depth == 8)
@@ -250,29 +341,25 @@ G80PreInit(ScrnInfoPtr pScrn, int flags)
if(!xf86SetGamma(pScrn, gzeros)) goto fail;
- /*
- * Setup the ClockRanges, which describe what clock ranges are available,
- * and what sort of modes they can be used for.
- */
- clockRanges = xnfcalloc(sizeof(ClockRange), 1);
- clockRanges->next = NULL;
- clockRanges->minClock = 0;
- clockRanges->maxClock = 400000;
- clockRanges->clockIndex = -1; /* programmable */
- clockRanges->doubleScanAllowed = TRUE;
- clockRanges->interlaceAllowed = TRUE;
-
/* Map memory */
- xf86DrvMsg(pScrn->scrnIndex, X_PROBED, "MMIO registers at 0x%lx\n",
- pPci->memBase[0]);
- xf86DrvMsg(pScrn->scrnIndex, X_PROBED, "Linear framebuffer at 0x%lx\n",
- pPci->memBase[1]);
- pScrn->memPhysBase = pPci->memBase[1];
+ pScrn->memPhysBase = MEMBASE(pPci, 1);
pScrn->fbOffset = 0;
+#if XSERVER_LIBPCIACCESS
+ err = pci_device_map_range(pPci, pPci->regions[0].base_addr, G80_REG_SIZE,
+ PCI_DEV_MAP_FLAG_WRITABLE, &p);
+ if(err) {
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+ "Failed to map MMIO registers: %s\n", strerror(err));
+ goto fail;
+ }
+ pNv->reg = p;
+#else
+ pcitag = pciTag(pPci->bus, pPci->device, pPci->func);
pNv->reg = xf86MapPciMem(pScrn->scrnIndex,
VIDMEM_MMIO | VIDMEM_READSIDEEFFECT,
pcitag, pPci->memBase[0], G80_REG_SIZE);
+#endif
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "MMIO registers mapped at %p\n",
(void*)pNv->reg);
@@ -283,23 +370,58 @@ G80PreInit(ScrnInfoPtr pScrn, int flags)
}
pNv->architecture = pNv->reg[0] >> 20 & 0x1ff;
- pNv->RamAmountKBytes = pNv->RamAmountKBytes = (pNv->reg[0x0010020C/4] & 0xFFF00000) >> 10;
- pNv->videoRam = pNv->RamAmountKBytes;
- /* Limit videoRam to the max BAR1 size of 256MB */
- if(pNv->videoRam <= 1024) {
+ tmp = pNv->reg[0x0010020C/4];
+ pNv->videoRam = pNv->RamAmountKBytes = tmp >> 10 | (tmp & 1) << 22;
+
+ /* Determine the size of BAR1 */
+ /* Some configs have BAR1 < total RAM < 256 MB */
+#if XSERVER_LIBPCIACCESS
+ BAR1sizeKB = pPci->regions[1].size / 1024;
+#else
+ BAR1sizeKB = 1UL << (pPci->size[1] - 10);
+#endif
+ if(BAR1sizeKB > 256 * 1024) {
+ xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "BAR1 is > 256 MB, which is "
+ "probably wrong. Clamping to 256 MB.\n");
+ BAR1sizeKB = 256 * 1024;
+ }
+
+ /* Limit videoRam to the size of BAR1 */
+ if(pNv->videoRam <= 1024 || BAR1sizeKB == 0) {
xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Failed to determine the amount of "
"available video memory\n");
goto fail;
}
pNv->videoRam -= 1024;
- if(pNv->videoRam > 256 * 1024)
- pNv->videoRam = 256 * 1024;
+ if(pNv->videoRam > BAR1sizeKB)
+ pNv->videoRam = BAR1sizeKB;
+
pScrn->videoRam = pNv->videoRam;
- xf86DrvMsg(pScrn->scrnIndex, X_PROBED, "Mapping %.1f of %.1f MB of video RAM\n",
- pScrn->videoRam / 1024.0, pNv->RamAmountKBytes / 1024.0);
+
+ xf86DrvMsg(pScrn->scrnIndex, X_PROBED, "Total video RAM: %.1f MB\n",
+ pNv->RamAmountKBytes / 1024.0);
+ xf86DrvMsg(pScrn->scrnIndex, X_PROBED, " BAR1 size: %.1f MB\n",
+ BAR1sizeKB / 1024.0);
+ xf86DrvMsg(pScrn->scrnIndex, X_PROBED, " Mapped memory: %.1f MB\n",
+ pScrn->videoRam / 1024.0);
+
+#if XSERVER_LIBPCIACCESS
+ err = pci_device_map_range(pPci, pPci->regions[1].base_addr,
+ pScrn->videoRam * 1024,
+ PCI_DEV_MAP_FLAG_WRITABLE |
+ PCI_DEV_MAP_FLAG_WRITE_COMBINE,
+ &p);
+ if(err) {
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+ "Failed to map framebuffer: %s\n", strerror(err));
+ goto fail;
+ }
+ pNv->mem = p;
+#else
pNv->mem = xf86MapPciMem(pScrn->scrnIndex,
VIDMEM_MMIO | VIDMEM_READSIDEEFFECT,
pcitag, pPci->memBase[1], pScrn->videoRam * 1024);
+#endif
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Linear framebuffer mapped at %p\n",
(void*)pNv->mem);
@@ -310,70 +432,55 @@ G80PreInit(ScrnInfoPtr pScrn, int flags)
else
pNv->table1 -= 0x10000;
- /* Probe DDC */
- /* If no DDC info found, try DAC load detection */
+ xf86CrtcConfigInit(pScrn, &randr12_screen_funcs);
+ xf86CrtcSetSizeRange(pScrn, 320, 200, 8192, 8192);
+
if(!xf86LoadSubModule(pScrn, "i2c")) goto fail;
if(!xf86LoadSubModule(pScrn, "ddc")) goto fail;
xf86LoaderReqSymLists(i2cSymbols, ddcSymbols, NULL);
- if(!G80ProbeDDC(pScrn) && !G80LoadDetect(pScrn)) {
- xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "No display devices found\n");
+
+ if(!G80DispPreInit(pScrn)) goto fail;
+ /* Read the DDC routing table and create outputs */
+ if(!G80CreateOutputs(pScrn)) goto fail;
+ /* Create the crtcs */
+ G80DispCreateCrtcs(pScrn);
+
+ /* We can grow the desktop if XAA is disabled */
+ if(!xf86InitialConfiguration(pScrn, pNv->NoAccel || pNv->AccelMethod == EXA)) {
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+ "No valid initial configuration found\n");
goto fail;
}
- /* Hardcode HEAD0 for now. RandR 1.2 will move this into a Crtc struct. */
- pNv->head = 0;
-
- i = xf86ValidateModes(pScrn, pScrn->monitor->Modes,
- pScrn->display->modes, clockRanges,
- NULL, 256, 8192,
- 512, 128, 8192,
- pScrn->display->virtualX,
- pScrn->display->virtualY,
- pNv->videoRam * 1024 - G80_RESERVED_VIDMEM,
- LOOKUP_BEST_REFRESH);
- if(i == -1) goto fail;
- xf86PruneDriverModes(pScrn);
- if(i == 0 || !pScrn->modes) {
- xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "No valid modes found\n");
+ pScrn->displayWidth = (pScrn->virtualX + 255) & ~255;
+
+ if(!xf86RandR12PreInit(pScrn)) {
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "RandR initialization failure\n");
+ goto fail;
+ }
+ if(!pScrn->modes) {
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "No modes\n");
goto fail;
}
- xf86SetCrtcForModes(pScrn, 0);
pScrn->currentMode = pScrn->modes;
xf86PrintModes(pScrn);
xf86SetDpi(pScrn, 0, 0);
- /* Custom backend timings */
- pNv->BackendMode = NULL;
- if((s = xf86GetOptValString(pNv->Options, OPTION_BACKEND_MODE))) {
- DisplayModePtr mode;
-
- for(mode = pScrn->modes; ; mode = mode->next) {
- if(!strcmp(mode->name, s))
- break;
- if(mode->next == pScrn->modes) {
- mode = NULL;
- break;
- }
- }
-
- pNv->BackendMode = mode;
-
- if(mode)
- xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "BackendMode: Using mode "
- "\"%s\" for display timings\n", mode->name);
- else
- xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "Cannot honor "
- "\"BackendMode\" option: no mode named \"%s\" "
- "found.\n", s);
- }
-
/* Load fb */
if(!xf86LoadSubModule(pScrn, "fb")) goto fail;
xf86LoaderReqSymLists(fbSymbols, NULL);
if(!pNv->NoAccel) {
- if(!xf86LoadSubModule(pScrn, "xaa")) goto fail;
- xf86LoaderReqSymLists(xaaSymbols, NULL);
+ switch(pNv->AccelMethod) {
+ case XAA:
+ if(!xf86LoadSubModule(pScrn, "xaa")) goto fail;
+ xf86LoaderReqSymLists(xaaSymbols, NULL);
+ break;
+ case EXA:
+ if(!xf86LoadSubModule(pScrn, "exa")) goto fail;
+ xf86LoaderReqSymLists(exaSymbols, NULL);
+ break;
+ }
}
/* Load ramdac if needed */
@@ -401,15 +508,11 @@ fail:
static Bool
AcquireDisplay(ScrnInfoPtr pScrn)
{
- G80Ptr pNv = G80PTR(pScrn);
-
if(!G80DispInit(pScrn))
return FALSE;
- if(!G80CursorAcquire(pNv))
- return FALSE;
- if(!G80DispSetMode(pScrn, pScrn->currentMode))
+ if(!G80CursorAcquire(pScrn))
return FALSE;
- G80DispDPMSSet(pScrn, DPMSModeOn, 0);
+ xf86SetDesiredModes(pScrn);
return TRUE;
}
@@ -422,7 +525,7 @@ ReleaseDisplay(ScrnInfoPtr pScrn)
{
G80Ptr pNv = G80PTR(pScrn);
- G80CursorRelease(pNv);
+ G80CursorRelease(pScrn);
G80DispShutdown(pScrn);
if(pNv->int10 && pNv->int10Mode) {
@@ -450,13 +553,24 @@ G80CloseScreen(int scrnIndex, ScreenPtr pScreen)
if(pNv->xaa)
XAADestroyInfoRec(pNv->xaa);
- if(pNv->HWCursor)
- xf86DestroyCursorInfoRec(pNv->CursorInfo);
+ if(pNv->exa) {
+ if(pNv->exaScreenArea) {
+ exaOffscreenFree(pScreen, pNv->exaScreenArea);
+ pNv->exaScreenArea = NULL;
+ }
+ exaDriverFini(pScrn->pScreen);
+ }
+ xf86_cursors_fini(pScreen);
if(xf86ServerIsExiting()) {
if(pNv->int10) xf86FreeInt10(pNv->int10);
+#if XSERVER_LIBPCIACCESS
+ pci_device_unmap_range(pNv->pPci, pNv->mem, pNv->videoRam * 1024);
+ pci_device_unmap_range(pNv->pPci, (void*)pNv->reg, G80_REG_SIZE);
+#else
xf86UnMapVidMem(pScrn->scrnIndex, pNv->mem, pNv->videoRam * 1024);
xf86UnMapVidMem(pScrn->scrnIndex, (void*)pNv->reg, G80_REG_SIZE);
+#endif
pNv->reg = NULL;
pNv->mem = NULL;
}
@@ -477,6 +591,8 @@ G80BlockHandler(int i, pointer blockData, pointer pTimeout, pointer pReadmask)
if(pNv->DMAKickoffCallback)
(*pNv->DMAKickoffCallback)(pScrnInfo);
+ G80OutputResetCachedStatus(pScrnInfo);
+
pScreen->BlockHandler = pNv->BlockHandler;
(*pScreen->BlockHandler) (i, blockData, pTimeout, pReadmask);
pScreen->BlockHandler = G80BlockHandler;
@@ -485,13 +601,7 @@ G80BlockHandler(int i, pointer blockData, pointer pTimeout, pointer pReadmask)
static Bool
G80SaveScreen(ScreenPtr pScreen, int mode)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
-
- if(!pScrn->vtSema) return FALSE;
-
- G80DispBlankScreen(pScrn, !xf86IsUnblank(mode));
-
- return TRUE;
+ return FALSE;
}
static void
@@ -712,7 +822,7 @@ G80ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
ScrnInfoPtr pScrn;
G80Ptr pNv;
CARD32 pitch;
- int visualMask;
+ int visualMask, i;
BoxRec AvailFBArea;
/* First get the ScrnInfoRec */
@@ -731,8 +841,6 @@ G80ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
/* pad the screen pitch to 256 bytes */
pitch = pScrn->displayWidth * (pScrn->bitsPerPixel / 8);
- pitch = (pitch + 0xff) & ~0xff;
- pScrn->displayWidth = pitch / (pScrn->bitsPerPixel / 8);
/* fb init */
if(!fbScreenInit(pScreen, pNv->mem,
@@ -774,12 +882,27 @@ G80ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
AvailFBArea.y2 = pNv->offscreenHeight;
xf86InitFBManager(pScreen, &AvailFBArea);
+ pNv->reg[0x00001708/4] = 0;
+ for(i = 0; i < 8; i++)
+ pNv->reg[0x00001900/4 + i] = 0;
+
if(!pNv->NoAccel) {
G80InitHW(pScrn);
- if(!G80XAAInit(pScreen)) {
- xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
- "Hardware acceleration initialization failed\n");
- pNv->NoAccel = FALSE;
+ switch(pNv->AccelMethod) {
+ case XAA:
+ if(!G80XAAInit(pScreen)) {
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+ "XAA hardware acceleration initialization failed\n");
+ return FALSE;
+ }
+ break;
+ case EXA:
+ if(!G80ExaInit(pScreen, pScrn)) {
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+ "EXA hardware acceleration initialization failed\n");
+ return FALSE;
+ }
+ break;
}
}
@@ -808,7 +931,7 @@ G80ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
CMAP_PALETTED_TRUECOLOR))
return FALSE;
- xf86DPMSInit(pScreen, G80DispDPMSSet, 0);
+ xf86DPMSInit(pScreen, xf86DPMSSet, 0);
/* Clear the screen */
if(pNv->xaa) {
@@ -834,6 +957,9 @@ G80ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
pNv->BlockHandler = pScreen->BlockHandler;
pScreen->BlockHandler = G80BlockHandler;
+ if(!xf86CrtcScreenInit(pScreen))
+ return FALSE;
+
return TRUE;
}
@@ -847,22 +973,12 @@ static Bool
G80SwitchMode(int scrnIndex, DisplayModePtr mode, int flags)
{
ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
-
- return G80DispSetMode(pScrn, mode);
+ return xf86SetSingleMode(pScrn, mode, RR_Rotate_0);
}
static void
G80AdjustFrame(int scrnIndex, int x, int y, int flags)
{
- ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
- G80Ptr pNv = G80PTR(pScrn);
-
- if(x + pScrn->currentMode->HDisplay > pScrn->virtualX ||
- y + pScrn->currentMode->VDisplay > pScrn->virtualY ||
- x < 0 || y < 0)
- /* Ignore bogus panning */
- return;
- G80DispAdjustFrame(pNv, x, y);
}
static Bool
diff --git a/driver/xf86-video-nv/src/g80_output.c b/driver/xf86-video-nv/src/g80_output.c
index 1ec6a89af..4c8448fa6 100644
--- a/driver/xf86-video-nv/src/g80_output.c
+++ b/driver/xf86-video-nv/src/g80_output.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007 NVIDIA, Corporation
+ * Copyright (c) 2007-2008 NVIDIA, Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
@@ -32,16 +32,51 @@
#include "g80_display.h"
#include "g80_output.h"
+static unsigned G80FindLoadVal(const unsigned char *table1)
+{
+ const unsigned char *p = table1;
+ int count;
+ const CARD32 def = 340;
+
+ for(p = table1; *(CARD16*)p != 0xb8ff && p < table1 + 64000; p += 2);
+ if(p == table1 + 64000)
+ return def;
+ p += 2;
+ if(*(CARD32*)p != 0x544942)
+ return def;
+ p += 4;
+ if(*(CARD16*)p != 0x100)
+ return def;
+ p += 2;
+ if(*p != 12)
+ return def;
+ p++;
+ if(*p != 6)
+ return def;
+ p++;
+ count = *p;
+ p += 2;
+ for(; *p != 'A' && count >= 0; count--, p += 6);
+ if(count == -1)
+ return def;
+ p += 4;
+ p = table1 + *(CARD16*)p;
+ p = table1 + *(CARD16*)p;
+ if(p[0] != 0x10 || p[1] != 4 || p[2] != 4 || p[3] != 2)
+ return def;
+ return *(CARD32*)(p + 4) & 0x3ff;
+}
+
static Bool G80ReadPortMapping(int scrnIndex, G80Ptr pNv)
{
- unsigned char *table2;
- unsigned char headerSize, entries;
+ unsigned char *table2, *table3;
+ unsigned char headerSize, entries, table3Entries, table3EntSize;
int i;
CARD16 a;
CARD32 b;
/* Clear the i2c map to invalid */
- for(i = 0; i < 4; i++)
+ for(i = 0; i < G80_NUM_I2C_PORTS; i++)
pNv->i2cMap[i].dac = pNv->i2cMap[i].sor = -1;
if(*(CARD16*)pNv->table1 != 0xaa55) goto fail;
@@ -54,11 +89,16 @@ static Bool G80ReadPortMapping(int scrnIndex, G80Ptr pNv)
b = *(CARD32*)(table2 + 6);
if(b != 0x4edcbdcb) goto fail;
+ table3 = (unsigned char*)pNv->table1 + *(CARD16*)(table2 + 4);
+ table3Entries = table3[2];
+ table3EntSize = table3[3];
+ table3 += table3[1];
+
headerSize = table2[1];
entries = table2[2];
for(i = 0; i < entries; i++) {
- int type, port;
+ int type, port, portType;
ORNum or;
b = *(CARD32*)&table2[headerSize + 8*i];
@@ -66,50 +106,103 @@ static Bool G80ReadPortMapping(int scrnIndex, G80Ptr pNv)
port = (b >> 4) & 0xf;
or = ffs((b >> 24) & 0xf) - 1;
+ if(b & 0x300000)
+ /* Can't handle this type of output yet */
+ continue;
+
if(type == 0xe) break;
- if(type < 4) {
- switch(type) {
- case 0: /* CRT */
- if(pNv->i2cMap[port].dac != -1) {
- xf86DrvMsg(scrnIndex, X_WARNING,
- "DDC routing table corrupt! DAC %i -> %i "
- "for port %i\n",
- or, pNv->i2cMap[port].dac, port);
- }
- pNv->i2cMap[port].dac = or;
+ switch(type) {
+ case 0: /* CRT */
+ if(port >= table3Entries) {
+ xf86DrvMsg(scrnIndex, X_WARNING,
+ "VGA%d: invalid port %d\n", or, port);
break;
- case 1: /* TV */
- /* Ignore TVs */
+ }
+ b = *(CARD32*)&table3[table3EntSize * port];
+ port = b & 0xff;
+ portType = b >> 24;
+ if(portType != 5) {
+ xf86DrvMsg(scrnIndex, X_WARNING,
+ "VGA%d: invalid port type %d\n", or, portType);
break;
-
- case 2: /* TMDS */
- if(pNv->i2cMap[port].sor != -1)
- xf86DrvMsg(scrnIndex, X_WARNING,
- "DDC routing table corrupt! SOR %i -> %i "
- "for port %i\n",
- or, pNv->i2cMap[port].sor, port);
- pNv->i2cMap[port].sor = or;
+ }
+ if(pNv->i2cMap[port].dac != -1) {
+ xf86DrvMsg(scrnIndex, X_WARNING,
+ "DDC routing table corrupt! DAC %i -> %i for "
+ "port %i\n", or, pNv->i2cMap[port].dac, port);
+ }
+ pNv->i2cMap[port].dac = or;
+ break;
+ case 1: /* TV */
+ /* Ignore TVs */
+ break;
+
+ case 2: /* TMDS */
+ if(port >= table3Entries) {
+ xf86DrvMsg(scrnIndex, X_WARNING,
+ "DVI%d: invalid port %d\n", or, port);
break;
-
- case 3: /* LVDS */
- pNv->lvds.present = TRUE;
- pNv->lvds.or = or;
+ }
+ b = *(CARD32*)&table3[table3EntSize * port];
+ port = b & 0xff;
+ portType = b >> 24;
+ if(portType != 5) {
+ xf86DrvMsg(scrnIndex, X_WARNING,
+ "DVI%d: invalid port type %d\n", or, portType);
break;
- }
+ }
+ if(pNv->i2cMap[port].sor != -1)
+ xf86DrvMsg(scrnIndex, X_WARNING,
+ "DDC routing table corrupt! SOR %i -> %i for "
+ "port %i\n", or, pNv->i2cMap[port].sor, port);
+ pNv->i2cMap[port].sor = or;
+ break;
+
+ case 3: /* LVDS */
+ pNv->lvds.present = TRUE;
+ pNv->lvds.or = or;
+ pNv->lvds.i2cPort = -1;
+
+ if(port == 15) {
+ xf86DrvMsg(scrnIndex, X_INFO, "LVDS has no I2C port\n");
+ break;
+ }
+ if(port >= table3Entries) {
+ xf86DrvMsg(scrnIndex, X_WARNING,
+ "LVDS: invalid port %d\n", port);
+ break;
+ }
+ b = *(CARD32*)&table3[table3EntSize * port];
+ port = b & 0xff;
+ portType = b >> 24;
+ if(portType != 5) {
+ xf86DrvMsg(scrnIndex, X_WARNING,
+ "LVDS: invalid port type %d\n", portType);
+ break;
+ }
+ pNv->lvds.i2cPort = port;
+
+ break;
+
+ default:
+ break;
}
}
xf86DrvMsg(scrnIndex, X_PROBED, "Connector map:\n");
if(pNv->lvds.present)
xf86DrvMsg(scrnIndex, X_PROBED, " [N/A] -> SOR%i (LVDS)\n", pNv->lvds.or);
- for(i = 0; i < 4; i++) {
+ for(i = 0; i < G80_NUM_I2C_PORTS; i++) {
if(pNv->i2cMap[i].dac != -1)
xf86DrvMsg(scrnIndex, X_PROBED, " Bus %i -> DAC%i\n", i, pNv->i2cMap[i].dac);
if(pNv->i2cMap[i].sor != -1)
xf86DrvMsg(scrnIndex, X_PROBED, " Bus %i -> SOR%i\n", i, pNv->i2cMap[i].sor);
}
+ pNv->loadVal = G80FindLoadVal(pNv->table1);
+ xf86DrvMsg(scrnIndex, X_PROBED, "Load detection: %d\n", pNv->loadVal);
+
return TRUE;
fail:
@@ -118,21 +211,24 @@ fail:
return FALSE;
}
+static CARD32 i2cAddr(const int port)
+{
+ const CARD32 base = (port > 3) ? 0x0000E1E0 : 0x0000E138;
+ return base + port * 0x18;
+}
+
static void G80_I2CPutBits(I2CBusPtr b, int clock, int data)
{
G80Ptr pNv = G80PTR(xf86Screens[b->scrnIndex]);
- const int off = b->DriverPrivate.val * 0x18;
-
- pNv->reg[(0x0000E138+off)/4] = 4 | clock | data << 1;
+ pNv->reg[i2cAddr(b->DriverPrivate.val)/4] = 4 | clock | data << 1;
}
static void G80_I2CGetBits(I2CBusPtr b, int *clock, int *data)
{
G80Ptr pNv = G80PTR(xf86Screens[b->scrnIndex]);
- const int off = b->DriverPrivate.val * 0x18;
unsigned char val;
- val = pNv->reg[(0x0000E138+off)/4];
+ val = pNv->reg[i2cAddr(b->DriverPrivate.val)/4];
*clock = !!(val & 1);
*data = !!(val & 2);
}
@@ -200,14 +296,15 @@ ProbeDDC(I2CBusPtr i2c)
ScrnInfoPtr pScrn = xf86Screens[i2c->scrnIndex];
G80Ptr pNv = G80PTR(pScrn);
xf86MonPtr monInfo = NULL;
- const int bus = i2c->DriverPrivate.val, off = bus * 0x18;
+ const int bus = i2c->DriverPrivate.val;
+ const CARD32 addr = i2cAddr(bus);
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"Probing for EDID on I2C bus %i...\n", bus);
- pNv->reg[(0x0000E138+off)/4] = 7;
+ pNv->reg[addr/4] = 7;
/* Should probably use xf86OutputGetEDID here */
monInfo = xf86DoEDID_DDC2(pScrn->scrnIndex, i2c);
- pNv->reg[(0x0000E138+off)/4] = 3;
+ pNv->reg[addr/4] = 3;
if(monInfo) {
xf86DrvMsg(pScrn->scrnIndex, X_PROBED,
@@ -304,7 +401,7 @@ G80CreateOutputs(ScrnInfoPtr pScrn)
return FALSE;
/* For each DDC port, create an output for the attached ORs */
- for(i = 0; i < 4; i++) {
+ for(i = 0; i < G80_NUM_I2C_PORTS; i++) {
xf86OutputPtr dac = NULL, sor = NULL;
I2CBusPtr i2c;
char i2cName[16];
@@ -348,6 +445,19 @@ G80CreateOutputs(ScrnInfoPtr pScrn)
G80OutputPrivPtr pPriv = lvds->driver_private;
pPriv->scale = G80_SCALE_ASPECT;
+
+ if(pNv->lvds.i2cPort != -1) {
+ I2CBusPtr i2c;
+ char i2cName[16];
+
+ snprintf(i2cName, sizeof(i2cName), "I2C%i (LVDS)", pNv->lvds.i2cPort);
+ pPriv->i2c = G80I2CInit(pScrn, i2cName, pNv->lvds.i2cPort);
+ if(!pPriv->i2c) {
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+ "Failed to initialize I2C for port %i (LVDS)!\n",
+ pNv->lvds.i2cPort);
+ }
+ }
}
/* For each output, set the crtc and clone masks */
diff --git a/driver/xf86-video-nv/src/g80_sor.c b/driver/xf86-video-nv/src/g80_sor.c
index c98b66d42..c1ef42d09 100644
--- a/driver/xf86-video-nv/src/g80_sor.c
+++ b/driver/xf86-video-nv/src/g80_sor.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007 NVIDIA, Corporation
+ * Copyright (c) 2007-2008 NVIDIA, Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
@@ -41,7 +41,7 @@ G80SorSetPClk(xf86OutputPtr output, int pclk)
const int orOff = 0x800 * pPriv->or;
const int limit = 165000;
- pNv->reg[(0x00614300+orOff)/4] = (pclk > limit) ? 0x101 : 0;
+ pNv->reg[(0x00614300+orOff)/4] = 0x70000 | (pclk > limit ? 0x101 : 0);
}
static void
@@ -69,9 +69,10 @@ G80SorDPMSSet(xf86OutputPtr output, int mode)
static int
G80TMDSModeValid(xf86OutputPtr output, DisplayModePtr mode)
{
- // Disable dual-link modes until I can find a way to make them work
- // reliably.
- if (mode->Clock > 165000)
+ G80Ptr pNv = G80PTR(output->scrn);
+
+ // Disable dual-link modes unless enabled in the config file.
+ if (mode->Clock > 165000 && !pNv->AllowDualLink)
return MODE_CLOCK_HIGH;
return G80OutputModeValid(output, mode);
@@ -142,7 +143,15 @@ G80SorDetect(xf86OutputPtr output)
static xf86OutputStatus
G80SorLVDSDetect(xf86OutputPtr output)
{
- /* Assume LVDS is always connected */
+ G80OutputPrivPtr pPriv = output->driver_private;
+
+ if(pPriv->i2c) {
+ /* If LVDS has an I2C port, use the normal probe routine to get the
+ * EDID, if possible. */
+ G80SorDetect(output);
+ }
+
+ /* Ignore G80SorDetect and assume LVDS is always connected */
return XF86OutputStatusConnected;
}
@@ -241,6 +250,13 @@ static DisplayModePtr
G80SorGetLVDSModes(xf86OutputPtr output)
{
G80OutputPrivPtr pPriv = output->driver_private;
+
+ /* If an EDID was read during detection, use the modes from that. */
+ DisplayModePtr modes = G80OutputGetDDCModes(output);
+ if(modes)
+ return modes;
+
+ /* Otherwise, feed in the mode we read during initialization. */
return xf86DuplicateMode(pPriv->nativeMode);
}
@@ -324,7 +340,6 @@ G80SorSetProperty(xf86OutputPtr output, Atom prop, RRPropertyValuePtr val)
return FALSE;
G80CrtcSetDither(output->crtc, i, TRUE);
- return TRUE;
} else if(prop == properties.scale.atom) {
const char *s;
enum G80ScaleMode oldScale, scale;
@@ -383,10 +398,9 @@ G80SorSetProperty(xf86OutputPtr output, Atom prop, RRPropertyValuePtr val)
return FALSE;
}
}
- return TRUE;
}
- return FALSE;
+ return TRUE;
}
#endif // RANDR_12_INTERFACE
@@ -427,20 +441,20 @@ static const xf86OutputFuncsRec G80SorLVDSOutputFuncs = {
};
static DisplayModePtr
-GetLVDSNativeMode(G80Ptr pNv)
+ReadLVDSNativeMode(G80Ptr pNv, const int off)
{
DisplayModePtr mode = xnfcalloc(1, sizeof(DisplayModeRec));
- const CARD32 size = pNv->reg[0x00610B4C/4];
+ const CARD32 size = pNv->reg[(0x00610B4C+off)/4];
const int width = size & 0x3fff;
const int height = (size >> 16) & 0x3fff;
mode->HDisplay = mode->CrtcHDisplay = width;
mode->VDisplay = mode->CrtcVDisplay = height;
- mode->Clock = pNv->reg[0x610AD4/4] & 0x3fffff;
- mode->CrtcHBlankStart = pNv->reg[0x610AFC/4];
- mode->CrtcHSyncEnd = pNv->reg[0x610B04/4];
- mode->CrtcHBlankEnd = pNv->reg[0x610AE8/4];
- mode->CrtcHTotal = pNv->reg[0x610AF4/4];
+ mode->Clock = pNv->reg[(0x610AD4+off)/4] & 0x3fffff;
+ mode->CrtcHBlankStart = pNv->reg[(0x610AFC+off)/4];
+ mode->CrtcHSyncEnd = pNv->reg[(0x610B04+off)/4];
+ mode->CrtcHBlankEnd = pNv->reg[(0x610AE8+off)/4];
+ mode->CrtcHTotal = pNv->reg[(0x610AF4+off)/4];
mode->next = mode->prev = NULL;
mode->status = MODE_OK;
@@ -451,6 +465,19 @@ GetLVDSNativeMode(G80Ptr pNv)
return mode;
}
+static DisplayModePtr
+GetLVDSNativeMode(G80Ptr pNv)
+{
+ CARD32 val = pNv->reg[0x00610050/4];
+
+ if((val & 3) == 2)
+ return ReadLVDSNativeMode(pNv, 0);
+ else if((val & 0x300) == 0x200)
+ return ReadLVDSNativeMode(pNv, 0x540);
+
+ return NULL;
+}
+
xf86OutputPtr
G80CreateSor(ScrnInfoPtr pScrn, ORNum or, PanelType panelType)
{
@@ -462,11 +489,24 @@ G80CreateSor(ScrnInfoPtr pScrn, ORNum or, PanelType panelType)
const xf86OutputFuncsRec *funcs;
if(!pPriv)
- return FALSE;
+ return NULL;
if(panelType == LVDS) {
strcpy(orName, "LVDS");
funcs = &G80SorLVDSOutputFuncs;
+
+ pPriv->nativeMode = GetLVDSNativeMode(pNv);
+
+ if(!pPriv->nativeMode) {
+ xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+ "Failed to find LVDS native mode\n");
+ xfree(pPriv);
+ return NULL;
+ }
+
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "%s native size %dx%d\n",
+ orName, pPriv->nativeMode->HDisplay,
+ pPriv->nativeMode->VDisplay);
} else {
snprintf(orName, 5, "DVI%d", or);
pNv->reg[(0x61C00C+off)/4] = 0x03010700;
@@ -488,13 +528,5 @@ G80CreateSor(ScrnInfoPtr pScrn, ORNum or, PanelType panelType)
output->interlaceAllowed = TRUE;
output->doubleScanAllowed = TRUE;
- if(panelType == LVDS) {
- pPriv->nativeMode = GetLVDSNativeMode(pNv);
-
- xf86DrvMsg(pScrn->scrnIndex, X_INFO, "%s native size %dx%d\n",
- orName, pPriv->nativeMode->HDisplay,
- pPriv->nativeMode->VDisplay);
- }
-
return output;
}
diff --git a/driver/xf86-video-nv/src/g80_type.h b/driver/xf86-video-nv/src/g80_type.h
index 39d737c28..0cebae794 100644
--- a/driver/xf86-video-nv/src/g80_type.h
+++ b/driver/xf86-video-nv/src/g80_type.h
@@ -1,7 +1,13 @@
#include <xaa.h>
+#include <exa.h>
#include <xf86.h>
#include <xf86int10.h>
#include <xf86Cursor.h>
+#include <xf86DDC.h>
+#include <xf86Crtc.h>
+#include <xf86int10.h>
+
+#define G80_NUM_I2C_PORTS 6
typedef enum Head {
HEAD0 = 0,
@@ -21,7 +27,20 @@ typedef enum ORNum {
SOR1 = 1
} ORNum;
+typedef enum PanelType {
+ TMDS,
+ LVDS,
+} PanelType;
+
+typedef enum AccelMethod {
+ XAA,
+ EXA,
+} AccelMethod;
+
typedef struct G80Rec {
+#if XSERVER_LIBPCIACCESS
+ struct pci_device *pPci;
+#endif
volatile CARD32 * reg;
unsigned char * mem;
@@ -32,15 +51,15 @@ typedef struct G80Rec {
const unsigned char*table1;
int offscreenHeight;
struct {
- ORNum dac;
- ORNum sor;
- } i2cMap[4];
-
- float pclk; /* Current mode pclk in kHz */
-
- Head head;
- ORType orType;
- ORNum or;
+ ORNum dac;
+ ORNum sor;
+ } i2cMap[G80_NUM_I2C_PORTS];
+ struct {
+ Bool present;
+ ORNum or;
+ int i2cPort;
+ } lvds;
+ unsigned loadVal;
xf86Int10InfoPtr int10;
int int10Mode; /* Console mode to restore */
@@ -49,17 +68,18 @@ typedef struct G80Rec {
OptionInfoPtr Options;
Bool HWCursor;
Bool NoAccel;
- DisplayModePtr BackendMode;
-
- /* Cursor */
- xf86CursorInfoPtr CursorInfo;
- Bool cursorVisible;
- CARD32 tmpCursor[256]; /* Temporary 1bpp cursor image */
+ AccelMethod AccelMethod;
+ Bool Dither;
+ Bool AllowDualLink;
/* XAA */
XAAInfoRecPtr xaa;
CARD32 currentRop;
+ /* EXA */
+ ExaDriverPtr exa;
+ ExaOffscreenArea *exaScreenArea;
+
/* DMA command buffer */
CARD32 dmaPut;
CARD32 dmaCurrent;
@@ -68,8 +88,8 @@ typedef struct G80Rec {
CARD32 * dmaBase;
void (*DMAKickoffCallback)(ScrnInfoPtr);
- CloseScreenProcPtr CloseScreen;
- ScreenBlockHandlerProcPtr BlockHandler;
+ CloseScreenProcPtr CloseScreen;
+ ScreenBlockHandlerProcPtr BlockHandler;
} G80Rec, *G80Ptr;
#define G80PTR(p) ((G80Ptr)((p)->driverPrivate))
diff --git a/driver/xf86-video-nv/src/nv_const.h b/driver/xf86-video-nv/src/nv_const.h
index 7a7bdea04..8f9799c0e 100644
--- a/driver/xf86-video-nv/src/nv_const.h
+++ b/driver/xf86-video-nv/src/nv_const.h
@@ -1,5 +1,3 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_const.h,v 1.6 2001/12/07 00:09:55 mvojkovi Exp $ */
-
#ifndef __NV_CONST_H__
#define __NV_CONST_H__
@@ -7,5 +5,21 @@
#define NV_NAME "NV"
#define NV_DRIVER_NAME "nv"
+/* libpciaccess gratuitous API changes */
+#if XSERVER_LIBPCIACCESS
+ #define MEMBASE(p,n) (p)->regions[n].base_addr
+ #define VENDOR_ID(p) (p)->vendor_id
+ #define DEVICE_ID(p) (p)->device_id
+ #define SUBVENDOR_ID(p) (p)->subvendor_id
+ #define SUBDEVICE_ID(p) (p)->subdevice_id
+ #define CHIP_REVISION(p) (p)->revision
+#else
+ #define MEMBASE(p,n) (p)->memBase[n]
+ #define VENDOR_ID(p) (p)->vendor
+ #define DEVICE_ID(p) (p)->chipType
+ #define SUBVENDOR_ID(p) (p)->subsysVendor
+ #define SUBDEVICE_ID(p) (p)->subsysCard
+ #define CHIP_REVISION(p) (p)->chipRev
+#endif
+
#endif /* __NV_CONST_H__ */
-
diff --git a/driver/xf86-video-nv/src/nv_cursor.c b/driver/xf86-video-nv/src/nv_cursor.c
index 453ca52fc..bf5adc0ec 100644
--- a/driver/xf86-video-nv/src/nv_cursor.c
+++ b/driver/xf86-video-nv/src/nv_cursor.c
@@ -1,43 +1,25 @@
- /***************************************************************************\
-|* *|
-|* Copyright 2003 NVIDIA, Corporation. All rights reserved. *|
-|* *|
-|* NOTICE TO USER: The source code is copyrighted under U.S. and *|
-|* international laws. Users and possessors of this source code are *|
-|* hereby granted a nonexclusive, royalty-free copyright license to *|
-|* use this code in individual and commercial software. *|
-|* *|
-|* Any use of this source code must include, in the user documenta- *|
-|* tion and internal comments to the code, notices to the end user *|
-|* as follows: *|
-|* *|
-|* Copyright 2003 NVIDIA, Corporation. All rights reserved. *|
-|* *|
-|* NVIDIA, CORPORATION MAKES NO REPRESENTATION ABOUT THE SUITABILITY *|
-|* OF THIS SOURCE CODE FOR ANY PURPOSE. IT IS PROVIDED "AS IS" *|
-|* WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND. NVIDIA, CORPOR- *|
-|* ATION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOURCE CODE, *|
-|* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGE- *|
-|* MENT, AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL *|
-|* NVIDIA, CORPORATION BE LIABLE FOR ANY SPECIAL, INDIRECT, INCI- *|
-|* DENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RE- *|
-|* SULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION *|
-|* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF *|
-|* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOURCE CODE. *|
-|* *|
-|* U.S. Government End Users. This source code is a "commercial *|
-|* item," as that term is defined at 48 C.F.R. 2.101 (OCT 1995), *|
-|* consisting of "commercial computer software" and "commercial *|
-|* computer software documentation," as such terms are used in *|
-|* 48 C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Govern- *|
-|* ment only as a commercial end item. Consistent with 48 C.F.R. *|
-|* 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), *|
-|* all U.S. Government End Users acquire the source code with only *|
-|* those rights set forth herein. *|
-|* *|
- \***************************************************************************/
-
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_cursor.c,v 1.13 2004/03/13 22:07:05 mvojkovi Exp $ */
+/*
+ * Copyright (c) 2003 NVIDIA, Corporation
+ *
+ * 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 the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, 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 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 NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 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.
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -137,18 +119,18 @@ TransformCursor (NVPtr pNv)
/* convert to color cursor */
if(pNv->alphaCursor) {
dwords = 64 * 64;
- if(!(tmp = ALLOCATE_LOCAL(dwords * 4))) return;
+ if(!(tmp = Xcalloc(dwords * 4))) return;
ConvertCursor8888(pNv, pNv->curImage, tmp);
} else {
dwords = (32 * 32) >> 1;
- if(!(tmp = ALLOCATE_LOCAL(dwords * 4))) return;
+ if(!(tmp = Xcalloc(dwords * 4))) return;
ConvertCursor1555(pNv, pNv->curImage, (CARD16*)tmp);
}
for(i = 0; i < dwords; i++)
pNv->CURSOR[i] = tmp[i];
- DEALLOCATE_LOCAL(tmp);
+ xfree(tmp);
}
static void
diff --git a/driver/xf86-video-nv/src/nv_dac.c b/driver/xf86-video-nv/src/nv_dac.c
index 3fb687fe1..b1049cce1 100644
--- a/driver/xf86-video-nv/src/nv_dac.c
+++ b/driver/xf86-video-nv/src/nv_dac.c
@@ -1,43 +1,25 @@
- /***************************************************************************\
-|* *|
-|* Copyright 2003 NVIDIA, Corporation. All rights reserved. *|
-|* *|
-|* NOTICE TO USER: The source code is copyrighted under U.S. and *|
-|* international laws. Users and possessors of this source code are *|
-|* hereby granted a nonexclusive, royalty-free copyright license to *|
-|* use this code in individual and commercial software. *|
-|* *|
-|* Any use of this source code must include, in the user documenta- *|
-|* tion and internal comments to the code, notices to the end user *|
-|* as follows: *|
-|* *|
-|* Copyright 2003 NVIDIA, Corporation. All rights reserved. *|
-|* *|
-|* NVIDIA, CORPORATION MAKES NO REPRESENTATION ABOUT THE SUITABILITY *|
-|* OF THIS SOURCE CODE FOR ANY PURPOSE. IT IS PROVIDED "AS IS" *|
-|* WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND. NVIDIA, CORPOR- *|
-|* ATION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOURCE CODE, *|
-|* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGE- *|
-|* MENT, AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL *|
-|* NVIDIA, CORPORATION BE LIABLE FOR ANY SPECIAL, INDIRECT, INCI- *|
-|* DENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RE- *|
-|* SULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION *|
-|* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF *|
-|* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOURCE CODE. *|
-|* *|
-|* U.S. Government End Users. This source code is a "commercial *|
-|* item," as that term is defined at 48 C.F.R. 2.101 (OCT 1995), *|
-|* consisting of "commercial computer software" and "commercial *|
-|* computer software documentation," as such terms are used in *|
-|* 48 C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Govern- *|
-|* ment only as a commercial end item. Consistent with 48 C.F.R. *|
-|* 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), *|
-|* all U.S. Government End Users acquire the source code with only *|
-|* those rights set forth herein. *|
-|* *|
- \***************************************************************************/
-
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_dac.c,v 1.45 2005/07/09 00:53:00 mvojkovi Exp $ */
+/*
+ * Copyright (c) 2007 NVIDIA, Corporation
+ *
+ * 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 the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, 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 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 NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 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.
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -118,7 +100,9 @@ NVDACInit(ScrnInfoPtr pScrn, DisplayModePtr mode)
vertBlankStart = vertStart;
horizStart = horizTotal - 5;
horizEnd = horizTotal - 2;
- horizBlankEnd = horizTotal + 4;
+ horizBlankEnd = horizTotal + 4;
+ if(pNv->Architecture == NV_ARCH_30)
+ horizTotal += 2;
}
pVga->CRTC[0x0] = Set8Bits(horizTotal);
@@ -221,6 +205,7 @@ NVDACInit(ScrnInfoPtr pScrn, DisplayModePtr mode)
}
nvReg->crtcSync = pNv->PRAMDAC[0x0828/4];
nvReg->crtcSync += NVDACPanelTweaks(pNv, nvReg);
+ nvReg->crtcVSync = pNv->fpVTotal - 6;
}
nvReg->vpll = nvReg->pll;
@@ -430,4 +415,3 @@ NVDACi2cInit(ScrnInfoPtr pScrn)
}
return TRUE;
}
-
diff --git a/driver/xf86-video-nv/src/nv_dma.h b/driver/xf86-video-nv/src/nv_dma.h
index ca0bf1b12..fbd72e15a 100644
--- a/driver/xf86-video-nv/src/nv_dma.h
+++ b/driver/xf86-video-nv/src/nv_dma.h
@@ -1,44 +1,25 @@
-
- /***************************************************************************\
-|* *|
-|* Copyright 2003 NVIDIA, Corporation. All rights reserved. *|
-|* *|
-|* NOTICE TO USER: The source code is copyrighted under U.S. and *|
-|* international laws. Users and possessors of this source code are *|
-|* hereby granted a nonexclusive, royalty-free copyright license to *|
-|* use this code in individual and commercial software. *|
-|* *|
-|* Any use of this source code must include, in the user documenta- *|
-|* tion and internal comments to the code, notices to the end user *|
-|* as follows: *|
-|* *|
-|* Copyright 2003 NVIDIA, Corporation. All rights reserved. *|
-|* *|
-|* NVIDIA, CORPORATION MAKES NO REPRESENTATION ABOUT THE SUITABILITY *|
-|* OF THIS SOURCE CODE FOR ANY PURPOSE. IT IS PROVIDED "AS IS" *|
-|* WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND. NVIDIA, CORPOR- *|
-|* ATION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOURCE CODE, *|
-|* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGE- *|
-|* MENT, AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL *|
-|* NVIDIA, CORPORATION BE LIABLE FOR ANY SPECIAL, INDIRECT, INCI- *|
-|* DENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RE- *|
-|* SULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION *|
-|* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF *|
-|* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOURCE CODE. *|
-|* *|
-|* U.S. Government End Users. This source code is a "commercial *|
-|* item," as that term is defined at 48 C.F.R. 2.101 (OCT 1995), *|
-|* consisting of "commercial computer software" and "commercial *|
-|* computer software documentation," as such terms are used in *|
-|* 48 C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Govern- *|
-|* ment only as a commercial end item. Consistent with 48 C.F.R. *|
-|* 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), *|
-|* all U.S. Government End Users acquire the source code with only *|
-|* those rights set forth herein. *|
-|* *|
- \***************************************************************************/
-
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_dma.h,v 1.4 2004/03/20 01:52:16 mvojkovi Exp $ */
+/*
+ * Copyright (c) 2003 NVIDIA, Corporation
+ *
+ * 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 the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, 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 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 NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 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.
+ */
#define SURFACE_FORMAT 0x00000300
#define SURFACE_FORMAT_DEPTH8 0x00000001
diff --git a/driver/xf86-video-nv/src/nv_driver.c b/driver/xf86-video-nv/src/nv_driver.c
index 265979e51..62aef769e 100644
--- a/driver/xf86-video-nv/src/nv_driver.c
+++ b/driver/xf86-video-nv/src/nv_driver.c
@@ -113,7 +113,7 @@ _X_EXPORT DriverRec NV = {
#endif
};
-/* Known cards as of 2007/07/24 */
+/* Known cards as of 2008/06/16 */
static SymTabRec NVKnownChipsets[] =
{
@@ -361,9 +361,12 @@ static SymTabRec NVKnownChipsets[] =
{ 0x10DE019D, "Quadro FX 5600" },
{ 0x10DE019E, "Quadro FX 4600" },
{ 0x10DE0400, "GeForce 8600 GTS" },
+ { 0x10DE0401, "GeForce 8600 GT" },
{ 0x10DE0402, "GeForce 8600 GT" },
{ 0x10DE0404, "GeForce 8400 GS" },
+ { 0x10DE0405, "GeForce 9500M GS" },
{ 0x10DE0407, "GeForce 8600M GT" },
+ { 0x10DE0408, "GeForce 9650M GS" },
{ 0x10DE0409, "GeForce 8700M GT" },
{ 0x10DE040A, "Quadro FX 370" },
{ 0x10DE040B, "Quadro NVS 320M" },
@@ -371,9 +374,11 @@ static SymTabRec NVKnownChipsets[] =
{ 0x10DE040D, "Quadro FX 1600M" },
{ 0x10DE040E, "Quadro FX 570" },
{ 0x10DE040F, "Quadro FX 1700" },
+ { 0x10DE0420, "GeForce 8400 SE" },
{ 0x10DE0421, "GeForce 8500 GT" },
{ 0x10DE0422, "GeForce 8400 GS" },
{ 0x10DE0423, "GeForce 8300 GS" },
+ { 0x10DE0424, "GeForce 8400 GS" },
{ 0x10DE0425, "GeForce 8600M GS" },
{ 0x10DE0426, "GeForce 8400M GT" },
{ 0x10DE0427, "GeForce 8400M GS" },
@@ -762,26 +767,26 @@ NVIsSupported(CARD32 id)
/* look for a compatible devices which may be newer than
the NVKnownChipsets list above. */
switch(id & 0xfff0) {
- case 0x0170:
- case 0x0180:
- case 0x0250:
- case 0x0280:
- case 0x0300:
- case 0x0310:
- case 0x0320:
- case 0x0330:
- case 0x0340:
case 0x0040:
+ case 0x0090:
case 0x00C0:
case 0x0120:
case 0x0140:
case 0x0160:
+ case 0x0170:
+ case 0x0180:
case 0x01D0:
- case 0x0090:
case 0x0210:
case 0x0220:
case 0x0240:
+ case 0x0250:
+ case 0x0280:
case 0x0290:
+ case 0x0300:
+ case 0x0310:
+ case 0x0320:
+ case 0x0330:
+ case 0x0340:
case 0x0390:
case 0x03D0:
return TRUE;
@@ -938,7 +943,7 @@ NVSwitchMode(int scrnIndex, DisplayModePtr mode, int flags)
return NVModeInit(pScrn, mode);
}
-Bool
+static Bool
NVSwitchModeVBE(int scrnIndex, DisplayModePtr mode, int flags)
{
ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
@@ -1218,7 +1223,7 @@ NVModesAdd(DisplayModePtr Modes, DisplayModePtr Additions)
}
/* Mandatory */
-Bool
+static Bool
NVPreInit(ScrnInfoPtr pScrn, int flags)
{
NVPtr pNv;
@@ -2002,7 +2007,7 @@ NVMapMem(ScrnInfoPtr pScrn)
return TRUE;
}
-Bool
+static Bool
NVMapMemFBDev(ScrnInfoPtr pScrn)
{
NVPtr pNv;
@@ -2134,8 +2139,10 @@ NVRestore(ScrnInfoPtr pScrn)
NVPtr pNv = NVPTR(pScrn);
NVRegPtr nvReg = &pNv->SavedReg;
- if(pNv->HWCursor)
+ if(pNv->HWCursor) {
NVShowHideCursor(pNv, 0);
+ sleep(1);
+ }
NVLockUnlock(pNv, 0);
if(pNv->twoHeads) {
@@ -2178,8 +2185,17 @@ static void NVBacklightEnable(NVPtr pNv, Bool on)
#endif
if(pNv->LVDS) {
- if(pNv->twoHeads && ((pNv->Chipset & 0x0ff0) != 0x0110)) {
- pNv->PMC[0x130C/4] = on ? 3 : 7;
+ if(pNv->twoHeads) {
+ if((pNv->Chipset & 0x0ff0) != 0x0110) {
+ pNv->PMC[0x130C/4] = on ? 3 : 7;
+ } else if(SUBVENDOR_ID(pNv->PciInfo) == 0x1028 &&
+ SUBDEVICE_ID(pNv->PciInfo) == 0xd4) {
+ // Dell Inspiron 8200, GeForce2 Go
+ CARD32 tmp_pcrt = pNv->PCRTC0[0x081C/4] & 0xFFFFFFFC;
+ if(on)
+ tmp_pcrt |= 0x1;
+ pNv->PCRTC0[0x081C/4] = tmp_pcrt;
+ }
}
} else {
CARD32 fpcontrol;
diff --git a/driver/xf86-video-nv/src/nv_hw.c b/driver/xf86-video-nv/src/nv_hw.c
index ab703f164..ecac28f51 100644
--- a/driver/xf86-video-nv/src/nv_hw.c
+++ b/driver/xf86-video-nv/src/nv_hw.c
@@ -1,42 +1,25 @@
- /***************************************************************************\
-|* *|
-|* Copyright 1993-2003 NVIDIA, Corporation. All rights reserved. *|
-|* *|
-|* NOTICE TO USER: The source code is copyrighted under U.S. and *|
-|* international laws. Users and possessors of this source code are *|
-|* hereby granted a nonexclusive, royalty-free copyright license to *|
-|* use this code in individual and commercial software. *|
-|* *|
-|* Any use of this source code must include, in the user documenta- *|
-|* tion and internal comments to the code, notices to the end user *|
-|* as follows: *|
-|* *|
-|* Copyright 1993-2003 NVIDIA, Corporation. All rights reserved. *|
-|* *|
-|* NVIDIA, CORPORATION MAKES NO REPRESENTATION ABOUT THE SUITABILITY *|
-|* OF THIS SOURCE CODE FOR ANY PURPOSE. IT IS PROVIDED "AS IS" *|
-|* WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND. NVIDIA, CORPOR- *|
-|* ATION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOURCE CODE, *|
-|* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGE- *|
-|* MENT, AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL *|
-|* NVIDIA, CORPORATION BE LIABLE FOR ANY SPECIAL, INDIRECT, INCI- *|
-|* DENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RE- *|
-|* SULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION *|
-|* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF *|
-|* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOURCE CODE. *|
-|* *|
-|* U.S. Government End Users. This source code is a "commercial *|
-|* item," as that term is defined at 48 C.F.R. 2.101 (OCT 1995), *|
-|* consisting of "commercial computer software" and "commercial *|
-|* computer software documentation," as such terms are used in *|
-|* 48 C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Govern- *|
-|* ment only as a commercial end item. Consistent with 48 C.F.R. *|
-|* 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), *|
-|* all U.S. Government End Users acquire the source code with only *|
-|* those rights set forth herein. *|
-|* *|
- \***************************************************************************/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_hw.c,v 1.21 2006/06/16 00:19:33 mvojkovi Exp $ */
+/*
+ * Copyright (c) 1993-2003 NVIDIA, Corporation
+ *
+ * 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 the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, 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 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 NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 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.
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -678,6 +661,16 @@ static void nForceUpdateArbitrationSettings (
NVPtr pNv
)
{
+#if XSERVER_LIBPCIACCESS
+ struct pci_device *const dev1 = pci_device_find_by_slot(0, 0, 0, 1);
+ struct pci_device *const dev2 = pci_device_find_by_slot(0, 0, 0, 2);
+ struct pci_device *const dev3 = pci_device_find_by_slot(0, 0, 0, 3);
+ struct pci_device *const dev5 = pci_device_find_by_slot(0, 0, 0, 5);
+ uint32_t tmp;
+ #define READ_LONG(num, offset) ({ pci_device_cfg_read_u32(dev##num, &tmp, (offset)); tmp; })
+#else
+ #define READ_LONG(num, offset) pciReadLong(pciTag(0, 0, num), (offset))
+#endif
nv10_fifo_info fifo_data;
nv10_sim_state sim_data;
unsigned int M, N, P, pll, MClk, NVClk, memctrl;
@@ -685,11 +678,11 @@ static void nForceUpdateArbitrationSettings (
if((pNv->Chipset & 0x0FF0) == 0x01A0) {
unsigned int uMClkPostDiv;
- uMClkPostDiv = (pciReadLong(pciTag(0, 0, 3), 0x6C) >> 8) & 0xf;
+ uMClkPostDiv = (READ_LONG(3, 0x6C) >> 8) & 0xf;
if(!uMClkPostDiv) uMClkPostDiv = 4;
MClk = 400000 / uMClkPostDiv;
} else {
- MClk = pciReadLong(pciTag(0, 0, 5), 0x4C) / 1000;
+ MClk = READ_LONG(5, 0x4C) / 1000;
}
pll = pNv->PRAMDAC0[0x0500/4];
@@ -698,17 +691,17 @@ static void nForceUpdateArbitrationSettings (
sim_data.pix_bpp = (char)pixelDepth;
sim_data.enable_video = 0;
sim_data.enable_mp = 0;
- sim_data.memory_type = (pciReadLong(pciTag(0, 0, 1), 0x7C) >> 12) & 1;
+ sim_data.memory_type = (READ_LONG(1, 0x7C) >> 12) & 1;
sim_data.memory_width = 64;
- memctrl = pciReadLong(pciTag(0, 0, 3), 0x00) >> 16;
+ memctrl = READ_LONG(3, 0x00) >> 16;
if((memctrl == 0x1A9) || (memctrl == 0x1AB) || (memctrl == 0x1ED)) {
int dimm[3];
- dimm[0] = (pciReadLong(pciTag(0, 0, 2), 0x40) >> 8) & 0x4F;
- dimm[1] = (pciReadLong(pciTag(0, 0, 2), 0x44) >> 8) & 0x4F;
- dimm[2] = (pciReadLong(pciTag(0, 0, 2), 0x48) >> 8) & 0x4F;
+ dimm[0] = (READ_LONG(2, 0x40) >> 8) & 0x4F;
+ dimm[1] = (READ_LONG(2, 0x44) >> 8) & 0x4F;
+ dimm[2] = (READ_LONG(2, 0x48) >> 8) & 0x4F;
if((dimm[0] + dimm[1]) != dimm[2]) {
ErrorF("WARNING: "
@@ -731,6 +724,8 @@ static void nForceUpdateArbitrationSettings (
while (b >>= 1) (*burst)++;
*lwm = fifo_data.graphics_lwm >> 3;
}
+
+#undef READ_LONG
}
@@ -844,7 +839,7 @@ void NVCalcStateExt (
int flags
)
{
- int pixelDepth, VClk;
+ int pixelDepth, VClk = 0;
/*
* Save mode parameters.
*/
@@ -878,6 +873,10 @@ void NVCalcStateExt (
state->general = bpp == 16 ? 0x00101100 : 0x00100100;
state->repaint1 = hDisplaySize < 1280 ? 0x04 : 0x00;
break;
+ case NV_ARCH_40:
+ if(!pNv->FlatPanel)
+ state->control = pNv->PRAMDAC0[0x0580/4] & 0xeffffeff;
+ /* fallthrough */
case NV_ARCH_10:
case NV_ARCH_20:
case NV_ARCH_30:
@@ -944,7 +943,8 @@ void NVLoadStateExt (
pNv->PTIMER[0x0100] = 0xFFFFFFFF;
if(pNv->Architecture == NV_ARCH_04) {
- pNv->PFB[0x0200/4] = state->config;
+ if (state)
+ pNv->PFB[0x0200/4] = state->config;
} else
if((pNv->Architecture < NV_ARCH_40) ||
((pNv->Chipset & 0xfff0) == 0x0040))
@@ -1186,6 +1186,7 @@ void NVLoadStateExt (
pNv->PGRAPH[0x008C/4] = 0x60de8051;
pNv->PGRAPH[0x0090/4] = 0x00008000;
pNv->PGRAPH[0x0610/4] = 0x00be3c5f;
+ pNv->PGRAPH[0x0bc4/4] |= 0x00008000;
j = pNv->REGS[0x1540/4] & 0xff;
if(j) {
@@ -1406,6 +1407,11 @@ void NVLoadStateExt (
pNv->PFIFO[0x0495] = 0x00000001;
pNv->PFIFO[0x0140] = 0x00000001;
+ if(!state) {
+ pNv->CurrentState = NULL;
+ return;
+ }
+
if(pNv->Architecture >= NV_ARCH_10) {
if(pNv->twoHeads) {
pNv->PCRTC0[0x0860/4] = state->head;
@@ -1475,6 +1481,10 @@ void NVLoadStateExt (
VGA_WR08(pNv->PCIO, 0x03D5, state->interlace);
if(!pNv->FlatPanel) {
+ if(pNv->Architecture >= NV_ARCH_40) {
+ pNv->PRAMDAC0[0x0580/4] = state->control;
+ }
+
pNv->PRAMDAC0[0x050C/4] = state->pllsel;
pNv->PRAMDAC0[0x0508/4] = state->vpll;
if(pNv->twoHeads)
@@ -1486,6 +1496,7 @@ void NVLoadStateExt (
} else {
pNv->PRAMDAC[0x0848/4] = state->scale;
pNv->PRAMDAC[0x0828/4] = state->crtcSync;
+ pNv->PRAMDAC[0x0808/4] = state->crtcVSync;
}
pNv->PRAMDAC[0x0600/4] = state->general;
@@ -1541,6 +1552,10 @@ void NVUnloadStateExt
state->scale = pNv->PRAMDAC[0x0848/4];
state->config = pNv->PFB[0x0200/4];
+ if(pNv->Architecture >= NV_ARCH_40 && !pNv->FlatPanel) {
+ state->control = pNv->PRAMDAC0[0x0580/4];
+ }
+
if(pNv->Architecture >= NV_ARCH_10) {
if(pNv->twoHeads) {
state->head = pNv->PCRTC0[0x0860/4];
@@ -1569,6 +1584,7 @@ void NVUnloadStateExt
if(pNv->FlatPanel) {
state->crtcSync = pNv->PRAMDAC[0x0828/4];
+ state->crtcVSync = pNv->PRAMDAC[0x0808/4];
}
}
@@ -1577,7 +1593,10 @@ void NVSetStartAddress (
CARD32 start
)
{
- pNv->PCRTC[0x800/4] = start;
+ if (pNv->VBEDualhead) {
+ pNv->PCRTC0[0x800/4] = start;
+ pNv->PCRTC0[0x2800/4] = start + pNv->vbeCRTC1Offset;
+ } else {
+ pNv->PCRTC[0x800/4] = start;
+ }
}
-
-
diff --git a/driver/xf86-video-nv/src/nv_local.h b/driver/xf86-video-nv/src/nv_local.h
index 6cb026401..a0b5e41c1 100644
--- a/driver/xf86-video-nv/src/nv_local.h
+++ b/driver/xf86-video-nv/src/nv_local.h
@@ -1,42 +1,25 @@
- /***************************************************************************\
-|* *|
-|* Copyright 1993-2003 NVIDIA, Corporation. All rights reserved. *|
-|* *|
-|* NOTICE TO USER: The source code is copyrighted under U.S. and *|
-|* international laws. Users and possessors of this source code are *|
-|* hereby granted a nonexclusive, royalty-free copyright license to *|
-|* use this code in individual and commercial software. *|
-|* *|
-|* Any use of this source code must include, in the user documenta- *|
-|* tion and internal comments to the code, notices to the end user *|
-|* as follows: *|
-|* *|
-|* Copyright 1993-1999 NVIDIA, Corporation. All rights reserved. *|
-|* *|
-|* NVIDIA, CORPORATION MAKES NO REPRESENTATION ABOUT THE SUITABILITY *|
-|* OF THIS SOURCE CODE FOR ANY PURPOSE. IT IS PROVIDED "AS IS" *|
-|* WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND. NVIDIA, CORPOR- *|
-|* ATION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOURCE CODE, *|
-|* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGE- *|
-|* MENT, AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL *|
-|* NVIDIA, CORPORATION BE LIABLE FOR ANY SPECIAL, INDIRECT, INCI- *|
-|* DENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RE- *|
-|* SULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION *|
-|* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF *|
-|* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOURCE CODE. *|
-|* *|
-|* U.S. Government End Users. This source code is a "commercial *|
-|* item," as that term is defined at 48 C.F.R. 2.101 (OCT 1995), *|
-|* consisting of "commercial computer software" and "commercial *|
-|* computer software documentation," as such terms are used in *|
-|* 48 C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Govern- *|
-|* ment only as a commercial end item. Consistent with 48 C.F.R. *|
-|* 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), *|
-|* all U.S. Government End Users acquire the source code with only *|
-|* those rights set forth herein. *|
-|* *|
- \***************************************************************************/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_local.h,v 1.8tsi Exp $ */
+/*
+ * Copyright (c) 1993-2003 NVIDIA, Corporation
+ *
+ * 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 the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, 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 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 NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 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.
+ */
#ifndef __NV_LOCAL_H__
#define __NV_LOCAL_H__
@@ -46,9 +29,6 @@
* HW. Put all affected includes, typdefs, etc. here so the riva_hw.* files
* can stay generic in nature.
*/
-#if USE_LIBC_WRAPPER
-#include "xf86_ansic.h"
-#endif
#include "compiler.h"
#include "xf86_OSproc.h"
diff --git a/driver/xf86-video-nv/src/nv_setup.c b/driver/xf86-video-nv/src/nv_setup.c
index c7a0e86c9..b057da15f 100644
--- a/driver/xf86-video-nv/src/nv_setup.c
+++ b/driver/xf86-video-nv/src/nv_setup.c
@@ -1,43 +1,25 @@
- /***************************************************************************\
-|* *|
-|* Copyright 2003 NVIDIA, Corporation. All rights reserved. *|
-|* *|
-|* NOTICE TO USER: The source code is copyrighted under U.S. and *|
-|* international laws. Users and possessors of this source code are *|
-|* hereby granted a nonexclusive, royalty-free copyright license to *|
-|* use this code in individual and commercial software. *|
-|* *|
-|* Any use of this source code must include, in the user documenta- *|
-|* tion and internal comments to the code, notices to the end user *|
-|* as follows: *|
-|* *|
-|* Copyright 2003 NVIDIA, Corporation. All rights reserved. *|
-|* *|
-|* NVIDIA, CORPORATION MAKES NO REPRESENTATION ABOUT THE SUITABILITY *|
-|* OF THIS SOURCE CODE FOR ANY PURPOSE. IT IS PROVIDED "AS IS" *|
-|* WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND. NVIDIA, CORPOR- *|
-|* ATION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOURCE CODE, *|
-|* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGE- *|
-|* MENT, AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL *|
-|* NVIDIA, CORPORATION BE LIABLE FOR ANY SPECIAL, INDIRECT, INCI- *|
-|* DENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RE- *|
-|* SULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION *|
-|* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF *|
-|* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOURCE CODE. *|
-|* *|
-|* U.S. Government End Users. This source code is a "commercial *|
-|* item," as that term is defined at 48 C.F.R. 2.101 (OCT 1995), *|
-|* consisting of "commercial computer software" and "commercial *|
-|* computer software documentation," as such terms are used in *|
-|* 48 C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Govern- *|
-|* ment only as a commercial end item. Consistent with 48 C.F.R. *|
-|* 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), *|
-|* all U.S. Government End Users acquire the source code with only *|
-|* those rights set forth herein. *|
-|* *|
- \***************************************************************************/
-
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_setup.c,v 1.48 2005/09/14 02:28:03 mvojkovi Exp $ */
+/*
+ * Copyright (c) 2003 NVIDIA, Corporation
+ *
+ * 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 the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, 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 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 NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 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.
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -174,14 +156,17 @@ NVIsConnected (ScrnInfoPtr pScrn, int output)
{
NVPtr pNv = NVPTR(pScrn);
volatile U032 *PRAMDAC = pNv->PRAMDAC0;
- CARD32 reg52C, reg608;
+ CARD32 reg52C, reg608, dac0_reg608 = 0;
Bool present;
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"Probing for analog device on output %s...\n",
output ? "B" : "A");
- if(output) PRAMDAC += 0x800;
+ if(output) {
+ dac0_reg608 = PRAMDAC[0x0608/4];
+ PRAMDAC += 0x800;
+ }
reg52C = PRAMDAC[0x052C/4];
reg608 = PRAMDAC[0x0608/4];
@@ -204,7 +189,8 @@ NVIsConnected (ScrnInfoPtr pScrn, int output)
else
xf86DrvMsg(pScrn->scrnIndex, X_PROBED, " ...can't find one\n");
- pNv->PRAMDAC0[0x0608/4] &= 0x0000EFFF;
+ if(output)
+ pNv->PRAMDAC0[0x0608/4] = dac0_reg608;
PRAMDAC[0x052C/4] = reg52C;
PRAMDAC[0x0608/4] = reg608;
@@ -296,6 +282,24 @@ static void nv10GetConfig (NVPtr pNv)
}
#endif
+#if XSERVER_LIBPCIACCESS
+ {
+ /* [AGP]: I don't know if this is correct */
+ struct pci_device *dev = pci_device_find_by_slot(0, 0, 0, 1);
+
+ if(implementation == 0x01a0) {
+ uint32_t amt;
+ pci_device_cfg_read_u32(dev, &amt, 0x7C);
+ pNv->RamAmountKBytes = (((amt >> 6) & 31) + 1) * 1024;
+ } else if(implementation == 0x01f0) {
+ uint32_t amt;
+ pci_device_cfg_read_u32(dev, &amt, 0x84);
+ pNv->RamAmountKBytes = (((amt >> 4) & 127) + 1) * 1024;
+ } else {
+ pNv->RamAmountKBytes = (pNv->PFB[0x020C/4] & 0xFFF00000) >> 10;
+ }
+ }
+#else
if(implementation == 0x01a0) {
int amt = pciReadLong(pciTag(0, 0, 1), 0x7C);
pNv->RamAmountKBytes = (((amt >> 6) & 31) + 1) * 1024;
@@ -305,6 +309,7 @@ static void nv10GetConfig (NVPtr pNv)
} else {
pNv->RamAmountKBytes = (pNv->PFB[0x020C/4] & 0xFFF00000) >> 10;
}
+#endif
if(pNv->RamAmountKBytes > 256*1024)
pNv->RamAmountKBytes = 256*1024;
@@ -335,6 +340,7 @@ NVCommonSetup(ScrnInfoPtr pScrn)
Bool tvB = FALSE;
int FlatPanel = -1; /* really means the CRTC is slaved */
Bool Television = FALSE;
+ void *tmp;
/*
* Override VGA I/O routines.
@@ -363,10 +369,15 @@ NVCommonSetup(ScrnInfoPtr pScrn)
*/
pVga->MMIOBase = (CARD8 *)pNv;
pVga->MMIOOffset = 0;
-
- pNv->REGS = xf86MapPciMem(pScrn->scrnIndex,
- VIDMEM_MMIO | VIDMEM_READSIDEEFFECT,
- pNv->PciTag, pNv->IOAddress, 0x01000000);
+
+#if XSERVER_LIBPCIACCESS
+ pci_device_map_range(pNv->PciInfo, pNv->IOAddress, 0x01000000,
+ PCI_DEV_MAP_FLAG_WRITABLE, &tmp);
+#else
+ tmp = xf86MapPciMem(pScrn->scrnIndex, VIDMEM_MMIO | VIDMEM_READSIDEEFFECT,
+ pNv->PciTag, pNv->IOAddress, 0x01000000);
+#endif
+ pNv->REGS = tmp;
pNv->PRAMIN = pNv->REGS + (0x00710000/4);
pNv->PCRTC0 = pNv->REGS + (0x00600000/4);
@@ -683,9 +694,14 @@ NVCommonSetup(ScrnInfoPtr pScrn)
if(pNv->FlatPanel && !pNv->Television) {
pNv->fpWidth = pNv->PRAMDAC[0x0820/4] + 1;
pNv->fpHeight = pNv->PRAMDAC[0x0800/4] + 1;
+ pNv->fpVTotal = pNv->PRAMDAC[0x804/4] + 1;
pNv->fpSyncs = pNv->PRAMDAC[0x0848/4] & 0x30000033;
xf86DrvMsg(pScrn->scrnIndex, X_PROBED, "Panel size is %i x %i\n",
pNv->fpWidth, pNv->fpHeight);
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "NOTE: This driver cannot "
+ "reconfigure the BIOS-programmed size.\n");
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "These dimensions will be used as "
+ "the panel size for mode validation.\n");
}
if(monitorA)
@@ -703,4 +719,3 @@ NVCommonSetup(ScrnInfoPtr pScrn)
pNv->LVDS ? "LVDS" : "TMDS");
}
}
-
diff --git a/driver/xf86-video-nv/src/nv_xaa.c b/driver/xf86-video-nv/src/nv_xaa.c
index 2504882b7..b29bf381f 100644
--- a/driver/xf86-video-nv/src/nv_xaa.c
+++ b/driver/xf86-video-nv/src/nv_xaa.c
@@ -1,43 +1,25 @@
- /***************************************************************************\
-|* *|
-|* Copyright 2003 NVIDIA, Corporation. All rights reserved. *|
-|* *|
-|* NOTICE TO USER: The source code is copyrighted under U.S. and *|
-|* international laws. Users and possessors of this source code are *|
-|* hereby granted a nonexclusive, royalty-free copyright license to *|
-|* use this code in individual and commercial software. *|
-|* *|
-|* Any use of this source code must include, in the user documenta- *|
-|* tion and internal comments to the code, notices to the end user *|
-|* as follows: *|
-|* *|
-|* Copyright 2003 NVIDIA, Corporation. All rights reserved. *|
-|* *|
-|* NVIDIA, CORPORATION MAKES NO REPRESENTATION ABOUT THE SUITABILITY *|
-|* OF THIS SOURCE CODE FOR ANY PURPOSE. IT IS PROVIDED "AS IS" *|
-|* WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND. NVIDIA, CORPOR- *|
-|* ATION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOURCE CODE, *|
-|* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGE- *|
-|* MENT, AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL *|
-|* NVIDIA, CORPORATION BE LIABLE FOR ANY SPECIAL, INDIRECT, INCI- *|
-|* DENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RE- *|
-|* SULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION *|
-|* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF *|
-|* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOURCE CODE. *|
-|* *|
-|* U.S. Government End Users. This source code is a "commercial *|
-|* item," as that term is defined at 48 C.F.R. 2.101 (OCT 1995), *|
-|* consisting of "commercial computer software" and "commercial *|
-|* computer software documentation," as such terms are used in *|
-|* 48 C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Govern- *|
-|* ment only as a commercial end item. Consistent with 48 C.F.R. *|
-|* 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), *|
-|* all U.S. Government End Users acquire the source code with only *|
-|* those rights set forth herein. *|
-|* *|
- \***************************************************************************/
-
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_xaa.c,v 1.35 2004/03/20 16:25:18 mvojkovi Exp $ */
+/*
+ * Copyright (c) 2003 NVIDIA, Corporation
+ *
+ * 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 the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, 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 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 NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 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.
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -729,4 +711,3 @@ NVAccelInit(ScreenPtr pScreen)
return (XAAInit(pScreen, accel));
}
-
diff --git a/driver/xf86-video-nv/src/riva_cursor.c b/driver/xf86-video-nv/src/riva_cursor.c
index 9c9c26779..35d6a58af 100644
--- a/driver/xf86-video-nv/src/riva_cursor.c
+++ b/driver/xf86-video-nv/src/riva_cursor.c
@@ -23,8 +23,6 @@
/* Rewritten with reference from mga driver and 3.3.4 NVIDIA driver by
Jarno Paananen <jpaana@s2.org> */
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/riva_cursor.c $ */
-
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
@@ -74,13 +72,13 @@ RivaTransformCursor (RivaPtr pRiva)
int i, dwords;
dwords = (32 * 32) >> 1;
- if(!(tmp = ALLOCATE_LOCAL(dwords * 4))) return;
+ if(!(tmp = Xcalloc(dwords * 4))) return;
RivaConvertCursor1555(pRiva, pRiva->curImage, (CARD16*)tmp);
for(i = 0; i < dwords; i++)
pRiva->riva.CURSOR[i] = tmp[i];
- DEALLOCATE_LOCAL(tmp);
+ xfree(tmp);
}
static void
diff --git a/driver/xf86-video-nv/src/riva_hw.c b/driver/xf86-video-nv/src/riva_hw.c
index 1b8926467..c178eacfe 100644
--- a/driver/xf86-video-nv/src/riva_hw.c
+++ b/driver/xf86-video-nv/src/riva_hw.c
@@ -1,42 +1,25 @@
- /***************************************************************************\
-|* *|
-|* Copyright 1993-1999 NVIDIA, Corporation. All rights reserved. *|
-|* *|
-|* NOTICE TO USER: The source code is copyrighted under U.S. and *|
-|* international laws. Users and possessors of this source code are *|
-|* hereby granted a nonexclusive, royalty-free copyright license to *|
-|* use this code in individual and commercial software. *|
-|* *|
-|* Any use of this source code must include, in the user documenta- *|
-|* tion and internal comments to the code, notices to the end user *|
-|* as follows: *|
-|* *|
-|* Copyright 1993-1999 NVIDIA, Corporation. All rights reserved. *|
-|* *|
-|* NVIDIA, CORPORATION MAKES NO REPRESENTATION ABOUT THE SUITABILITY *|
-|* OF THIS SOURCE CODE FOR ANY PURPOSE. IT IS PROVIDED "AS IS" *|
-|* WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND. NVIDIA, CORPOR- *|
-|* ATION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOURCE CODE, *|
-|* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGE- *|
-|* MENT, AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL *|
-|* NVIDIA, CORPORATION BE LIABLE FOR ANY SPECIAL, INDIRECT, INCI- *|
-|* DENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RE- *|
-|* SULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION *|
-|* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF *|
-|* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOURCE CODE. *|
-|* *|
-|* U.S. Government End Users. This source code is a "commercial *|
-|* item," as that term is defined at 48 C.F.R. 2.101 (OCT 1995), *|
-|* consisting of "commercial computer software" and "commercial *|
-|* computer software documentation," as such terms are used in *|
-|* 48 C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Govern- *|
-|* ment only as a commercial end item. Consistent with 48 C.F.R. *|
-|* 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), *|
-|* all U.S. Government End Users acquire the source code with only *|
-|* those rights set forth herein. *|
-|* *|
- \***************************************************************************/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/riva_hw.c,v 1.51tsi Exp $ */
+/*
+ * Copyright (c) 1993-1999 NVIDIA, Corporation
+ *
+ * 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 the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, 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 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 NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 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.
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -659,7 +642,7 @@ static void CalcStateExt
int flags
)
{
- int pixelDepth, VClk, m, n, p;
+ int pixelDepth, VClk = 0, m = 0, n = 0, p = 0;
/*
* Save mode parameters.
*/
@@ -990,4 +973,3 @@ int RivaGetConfig
chip->Line = (RivaLine *)&(chip->FIFO[0x0000C000/4]);
return (0);
}
-
diff --git a/driver/xf86-video-nv/src/riva_hw.h b/driver/xf86-video-nv/src/riva_hw.h
index ec2b90ba1..61692cf06 100644
--- a/driver/xf86-video-nv/src/riva_hw.h
+++ b/driver/xf86-video-nv/src/riva_hw.h
@@ -1,42 +1,26 @@
-/***************************************************************************\
-|* *|
-|* Copyright 1993-1999 NVIDIA, Corporation. All rights reserved. *|
-|* *|
-|* NOTICE TO USER: The source code is copyrighted under U.S. and *|
-|* international laws. Users and possessors of this source code are *|
-|* hereby granted a nonexclusive, royalty-free copyright license to *|
-|* use this code in individual and commercial software. *|
-|* *|
-|* Any use of this source code must include, in the user documenta- *|
-|* tion and internal comments to the code, notices to the end user *|
-|* as follows: *|
-|* *|
-|* Copyright 1993-1999 NVIDIA, Corporation. All rights reserved. *|
-|* *|
-|* NVIDIA, CORPORATION MAKES NO REPRESENTATION ABOUT THE SUITABILITY *|
-|* OF THIS SOURCE CODE FOR ANY PURPOSE. IT IS PROVIDED "AS IS" *|
-|* WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND. NVIDIA, CORPOR- *|
-|* ATION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOURCE CODE, *|
-|* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGE- *|
-|* MENT, AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL *|
-|* NVIDIA, CORPORATION BE LIABLE FOR ANY SPECIAL, INDIRECT, INCI- *|
-|* DENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RE- *|
-|* SULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION *|
-|* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF *|
-|* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOURCE CODE. *|
-|* *|
-|* U.S. Government End Users. This source code is a "commercial *|
-|* item," as that term is defined at 48 C.F.R. 2.101 (OCT 1995), *|
-|* consisting of "commercial computer software" and "commercial *|
-|* computer software documentation," as such terms are used in *|
-|* 48 C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Govern- *|
-|* ment only as a commercial end item. Consistent with 48 C.F.R. *|
-|* 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), *|
-|* all U.S. Government End Users acquire the source code with only *|
-|* those rights set forth herein. *|
-|* *|
-\***************************************************************************/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/riva_hw.h,v 1.26 2003/07/31 20:24:31 mvojkovi Exp $ */
+/*
+ * Copyright (c) 1993-1999 NVIDIA, Corporation
+ *
+ * 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 the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, 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 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 NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 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.
+ */
+
#ifndef __RIVA_HW_H__
#define __RIVA_HW_H__
@@ -363,4 +347,3 @@ typedef struct _riva_hw_state
while ((hwinst).Busy(&(hwinst))); \
}
#endif /* __RIVA_HW_H__ */
-
diff --git a/driver/xf86-video-nv/src/riva_local.h b/driver/xf86-video-nv/src/riva_local.h
index bdfe2b95e..a826bdc88 100644
--- a/driver/xf86-video-nv/src/riva_local.h
+++ b/driver/xf86-video-nv/src/riva_local.h
@@ -1,42 +1,25 @@
- /***************************************************************************\
-|* *|
-|* Copyright 1993-1999 NVIDIA, Corporation. All rights reserved. *|
-|* *|
-|* NOTICE TO USER: The source code is copyrighted under U.S. and *|
-|* international laws. Users and possessors of this source code are *|
-|* hereby granted a nonexclusive, royalty-free copyright license to *|
-|* use this code in individual and commercial software. *|
-|* *|
-|* Any use of this source code must include, in the user documenta- *|
-|* tion and internal comments to the code, notices to the end user *|
-|* as follows: *|
-|* *|
-|* Copyright 1993-1999 NVIDIA, Corporation. All rights reserved. *|
-|* *|
-|* NVIDIA, CORPORATION MAKES NO REPRESENTATION ABOUT THE SUITABILITY *|
-|* OF THIS SOURCE CODE FOR ANY PURPOSE. IT IS PROVIDED "AS IS" *|
-|* WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND. NVIDIA, CORPOR- *|
-|* ATION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOURCE CODE, *|
-|* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGE- *|
-|* MENT, AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL *|
-|* NVIDIA, CORPORATION BE LIABLE FOR ANY SPECIAL, INDIRECT, INCI- *|
-|* DENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RE- *|
-|* SULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION *|
-|* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF *|
-|* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOURCE CODE. *|
-|* *|
-|* U.S. Government End Users. This source code is a "commercial *|
-|* item," as that term is defined at 48 C.F.R. 2.101 (OCT 1995), *|
-|* consisting of "commercial computer software" and "commercial *|
-|* computer software documentation," as such terms are used in *|
-|* 48 C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Govern- *|
-|* ment only as a commercial end item. Consistent with 48 C.F.R. *|
-|* 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), *|
-|* all U.S. Government End Users acquire the source code with only *|
-|* those rights set forth herein. *|
-|* *|
- \***************************************************************************/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/riva_local.h,v 1.1tsi Exp $ */
+/*
+ * Copyright (c) 1993-1999 NVIDIA, Corporation
+ *
+ * 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 the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, 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 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 NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 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.
+ */
#ifndef __RIVA_LOCAL_H__
#define __RIVA_LOCAL_H__
@@ -46,9 +29,6 @@
* HW. Put all affected includes, typdefs, etc. here so the riva_hw.* files
* can stay generic in nature.
*/
-#if USE_LIBC_WRAPPER
-#include "xf86_ansic.h"
-#endif
#include "compiler.h"
#include "xf86_OSproc.h"
diff --git a/driver/xf86-video-nv/src/riva_tbl.h b/driver/xf86-video-nv/src/riva_tbl.h
index bb2a3291d..19f5f3b87 100644
--- a/driver/xf86-video-nv/src/riva_tbl.h
+++ b/driver/xf86-video-nv/src/riva_tbl.h
@@ -1,43 +1,25 @@
- /***************************************************************************\
-|* *|
-|* Copyright 1993-1999 NVIDIA, Corporation. All rights reserved. *|
-|* *|
-|* NOTICE TO USER: The source code is copyrighted under U.S. and *|
-|* international laws. Users and possessors of this source code are *|
-|* hereby granted a nonexclusive, royalty-free copyright license to *|
-|* use this code in individual and commercial software. *|
-|* *|
-|* Any use of this source code must include, in the user documenta- *|
-|* tion and internal comments to the code, notices to the end user *|
-|* as follows: *|
-|* *|
-|* Copyright 1993-1999 NVIDIA, Corporation. All rights reserved. *|
-|* *|
-|* NVIDIA, CORPORATION MAKES NO REPRESENTATION ABOUT THE SUITABILITY *|
-|* OF THIS SOURCE CODE FOR ANY PURPOSE. IT IS PROVIDED "AS IS" *|
-|* WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND. NVIDIA, CORPOR- *|
-|* ATION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOURCE CODE, *|
-|* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGE- *|
-|* MENT, AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL *|
-|* NVIDIA, CORPORATION BE LIABLE FOR ANY SPECIAL, INDIRECT, INCI- *|
-|* DENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RE- *|
-|* SULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION *|
-|* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF *|
-|* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOURCE CODE. *|
-|* *|
-|* U.S. Government End Users. This source code is a "commercial *|
-|* item," as that term is defined at 48 C.F.R. 2.101 (OCT 1995), *|
-|* consisting of "commercial computer software" and "commercial *|
-|* computer software documentation," as such terms are used in *|
-|* 48 C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Govern- *|
-|* ment only as a commercial end item. Consistent with 48 C.F.R. *|
-|* 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), *|
-|* all U.S. Government End Users acquire the source code with only *|
-|* those rights set forth herein. *|
-|* *|
- \***************************************************************************/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/riva_tbl.h,v 1.10 2003/07/31 20:24:31 mvojkovi Exp $ */
-
+/*
+ * Copyright (c) 1993-1999 NVIDIA, Corporation
+ *
+ * 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 the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, 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 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 NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 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.
+ */
/*
* RIVA Fixed Functionality Init Tables.
@@ -251,4 +233,3 @@ static unsigned nv3TablePRAMIN_32BPP[][2] =
{0x00000D1C, 0x10419208},
{0x00000D30, 0x10118201}
};
-
diff --git a/driver/xf86-video-nv/src/riva_xaa.c b/driver/xf86-video-nv/src/riva_xaa.c
index 6863143c7..0b361b403 100644
--- a/driver/xf86-video-nv/src/riva_xaa.c
+++ b/driver/xf86-video-nv/src/riva_xaa.c
@@ -1,47 +1,29 @@
- /***************************************************************************\
-|* *|
-|* Copyright 1993-1999 NVIDIA, Corporation. All rights reserved. *|
-|* *|
-|* NOTICE TO USER: The source code is copyrighted under U.S. and *|
-|* international laws. Users and possessors of this source code are *|
-|* hereby granted a nonexclusive, royalty-free copyright license to *|
-|* use this code in individual and commercial software. *|
-|* *|
-|* Any use of this source code must include, in the user documenta- *|
-|* tion and internal comments to the code, notices to the end user *|
-|* as follows: *|
-|* *|
-|* Copyright 1993-1999 NVIDIA, Corporation. All rights reserved. *|
-|* *|
-|* NVIDIA, CORPORATION MAKES NO REPRESENTATION ABOUT THE SUITABILITY *|
-|* OF THIS SOURCE CODE FOR ANY PURPOSE. IT IS PROVIDED "AS IS" *|
-|* WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND. NVIDIA, CORPOR- *|
-|* ATION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOURCE CODE, *|
-|* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGE- *|
-|* MENT, AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL *|
-|* NVIDIA, CORPORATION BE LIABLE FOR ANY SPECIAL, INDIRECT, INCI- *|
-|* DENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RE- *|
-|* SULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION *|
-|* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF *|
-|* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOURCE CODE. *|
-|* *|
-|* U.S. Government End Users. This source code is a "commercial *|
-|* item," as that term is defined at 48 C.F.R. 2.101 (OCT 1995), *|
-|* consisting of "commercial computer software" and "commercial *|
-|* computer software documentation," as such terms are used in *|
-|* 48 C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Govern- *|
-|* ment only as a commercial end item. Consistent with 48 C.F.R. *|
-|* 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), *|
-|* all U.S. Government End Users acquire the source code with only *|
-|* those rights set forth herein. *|
-|* *|
- \***************************************************************************/
+/*
+ * Copyright (c) 1993-1999 NVIDIA, Corporation
+ *
+ * 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 the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, 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 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 NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 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.
+ */
/* Hacked together from mga driver and 3.3.4 NVIDIA driver by
Jarno Paananen <jpaana@s2.org> */
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/riva_xaa.c $ */
-
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
@@ -555,4 +537,3 @@ RivaAccelInit(ScreenPtr pScreen)
return(XAAInit(pScreen, infoPtr));
}
-