[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
AC_CHECK_HEADERS works but AC_SEARCH_LIBS does not
From: |
Sam Steingold |
Subject: |
AC_CHECK_HEADERS works but AC_SEARCH_LIBS does not |
Date: |
Mon, 13 Dec 2004 14:38:29 -0500 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (windows-nt) |
I have a package (PARI) installed under /usr/local.
I have this (in a different package which wants to use PARI):
=== configure.in ===
AC_MSG_NOTICE([* PARI (Headers)])
AC_CHECK_HEADERS(pari/pari.h, break)
if test "$ac_cv_header_pari_pari_h" = "no";
then AC_MSG_ERROR([cannot find PARI headers])
fi
AC_MSG_NOTICE([ * PARI (Functions):])
AC_SEARCH_LIBS(pari_kernel_init, pari)
if test "$ac_cv_search_pari_kernel_init" = "no";
then AC_MSG_ERROR([cannot find PARI library])
fi
=== configure.in ===
I get this:
checking pari/pari.h usability... yes
checking pari/pari.h presence... yes
checking for pari/pari.h... yes
configure: * PARI (Functions):
checking for library containing pari_kernel_init... no
configure: error: cannot find PARI library
and in config.log:
configure:2970: gcc -o conftest.exe -g -O2 conftest.c -lpari >&5
/usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/../../../../i686-pc-cygwin/bin/ld: cannot
find -lpari
collect2: ld returned 1 exit status
configure:2976: $? = 1
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME "pari"
| #define PACKAGE_TARNAME "pari"
| #define PACKAGE_VERSION "1.0"
| #define PACKAGE_STRING "pari 1.0"
| #define PACKAGE_BUGREPORT "clisp-list"
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_PARI_PARI_H 1
| /* end confdefs.h. */
|
| /* Override any gcc2 internal prototype to avoid an error. */
| #ifdef __cplusplus
| extern "C"
| #endif
| /* We use char because int might match the return type of a gcc2
| builtin and then its argument prototype would still apply. */
| char pari_kernel_init ();
| int
| main ()
| {
| pari_kernel_init ();
| ;
| return 0;
| }
configure:3004: result: no
configure:3012: error: cannot find PARI library
how come gcc looks in /usr/local/include but not in /usr/local/lib?
$ ls -l /usr/local/include/
total 33
29 -rw-r--r-- 1 sds mkgroup- 29564 Jul 19 12:27 dmalloc.h
4 drwxrwxr-x+ 2 sds mkgroup- 4096 Dec 13 12:14 pari/
$ ls -l /usr/local/include/pari
total 157
0 lrwxrwxrwx 1 sds mkgroup- 6 Dec 13 12:14 genpari.h -> pari.h
2 -rw-r--r-- 1 sds mkgroup- 2020 Dec 13 12:14 pari.h
7 -rw-r--r-- 1 sds mkgroup- 7009 Dec 13 12:14 paricast.h
2 -rw-r--r-- 1 sds mkgroup- 1533 Dec 13 12:14 paricfg.h
12 -rw-r--r-- 1 sds mkgroup- 11269 Dec 13 12:14 paricom.h
64 -rw-r--r-- 1 sds mkgroup- 64906 Dec 13 12:14 paridecl.h
2 -rw-r--r-- 1 sds mkgroup- 1434 Dec 13 12:14 parierr.h
5 -rw-r--r-- 1 sds mkgroup- 4846 Dec 13 12:14 parigen.h
30 -rw-r--r-- 1 sds mkgroup- 30447 Dec 13 12:14 pariinl.h
4 -rw-r--r-- 1 sds mkgroup- 3285 Dec 13 12:14 parinf.h
2 -rw-r--r-- 1 sds mkgroup- 1723 Dec 13 12:14 pariold.h
5 -rw-r--r-- 1 sds mkgroup- 4936 Dec 13 12:14 pariport.h
13 -rw-r--r-- 1 sds mkgroup- 12439 Dec 13 12:14 paripriv.h
3 -rw-r--r-- 1 sds mkgroup- 2938 Dec 13 12:14 paristio.h
2 -rw-r--r-- 1 sds mkgroup- 1903 Dec 13 12:14 parisys.h
2 -rw-r--r-- 1 sds mkgroup- 1401 Dec 13 12:14 paritune.h
2 -rw-r--r-- 1 sds mkgroup- 1680 Dec 13 12:14 paritype.h
$ ls -l /usr/local/lib
total 657
316 -rw-r--r-- 1 sds mkgroup- 323336 Jul 19 12:27 libdmalloc.a
341 -rw-r--r-- 1 sds mkgroup- 348892 Jul 19 12:27 libdmallocxx.a
0 lrwxrwxrwx 1 sds mkgroup- 15 Dec 13 12:14 libpari-2.2.dll ->
libpari-2.2.dll
0 lrwxrwxrwx 1 sds mkgroup- 15 Dec 13 12:14 libpari.dll ->
libpari-2.2.dll
0 drwxrwxr-x+ 2 sds mkgroup- 0 Dec 13 12:16 pari/
--
Sam Steingold (http://www.podval.org/~sds) running w2k
<http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/>
<http://www.mideasttruth.com/> <http://www.honestreporting.com>
If Perl is the solution, you're solving the wrong problem. - Erik Naggum
- AC_CHECK_HEADERS works but AC_SEARCH_LIBS does not,
Sam Steingold <=