<20050623055800.GA4215@xxxxxxxxxxxxxxx>Ralf Wildenhues writes: >* tom fogal wrote on Wed, Jun 22, 2005 at 11:09:22PM CEST: >> Hi all, I'm just wondering how I find out what architecture a >> particular user is on? I'm trying to write a macro to search for a >> particular library, and since it uses 'find' under the hood to search >> for a .so file, things break when trying on OS X (where I need to >> change it to search for .dylib) > >Ouch. Don't do that (use `find' to look for a library). >That is about as unreliable as I can imagine -- you have no idea whether >that library belongs to the system/arch in question or whether it is the >one the user wants. This is just poking in the dark. Besides, it is >very very much too expensive searching a whole directory tree for a >file! Hrm, yes I was a little queasy with the approach, but I actually got it from something in the AC archives -- ac_python_devel to be exact -- and so I figured it wasn't \emph{too} bad. Mea culpa. (ac_python devel is at: http://autoconf-archive.cryp.to/ac_python_devel.html ) >If you must know during configure whether it exists or not, try to link >against it using AC_CHECK_LIB. If you must be able to choose whether to >link against a shared library only, you can look at Bruno Haible's >macros from gettext (look at gnulib's `gettext' or `iconv' module to >find them), I'm not sure but believe that may help. Alternatively, >Libtool's macros may be of help but may be overkill. Actually I'm trying to find the appropriate -L<text> option to pass to the compiler. Is there a smart way to do this via AC_CHECK_LIB? These are paths that I don't expect will be in default compiler (err, linker) search directories. >Autoconf Way[tm] of testing things is to try to emulate the later use as >closely as possible. That way the tests are as reliable as possible >also on systems you have not encountered yet. thanks for the heads up. as you can see, i'm quite new to all this! >> On a vaguely related note, are the archives >> (http://lists.gnu.org/archive/html/autoconf/) broken for anyone else? <snip> >http://savannah.gnu.org/support/?group=administration are good places to >report this. welp, someone appears to have fixed it between now and then, thanks for the link though. -tom _______________________________________________ Autoconf mailing list Autoconf@xxxxxxx http://lists.gnu.org/mailman/listinfo/autoconf