AC_PATH_XTRA and -rpath

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

 



I happen to use an OS (NetBSD) which uses rpath. AC_PATH_XTRA sets X_CFLAGS
and X_LIBS to something sensible for compiling X, however, it misses out
the necessary -rpath or -R.

(libtool --config says
# How to pass a linker flag through the compiler.
wl="-Wl,"
# Flag to hardcode $libdir into a binary during linking.
# This must work even if $libdir does not exist
hardcode_libdir_flag_spec="\${wl}-rpath \${wl}\$libdir"
)

Attached are configure.ac, Makefile.am and hellow.c for a little test.

Now the strange thing: there is some code in AC_PATH_XTRA for SunOS which
looks at using -R. If I add NetBSD to the SunOS line

    # For Solaris; some versions of Sun CC require a space after -R and
    # others require no space.  Words are not sufficient . . . .
    case `(uname -sr) 2>/dev/null` in
    "NetBSD 3.99"* | "SunOS 5"*)
      { echo "$as_me:$LINENO: checking whether -R must be followed by a space" >
&5
echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6; }


then all is well - I don't care about the space, at least -R makes it into
X_LIBS.



So, what is the story for OSes that use rpath and X?
(CVS autotools and NetBSD-current/i386)

Cheers,

Patrick
AC_INIT(test,1)
AC_CONFIG_AUX_DIR([config])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE
AM_PROG_CC_C_O
AC_PATH_XTRA
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
bin_PROGRAMS = hellow
hellow_CFLAGS = $(X_CFLAGS)
hellow_LDADD = $(X_PRE_LIBS) $(X_LIBS) $(X_EXTRA_LIBS)
#include <stdio.h>
#include <stdlib.h>
#include <X11/ICE/ICEutil.h>

int main(void)
{
  (void)printf("Hello World! (%s)\n",IceAuthFileName());

  return 0;
}
_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf

[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux