AC_LTDL_DLLIB in HEAD/ltdl.m4

2001-09-19 Thread libtool

We've modified libtool.m4 to perfer shl_load on HP-UX *even* if dlopen
is available. The rationale for this is because dlopen() requires a
patch which all users might not have (we're running into this problem
now). Unfortunately, ltdl calls AC_LTDL_DLLIB which searches for
*every* possible loader and defines them all in libtldl/ltdl.c. Why?
Why not just pick the first we find? The current behaviour uses
shl_load and dlopen on HP-UX by default. I'd like to get this changed
to shl_load only.

-- 
albert chin ([EMAIL PROTECTED])

___
Libtool mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/libtool



HEAD and HP-UX C++ compiler

2001-09-19 Thread libtool

>From HEAD:
...
checking how to run the C++ preprocessor... aCC -E
checking the maximum length of command line arguments... 393217
checking command to parse /usr/ccs/bin/nm -p output from cc object...  failed
...

Problem is, with HP C++, A.03.30 (A.03.31 is the latest):

$ aCC -o conftest conftest.cc conftstm.o
Error 352: "conftest.cc", line 23 # Cannot take the address of main.
  {"main", (lt_ptr_t) &main},
     
  $ cat conftest.cc
#ifdef __cplusplus
extern "C" {
#endif

extern char nm_test_var;
extern int main();
extern int nm_test_func();
#if defined (__STDC__) && __STDC__
# define lt_ptr_t void *
#else
# define lt_ptr_t char *
# define const
#endif

/* The mapping between symbol names and symbols. */
const struct {
  const char *name;
  lt_ptr_t address;
}
lt_preloaded_symbols[] =
{
  {"nm_test_var", (lt_ptr_t) &nm_test_var},
  {"main", (lt_ptr_t) &main},
  {"nm_test_func", (lt_ptr_t) &nm_test_func},
  {0, (lt_ptr_t) 0}
};

#ifdef __cplusplus
}
#endif

So, do we ignore main on HP-UX with aCC? BTW, G++ 3.0.1 failes too.
Solaris C++ (5.3) works fine.

-- 
albert chin ([EMAIL PROTECTED])

___
Libtool mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/libtool



use of __STDC__ in libtool.m4 on HEAD

2001-09-19 Thread libtool

>From libtool.m4 in HEAD branch:

#if defined (__STDC__) && __STDC__
# define lt_ptr_t void *
#else
# define lt_ptr_t char *
# define const
#endif

Why? Some C compilers define __STDC__ but don't define it to 1. How
about:
  #ifdef __STDC__

-- 
albert chin ([EMAIL PROTECTED])

___
Libtool mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/libtool