[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [Debian]: Autoconf und X11-Bibliotheken



On Wed, 15 Apr 1998, Peter Tobias wrote:

> Am Mittwoch, den 15. April 1998 schrieb Andreas Tille:
> Bei Xpm musst Du zusaetzlich noch die X11 library fuer den Linker angeben:
> 
> $ cat configure.in
> AC_INIT(test.c)
> 
> AC_PATH_XTRA
> AC_CHECK_LIB(Xpm, main, echo HAVE_LIBXPM, echo LIBXPM missing, $X_LIBS -lX11)
Hier ist mein komplettes configure.in:
------------------------------------------------------------------------------- 
AC_INIT(xteddy.c)
AM_INIT_AUTOMAKE(xteddy, 1.04)

AC_PROG_CC

AC_PATH_XTRA
AC_CHECK_LIB(Xpm, main, echo HAVE_LIBXPM, echo LIBXPM missing, $X_LIBS -lX11)

AC_OUTPUT(Makefile)
-------------------------------------------------------------------------------

Leider hat sich durch das Anh"angen von -lX11 nichts ge"andert, denn nach wie
vor wird -L... NACH -lXpm im Aufruf des Kompilers erzeugt (siehe auch
das Attachment config.log!!).  Die Ausgabe von configure sieht bei mir
dementsprechend so aus:

...
checking for working autoconf... found
checking for working automake... found
checking for working autoheader... found
checking for working makeinfo... found
checking for gcc... gcc
checking whether the C compiler (gcc  ) works... yes
checking whether the C compiler (gcc  ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking how to run the C preprocessor... gcc -E
checking for X... libraries /usr/X11R6/lib, headers /usr/X11R6/include
checking for dnet_ntoa in -ldnet... no
checking for dnet_ntoa in -ldnet_stub... no
checking for gethostbyname... yes
checking for connect... yes
checking for remove... yes
checking for shmat... yes
checking for IceConnectionNumber in -lICE... yes
checking for main in -lXpm... no
LIBXPM missing
updating cache ./config.cache
creating ./config.status
creating Makefile

Gibt es eine M"oglichkeit (meiens Erachtens ist auch NUR diese M"oglichkeit
wirklich sinnvoll) die -L und -l Argumente, die configure erzeugt zu
vertauschen????

Gru"s

        Andreas.

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

configure:554: checking for a BSD compatible install
configure:607: checking whether build environment is sane
configure:664: checking whether make sets ${MAKE}
configure:710: checking for working aclocal
configure:723: checking for working autoconf
configure:736: checking for working automake
configure:749: checking for working autoheader
configure:762: checking for working makeinfo
configure:779: checking for gcc
configure:856: checking whether the C compiler (gcc  ) works
configure:870: gcc -o conftest    conftest.c  1>&5
configure:890: checking whether the C compiler (gcc  ) is a cross-compiler
configure:895: checking whether we are using GNU C
configure:904: gcc -E conftest.c
configure:919: checking whether gcc accepts -g
configure:948: checking how to run the C preprocessor
configure:969: gcc -E  conftest.c >/dev/null 2>conftest.out
configure:1013: checking for X
configure:1327: checking for dnet_ntoa in -ldnet
configure:1346: gcc -o conftest -g -O2   conftest.c -ldnet   1>&5
ld: cannot open -ldnet: No such file or directory
configure: failed program was:
#line 1335 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char dnet_ntoa();

int main() {
dnet_ntoa()
; return 0; }
configure:1368: checking for dnet_ntoa in -ldnet_stub
configure:1387: gcc -o conftest -g -O2   conftest.c -ldnet_stub   1>&5
ld: cannot open -ldnet_stub: No such file or directory
configure: failed program was:
#line 1376 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char dnet_ntoa();

int main() {
dnet_ntoa()
; return 0; }
configure:1416: checking for gethostbyname
configure:1444: gcc -o conftest -g -O2   conftest.c  1>&5
configure:1514: checking for connect
configure:1542: gcc -o conftest -g -O2   conftest.c  1>&5
configure:1606: checking for remove
configure:1634: gcc -o conftest -g -O2   conftest.c  1>&5
configure:1698: checking for shmat
configure:1726: gcc -o conftest -g -O2   conftest.c  1>&5
configure:1799: checking for IceConnectionNumber in -lICE
configure:1818: gcc -o conftest -g -O2   -L/usr/X11R6/lib conftest.c -lICE   1>&5
configure:1843: checking for main in -lXpm
configure:1858: gcc -o conftest -g -O2   conftest.c -lXpm  -L/usr/X11R6/lib -lX11  1>&5
ld: cannot open -lXpm: No such file or directory
configure: failed program was:
#line 1851 "configure"
#include "confdefs.h"

int main() {
main()
; return 0; }

Reply to: