File tree Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,26 @@ my $all_libs;
31
31
{
32
32
warn " 'pkg-config libpng' failed, continue with fallback values for cflags and libs...\n " ;
33
33
$libpng_cflags = ' -I/usr/local/include' ;
34
- $libpng_libs = ' -lpng -lm' ;
34
+ if ($^O eq ' freebsd' )
35
+ {
36
+ my $real_libpng = readlink ' /usr/local/lib/libpng.so' ;
37
+ if (defined $real_libpng )
38
+ {
39
+ $real_libpng =~ s { ^lib} {} ;
40
+ $real_libpng =~ s {\. so$} {} ;
41
+ $libpng_libs = " -l$real_libpng " ;
42
+ warn " detected $libpng_libs on this system\n " ;
43
+ }
44
+ else
45
+ {
46
+ warn " No /usr/local/lib/libpng.so found, continue with default values (will probably fail)" ;
47
+ $libpng_libs = ' -lpng -lm' ;
48
+ }
49
+ }
50
+ else
51
+ {
52
+ $libpng_libs = ' -lpng -lm' ;
53
+ }
35
54
}
36
55
37
56
my $zlib_cflags ;
You can’t perform that action at this time.
0 commit comments