Re: autoconf macros and C++

2001-02-15 Thread Simon Richter
On Thu, 15 Feb 2001, Jaldhar H. Vyas wrote: > Huh, hears an interesting thing. If I use main as the function I'm > checking then it works. But libapt-pkg.so.2.7 doesn't have a main > function. Yes, because the program that gets compiled is int main(int argc, char *argv[]) { main(); }

Re: autoconf macros and C++

2001-02-15 Thread Richard Atterer
Checking for C++ libs with autoconf is indeed a bit tricky. My usual solution is just to check for the function "main" and avoid all the other problems. :-) But you might want to try out the following. Note how one line starts with a comma - weird, but it has to be that way for autoconf to swallow

Re: autoconf macros and C++

2001-02-15 Thread Simon Richter
On Thu, 15 Feb 2001, Jaldhar H. Vyas wrote: [C++ libraries and autoconf] > I hope this helps anyone who has faced the problem themselves. I have a > question too, is there anyway to use the unmangled name? AFAIK, mangling > isn't portable and unportability kind of defeats the whole purpose of >

Re: autoconf macros and C++

2001-02-15 Thread Simon Richter
On Thu, 15 Feb 2001, Jaldhar H. Vyas wrote: > Huh, hears an interesting thing. If I use main as the function I'm > checking then it works. But libapt-pkg.so.2.7 doesn't have a main > function. Yes, because the program that gets compiled is int main(int argc, char *argv[]) { main(); }

Re: autoconf macros and C++

2001-02-15 Thread Richard Atterer
Checking for C++ libs with autoconf is indeed a bit tricky. My usual solution is just to check for the function "main" and avoid all the other problems. :-) But you might want to try out the following. Note how one line starts with a comma - weird, but it has to be that way for autoconf to swallo

Re: autoconf macros and C++

2001-02-15 Thread Simon Richter
On Thu, 15 Feb 2001, Jaldhar H. Vyas wrote: [C++ libraries and autoconf] > I hope this helps anyone who has faced the problem themselves. I have a > question too, is there anyway to use the unmangled name? AFAIK, mangling > isn't portable and unportability kind of defeats the whole purpose of

Re: autoconf macros and C++

2001-02-15 Thread Steve Robbins
On Thu, Feb 15, 2001 at 10:24:33AM +0200, Richard Braakman wrote: > On Thu, Feb 15, 2001 at 01:49:34AM -0500, Jaldhar H. Vyas wrote: > > I hope this helps anyone who has faced the problem themselves. I have a > > question too, is there anyway to use the unmangled name? AFAIK, mangling > > isn't p

Re: autoconf macros and C++

2001-02-15 Thread Jaldhar H. Vyas
Huh, hears an interesting thing. If I use main as the function I'm checking then it works. But libapt-pkg.so.2.7 doesn't have a main function. -- Jaldhar H. Vyas <[EMAIL PROTECTED]>

Re: autoconf macros and C++

2001-02-15 Thread Jaldhar H. Vyas
On Thu, 15 Feb 2001, peter karlsson wrote: > Jaldhar H. Vyas: > > > I hope this helps anyone who has faced the problem themselves. I have a > > question too, is there anyway to use the unmangled name? > > Did you specify AC_LANG_CPLUSPLUS in your configure.in? > Yes, ahead of AC_CHECK_LIB too.

Re: autoconf macros and C++

2001-02-15 Thread Jaldhar H. Vyas
On Thu, 15 Feb 2001, Richard Braakman wrote: > You could probably use the unmangled name if you convince autoconf > to compile the program fragment as a C++ program. Adding "-x c++" > to the general CFLAGS might work, though that means you can't have > any normal C files in your package. > Well,

Re: autoconf macros and C++

2001-02-15 Thread Steve Robbins
On Thu, Feb 15, 2001 at 10:24:33AM +0200, Richard Braakman wrote: > On Thu, Feb 15, 2001 at 01:49:34AM -0500, Jaldhar H. Vyas wrote: > > I hope this helps anyone who has faced the problem themselves. I have a > > question too, is there anyway to use the unmangled name? AFAIK, mangling > > isn't

