Skip to content

Commit

Permalink
Do not link with framework if it does not exist.
Browse files Browse the repository at this point in the history
Do not link with Firebird framework if it does not exist on macOS.
This should fix issue mariuz#51.
  • Loading branch information
Håkon Hægland committed Nov 1, 2021
1 parent 439d309 commit 6f68c6f
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion Makefile.PL
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,17 @@ SWITCH: {
last SWITCH;
};
$os eq 'darwin' && do {
$MakeParams{LDDLFLAGS} = $Config{lddlflags} . " -framework Firebird ";
my $framework_dir = dirname $FB::HOME; #"/Library/Frameworks/Firebird.framework";
my $framework_name = File::Spec->catfile( $framework_dir, "Firebird");
# For some reason, the framework file can be a broken symlink, see issue #??
# We can use -e to check if the symlink is broken:
if ( -e $framework_name ) {
$MakeParams{LDDLFLAGS} = $Config{lddlflags} . " -framework Firebird ";
}
else {
$MakeParams{LDDLFLAGS} = $Config{lddlflags};
$MakeParams{LIBS} = "-L$FB::LIB -l$client_lib ";
}
last SWITCH;
};

Expand Down

0 comments on commit 6f68c6f

Please sign in to comment.