Skip to content
Commits on Source (64)
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry excluding="tools/" kind="src" path="java-sdk/ietfldap"/>
<classpathentry kind="src" path="java-sdk/ldapbeans"/>
<classpathentry kind="src" path="java-sdk/ldapfilter"/>
<classpathentry kind="src" path="java-sdk/ldapjdk"/>
<classpathentry kind="src" path="java-sdk/ldapsp"/>
<classpathentry kind="lib" path="/usr/lib/java/jss4.jar"/>
<classpathentry kind="output" path="build/classes"/>
</classpath>
# .gitignore - List of filenames git should ignore
# Filenames that should be ignored wherever they appear
.pyc
TAGS
Makefile
now
# User files that may appear at the root
**/config/.cache
**/config/.log
**/config/.status
**/config/autoconf.mk
**/config/nsinstall
.fast-update
sdkver.h
dirver.h
# Ignore Eclipse build directory
bin
/build/
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>ldap-sdk</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
This diff is collapsed.
eclipse.preferences.version=1
editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
formatter_profile=_PKI
formatter_settings_version=13
sp_cleanup.add_default_serial_version_id=true
sp_cleanup.add_generated_serial_version_id=false
sp_cleanup.add_missing_annotations=false
sp_cleanup.add_missing_deprecated_annotations=true
sp_cleanup.add_missing_methods=false
sp_cleanup.add_missing_nls_tags=false
sp_cleanup.add_missing_override_annotations=true
sp_cleanup.add_missing_override_annotations_interface_methods=true
sp_cleanup.add_serial_version_id=false
sp_cleanup.always_use_blocks=true
sp_cleanup.always_use_parentheses_in_expressions=false
sp_cleanup.always_use_this_for_non_static_field_access=false
sp_cleanup.always_use_this_for_non_static_method_access=false
sp_cleanup.convert_functional_interfaces=false
sp_cleanup.convert_to_enhanced_for_loop=false
sp_cleanup.correct_indentation=false
sp_cleanup.format_source_code=false
sp_cleanup.format_source_code_changes_only=false
sp_cleanup.insert_inferred_type_arguments=false
sp_cleanup.make_local_variable_final=true
sp_cleanup.make_parameters_final=false
sp_cleanup.make_private_fields_final=true
sp_cleanup.make_type_abstract_if_missing_method=false
sp_cleanup.make_variable_declarations_final=false
sp_cleanup.never_use_blocks=false
sp_cleanup.never_use_parentheses_in_expressions=true
sp_cleanup.on_save_use_additional_actions=true
sp_cleanup.organize_imports=true
sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
sp_cleanup.remove_private_constructors=true
sp_cleanup.remove_redundant_type_arguments=false
sp_cleanup.remove_trailing_whitespaces=true
sp_cleanup.remove_trailing_whitespaces_all=true
sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
sp_cleanup.remove_unnecessary_casts=true
sp_cleanup.remove_unnecessary_nls_tags=false
sp_cleanup.remove_unused_imports=true
sp_cleanup.remove_unused_local_variables=false
sp_cleanup.remove_unused_private_fields=true
sp_cleanup.remove_unused_private_members=false
sp_cleanup.remove_unused_private_methods=true
sp_cleanup.remove_unused_private_types=true
sp_cleanup.sort_members=false
sp_cleanup.sort_members_all=false
sp_cleanup.use_anonymous_class_creation=false
sp_cleanup.use_blocks=false
sp_cleanup.use_blocks_only_for_return_and_throw=false
sp_cleanup.use_lambda=true
sp_cleanup.use_parentheses_in_expressions=false
sp_cleanup.use_this_for_non_static_field_access=false
sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
sp_cleanup.use_this_for_non_static_method_access=false
sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
This is the first source release produced from the mercurial repo. The
source tarball was produced by the following steps:
hg clone http://hg.mozilla.org/projects/ldap-sdks
cd ldap-sdks
hg archive -p mozldap-6.0.7 -r LDAPCSDK_6_0_7_RTM -t tgz -I ldapsdk.mak -I ldapsdk.mk -I c-sdk mozldap-6.0.7.tar.gz
NOTE: the format of the .tar.gz file has changed. The file/directory layout used to look like this:
mozldap-VER/mozilla/directory/
mozldap-VER/mozilla/directory/Makefile
mozldap-VER/mozilla/directory/ldapsdk.mak
mozldap-VER/mozilla/directory/ldapsdk.mk
mozldap-VER/mozilla/directory/c-sdk/
I have collapsed the directories to be this instead:
mozldap-VER/
mozldap-VER/ldapsdk.mak
mozldap-VER/ldapsdk.mk
mozldap-VER/c-sdk/
The top level Makefile has disappeared from the hg repo - I don't think it was needed.
Produce a source tarball from the mercurial repo using the following steps:
hg clone http://hg.mozilla.org/projects/ldap-sdks
cd ldap-sdks
hg archive -p ldapjdk-4.19 -r default -t tgz -I buildjsdk.txt -I java-sdk ldapjdk-4.19.tar.gz
NOTE: the format of the .tar.gz file has changed. The file/directory layout use
d to look like this:
mozldap-4.18/mozilla/directory/
mozldap-4.18/mozilla/directory/buildjsdk.txt
mozldap-4.18/mozilla/directory/java-sdk/
I have collapsed the directories to be this instead:
mozldap-4-19/
mozldap-4-19/buildjsdk.txt
mozldap-4-19/java-sdk/
#!/bin/bash -e
# BEGIN COPYRIGHT BLOCK
# (C) 2018 Red Hat, Inc.
# All rights reserved.
# END COPYRIGHT BLOCK
SCRIPT_PATH=`readlink -f "$0"`
SCRIPT_NAME=`basename "$SCRIPT_PATH"`
SRC_DIR=`dirname "$SCRIPT_PATH"`
NAME=
WORK_DIR=
SOURCE_TAG=
SPEC_TEMPLATE=
WITH_TIMESTAMP=
WITH_COMMIT_ID=
DIST=
VERBOSE=
DEBUG=
usage() {
echo "Usage: $SCRIPT_NAME [OPTIONS] <target>"
echo
echo "Options:"
echo " --name=<name> Package name (default: ldapjdk)."
echo " --work-dir=<path> Working directory (default: ~/build/ldapjdk)."
echo " --source-tag=<tag> Generate RPM sources from a source tag."
echo " --spec=<file> Use the specified RPM spec as a template."
echo " --with-timestamp Append timestamp to release number."
echo " --with-commit-id Append commit ID to release number."
echo " --dist=<name> Distribution name (e.g. fc28)."
echo " -v,--verbose Run in verbose mode."
echo " --debug Run in debug mode."
echo " --help Show help message."
echo
echo "Target:"
echo " src Generate RPM sources."
echo " spec Generate RPM spec."
echo " srpm Build SRPM package."
echo " rpm Build RPM packages (default)."
}
generate_rpm_sources() {
TARBALL="ldap-sdk-$VERSION${_PHASE}.tar.gz"
if [ "$SOURCE_TAG" != "" ] ; then
if [ "$VERBOSE" = true ] ; then
echo "Generating $TARBALL from $SOURCE_TAG tag"
fi
git -C "$SRC_DIR" \
archive \
--format=tar.gz \
--prefix ldap-sdk-$VERSION${_PHASE}/ \
-o "$WORK_DIR/SOURCES/$TARBALL" \
$SOURCE_TAG
if [ "$SOURCE_TAG" != "HEAD" ] ; then
TAG_ID=`git -C "$SRC_DIR" rev-parse $SOURCE_TAG`
HEAD_ID=`git -C "$SRC_DIR" rev-parse HEAD`
if [ "$TAG_ID" != "$HEAD_ID" ] ; then
generate_patch
fi
fi
return
fi
if [ "$VERBOSE" = true ] ; then
echo "Generating $TARBALL"
fi
tar czf "$WORK_DIR/SOURCES/$TARBALL" \
--transform "s,^./,ldap-sdk-$VERSION${_PHASE}/," \
--exclude .git \
--exclude .svn \
--exclude .swp \
--exclude .metadata \
--exclude build \
--exclude .tox \
--exclude dist \
--exclude MANIFEST \
--exclude *.pyc \
--exclude __pycache__ \
-C "$SRC_DIR" \
.
}
generate_patch() {
PATCH="ldap-sdk-$VERSION-$RELEASE.patch"
if [ "$VERBOSE" = true ] ; then
echo "Generating $PATCH for all changes since $SOURCE_TAG tag"
fi
git -C "$SRC_DIR" \
format-patch \
--stdout \
$SOURCE_TAG \
> "$WORK_DIR/SOURCES/$PATCH"
}
generate_rpm_spec() {
RPM_SPEC="$NAME.spec"
if [ "$VERBOSE" = true ] ; then
echo "Generating $RPM_SPEC"
fi
# hard-code package name
commands="s/^\(Name: *\).*\$/\1${NAME}/g"
if [ "$_TIMESTAMP" != "" ] ; then
# hard-code timestamp
commands="${commands}; s/%{?_timestamp}/${_TIMESTAMP}/g"
fi
if [ "$_COMMIT_ID" != "" ] ; then
# hard-code commit ID
commands="${commands}; s/%{?_commit_id}/${_COMMIT_ID}/g"
fi
if [ "$_PHASE" != "" ] ; then
# hard-code phase
commands="${commands}; s/%{?_phase}/${_PHASE}/g"
fi
# hard-code patch
if [ "$PATCH" != "" ] ; then
commands="${commands}; s/# Patch: ldap-sdk-VERSION-RELEASE.patch/Patch: $PATCH/g"
fi
sed "$commands" "$SPEC_TEMPLATE" > "$WORK_DIR/SPECS/$RPM_SPEC"
# rpmlint "$WORK_DIR/SPECS/$RPM_SPEC"
}
while getopts v-: arg ; do
case $arg in
v)
VERBOSE=true
;;
-)
LONG_OPTARG="${OPTARG#*=}"
case $OPTARG in
name=?*)
NAME="$LONG_OPTARG"
;;
work-dir=?*)
WORK_DIR=`readlink -f "$LONG_OPTARG"`
;;
source-tag=?*)
SOURCE_TAG="$LONG_OPTARG"
;;
spec=?*)
SPEC_TEMPLATE="$LONG_OPTARG"
;;
with-timestamp)
WITH_TIMESTAMP=true
;;
with-commit-id)
WITH_COMMIT_ID=true
;;
dist=?*)
DIST="$LONG_OPTARG"
;;
verbose)
VERBOSE=true
;;
debug)
VERBOSE=true
DEBUG=true
;;
help)
usage
exit
;;
'')
break # "--" terminates argument processing
;;
name* | work-dir* | source-tag* | spec* | dist*)
echo "ERROR: Missing argument for --$OPTARG option" >&2
exit 1
;;
*)
echo "ERROR: Illegal option --$OPTARG" >&2
exit 1
;;
esac
;;
\?)
exit 1 # getopts already reported the illegal option
;;
esac
done
# remove parsed options and args from $@ list
shift $((OPTIND-1))
if [ "$#" -lt 1 ] ; then
BUILD_TARGET=rpm
else
BUILD_TARGET=$1
fi
if [ "$DEBUG" = true ] ; then
echo "BUILD_TARGET: $BUILD_TARGET"
fi
if [ "$BUILD_TARGET" != "src" ] &&
[ "$BUILD_TARGET" != "spec" ] &&
[ "$BUILD_TARGET" != "srpm" ] &&
[ "$BUILD_TARGET" != "rpm" ] ; then
echo "ERROR: Invalid build target: $BUILD_TARGET" >&2
exit 1
fi
if [ "$NAME" = "" ] ; then
NAME="ldapjdk"
fi
if [ "$DEBUG" = true ] ; then
echo "NAME: $NAME"
fi
if [ "$WORK_DIR" = "" ] ; then
WORK_DIR="$HOME/build/$NAME"
fi
if [ "$DEBUG" = true ] ; then
echo "WORK_DIR: $WORK_DIR"
fi
if [ "$SPEC_TEMPLATE" = "" ] ; then
SPEC_TEMPLATE="$SRC_DIR/ldapjdk.spec"
fi
VERSION="`rpmspec -P "$SPEC_TEMPLATE" | grep "^Version:" | awk '{print $2;}'`"
if [ "$DEBUG" = true ] ; then
echo "VERSION: $VERSION"
fi
RELEASE="`rpmspec -P "$SPEC_TEMPLATE" --undefine dist | grep "^Release:" | awk '{print $2;}'`"
if [ "$DEBUG" = true ] ; then
echo "RELEASE: $RELEASE"
fi
spec=$(<"$SPEC_TEMPLATE")
regex=$'%global *_phase *([^\n]+)'
if [[ $spec =~ $regex ]] ; then
_PHASE="${BASH_REMATCH[1]}"
fi
if [ "$DEBUG" = true ] ; then
echo "PHASE: ${_PHASE}"
fi
if [ "$WITH_TIMESTAMP" = true ] ; then
TIMESTAMP="`date +"%Y%m%d%H%M%S"`"
_TIMESTAMP=".$TIMESTAMP"
fi
if [ "$DEBUG" = true ] ; then
echo "TIMESTAMP: $TIMESTAMP"
fi
if [ "$WITH_COMMIT_ID" = true ]; then
COMMIT_ID="`git -C "$SRC_DIR" rev-parse --short=8 HEAD`"
_COMMIT_ID=".$COMMIT_ID"
fi
if [ "$DEBUG" = true ] ; then
echo "COMMIT_ID: $COMMIT_ID"
fi
echo "Building $NAME-$VERSION-$RELEASE${_TIMESTAMP}${_COMMIT_ID}"
################################################################################
# Initialize working directory
################################################################################
if [ "$VERBOSE" = true ] ; then
echo "Initializing $WORK_DIR"
fi
mkdir -p $WORK_DIR
cd $WORK_DIR
rm -rf BUILD
rm -rf RPMS
rm -rf SOURCES
rm -rf SPECS
rm -rf SRPMS
mkdir BUILD
mkdir RPMS
mkdir SOURCES
mkdir SPECS
mkdir SRPMS
################################################################################
# Generate RPM sources
################################################################################
generate_rpm_sources
echo "RPM sources:"
find "$WORK_DIR/SOURCES" -type f -printf " %p\n"
if [ "$BUILD_TARGET" = "src" ] ; then
exit
fi
################################################################################
# Generate RPM spec
################################################################################
generate_rpm_spec
echo "RPM spec:"
find "$WORK_DIR/SPECS" -type f -printf " %p\n"
if [ "$BUILD_TARGET" = "spec" ] ; then
exit
fi
################################################################################
# Build source package
################################################################################
OPTIONS=()
OPTIONS+=(--quiet)
OPTIONS+=(--define "_topdir ${WORK_DIR}")
if [ "$WITH_TIMESTAMP" = true ] ; then
OPTIONS+=(--define "_timestamp ${_TIMESTAMP}")
fi
if [ "$WITH_COMMIT_ID" = true ] ; then
OPTIONS+=(--define "_commit_id ${_COMMIT_ID}")
fi
if [ "$DIST" != "" ] ; then
OPTIONS+=(--define "dist .$DIST")
fi
if [ "$DEBUG" = true ] ; then
echo "rpmbuild -bs ${OPTIONS[@]} $WORK_DIR/SPECS/$RPM_SPEC"
fi
# build SRPM with user-provided options
rpmbuild -bs "${OPTIONS[@]}" "$WORK_DIR/SPECS/$RPM_SPEC"
rc=$?
if [ $rc != 0 ]; then
echo "ERROR: Unable to build SRPM package"
exit 1
fi
SRPM=`find "$WORK_DIR/SRPMS" -type f`
echo "SRPM package:"
echo " $SRPM"
if [ "$BUILD_TARGET" = "srpm" ] ; then
exit
fi
################################################################################
# Build binary packages
################################################################################
OPTIONS=()
if [ "$VERBOSE" = true ] ; then
OPTIONS+=(--define "_verbose 1")
fi
OPTIONS+=(--define "_topdir ${WORK_DIR}")
if [ "$DEBUG" = true ] ; then
echo "rpmbuild --rebuild ${OPTIONS[@]} $SRPM"
fi
# rebuild RPM with hard-coded options in SRPM
rpmbuild --rebuild "${OPTIONS[@]}" "$SRPM"
rc=$?
if [ $rc != 0 ]; then
echo "ERROR: Unable to build RPM packages"
exit 1
fi
# install SRPM to restore sources and spec file removed during rebuild
rpm -i --define "_topdir $WORK_DIR" "$SRPM"
# flatten folder
find "$WORK_DIR/RPMS" -mindepth 2 -type f -exec mv -i '{}' "$WORK_DIR/RPMS" ';'
# remove empty subfolders
find "$WORK_DIR/RPMS" -mindepth 1 -type d -delete
echo "RPM packages:"
find "$WORK_DIR/RPMS" -type f -printf " %p\n"
======================================================================
NETSCAPE DIRECTORY SDK FOR JAVA:
BUILD INSTRUCTIONS
Last updated: August 2, 1999
======================================================================
For information on the Netscape Directory SDK source release,
see http://www.mozilla.org/directory/
Note the following:
- The LDAP filter classes (in the netscape.ldap.util package)
use the OROMatcher(tm) regular expression package (from ORO Java Software).
This is not provided with the source code release. If you want this
package, you need to get it from ORO, Inc. (For details, see the
ORO, Inc. home page at http://www.oroinc.com/.)
Unix/Linux Build Instructions
-----------------------------
System Requirements:
32MB of RAM, 128MB of swap, recommended 64MB of RAM.
Tool Requirements:
Sun Microsystems Java Development Kit (JDK) 1.1.7
(or a more recent version)
GNU make 3.74 or a more recent version
Instructions:
1. Uncompress and extract the source files by entering the
following command (or your preferred variant of this command):
gzip -dc <filename>.tar.gz | tar -xvf -
2. Set and unset the following environment variables.
In csh/tcsh:
setenv JAVA_HOME "<directory where the JDK is installed>"
For example:
setenv JAVA_HOME "/usr/local/jdk1.1.7"
setenv CLASSPATH "<location of the JDK classes.zip file>"
For example:
setenv CLASSPATH "/usr/local/jdk1.1.7/lib/classes.zip"
In sh/bash/ksh:
JAVA_HOME="<directory where the JDK is installed>"
CLASSPATH="<location of the JDK classes.zip file>"
export JAVA_HOME CLASSPATH
3. Build the LDAP Java classes by entering the following commands:
cd mozilla/directory/java-sdk
gmake -f ldap.mk
If you also want the classes packaged in a JAR file,
specify "basepackage" as the target:
gmake -f ldap.mk basepackage
To generate javadoc specify "doc" as the target:
gmake -f ldap.mk doc
Note that if you are using JDK1.1, javadoc images will be missing
and you'll need to copy those images from somewhere else into
mozilla/directory/java-sdk/dist/doc/images. If you are using JDK1.2
you do not need to do that.
The SDK will be built and copied into the following directories:
mozilla/directory/java-sdk/dist/classes - class files and manifest file
mozilla/directory/java-sdk/dist/packages - ldapjdk.jar JAR file
(if you've specified "basepackage" as the target)
mozilla/directory/java-sdk/dist/doc - ldapjdk javadoc
(if you've specified "doc" as the target)
4. Build the JNDI LDAP Service Provider classes by entering the following commands:
gmake -f ldapsp.mk
If you also want the classes packaged in a JAR file,
specify "basepackage" as the target:
gmake -f ldapsp.mk basepackage
To generate javadoc specify "doc" as the target:
gmake -f ldapsp.mk doc
The SDK will be built and copied into the following directories:
mozilla/directory/java-sdk/dist/classes - class files
mozilla/directory/java-sdk/dist/packages - ldapsp.jar JAR file
(if you've specified "basepackage" as the target)
mozilla/directory/java-sdk/dist/doc/ldapsp - ldapsp controls' javadoc
(if you've specified "doc" as the target)
The JNDI LDAP Service Provider depends on the LDAP Java classes, so you
always must build the LDAP Java first. For more information on JNDI see
ldapsp/Readme.html and http://java.sun.com/products/jndi/index.html
Windows Build Instructions
--------------------------
System Requirements:
Windows NT 3.51 or 4.0 (4.0 preferred).
Tool Requirements:
Sun Microsystems Java Development Kit (JDK) 1.1.7
(or a more recent version)
GNU Tools for Windows (you can find these on the Internet).
Specifically, you'll need:
cp.exe
rm.exe
Here are some sample download sites to find these:
Cygnus (http://www.cygnus.com/misc/gnu-win32)
GNU (http://www.gnu.org/order/ftp.html)
MIT (ftp://prep.ai.mit.edu/pub/gnu)
Netscape uses internally modified versions of the following tools:
gmake.exe
shmsdos.exe
uname.exe
You can download them from http://www.mozilla.org/download-mozilla.html
(click the Windows Build Tools link). When you unzip the file, the
tools will be located in the windows\bin\x86 directory.
All of these tools need to be put in your path.
Extracting the Source Files:
The source files for the Directory SDK are zipped in a file.
When unzipping the file, make sure to specify that you want to
preserve the directory structure. For example,
make sure that "Use Folder Names" is checked.
Instructions:
NOTE: Make sure to run the commands from a standard Windows NT
command prompt. Although you may be able to use other shells
to build the SDK, you may need to adjust the makefiles for
the shell that you are using.
1. Set the following environment variables (within the command session,
either manually or via a script), or within the system environment
through the Control Panel | System control panel):
set MOZ_SRC=(top of your source tree, drive letter and path.
For example, set MOZ_SRC=d:\mozilla_src, if the mozilla
directory is at d:\mozilla_src\mozilla.)
set JAVA_HOME=(directory where the JDK is installed)
For example:
set JAVA_HOME=D:\jdk1.1.7
set CLASSPATH=(location of the JDK classes.zip file)
For example:
set CLASSPATH=D:\jdk1.1.7\lib\classes.zip
In addition, make sure to set your PATH environment variable to
include the tools that you have downloaded.
2. Enter the following commands to build the LDAP Java classes:
cd mozilla\directory\java-sdk
gmake -f ldap.mk
If you also want the classes packaged in a JAR file,
specify "basepackage" as the target:
gmake -f ldap.mk basepackage
To generate javadoc specify "doc" as the target:
gmake -f ldap.mk doc
Note that if you are using JDK1.1, javadoc images will be missing
and you'll need to copy those images from somewhere else into
mozilla\directory\java-sdk\dist\doc\images. If you are using JDK1.2
you do not need to do that.
The SDK will be built and copied into the following directories:
mozilla\directory\java-sdk\dist\classes - class files and manifest file
mozilla\directory\java-sdk\dist\packages - ldapjdk.jar JAR file
(if you've specified "basepackage" as the target)
mozilla\directory\java-sdk\dist\doc - ldapjdk javadoc
(if you've specified "doc" as the target)
3. Build the JNDI LDAP Service Provider classes by entering the following commands:
gmake -f ldapsp.mk
If you also want the classes packaged in a JAR file,
specify "basepackage" as the target:
gmake -f ldapsp.mk basepackage
To generate javadoc specify "doc" as the target:
gmake -f ldapsp.mk doc
The SDK will be built and copied into the following directories:
mozilla/directory/java-sdk/dist/classes - class files
mozilla/directory/java-sdk/dist/packages - ldapsp.jar JAR file
(if you've specified "basepackage" as the target)
mozilla\directory\java-sdk\dist\doc\ldapsp - ldapsp controls' javadoc
(if you've specified "doc" as the target)
The JNDI LDAP Service Provider depends on the LDAP Java classes, so you
always must build the LDAP Java first. For more information on JNDI see
ldapsp/Readme.html and http://java.sun.com/products/jndi/index.html
--------------------------------------------------------
Copyright (c) 1999 Netscape Communications Corporation.
(http://home.netscape.com/misc/contact_info.html)
#
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (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 mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2002
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#
# Alternatively, the contents of this file may be used under the terms of
# either of the GNU General Public License Version 2 or later (the "GPL"),
# or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
MOD_DEPTH = .
topsrcdir = @top_srcdir@
srcdir = @srcdir@
include $(MOD_DEPTH)/config/autoconf.mk
DIRS = config ldap
DIST_GARBAGE = config.cache config.log config.status
include $(topsrcdir)/config/rules.mk
# dummy target to allow platforms without a compiler-based depend (like GCC
# has) to call "make depend" here and not fail, at the cost of actual
# dependencies on such builds possibly being incorrect. A nasty hack, but
# this build system is going away soon.
#
depend:
FORCE:
distclean::
rm -f $(DIST_GARBAGE)
rm -f config/autoconf.mk
rm -f `cat unallmakefiles` unallmakefiles
#
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (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 mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2002
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#
# Alternatively, the contents of this file may be used under the terms of
# either of the GNU General Public License Version 2 or later (the "GPL"),
# or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
The autoconf files here are a minimal shim to allow the LDAP C SDK to
build with autoconf. These are currently just a slightly modified
version of the existing Makefile.client-based build system, merged
with a copy of the NSPR autoconf stuff. As in the main browser tree,
I've checked in the (generated) configure script so that autoconf
isn't a prerequisite to build.
My hope is that the owners of the C SDK will be interested in
migrating to this build system, so that over time it can evolve into a
true autoconf-style build system with all the goodies that go with
that (ie configure-time feature tests for faster porting to new
platforms, cross-compilation support, etc.).
Comments to <news://news.mozilla.org/netscape.public.mozilla.directory>,
please.
Dan Mosedale
<dmose@netscape.com>
#
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (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 mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2002
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#
# Alternatively, the contents of this file may be used under the terms of
# either of the GNU General Public License Version 2 or later (the "GPL"),
# or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
The mozldap.spec file can be used to build an RPM package. This
spec file produces 3 packages:
mozldap - the core runtime shared libraries libssldap50.so,
libprldap50.so, and libldap50.so, along with major and minor
version symlinks (see the %files section). These files are
placed in the system LIBDIR (usually /usr/lib or /usr/lib64).
mozldap-tools - the command line tools ldapsearch, ldapmodify,
ldapdelete, ldapcmp, ldapcompare - these are placed in a
subdirectory of LIBDIR called mozldap, so as not to conflict
with the OpenLDAP versions of ldapsearch, ldapmodify, etc.
which are present in almost every linux distro in /usr/bin
(the libs don't conflict because they have different names).
This package is not required if you only need the libs for
application support (e.g. Thunderbird), but it is a good
idea if you need to test some LDAP client feature that is
not supported by the OpenLDAP tools, or want to use NSS
for crypto with ldapsearch et. al.
mozldap-devel - the include files, example code, config files,
and pkg-config .pc file. The include files are placed in a
mozldap subdirectory of the system INCDIR (usually /usr/include)
so as not to conflict with the OpenLDAP include files in
/usr/include. The example code and config files go into the
/usr/share/mozldap directory. The mozldap.pc file goes into
the usual pkg-config directory, so you can get information
about the lib and include directories when building other
applications that use mozldap, e.g.
/usr/bin/pkg-config --cflags-only-I mozldap
Build Dependencies: nspr-devel, nss-devel, and svrcore-devel
Runtime Dependencies: nspr, nss
These packages should be available for download from ftp.mozilla.org
or from your favorite RPM/yum repository. If these packages are
installed, and have the proper pkg-config installed, the rpmbuild
will automatically find them - see config/autoconf/*.m4.
This RPM uses NSS for crypto and SVRCORE for secure PIN
management, which in turn depend on NSPR. If you do not want that,
you can create a new mozldap.spec file that removes those
dependencies (edit Requires: and BuildRequires:) and removes those
from the build (e.g. use --without-nss for the configure command).
Comments to <news://news.mozilla.org/netscape.public.mozilla.directory>,
please.
- Rich Megginson <richm@stanfordalumni.org>
dnl
dnl ***** BEGIN LICENSE BLOCK *****
dnl Version: MPL 1.1/GPL 2.0/LGPL 2.1
dnl
dnl The contents of this file are subject to the Mozilla Public License Version
dnl 1.1 (the "License"); you may not use this file except in compliance with
dnl the License. You may obtain a copy of the License at
dnl http://www.mozilla.org/MPL/
dnl
dnl Software distributed under the License is distributed on an "AS IS" basis,
dnl WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
dnl for the specific language governing rights and limitations under the
dnl License.
dnl
dnl The Original Code is mozilla.org code.
dnl
dnl The Initial Developer of the Original Code is
dnl Netscape Communications Corporation.
dnl Portions created by the Initial Developer are Copyright (C) 2002
dnl the Initial Developer. All Rights Reserved.
dnl
dnl Contributor(s):
dnl Dan Mosedale <dmose@netcape.com>
dnl
dnl Alternatively, the contents of this file may be used under the terms of
dnl either of the GNU General Public License Version 2 or later (the "GPL"),
dnl or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
dnl in which case the provisions of the GPL or the LGPL are applicable instead
dnl of those above. If you wish to allow use of your version of this file only
dnl under the terms of either the GPL or the LGPL, and not to allow others to
dnl use your version of this file under the terms of the MPL, indicate your
dnl decision by deleting the provisions above and replace them with the notice
dnl and other provisions required by the GPL or the LGPL. If you do not delete
dnl the provisions above, a recipient may use your version of this file under
dnl the terms of any one of the MPL, the GPL or the LGPL.
dnl
dnl ***** END LICENSE BLOCK *****
builtin(include, config/autoconf/nspr.m4)dnl
builtin(include, config/autoconf/nss.m4)dnl
builtin(include, config/autoconf/svrcore.m4)dnl
builtin(include, config/autoconf/sasl.m4)dnl
builtin(include, config/autoconf/acwinpaths.m4)dnl
#
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (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 Mozilla Communicator client code, released
# March 31, 1998.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998-1999
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#
# Alternatively, the contents of this file may be used under the terms of
# either of the GNU General Public License Version 2 or later (the "GPL"),
# or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
# some vendors may wish to override COMPVERSIONDIR from the command-line
#
ifdef USE_AUTOCONF
COMPVERSIONDIR = $(topsrcdir)
else
COMPVERSIONDIR = $(DEPTH)/directory/c-sdk
endif
DEFAULT_VENDOR_NAME=mozilla.org
DEFAULT_VENDOR_VERSION=607
ifndef VENDOR_NAME
VENDOR_NAME = $(DEFAULT_VENDOR_NAME)
endif
ifndef VENDOR_VERSION
VENDOR_VERSION = $(DEFAULT_VENDOR_VERSION)
endif
ifeq ($(OS_ARCH), WINNT)
COMPONENT_PULL_METHOD=FTP
win_srcdir:=$(subst $(topsrcdir),$(WIN_TOP_SRC),$(srcdir))
endif
# component tags for internal build only
include $(COMPVERSIONDIR)/component_versions.mk
# Ldap library
ifeq ($(OS_ARCH), WINNT)
LDAP_LIBNAME = nsldap32v$(LDAPVERS)
else
LDAP_LIBNAME = ldap$(LDAPVERS)
endif
DIR_VERSION = $(LDAPVERS_SUFFIX)
DIRSDK_VERSION = $(LDAPVERS_SUFFIX)
# PrLdap library
ifeq ($(OS_ARCH), WINNT)
PRLDAP_LIBNAME = nsldappr32v$(PRLDAPVERS)
else
PRLDAP_LIBNAME = prldap$(PRLDAPVERS)
endif
# lber library
ifeq ($(OS_ARCH), WINNT)
LBER_LIBNAME = nslber32v$(LBERVERS)
else
LBER_LIBNAME = lber$(LBERVERS)
endif
# ldif library
ifeq ($(OS_ARCH), WINNT)
LDIF_LIBNAME = nsldif32v$(LDIFVERS)
else
LDIF_LIBNAME = ldif$(LDIFVERS)
endif
# iutil library
ifeq ($(OS_ARCH), WINNT)
IUTIL_LIBNAME = nsiutil32v$(IUTILVERS)
else
IUTIL_LIBNAME = iutil$(IUTILVERS)
endif
# util library
ifeq ($(OS_ARCH), WINNT)
UTIL_LIBNAME = nsutil32v$(UTILVERS)
else
UTIL_LIBNAME = util$(UTILVERS)
endif
# ssl library
ifeq ($(OS_ARCH), WINNT)
SSLDAP_LIBNAME = nsldapssl32v$(SSLDAPVERS)
else
SSLDAP_LIBNAME = ssldap$(SSLDAPVERS)
endif
# nss library
NSS_LIBNAME = nss$(NSSVERS)
ifeq ($(NSS_DYNAMIC_SOFTOKN),1)
SOFTOKN_LIBNAME = softokn$(NSSVERS)
endif
SSL_LIBNAME = ssl$(NSSVERS)
ifeq ($(OS_ARCH), WINNT)
DYNAMICNSS = $(addsuffix .$(LIB_SUFFIX),$(SSL_LIBNAME) $(NSS_LIBNAME))
else
DYNAMICNSS = $(addprefix -l,$(SSL_LIBNAME) $(NSS_LIBNAME) $(SOFTOKN_LIBNAME))
endif
NSSLINK = $(NSS_LIBS) $(DYNAMICNSS)
HYBRID_LIBNAME = freebl_hybrid_$(NSSVERS)
PURE32_LIBNAME = freebl_pure32_$(NSSVERS)
ifneq ($(USE_64), 1)
ifeq ($(OS_ARCH), SunOS)
ifneq ($(OS_TEST),i86pc)
COPYFREEBL = 1
endif
endif
ifeq ($(OS_ARCH), HP-UX)
ifneq ($(OS_TEST),ia64)
COPYFREEBL = 1
endif
endif
endif
# svrcore library
SVRCOREVERS =
SVRCOREVERS_SUFFIX =
SVRCORE_LIBNAME = svrcore$(SVRCOREVERS)
ifeq ($(OS_ARCH), WINNT)
SVRCORE_LINK = $(SVRCORE_LIBS) $(SVRCORE_LIBNAME).$(LIB_SUFFIX)
else
SVRCORE_LINK = $(SVRCORE_LIBS) -l$(SVRCORE_LIBNAME)
endif
# sasl library
ifdef SASL_LIBS
SASL_LINK = $(SASL_LIBS)
endif
#
# NSPR library
#
PLCBASE=plc$(NSPR_LIBVERSION)
PLDSBASE=plds$(NSPR_LIBVERSION)
NSPRBASE=nspr$(NSPR_LIBVERSION)
ifeq ($(OS_ARCH), WINNT)
PLC_BASENAME=lib$(PLCBASE)
PLDS_BASENAME=lib$(PLDSBASE)
NSPR_BASENAME=lib$(NSPRBASE)
DYNAMICNSPR = $(PLC_BASENAME).$(LIB_SUFFIX) $(PLDS_BASENAME).$(LIB_SUFFIX) $(NSPR_BASENAME).$(LIB_SUFFIX)
else
PLC_BASENAME=$(PLCBASE)
PLDS_BASENAME=$(PLDSBASE)
NSPR_BASENAME=$(NSPRBASE)
DYNAMICNSPR = -l$(PLCBASE) -l$(PLDSBASE) -l$(NSPRBASE)
endif
# use the NSPRLINK macro in other makefiles to define the linker command line
# the mozilla client build likes to set the makefile macro directly
ifdef LIBS_ALREADY_SET
NSPRLINK = $(NSPR_LIBS)
else
NSPRLINK = $(NSPR_LIBS) $(DYNAMICNSPR)
endif
# why the redundant definitions? apparently, all of these basename/libname macros are so that
# the ldapsdk can create a package containing all of the nspr shared libs/dlls - I don't think
# we should do this anymore, we should just depend on the user installing nspr first - then we
# can get rid of all of this junk
PLC_LIBNAME=$(PLCBASE)
PLDS_LIBNAME=$(PLDSBASE)
NSPR_LIBNAME=$(NSPRBASE)
RM = rm -f
SED = sed
# uncomment to enable support for LDAP referrals
LDAP_REFERRALS = -DLDAP_REFERRALS
DEFNETSSL = -DNET_SSL
NOLIBLCACHE = -DNO_LIBLCACHE
NSDOMESTIC = -DNS_DOMESTIC
ifdef BUILD_OPT
LDAP_DEBUG =
else
LDAP_DEBUG = -DLDAP_DEBUG
endif
ifdef BUILD_CLU
BUILDCLU = 1
else
BUILDCLU =
endif
#
# DEFS are included in CFLAGS
#
DEFS = $(PLATFORMCFLAGS) $(LDAP_DEBUG) \
$(CLDAP) $(DEFNETSSL) $(NOLIBLCACHE) \
$(LDAP_REFERRALS) $(LDAP_DNS) $(STR_TRANSLATION) \
$(LIBLDAP_CHARSETS) $(LIBLDAP_DEF_CHARSET) \
$(NSDOMESTIC) $(LDAPSSLIO)
ifeq ($(OS_ARCH), WINNT)
DIRVER_PROG=$(COMMON_OBJDIR)/dirver.exe
else
DIRVER_PROG=$(COMMON_OBJDIR)/dirver
endif
ifeq ($(OS_ARCH), WINNT)
EXE_SUFFIX=.exe
RSC=rc
ifdef NS_USE_GCC
OFFLAG=-o #
else
OFFLAG=/Fo
MT = mt.exe
endif
else
OFFLAG=-o
endif
ifeq ($(OS_ARCH), Linux)
DEFS += -DLINUX2_0 -DLINUX1_2 -DLINUX2_1
endif
ifeq ($(OS_ARCH), WINNT)
ifndef NS_USE_GCC
DLLEXPORTS_PREFIX=-DEF:
USE_DLL_EXPORTS_FILE = 1
endif
endif
ifeq ($(OS_ARCH), OS2)
USE_DLL_EXPORTS_FILE = 1
endif
ifeq ($(OS_ARCH), SunOS)
ifndef NS_USE_GCC
DLLEXPORTS_PREFIX=-Blocal -M
USE_DLL_EXPORTS_FILE = 1
# else
# use the --version-script GNU ld argument - need to add support for
# GNU (linux and solaris and ???) to genexports.pl et. al.
endif # NS_USE_GCC
endif
ifeq ($(OS_ARCH), IRIX)
DLLEXPORTS_PREFIX=-exports_file
USE_DLL_EXPORTS_FILE = 1
endif
ifeq ($(OS_ARCH), HP-UX)
DEFS += -Dhpux -D_REENTRANT
endif
ifeq ($(OS_ARCH),AIX)
DLLEXPORTS_PREFIX=-bE:
DL=-ldl
USE_DLL_EXPORTS_FILE = 1
endif
ifeq ($(OS_ARCH),OSF1)
DEFS += -DOSF1V4
DL=
endif
ifeq ($(OS_ARCH),ReliantUNIX)
DL=-ldl
ifdef RPATHFLAG
USE_LD_RUN_PATH=1
endif
USE_CCC_TO_LINK=1
CCC=$(CXX)
endif
ifeq ($(OS_ARCH),UnixWare)
DL=
endif
ifeq ($(OS_ARCH), SunOS)
# flag to pass to cc when linking to set runtime shared library search path
# this is used like this, for example: $(RPATHFLAG_PREFIX)../..
# Also, use the C++ compiler to link for 64-bit builds.
ifeq ($(USE_64), 1)
USE_CCC_TO_LINK=1
ifdef RPATHFLAG
RPATHFLAG_PREFIX=-R:
endif
else
ifdef RPATHFLAG
RPATHFLAG_PREFIX=-Wl,-R,
endif
endif
ifdef NS_USE_GCC
USE_CCC_TO_LINK=1
ifdef RPATHFLAG
RPATHFLAG_PREFIX=-Wl,-R,
endif
endif
# flag to pass to ld when linking to set runtime shared library search path
# this is used like this, for example: $(LDRPATHFLAG_PREFIX)../..
ifdef RPATHFLAG
LDRPATHFLAG_PREFIX=-R
endif
# OS network libraries
PLATFORMLIBS+=-lresolv -lsocket -lnsl -lgen -ldl -lposix4
endif
ifeq ($(OS_ARCH), OSF1)
# Use the C++ compiler to link
USE_CCC_TO_LINK=1
# flag to pass to cc when linking to set runtime shared library search path
# this is used like this, for example: $(RPATHFLAG_PREFIX)../..
ifdef RPATHFLAG
RPATHFLAG_PREFIX=-Wl,-rpath,
# flag to pass to ld when linking to set runtime shared library search path
# this is used like this, for example: $(LDRPATHFLAG_PREFIX)../..
LDRPATHFLAG_PREFIX=-rpath
endif
# allow for unresolved symbols
DLL_LDFLAGS += -expect_unresolved "*"
endif # OSF1
ifeq ($(OS_ARCH), AIX)
# Flags to set runtime shared library search path. For example:
# $(CC) $(RPATHFLAG_PREFIX)../..$(RPATHFLAG_EXTRAS)
ifdef RPATHFLAG
RPATHFLAG_PREFIX=-blibpath:
RPATHFLAG_EXTRAS=:/usr/lib:/lib
# flag to pass to ld when linking to set runtime shared library search path
# this is used like this, for example: $(LDRPATHFLAG_PREFIX)../..
LDRPATHFLAG_PREFIX=-blibpath:/usr/lib:/lib:
endif
DLL_LDFLAGS= -bM:SRE -bnoentry \
-L.:/usr/lib/threads:/usr/lpp/xlC/lib:/usr/lib:/lib
DLL_EXTRA_LIBS= -bI:/usr/lib/lowsys.exp -lC_r -lC -lpthreads -lc_r -lm \
/usr/lib/libc.a
EXE_EXTRA_LIBS= -bI:/usr/lib/syscalls.exp -lsvld -lpthreads
endif # AIX
ifeq ($(OS_ARCH), HP-UX)
# Use the C++ compiler to link
USE_CCC_TO_LINK=1
ifdef RPATHFLAG
# flag to pass to cc when linking to set runtime shared library search path
# this is used like this, for example: $(RPATHFLAG_PREFIX)../..
RPATHFLAG_PREFIX=-Wl,+s,+b,
# flag to pass to ld when linking to set runtime shared library search path
# this is used like this, for example: $(LDRPATHFLAG_PREFIX)../..
LDRPATHFLAG_PREFIX=+s +b
endif
# we need to link in the rt library to get sem_*()
PLATFORMLIBS += -lrt
PLATFORMCFLAGS=
endif # HP-UX
ifeq ($(OS_ARCH), Linux)
# Use the C++ compiler to link
USE_CCC_TO_LINK=1
# flag to pass to cc when linking to set runtime shared library search path
# this is used like this, for example: $(RPATHFLAG_PREFIX)../..
ifdef RPATHFLAG
RPATHFLAG_PREFIX=-Wl,-rpath,
# flag to pass to ld when linking to set runtime shared library search path
# this is used like this, for example: $(LDRPATHFLAG_PREFIX)../..
# note, there is a trailing space
LDRPATHFLAG_PREFIX=-rpath
endif # RPATHFLAG
endif # Linux
ifeq ($(OS_ARCH), Darwin)
# Darwin doesn't use RPATH.
#ifdef RPATHFLAG
RPATHFLAG_PREFIX=
#endif
# Use the C++ compiler to link
USE_CCC_TO_LINK=1
endif # Darwin
# Use the C++ compiler to link... or not.
ifdef USE_CCC_TO_LINK
CC_FOR_LINK=$(CCC)
else
CC_FOR_LINK=$(CC)
endif
#
# XXX: does anyone know of a better way to solve the "LINK_LIB2" problem? -mcs
#
# Link to produce a console/windows exe on Windows
#
ifeq ($(OS_ARCH), WINNT)
ifdef NS_USE_GCC
LINK_EXE = $(CC_FOR_LINK) -o $@ $(LDFLAGS) $(LCFLAGS) $(DEPLIBS) \
$(filter %.$(OBJ_SUFFIX),$^) $(OBJS) $(EXTRA_LIBS) $(PLATFORMLIBS)
LINK_LIB = $(AR) cr $@ $(OBJS)
LINK_DLL = $(CC_FOR_LINK) -shared -Wl,--export-all-symbols -Wl,--out-implib -Wl,$(@:.$(DLL_SUFFIX)=.$(LIB_SUFFIX)) $(LLFLAGS) $(DLL_LDFLAGS) -o $@ $(OBJS) $(EXTRA_LIBS) $(EXTRA_DLL_LIBS)
else
SUBSYSTEM=CONSOLE
LINK_EXE = $(CYGWIN_WRAPPER) link $(DLLFLAGS) -OUT:"$@" -MAP $(ALDFLAGS) $(LDFLAGS) $(ML_DEBUG) \
$(LCFLAGS) -NOLOGO $(DEBUG_FLAGS) -INCREMENTAL:NO \
-NODEFAULTLIB:MSVCRTD -SUBSYSTEM:$(SUBSYSTEM) $(DEPLIBS) \
$(filter %.$(OBJ_SUFFIX),$^) $(OBJS) $(EXTRA_LIBS) $(PLATFORMLIBS) msvcrt.lib
ifdef MT
LINK_EXE += ; if test -f $@.manifest ; then \
$(MT) -NOLOGO -MANIFEST $@.manifest -OUTPUTRESOURCE:$@\;1; \
rm -f $@.manifest ; fi
endif # MSVC with manifest tool - from NSS rules.mk
# AR is set when doing an autoconf build
ifdef AR
LINK_LIB = $(CYGWIN_WRAPPER) $(AR) $(OBJS)
else
LINK_LIB = $(CYGWIN_WRAPPER) lib -OUT:"$@" $(OBJS)
endif
ifndef LD
LD=link
endif
LINK_DLL = $(CYGWIN_WRAPPER) $(LD) $(DLLFLAGS) -MAP $(OS_DLLFLAGS) \
$(ML_DEBUG) -SUBSYSTEM:$(SUBSYSTEM) $(LLFLAGS) $(DLL_LDFLAGS) \
$(EXTRA_LIBS) -out:"$@" $(OBJS)
endif # NS_USE_GCC
else # WINNT
#
# UNIX link commands
#
ifeq ($(OS_ARCH),OS2)
LINK_LIB = -$(RM) $@ && $(AR) $(AR_FLAGS) $(OBJS) && $(RANLIB) $@
LINK_LIB2 = -$(RM) $@ && $(AR) $@ $(OBJS2) && $(RANLIB) $@
LINK_DLL = $(LD) $(DSO_LDOPTS) $(ALDFLAGS) $(DLL_LDFLAGS) $(DLL_EXPORT_FLAGS) \
-o $@ $(OBJS)
else
LINK_LIB = $(RM) $@; $(AR) $(AR_FLAGS) $(OBJS); $(RANLIB) $@
LINK_LIB2 = $(RM) $@; $(AR) $@ $(OBJS2); $(RANLIB) $@
ifneq ($(LD),$(CC))
ifdef SONAMEFLAG_PREFIX
LINK_DLL = $(LD) $(DSO_LDOPTS) $(LDRPATHFLAG_PREFIX)$(RPATHFLAG) $(ALDFLAGS) \
$(DLL_LDFLAGS) $(DLL_EXPORT_FLAGS) \
-o $@ $(SONAMEFLAG_PREFIX)$(notdir $@) $(OBJS)
else # SONAMEFLAG_PREFIX
LINK_DLL = $(LD) $(DSO_LDOPTS) $(LDRPATHFLAG_PREFIX)$(RPATHFLAG) $(ALDFLAGS) \
$(DLL_LDFLAGS) $(DLL_EXPORT_FLAGS) \
-o $@ $(OBJS)
endif # SONAMEFLAG_PREFIX
else # $(CC) is used to link libs
ifdef SONAMEFLAG_PREFIX
LINK_DLL = $(LD) $(DSO_LDOPTS) $(RPATHFLAG_PREFIX)$(RPATHFLAG) $(ALDFLAGS) \
$(DLL_LDFLAGS) $(DLL_EXPORT_FLAGS) \
-o $@ $(SONAMEFLAG_PREFIX)$(notdir $@) $(OBJS)
else # SONAMEFLAG_PREFIX
LINK_DLL = $(LD) $(DSO_LDOPTS) $(RPATHFLAG_PREFIX)$(RPATHFLAG) $(ALDFLAGS) \
$(DLL_LDFLAGS) $(DLL_EXPORT_FLAGS) \
-o $@ $(OBJS)
endif # SONAMEFLAG_PREFIX
endif # LD!CC
endif #!os2
ifeq ($(OS_ARCH), OSF1)
# The linker on OSF/1 gets confused if it finds an so_locations file
# that doesn't meet its expectations, so we arrange to remove it before
# linking.
SO_FILES_TO_REMOVE=so_locations
endif
ifneq (,$(filter BeOS Darwin NetBSD,$(OS_ARCH)))
LINK_DLL = $(MKSHLIB) $(OBJS)
endif
ifeq ($(OS_ARCH), HP-UX)
# On HPUX, we need a couple of changes:
# 1) Use the C++ compiler for linking, which will pass the +eh flag on down to the
# linker so the correct exception-handling-aware libC gets used (libnshttpd.sl
# needs this).
# 2) Add a "-Wl,-E" option so the linker gets a "-E" flag. This makes symbols
# in an executable visible to shared libraries loaded at runtime.
LINK_EXE = $(CC_FOR_LINK) -Wl,-E $(ALDFLAGS) $(LDFLAGS) $(RPATHFLAG_PREFIX)$(RPATHFLAG) -o $@ $(filter %.$(OBJ_SUFFIX),$^) $(OBJS) $(EXTRA_LIBS) $(PLATFORMLIBS)
ifeq ($(USE_64), 1)
ifeq ($(OS_RELEASE), B.11.23)
LINK_EXE = $(CC_FOR_LINK) -DHPUX_ACC -D__STDC_EXT__ -D_POSIX_C_SOURCE=199506L +DD64 -Wl,-E $(ALDFLAGS) $(LDFLAGS) $(RPATHFLAG_PREFIX)$(RPATHFLAG) -o $@ $(filter %.$(OBJ_SUFFIX),$^) $(OBJS) $(EXTRA_LIBS) $(PLATFORMLIBS)
else
LINK_EXE = $(CC_FOR_LINK) -DHPUX_ACC -D__STDC_EXT__ -D_POSIX_C_SOURCE=199506L +DA2.0W +DS2.0 -Wl,-E $(ALDFLAGS) $(LDFLAGS) $(RPATHFLAG_PREFIX)$(RPATHFLAG) -o $@ $(filter %.$(OBJ_SUFFIX),$^) $(OBJS) $(EXTRA_LIBS) $(PLATFORMLIBS)
endif
endif
else # HP-UX
# everything except HPUX
ifdef USE_LD_RUN_PATH
#does RPATH differently. instead we export RPATHFLAG as LD_RUN_PATH
#see ns/netsite/ldap/clients/tools/Makefile for an example
export LD_RUN_PATH=$(RPATHFLAG)
LINK_EXE = $(CC_FOR_LINK) $(ALDFLAGS) $(LDFLAGS) \
-o $@ $(filter %.$(OBJ_SUFFIX),$^) $(OBJS) $(EXTRA_LIBS) $(PLATFORMLIBS)
LINK_EXE_NOLIBSOBJS = $(CC_FOR_LINK) $(ALDFLAGS) $(LDFLAGS) -o $@
else # USE_LD_RUN_PATH
LINK_EXE = $(CC_FOR_LINK) $(ALDFLAGS) $(LDFLAGS) \
$(RPATHFLAG_PREFIX)$(RPATHFLAG)$(RPATHFLAG_EXTRAS) \
-o $@ $(filter %.$(OBJ_SUFFIX),$^) $(OBJS) $(EXTRA_LIBS) $(PLATFORMLIBS)
LINK_EXE_NOLIBSOBJS = $(CC_FOR_LINK) $(ALDFLAGS) $(LDFLAGS) \
$(RPATHFLAG_PREFIX)$(RPATHFLAG)$(RPATHFLAG_EXTRAS) -o $@
endif # USE_LD_RUN_PATH
endif # HP-UX
endif # WINNT
ifndef PERL
PERL = perl
endif
#
# shared library symbol export definitions
#
ifeq ($(OS_ARCH), WINNT)
GENEXPORTS=cmd /c $(PERL) $(LDAP_SRC)/build/genexports.pl
else
GENEXPORTS=$(PERL) $(LDAP_SRC)/build/genexports.pl
endif
#!/bin/sh
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (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 the Netscape svrcore library.
#
# The Initial Developer of the Original Code is
# Red Hat
# Portions created by the Initial Developer are Copyright (C) 2006
# the Initial Developer. All Rights Reserved.
#
# Contributor(s): Rich Megginson <richm@stanfordalumni.org>
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
# This script can be used to build the mozldap rpms and srpm. It assumes
# you begin with nothing but this script. You must have nspr, nspr-devel,
# nss, and nss-devel, and svrcore-devel installed on your system in order to run this script. Not
# only will the script check, but the rpmbuild will also check and bomb out if
# those dependencies are not present. The script allows you to build the rpm
# as a non root user and puts the build files under the current directory. This
# script does not install the rpm.
#
# You may need to edit this script to change:
# the versions of nspr and nss and svrcore used
# the CVS tag for pulling mozldap
# the mozldap version and release - these should match the spec file
# Always switch into the base directory of this
# shell script prior to executing it so that all
# of its output is written to this directory
cd `dirname $0`
# This script may ONLY be run on Linux!
OS=`uname`
if [ ${OS} != "Linux" ]; then
echo "The '$0' script is ONLY executable on a 'Linux' machine!"
exit 255
fi
# This script may ONLY be executed on either
# an 'i386' platform or an 'x86_64' platform!
PLATFORM=`uname -i`
if [ ${PLATFORM} = "i386" ]; then
BITSIZE=32-bit
elif [ ${PLATFORM} = "x86_64" ]; then
BITSIZE=64-bit
else
echo "The '$0' script is ONLY executable on either"
echo "an 'i386' platform or an 'x86_64' platform!"
exit 255
fi
# initialize environment variables for this script
unset LD_LIBRARY_PATH
CVSROOT=:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot
export CVSROOT
# define the remaining variables
PACKAGE=mozldap6
VERSION=6.0.0
RELEASE=1
MOZLDAP_TAG=LDAPCSDK_6_0_0_RTM
PRJ=${PACKAGE}-${VERSION}
RPM_HOME=`pwd`
SPEC_FILENAME=${PACKAGE}.spec
# define subroutines for this script
usage() {
echo
echo "Usage: $0"
echo
}
mkdirs() {
for d in "$@" ; do
if [ -d $d ]; then
mv $d $d.deleted
rm -rf $d.deleted &
fi
mkdir -p $d
done
}
# check the number of arguments supplied to this script
if [ $# -ne 0 ] ; then
usage
exit 255
fi
# remove any old RPM directories
echo "Removing any old RPM directories . . ."
if [ -d ${RPM_HOME}/BUILD ]; then
rm -rf ${RPM_HOME}/BUILD
fi
if [ -d ${RPM_HOME}/SOURCES ]; then
rm -rf ${RPM_HOME}/SOURCES
fi
if [ -d ${RPM_HOME}/SPECS ]; then
rm -rf ${RPM_HOME}/SPECS
fi
echo "Finished."
echo "Changing current working directory to ${RPM_HOME}."
cd ${RPM_HOME}
# create new RPM directories
echo "Creating new RPM directories . . ."
mkdirs BUILD
if [ ! -d ${RPM_HOME}/RPMS ]; then
mkdirs ${RPM_HOME}/RPMS
fi
if [ ! -d ${RPM_HOME}/SGTARS ]; then
mkdirs ${RPM_HOME}/SGTARS
fi
mkdirs SOURCES SPECS
if [ ! -d ${RPM_HOME}/SRPMS ]; then
mkdirs ${RPM_HOME}/SRPMS
fi
echo "Finished."
# check out MOZLDAP code
echo "Checking out MOZLDAP source code . . ."
cvs -z3 export -r ${MOZLDAP_TAG} -d ${PRJ} -N DirectorySDKSourceC
echo "Finished."
# create a tarball from the checked out code
echo "Creating tarball of MOZLDAP source code . . ."
tar cf - ${PRJ} | gzip > SOURCES/${PRJ}.tar.gz
echo "Finished."
# remove the checked out code
echo "Removing checked out MOZLDAP source code . . ."
rm -rf ${PRJ}
echo "Finished."
# create a spec file from the MOZLDAP template
cp mozldap.spec SPECS/${SPEC_FILENAME}
# build the ${BITSIZE} RPM and Source RPM
echo "Executing ${BITSIZE} rpmbuild of ${SPEC_FILENAME} file . . . "
if [ ! -f SRPMS/${PACKAGE}-${VERSION}-${RELEASE}.src.rpm ]; then
rpmbuild --define="_topdir ${RPM_HOME}" --target ${PLATFORM} -ba --clean --rmsource --rmspec SPECS/${SPEC_FILENAME}
else
rpmbuild --define="_topdir ${RPM_HOME}" --target ${PLATFORM} -bb --clean --rmsource --rmspec SPECS/${SPEC_FILENAME}
fi
echo "Finished doing ${BITSIZE} rpmbuild of ${SPEC_FILENAME} file."
echo "Removing BUILD directory . . ."
if [ -d ${RPM_HOME}/BUILD ]; then
rm -rf ${RPM_HOME}/BUILD
fi
echo "Finished."
echo "Removing SOURCES directory . . ."
if [ -d ${RPM_HOME}/SOURCES ]; then
rm -rf ${RPM_HOME}/SOURCES
fi
echo "Finished."
echo "Removing SPECS directory . . ."
if [ -d ${RPM_HOME}/SPECS ]; then
rm -rf ${RPM_HOME}/SPECS
fi
echo "Finished."
#
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (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 Mozilla Communicator client code, released
# March 31, 1998.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998-1999
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#
# Alternatively, the contents of this file may be used under the terms of
# either of the GNU General Public License Version 2 or later (the "GPL"),
# or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
COMPONENTS_DIR = /share/builds/components
# NSPR - Netscape Portable Runtime
NSPR_LIBVERSION = 4
NSPR_RELEASE_TAG = v4.4.1
NSPR_RELEASE_TREE = $(COMPONENTS_DIR)
# NSS - Network Security Services
NSSVERS = 3
NSS_RELEASE_TAG = NSS_3_9_3_RTM
NSS_DYNAMIC_SOFTOKN = 1
NSS_RELEASE_TREE = $(COMPONENTS_DIR)
# SVRCORE - Client/server utility library
SVRCORE_RELEASE_TAG = SVRCORE_4_0_RTM
SVRCORE_RELEASE_TREE = $(COMPONENTS_DIR)
# LDAP library
LDAPVERS = 60
LDAPVERS_SUFFIX = 6.0
# PRLDAP library
PRLDAPVERS = 60
PRLDAPVERS_SUFFIX = 6.0
# LBER library
LBERVERS = 60
LBERVERS_SUFFIX = 6.0
# ldif library
LDIFVERS = 60
LDIFVERS_SUFFIX = 6.0
# iutil library
IUTILVERS = 60
IUTILVERS_SUFFIX = 6.0
# util library
UTILVERS = 60
UTILVERS_SUFFIX = 6.0
# ssl library
SSLDAPVERS = 60
SSLDAPVERS_SUFFIX = 6.0
#
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (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 the Netscape Portable Runtime (NSPR).
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998-2000
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#
# Alternatively, the contents of this file may be used under the terms of
# either of the GNU General Public License Version 2 or later (the "GPL"),
# or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
#
# Config stuff for AIX.
#
include $(MOD_DEPTH)/config/UNIX.mk
#
# XXX
# Temporary define for the Client; to be removed when binary release is used
#
ifdef MOZILLA_CLIENT
ifneq ($(USE_PTHREADS),1)
CLASSIC_NSPR = 1
endif
endif
#
# There are three implementation strategies available on AIX:
# pthreads, classic, and pthreads-user.
#
# On AIX 3.2, classic nspr is the default (and only) implementation
# strategy. On AIX 4.1 and later, the default is pthreads.
#
ifeq ($(OS_RELEASE),3.2)
CLASSIC_NSPR = 1
endif
ifeq ($(CLASSIC_NSPR),1)
PTHREADS_USER =
USE_PTHREADS =
IMPL_STRATEGY = _EMU
DEFINES += -D_PR_LOCAL_THREADS_ONLY
else
ifeq ($(PTHREADS_USER),1)
USE_PTHREADS =
IMPL_STRATEGY = _PTH_USER
else
USE_PTHREADS = 1
ifeq ($(HAVE_CCONF), 1)
IMPL_STRATEGY =
else
IMPL_STRATEGY = _PTH
endif
endif
endif
# IPv6 support part of the standard AIX 4.3 release.
ifneq (,$(filter-out 3.2 4.1 4.2,$(OS_RELEASE)))
USE_IPV6 = 1
endif
ifeq ($(CLASSIC_NSPR),1)
CC = xlC
CCC = xlC
else
CC = xlC_r
CCC = xlC_r
endif
OS_CFLAGS = -qro -qroconst
ifeq ($(USE_64),1)
OBJECT_MODE = 64
export OBJECT_MODE
COMPILER_TAG = _64
else
ifeq ($(HAVE_CCONF), 1)
COMPILER_TAG =
else
COMPILER_TAG = _32
endif
endif
CPU_ARCH = rs6000
RANLIB = ranlib
OS_CFLAGS += -DAIX -DSYSV
ifeq ($(CC),xlC_r)
OS_CFLAGS += -qarch=com
endif
ifneq ($(OS_RELEASE),3.2)
OS_CFLAGS += -DAIX_HAVE_ATOMIC_OP_H -DAIX_TIMERS
endif
ifeq (,$(filter-out 3.2 4.1,$(OS_RELEASE)))
ifndef USE_PTHREADS
OS_CFLAGS += -DAIX_RENAME_SELECT
endif
endif
ifeq (,$(filter-out 3.2 4.1,$(OS_RELEASE)))
OS_CFLAGS += -D_PR_NO_LARGE_FILES
else
OS_CFLAGS += -D_PR_HAVE_OFF64_T -D_LARGEFILE64_SOURCE
endif
ifeq ($(OS_RELEASE),4.1)
OS_CFLAGS += -DAIX4_1
else
DSO_LDOPTS = -brtl -bM:SRE -bnoentry -bexpall
MKSHLIB = $(LD) $(DSO_LDOPTS)
ifeq ($(OS_RELEASE),4.3)
OS_CFLAGS += -DAIX4_3
endif
endif
# Have the socklen_t data type
ifeq ($(OS_RELEASE),4.3)
OS_CFLAGS += -DHAVE_SOCKLEN_T
endif
ifeq (,$(filter-out 4.2 4.3,$(OS_RELEASE)))
# On these OS revisions, localtime_r() is declared if _THREAD_SAFE
# is defined.
ifneq ($(CLASSIC_NSPR),1)
OS_CFLAGS += -DHAVE_POINTER_LOCALTIME_R
endif
endif
ifeq (,$(filter-out 4.3,$(OS_RELEASE)))
# On these OS revisions, gethostbyXXX() returns result in thread
# specific storage.
ifeq ($(USE_PTHREADS),1)
OS_CFLAGS += -D_PR_HAVE_THREADSAFE_GETHOST
endif
endif
#
# Special link info for constructing AIX programs. On AIX we have to
# statically link programs that use NSPR into a single .o, rewriting the
# calls to select to call "aix". Once that is done we then can
# link that .o with a .o built in nspr which implements the system call.
#
ifneq (,$(filter-out 3.2 4.1,$(OS_RELEASE)))
AIX_LINK_OPTS = -brtl -bnso -berok
else
AIX_LINK_OPTS = -bnso -berok
#AIX_LINK_OPTS = -bnso -berok -brename:.select,.wrap_select -brename:.poll,.wrap_poll -bI:/usr/lib/syscalls.exp
endif
AIX_WRAP = $(DIST)/lib/aixwrap.o
AIX_TMP = $(OBJDIR)/_aix_tmp.o
#
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (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 the Netscape Portable Runtime (NSPR).
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998-2000
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#
# Alternatively, the contents of this file may be used under the terms of
# either of the GNU General Public License Version 2 or later (the "GPL"),
# or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
#
# Config stuff for BSD/OS Unix.
#
include $(MOD_DEPTH)/config/UNIX.mk
ifeq (,$(filter-out 1.1 4.%,$(OS_RELEASE)))
CC = gcc -Wall -Wno-format
CCC = g++
else
CC = shlicc2
CCC = shlicc2
endif
RANLIB = ranlib
ifeq ($(USE_PTHREADS),1)
IMPL_STRATEGY = _PTH
DEFINES += -D_PR_NEED_PTHREAD_INIT
else
IMPL_STRATEGY = _EMU
DEFINES += -D_PR_LOCAL_THREADS_ONLY
endif
OS_CFLAGS = $(DSO_CFLAGS) -DBSDI -DHAVE_STRERROR -DNEED_BSDREGEX
ifeq (86,$(findstring 86,$(OS_TEST)))
CPU_ARCH = x86
endif
ifeq (sparc,$(findstring sparc,$(OS_TEST)))
CPU_ARCH = sparc
endif
ifeq ($(OS_RELEASE),2.1)
OS_CFLAGS += -D_PR_TIMESPEC_HAS_TS_SEC
endif
ifeq (,$(filter-out 1.1 2.1,$(OS_RELEASE)))
OS_CFLAGS += -D_PR_BSDI_JMPBUF_IS_ARRAY
else
OS_CFLAGS += -D_PR_SELECT_CONST_TIMEVAL -D_PR_BSDI_JMPBUF_IS_STRUCT
endif
NOSUCHFILE = /no-such-file
ifeq ($(OS_RELEASE),1.1)
OS_CFLAGS += -D_PR_STAT_HAS_ONLY_ST_ATIME -D_PR_NEED_H_ERRNO
else
OS_CFLAGS += -DHAVE_DLL -DUSE_DLFCN -D_PR_STAT_HAS_ST_ATIMESPEC
OS_LIBS = -ldl
ifeq (,$(filter-out 4.%,$(OS_RELEASE)))
MKSHLIB = $(CC) $(DSO_LDOPTS)
DSO_CFLAGS = -fPIC
DSO_LDOPTS = -shared -Wl,-soname,$(@:$(OBJDIR)/%.so=%.so)
else
MKSHLIB = $(LD) $(DSO_LDOPTS)
DSO_LDOPTS = -r
endif
endif
#
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (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 the Netscape Portable Runtime (NSPR).
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998-2000
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#
# Alternatively, the contents of this file may be used under the terms of
# either of the GNU General Public License Version 2 or later (the "GPL"),
# or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
######################################################################
# Config stuff for BeOS (all architectures)
######################################################################
######################################################################
# Version-independent
######################################################################
DEFINES +=
XP_DEFINE = -DXP_BEOS
OBJ_SUFFIX = o
LIB_SUFFIX = a
DLL_SUFFIX = so
AR = ar cr $@
ifdef BUILD_OPT
DEFINES = -UDEBUG -DNDEBUG
OBJDIR_TAG = _OPT
else
DEFINES = -DDEBUG -UNDEBUG
OBJDIR_TAG = _DBG
endif
ifeq (PC,$(findstring PC,$(OS_TEST)))
CPU_ARCH = x86
CC = gcc
CCC = g++
LD = gcc
RANLIB = ranlib
DSO_LDOPTS = -nostart
PORT_FLAGS = -DHAVE_STRERROR
ifdef BUILD_OPT
OPTIMIZER = -O2
LDFLAGS += -s
else
OPTIMIZER = -gdwarf-2 -O0
endif
else
CPU_ARCH = ppc
CC = mwcc
CCC = mwcc
LD = mwld
RANLIB = ranlib
DSO_LDOPTS = -xms -export pragma \
-init _init_routine_ \
-term _term_routine_ \
-lroot -lnet \
/boot/develop/lib/ppc/glue-noinit.a \
/boot/develop/lib/ppc/init_term_dyn.o \
/boot/develop/lib/ppc/start_dyn.o
PORT_FLAGS = -DHAVE_STRERROR -D_POSIX_SOURCE
ifdef BUILD_OPT
OPTIMIZER = -O2
else
OPTIMIZER = -g -O0
endif
endif
CPU_ARCH_TAG = _$(CPU_ARCH)
OS_INCLUDES = -I- -I.
#G++INCLUDES = -I/usr/include/g++
PLATFORM_FLAGS = -DBeOS -DBEOS $(OS_INCLUDES)
OS_CFLAGS = $(DSO_CFLAGS) $(PLATFORM_FLAGS) $(PORT_FLAGS)
USE_BTHREADS = 1
MKSHLIB = $(LD) $(DSO_LDOPTS)
OBJDIR_NAME = $(OS_CONFIG)_$(CPU_ARCH)$(OBJDIR_TAG).OBJ
####################################################################
#
# One can define the makefile variable NSDISTMODE to control
# how files are published to the 'dist' directory. If not
# defined, the default is "install using relative symbolic
# links". The two possible values are "copy", which copies files
# but preserves source mtime, and "absolute_symlink", which
# installs using absolute symbolic links. The "absolute_symlink"
# option requires NFSPWD.
#
####################################################################
NSINSTALL = $(MOD_DEPTH)/config/$(OBJDIR_NAME)/nsinstall
ifeq ($(NSDISTMODE),copy)
# copy files, but preserve source mtime
INSTALL = $(NSINSTALL) -t
else
ifeq ($(NSDISTMODE),absolute_symlink)
# install using absolute symbolic links
INSTALL = $(NSINSTALL) -L `$(NFSPWD)`
else
# install using relative symbolic links
INSTALL = $(NSINSTALL) -R
endif
endif
define MAKE_OBJDIR
if test ! -d $(@D); then rm -rf $(@D); $(NSINSTALL) -D $(@D); fi
endef
#
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (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 the Netscape Portable Runtime (NSPR).
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998-2000
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#
# Alternatively, the contents of this file may be used under the terms of
# either of the GNU General Public License Version 2 or later (the "GPL"),
# or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
#
# Config stuff for Data General DG/UX
#
# Initial DG/UX port by Marc Fraioli <fraioli@dg-rtp.dg.com>
#
include $(MOD_DEPTH)/config/UNIX.mk
CC = gcc
CCC = g++
RANLIB = true
DEFINES += -D_PR_LOCAL_THREADS_ONLY
OS_CFLAGS = -DSVR4 -DSYSV -DDGUX -D_DGUX_SOURCE -D_POSIX4A_DRAFT6_SOURCE
MKSHLIB = $(LD) $(DSO_LDOPTS)
DSO_LDOPTS = -G
CPU_ARCH = x86
ARCH = dgux
NOSUCHFILE = /no-such-file
ifdef BUILD_OPT
OPTIMIZER = -O2
else
# -g would produce a huge executable.
OPTIMIZER =
endif