Mailing List Archive

Makefile.PL and ext/{GDBM,DB}_File: MM 5.06 problem?
Perl 5.002beta1:

I need additional -L:s and -I:s to compile GDBM_File and DB_File.
However, I do not want them to be in Perl's -L:s and I:s. Ergo,
I adjust the */Makefile.PL:s of GDBM_File and DB_File to have
the correct LIBSs and INCs. In 'make' the following happens:

Making GDBM_File (dynamic)
CCCMD = cc -c -DSTANDARD_C -DDEBUGGING -O2 -Olimit 2900
Writing Makefile for GDBM_File
umask 0 && cp GDBM_File.pm ../../lib/GDBM_File.pm
AutoSplitting GDBM_File (../../lib/auto/GDBM_File)
cc -c -DSTANDARD_C -DDEBUGGING -O2 -Olimit 2900 -DVERSION=\"0.10\" -I../.. GDBM_File.c
/usr/lib/cmplrs/cc/cfe: Error: GDBM_File.c: 13: Cannot open file gdbm.h for #include
make[1]: *** [GDBM_File.o] Error 1
make[1]: Leaving directory `/v/sb/jhi/perl/perl5.002beta1/ext/GDBM_File'
make: *** [lib/auto/GDBM_File/GDBM_File.so] Error 2
$

Ugh. Where is my beautiful -I/the/gdbm/include?

The funny thing is this:

$ cd ext/GDBM_File
$ ls
GDBM_File.c GDBM_File.xs Makefile.PL typemap
GDBM_File.pm Makefile blib
$ perl Makefile.PL
CCCMD = cc -c -DSTANDARD_C -DDEBUGGING -O2 -Olimit 2900
Writing Makefile for GDBM_File
$ make
Makefile built with ExtUtils::MakeMaker v 5 Current Version is 5.06.
umask 0 && cp GDBM_File.pm ../../lib/GDBM_File.pm
AutoSplitting GDBM_File (../../lib/auto/GDBM_File)
cc -c -DSTANDARD_C -DDEBUGGING -O2 -Olimit 2900 -DVERSION=\"0.10\" -I../.. -I/the/gdbm/include GDBM_File.c
Running Mkbootstrap for GDBM_File ()
chmod 644 GDBM_File.bs
ar cr tmp.a GDBM_File.o
: tmp.a
LD_RUN_PATH="/the/gdbm/shlib:/the/gdbm/lib:-lgdbm" ld -o ../../lib/auto/GDBM_File/GDBM_File.so -shared -expect_unresolved "*" -s -all tmp.a -none -L/the/gdbm/shlib -L/the/gdbm/lib -lgdbm
chmod 755 ../../lib/auto/GDBM_File/GDBM_File.so
cp GDBM_File.bs ../../lib/auto/GDBM_File/GDBM_File.bs
chmod 644 ../../lib/auto/GDBM_File/GDBM_File.bs
Installing ./blib/man/man3/GDBM_File.3
$

The "perl" in the above "perl Makefile.PL" is perl 5.001m which
seems to have MM 5.000 _and_ with that the Makefile is okk.
My Makefile.PL:

use ExtUtils::MakeMaker;
WriteMakefile(
LIBS => "-L/the/gdbm/shlib -L/the/gdbm/lib -lgdbm",
INC => "-I/the/gdbm/include"
);

Something broken in MM 5.06 INC? Or should the gdbm.h be somehow
mentioned in the Makefile.PL so that the MM knows to start looking
for it and really using the INC?

++jhi;