https://bugs.winehq.org/show_bug.cgi?id=38713
--- Comment #15 from Daniel Kamil Kozar dkk089@gmail.com --- (In reply to Ken Thomases from comment #13)
It's true that it's (currently) only used for 64-bit, but I'm guessing it's not the first such architecture-specific dependency. I'm not sure it's worth making the check architecture-specific if there's any chance that it will be used for other architectures in the future (which I don't really know if it will).
Your patch is better than mine in that I forgot to #define UNW_LOCAL_ONLY for my check.
The loop construct in mine avoids the duplication of the test code in yours.
UNW_LOCAL_ONLY is needed in this case. Your patch from comment #11 causes the linking of the test program to fail due to a missing symbol. My config.log says :
configure:8825: gcc -o conftest -O2 conftest.c -lunwind >&5 /tmp/cc297AN0.o: In function `main': conftest.c:(.text+0x20): undefined reference to `_Ux86_64_init_local' collect2: error: ld returned 1 exit status
(In reply to Sebastian Lackner from comment #12)
Created attachment 51679 [details] configure: Add libunwind configure flag.
I didn't have time to look at Kens last attempt, but here my own one. I think its also nice to offer a way to avoid linking against libunwind. Especially for 32-bit its a completely useless additional dependency.
This patch works okay, libunwind is correctly found and linked to ntdll.