Skip to content

Using a custom include and libs path for zlib #218

@vrkosk

Description

@vrkosk

I'm using a bare bones sysroot (same as in issue #217 in fact) that doesn't have zlib installed. I have compiled and installed zlib in a different path, say $XYZZY, so I'd like to set a custom include path $XYZZY/include and custom linker flag -L$XYZZY/lib.

Makefile.PL has my $INCLUDE; variable, which is passed to WriteMakeFile(), but the variable is always undef. Solution is:

 push @h_dirs, qw(/include /usr/include /usr/local/include /usr/include/mach);
 @h_dirs = grep { -d $_ } @h_dirs;

+$INCLUDE = join(' ', map { sprintf('-I%s', $_) } split /:/, $ENV{INCLUDE}) if $ENV{INCLUDE};

Then configure as:

INCLUDE=$XYZZY/include perl Makefile.PL

However, there's no mechanism to set a custom library path. Essentially, I want to push something to @libs before it's passed to WriteMakeFile().

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions