Makefile.PL - Changed it quite a bit. Asks less stupid questions...now works

with LDAPv2 and LDAPv3 SDKs.

README - Write a skeleton version.  Needs lots of work.
This commit is contained in:
clayton 1998-08-03 00:27:51 +00:00
Родитель 8ca115e86b
Коммит 589657a425
2 изменённых файлов: 189 добавлений и 108 удалений

Просмотреть файл

@ -1,107 +1,135 @@
#############################################################################
# $Id: Makefile.PL,v 1.6 1998/07/31 21:18:29 clayton Exp $
#
# The contents of this file are subject to the Mozilla Public License
# Version 1.0 (the "License"); you may not use this file except in
# compliance with the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS"
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
# License for the specific language governing rights and limitations
# under the License.
#
# The Original Code is PerlDAP. The Initial Developer of the Original
# Code is Netscape Communications Corp. and Clayton Donley. Portions
# created by Netscape are Copyright (C) Netscape Communications
# Corp., portions created by Clayton Donley are Copyright (C) Clayton
# Donley. All Rights Reserved.
#
# Contributor(s):
#
# DESCRIPTION
# The Makefile "source".
#
#############################################################################
use ExtUtils::MakeMaker;
use Config;
$perlpath = $Config{'perlpath'};
$osname = $Config{'osname'};
$include_ldap = $ENV{"LDAPINCLUDE"};
$lib_ldap = $ENV{"LDAPLIB"};
$sslopt = $ENV{"USESSL"};
print "\n\nPerlDAP - Perl 5 Module for LDAP\n";
print "================================\n";
print "\nPut all sorts of legal bits and pieces here...\n\n";
if (!$include_ldap)
{
print "Location of LDAP SDK 3.0 Include Files (default: /usr/include): ";
chomp ($include_ldap = <>);
$include_ldap = "/usr/include" unless $include_ldap =~ /\S/;
}
if (!$lib_ldap)
{
$def_lib = ($include_ldap =~ m%^(\S+)([/\\])include% ? "$1$2lib" : "/usr/lib");
print "Location of LDAP SDK 3.0 Library Files (default: $def_lib): ";
chomp ($lib_ldap = <>);
$lib_ldap = $def_lib unless $lib_ldap =~ /\S/;
}
if (!$sslopt)
{
print "Include SSL Routines (default: yes)? ";
chomp ($sslopt = <>);
}
if ($sslopt =~ /^n/i)
{
$ssl_def = "";
} else {
$ssl_def = "-DUSE_SSL";
}
if ($osname =~ /mswin/i)
{
if ($ssl_def)
{
$ldap_lib = "nsldapssl32v30";
} else {
$ldap_lib = "nsldap32v30";
}
} else {
if ($ssl_def)
{
$ldap_lib = "ldapssl30";
} else {
$ldap_lib = "ldap30";
}
}
$v3_def = "-DLDAPV3";
if ($osname =~ /mswin/i)
{
$myextlib = "$lib_ldap\\$ldap_lib.lib";
} else {
$myextlib = "";
}
WriteMakefile(
'NAME' => 'Mozilla::LDAP::API',
'VERSION_FROM' => 'API.pm',
($include_ldap ne "/usr/include" ? (
'INC' => "-I$include_ldap",
) : (
'INC' => "",
)),
'LIBS' => ["-L$lib_ldap -l$ldap_lib"],
'MYEXTLIB' => $myextlib,
'DEFINE' => "$v3_def $ssl_def",
);
#############################################################################
# $Id: Makefile.PL,v 1.7 1998/08/03 00:27:50 clayton Exp $
#
# The contents of this file are subject to the Mozilla Public License
# Version 1.0 (the "License"); you may not use this file except in
# compliance with the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS"
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
# License for the specific language governing rights and limitations
# under the License.
#
# The Original Code is PerlDAP. The Initial Developer of the Original
# Code is Netscape Communications Corp. and Clayton Donley. Portions
# created by Netscape are Copyright (C) Netscape Communications
# Corp., portions created by Clayton Donley are Copyright (C) Clayton
# Donley. All Rights Reserved.
#
# Contributor(s):
#
# DESCRIPTION
# The Makefile "source".
#
#############################################################################
use ExtUtils::MakeMaker;
use Config;
$perlpath = $Config{'perlpath'};
$osname = $Config{'osname'};
$ldapsdk_loc = $ENV{"LDAPSDKDIR"}; # Full Path to C SDK Top-Level
$ldapsdk_ver = $ENV{"LDAPSDKVER"}; # 11 or 30
$ldapsdk_ssl = $ENV{"LDAPSDKSSL"}; # Y to include SSL
print "\n\nPerlDAP - Perl 5 Module for LDAP\n";
print "================================\n";
print "\nPut all sorts of legal bits and pieces here...\n\n";
if (!$include_ldap)
{
print "Directory containing 'include' and 'lib' directory of the Netscape\n";
print "LDAP Software Developer Kit (default: /usr): ";
chomp ($ldapsdk_loc = <>);
$ldapsdk_loc = "/usr" unless $ldapsdk_loc =~ /\S/;
}
if ($osname =~ /mswin/i)
{
$dir_sep = "\\";
} else {
$dir_sep = "/";
}
$include_ldap = $ldapsdk_loc . $dir_sep . "include";
$lib_ldap = $ldapsdk_loc . $dir_sep . "lib";
if (!$ldapsdk_ver)
{
print "Using LDAPv3 Developer Kit (default: yes)? ";
chomp ($ver = <>);
if ($ver =~ /^n/i)
{
$ldapsdk_ver = "11";
} else {
$ldapsdk_ver = "30";
}
}
if ($ldapsdk_ver == "30")
{
$v3def = "-DLDAPV3";
}
if (!$ldapsdk_ssl)
{
print "Include SSL Support (default: yes)? ";
chomp ($sslopt = <>);
}
if ($ldapsdk_ssl =~ /^n/i)
{
$ssl_def = "";
} else {
$ssl_def = "-DUSE_SSL";
}
if ($osname =~ /mswin/i)
{
if ($ssl_def)
{
if ($ldapsdk_ver == "30")
{
$ldap_lib = "nsldapssl32v30";
} else {
$ldap_lib = "nsldap32v11";
}
} else {
$ldap_lib = "nsldap32v" . $ldapsdk_ver;
}
} else {
if ($ssl_def)
{
if ($ldapsdk_ver == "30")
{
$ldap_lib = "ldapssl30";
} else {
$ldap_lib = "ldap30";
}
} else {
$ldap_lib = "ldap" . $ldapsdk_ver;
}
}
if ($osname =~ /mswin/i)
{
$myextlib = "$lib_ldap\\$ldap_lib.lib";
} else {
$myextlib = "";
}
WriteMakefile(
'NAME' => 'Mozilla::LDAP::API',
'VERSION_FROM' => 'API.pm',
($include_ldap ne "/usr/include" ? (
'INC' => "-I$include_ldap",
) : (
'INC' => "",
)),
'LIBS' => ["-L$lib_ldap -l$ldap_lib"],
'MYEXTLIB' => $myextlib,
'DEFINE' => "$v3_def $ssl_def",
);

Просмотреть файл

@ -1 +1,54 @@
Blah.
#############################################################################
# #
# PerlDAP v1.0 - A Perl Developers' Kit for LDAP #
# #
#############################################################################
[ This doc needs LOTS of work... --CED ]
INTRODUCTION
============
PerlDAP (also known as Mozilla::LDAP) allows Perl programmers to develop
software that leverages directories supporting the Lightweight Directory
Access Protocol (LDAP).
Version 1.0 provides both object oriented and direct methods of access
for all LDAP version 2 operations. Experimental direct access is also
included for version 3 operations.
Numerous examples and test applications are provided to help developers
quickly understand and utilize this module.
LICENSE/COPYRIGHT
=================
...stuff goes here...
REQUIREMENTS
============
Netscape LDAP C Developers' Kit (Version 1.1 or 3.0)
- http://developer.netscape.com/ldap/
- http://www.mozilla.org/ldap/
Perl 5.004 or higher (5.005 recommended)
- http://www.perl.com/
C Language Compiler
SUPPORTED SYSTEMS
=================
...Core systems that we test...
KNOWN BUGS
==========
LDAPv3 API calls are included as a baseline for further development only. Use
at your own risk.
WHERE TO GET - change section name
============
- Binaries
- Sources