]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - src/modules/extra/openssl_config.pl
More fixes
[user/henk/code/inspircd.git] / src / modules / extra / openssl_config.pl
1 #!/usr/bin/perl
2
3 if (!exists $ENV{PKG_CONFIG_PATH})
4 {
5         $ENV{PKG_CONFIG_PATH} = "/usr/lib/pkgconfig:/usr/local/lib/pkgconfig:/usr/local/libdata/pkgconfig:/usr/X11R6/libdata/pkgconfig";
6 }
7 else
8 {
9         $ENV{PKG_CONFIG_PATH} .= ":/usr/local/lib/pkgconfig:/usr/local/libdata/pkgconfig:/usr/X11R6/libdata/pkgconfig";
10 }
11
12 if ($ARGV[0] eq "compile")
13 {
14         $ret = `pkg-config --cflags openssl`;
15         if ((undef $ret) || ($ret eq ""))
16         {
17                 $ret = "";
18         }
19 }
20 else
21 {
22         $ret = `pkg-config --libs openssl`;
23         if ((undef $ret) || ($ret eq ""))
24         {
25                 $ret = "-lssl -lcrypto -ldl";
26         }
27 }
28 print "$ret\n";