apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jfcl...@apache.org
Subject cvs commit: apr configure.in
Date Thu, 30 Sep 2004 09:18:32 GMT
jfclere     2004/09/30 02:18:32

  Modified:    build    jlibtool.c
               .        configure.in
  Log:
  Add --config to jlibtool to fill shlibpath_var in configure.
  BTW: Why do we grep in (GNU) libtool instead using  --config?
  
  Revision  Changes    Path
  1.13      +24 -0     apr/build/jlibtool.c
  
  Index: jlibtool.c
  ===================================================================
  RCS file: /home/cvs/apr/build/jlibtool.c,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- jlibtool.c	29 Sep 2004 14:58:03 -0000	1.12
  +++ jlibtool.c	30 Sep 2004 09:18:32 -0000	1.13
  @@ -67,6 +67,7 @@
   #  define dynamic_link_version_func darwin_dynamic_link_function
   #  define DYNAMIC_INSTALL_NAME "-install_name"
   /*-install_name  /Users/jerenk/apache-2.0-cvs/lib/libapr.0.dylib -compatibility_version
1 -current_version 1.0 */
  +#  define LD_LIBRARY_PATH "DYLD_LIBRARY_PATH"
   #endif
   
   #if defined(__linux__) || defined(__FreeBSD__)
  @@ -84,6 +85,8 @@
   #  define MODULE_OPTS "-shared"
   #  define LINKER_FLAG_PREFIX "-Wl,"
   #  define ADD_MINUS_L
  +#  define LD_RUN_PATH "LD_RUN_PATH"
  +#  define LD_LIBRARY_PATH "LD_LIBRARY_PATH"
   #endif
   
   #if defined(_OSD_POSIX)
  @@ -114,6 +117,8 @@
   #  define DYNAMIC_LINK_OPTS "-Wl,-Blargedynsym"
   #  define LINKER_FLAG_PREFIX "-Wl,"
   #  define NEED_SNPRINTF
  +#  define LD_RUN_PATH "LD_RUN_PATH"
  +#  define LD_LIBRARY_PATH "LD_LIBRARY_PATH"
   #endif
   
   #ifndef SHELL_CMD
  @@ -410,6 +415,23 @@
       return external_spawn(cmd_data, spawn_args[0], (const char**)spawn_args);
   }
   
  +/*
  + * print configuration
  + * shlibpath_var is used in configure.
  + */
  +void print_config()
  +{
  +#ifdef LD_RUN_PATH
  +    printf("runpath_var=%s\n", LD_RUN_PATH);
  +#endif
  +#ifdef LD_LIBRARY_PATH
  +    printf("shlibpath_var=%s\n", LD_LIBRARY_PATH);
  +#endif
  +#ifdef SHELL_CMD
  +    printf("SHELL=\"%s\"\n", SHELL_CMD);
  +#endif
  +}
  +
   int parse_long_opt(char *arg, command_t *cmd_data)
   {
       char *equal_pos = strchr(arg, '=');
  @@ -454,6 +476,8 @@
           printf("Version " VERSION "\n");
       } else if (strcmp(var, "help") == 0) {
           printf("Sorry.  No help available.\n");
  +    } else if (strcmp(var, "config") == 0) {
  +        print_config();
       } else {
           return 0;
       }
  
  
  
  1.598     +4 -0      apr/configure.in
  
  Index: configure.in
  ===================================================================
  RCS file: /home/cvs/apr/configure.in,v
  retrieving revision 1.597
  retrieving revision 1.598
  diff -u -r1.597 -r1.598
  --- configure.in	1 Aug 2004 00:52:20 -0000	1.597
  +++ configure.in	30 Sep 2004 09:18:32 -0000	1.598
  @@ -155,6 +155,10 @@
           LIBTOOL="$apr_builddir/libtool"
           LIBTOOL_SRC="$apr_srcdir/build/jlibtool.c"
           $CC $CFLAGS $CPPFLAGS -o $LIBTOOL $LIBTOOL_SRC
  +        eval `$apr_builddir/libtool --config | grep "^shlibpath_var=[[A-Z_]]*$"`
  +        if test "x$shlibpath_var" = "x"; then
  +            shlibpath_var=REPLACE_WITH_YOUR_SHLIBPATH_VAR
  +        fi
       else
       dnl libtoolize requires that the following not be indented
   AC_PROG_LIBTOOL
  
  
  

Mime
View raw message