|
Lines 4-33
Link Here
|
| 4 |
# the contents of the Makefile that is written. |
4 |
# the contents of the Makefile that is written. |
| 5 |
|
5 |
|
| 6 |
print "Trying to find some configuration information...\n"; |
6 |
print "Trying to find some configuration information...\n"; |
| 7 |
my $kde_dirs = $ENV{TDEDIRS} || '/usr/local/kde'; |
7 |
my $tde_dirs = $ENV{TDEDIRS} || '/opt/trinity'; |
| 8 |
my $qt_dir = $ENV{QTDIR} || '/usr/lib/qt'; |
8 |
my $qt_dir = $ENV{QTDIR} || '/opt/trinity/lib'; |
| 9 |
my $kde_inc = "$kde_dirs/include"; |
9 |
my $tde_inc = "$tde_dirs/include"; |
| 10 |
my $kde_lib = "$kde_dirs/lib"; |
10 |
my $tde_lib = "$tde_dirs/lib"; |
| 11 |
my $qt_inc = "$qt_dir/include"; |
11 |
my $qt_inc = "$qt_dir/include"; |
| 12 |
my $qt_lib = "$qt_dir/lib"; |
12 |
my $qt_lib = "$qt_dir/lib"; |
| 13 |
$kde_inc = undef unless -f "$kde_inc/dcopclient.h"; |
13 |
$tde_inc = undef unless -f "$tde_inc/dcopclient.h"; |
| 14 |
$kde_lib = undef unless -f "$kde_lib/libDCOP.$Config{dlext}"; |
14 |
$tde_lib = undef unless -f "$tde_lib/libDCOP.$Config{dlext}"; |
| 15 |
$qt_dir = undef unless -f "$qt_inc/qglobal.h"; |
15 |
$qt_dir = undef unless -f "$qt_inc/qglobal.h"; |
| 16 |
|
16 |
|
| 17 |
print "Path to Qt headers? [$qt_inc]: "; |
17 |
print "Path to Qt headers? [$qt_inc]: "; |
| 18 |
chomp $input, $qt_inc = $input if (($input = <>) =~ /\S/); |
18 |
chomp $input, $qt_inc = $input if (($input = <>) =~ /\S/); |
| 19 |
print "Path to Qt libraries? [$qt_lib]: "; |
19 |
print "Path to Qt libraries? [$qt_lib]: "; |
| 20 |
chomp $input, $qt_lib = $input if (($input = <>) =~ /\S/); |
20 |
chomp $input, $qt_lib = $input if (($input = <>) =~ /\S/); |
| 21 |
print "Path to KDE headers? [$kde_inc]: "; |
21 |
print "Path to TDE headers? [$tde_inc]: "; |
| 22 |
chomp $input, $kde_inc = $input if (($input = <>) =~ /\S/); |
22 |
chomp $input, $tde_inc = $input if (($input = <>) =~ /\S/); |
| 23 |
print "Path to KDE libraries? [$kde_lib]: "; |
23 |
print "Path to TDE libraries? [$tde_lib]: "; |
| 24 |
chomp $input, $kde_lib = $input if (($input = <>) =~ /\S/); |
24 |
chomp $input, $tde_lib = $input if (($input = <>) =~ /\S/); |
| 25 |
|
25 |
|
| 26 |
WriteMakefile( |
26 |
WriteMakefile( |
| 27 |
NAME => 'DCOP', |
27 |
NAME => 'DCOP', |
| 28 |
VERSION_FROM => 'DCOP.pm', |
28 |
VERSION_FROM => 'DCOP.pm', |
| 29 |
INC => "-I$qt_inc -I$kde_inc", |
29 |
INC => "-I$qt_inc -I$tde_inc -I/usr/include/tqt", |
| 30 |
LIBS => "-L$qt_lib -ltqt-mt -L$kde_lib -ltdecore -lDCOP", |
30 |
LIBS => "-L$qt_lib -ltqt-mt -L$tde_lib -ltdecore -lDCOP", |
| 31 |
XS => {'DCOP.xs' => 'DCOP.cpp'}, |
31 |
XS => {'DCOP.xs' => 'DCOP.cpp'}, |
| 32 |
XSOPT => '-C++', |
32 |
XSOPT => '-C++', |
| 33 |
CCFLAGS => '-x c++', |
33 |
CCFLAGS => '-x c++', |