Re: autoconf macros and C++

2001-02-15 Thread Jaldhar H. Vyas
Huh, hears an interesting thing. If I use main as the function I'm checking then it works. But libapt-pkg.so.2.7 doesn't have a main function. -- Jaldhar H. Vyas <[EMAIL PROTECTED]> -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROT

Re: autoconf macros and C++

2001-02-15 Thread Jaldhar H. Vyas
On Thu, 15 Feb 2001, peter karlsson wrote: > Jaldhar H. Vyas: > > > I hope this helps anyone who has faced the problem themselves. I have a > > question too, is there anyway to use the unmangled name? > > Did you specify AC_LANG_CPLUSPLUS in your configure.in? > Yes, ahead of AC_CHECK_LIB too.

Re: autoconf macros and C++

2001-02-15 Thread Jaldhar H. Vyas
On Thu, 15 Feb 2001, Richard Braakman wrote: > You could probably use the unmangled name if you convince autoconf > to compile the program fragment as a C++ program. Adding "-x c++" > to the general CFLAGS might work, though that means you can't have > any normal C files in your package. > Well

Re: autoconf macros and C++

2001-02-15 Thread peter karlsson
Jaldhar H. Vyas: > I hope this helps anyone who has faced the problem themselves. I have a > question too, is there anyway to use the unmangled name? Did you specify AC_LANG_CPLUSPLUS in your configure.in? -- \\// peter - http://www.softwolves.pp.se/ Statement concerning unsolicited e-mail

Re: autoconf macros and C++

2001-02-15 Thread Sam TH
On Thu, Feb 15, 2001 at 10:24:33AM +0200, Richard Braakman wrote: > > Note that using C++ kind of defeats the whole purpose of using > autoconf :-) Autoconf is not even very happy about using ANSI C, > because it's not available everywhere. This really doesn't make much sense. Autoconf is a v

Re: autoconf macros and C++

2001-02-15 Thread Richard Braakman
On Thu, Feb 15, 2001 at 01:49:34AM -0500, Jaldhar H. Vyas wrote: > I hope this helps anyone who has faced the problem themselves. I have a > question too, is there anyway to use the unmangled name? AFAIK, mangling > isn't portable and unportability kind of defeats the whole purpose of > using aut

Re: autoconf macros and C++

2001-02-15 Thread peter karlsson
Jaldhar H. Vyas: > I hope this helps anyone who has faced the problem themselves. I have a > question too, is there anyway to use the unmangled name? Did you specify AC_LANG_CPLUSPLUS in your configure.in? -- \\// peter - http://www.softwolves.pp.se/ Statement concerning unsolicited e-mail

autoconf macros and C++

2001-02-15 Thread Jaldhar H. Vyas
I'm writing a program that uses the libapt-pkg library. In my configure.in I wanted to check to see if libapt-pkg.so was installed and gve a warning if it isn't. The way to do this I'm told is to use the AC_CHECK_LIBS macro giving it the name of the library and a function in that library. autoc

Re: autoconf macros and C++

2001-02-15 Thread Sam TH
On Thu, Feb 15, 2001 at 10:24:33AM +0200, Richard Braakman wrote: > > Note that using C++ kind of defeats the whole purpose of using > autoconf :-) Autoconf is not even very happy about using ANSI C, > because it's not available everywhere. This really doesn't make much sense. Autoconf is a

Re: autoconf macros and C++

2001-02-15 Thread Richard Braakman
On Thu, Feb 15, 2001 at 01:49:34AM -0500, Jaldhar H. Vyas wrote: > I hope this helps anyone who has faced the problem themselves. I have a > question too, is there anyway to use the unmangled name? AFAIK, mangling > isn't portable and unportability kind of defeats the whole purpose of > using au

autoconf macros and C++

2001-02-14 Thread Jaldhar H. Vyas
I'm writing a program that uses the libapt-pkg library. In my configure.in I wanted to check to see if libapt-pkg.so was installed and gve a warning if it isn't. The way to do this I'm told is to use the AC_CHECK_LIBS macro giving it the name of the library and a function in that library. auto