autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

correctly using -R for X tests?


From: mcmahill
Subject: correctly using -R for X tests?
Date: Sat, 13 Jul 2002 00:14:43 -0400 (EDT)

I'm having some troubles with checking for some X libraries using
autoconf-2.52.

The piece of the configure.ac file in question is:


AC_PATH_XTRA

#
# uncommenting this makes it `work' on my system
# but of course its not portable
# X_LIBS="$X_LIBS -R/usr/X11R6/lib"
#

AC_CHECK_LIB(X11, XOpenDisplay, , , $X_LIBS)
AC_CHECK_LIB(Xt, XtOpenDisplay, , , $X_LIBS)
AC_CHECK_LIB(Xaw, XawInitializeWidgetSet, , , $X_LIBS)


In the config.log file I see:

configure:3946: checking for XtOpenDisplay in -lXt
configure:3973: gcc -o conftest -g -O2   conftest.c -lXt  -L/usr/X11R6/lib
-lX11 -lm  >&5
/usr/bin/ld: warning: libSM.so.6, needed by /usr/X11R6/lib/libXt.so, not
found (try using --rpath)
/usr/bin/ld: warning: libICE.so.6, needed by /usr/X11R6/lib/libXt.so, not
found (try using --rpath)
/usr/X11R6/lib/libXt.so: undefined reference to `SmcSaveYourselfDone'
/usr/X11R6/lib/libXt.so: undefined reference to `IceConnectionNumber'
/usr/X11R6/lib/libXt.so: undefined reference to `SmcDeleteProperties'
/usr/X11R6/lib/libXt.so: undefined reference to `IceProcessMessages'
/usr/X11R6/lib/libXt.so: undefined reference to
`SmcRequestSaveYourselfPhase2'
/usr/X11R6/lib/libXt.so: undefined reference to `SmcInteractDone'
/usr/X11R6/lib/libXt.so: undefined reference to `SmcCloseConnection'
/usr/X11R6/lib/libXt.so: undefined reference to `SmcSetProperties'
/usr/X11R6/lib/libXt.so: undefined reference to `SmcOpenConnection'
/usr/X11R6/lib/libXt.so: undefined reference to `SmcInteractRequest'
/usr/X11R6/lib/libXt.so: undefined reference to `SmcModifyCallbacks'
/usr/X11R6/lib/libXt.so: undefined reference to `SmcClientID'
/usr/X11R6/lib/libXt.so: undefined reference to `SmcGetIceConnection'
collect2: ld returned 1 exit status


This is because 
% ldd /usr/X11R6/lib/libXt.so
/usr/X11R6/lib/libXt.so:
         -lX11.6 => /usr/X11R6/lib/libX11.so.6
         -lICE.6 => /usr/X11R6/lib/libICE.so.6
         -lSM.6 => /usr/X11R6/lib/libSM.so.6

so thats why the -R/usr/X11R6/lib hack makes the test succeed.  So my
question is whats the right thing to do here?  Clearly hardcoding the -R
stuff in configure.in is wrong.

Thanks
-Dan





reply via email to

[Prev in Thread] Current Thread [Next in Thread]