From: Iain M. <mu...@ds...> - 2006-10-19 21:50:43
|
I used to be able to build GPShell with the simple sequence: ./configure --prefix=${PFX} gmake gmake install Where my build environment is: PFX=/opt/ITsmartcard export CFLAGS="-I${PFX}/include -I${PFX}/include/PCSC -I/usr/sfw/include -I/opt/sfw/include" export LDFLAGS="-L${PFX}/lib -R${PFX}/lib -L/usr/sfw/lib -R/usr/sfw/lib -L/opt/sfw/lib" export PKG_CONFIG_PATH=${PFX}/lib/pkgconfig and it would find the GlobalPlatform headers and library. With the latest CVS source, it seems to be a bit botched. First, in Makefile.am, this line: gpshell_LDADD = $(AM_CPPFLAGS) -lGlobalPlatform -L"$(GLOBALPLATFORM_LIB_PATH)" causes the following failure during "./configure" if GLOBALPLATFORM_LIB_PATH is not set: configure:4746: cc -o conftest -I/opt/ITsmartcard/include -I/opt/ITsmartcard/include/PCSC -I/usr/sfw/include -I/opt/sfw/include -L/opt/ITsmartcard/lib -R/opt/ITsmartcard/lib -L/usr/sfw/lib -R/usr/sfw/lib -L/opt/sfw/lib -L conftest.c -lGlobalPlatform >&5 (note the nothingness between "-L" and "conftest.c") Also, I now have to set CPPFLAGS to the same as CFLAGS - otherwise the following garbled cc line is produced at gmake time: cc -DPACKAGE_NAME=\"GPShell\" -DPACKAGE_TARNAME=\"gpshell\" -DPACKAGE_VERSION=\"1.3.1\" -DPACKAGE_STRING=\"GPShell\ 1.3.1\" -DPACKAGE_BUGREPORT=\"sn...@gm...\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DLSTAT_FOLLOWS_SLASHED_SYMLINK=1 -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_ATOI=1 -DHAVE_FGETS=1 -DHAVE_LIBGLOBALPLATFORM=1 -I. -I. "-D_REENTRANT -I/opt/ITsmartcard/include/PCSC " "-I" -I/opt/ITsmartcard/include -I/opt/ITsmartcard/include/PCSC -I/usr/sfw/include -I/opt/sfw/include -c -o gpshell-GPShell.o `test -f 'GPShell.c' || echo './'`GPShell.c Finally, this section of configure.in : AC_ARG_VAR(GLOBALPLATFORM_H_PATH, [Specifies the location of GlobalPlatform/GlobalPlatform.h]) OLD_CFLAGS="$CFLAGS" case "$host" in *-*-cygwin*) if ! test -f "$GLOBALPLATFORM_H_PATH"/GlobalPlatform/GlobalPlatform.h; then AC_MSG_ERROR([GlobalPlatform/GlobalPlatform.h not found, specify location of GlobalPlatform/GlobalPlatform.h with ./configure GLOBALPLATFORM_H_PATH=<directory>]) fi ;; *) CFLAGS="$CFLAGS $GLOBALPLATFORM_H_PATH" AC_CHECK_HEADER(GlobalPlatform/GlobalPlatform.h, [], [AC_MSG_ERROR([GlobalPlatform/GlobalPlatform.h not found or usable, install GlobalPlatform 3.0.2 or later, or use ./configure GLOBALPLATFORM_H_PATH=<include directory>])], ) ;; esac AC_SUBST(GLOBALPLATFORM_CFLAGS,-I"$GLOBALPLATFORM_H_PATH") CFLAGS="$OLD_CFLAGS" Shouldn't that be: CFLAGS="$CFLAGS -I$GLOBALPLATFORM_H_PATH" ?? ^^ but then again, that'll probably break stuff if GLOBALPLATFORM_H_PATH is not set... ~Iain |