Compare commits

...

91 Commits

Author SHA1 Message Date
Mario Fetka
5fba979346 correct tar action
All checks were successful
Source release / source-package (push) Successful in 2m23s
2026-04-29 01:09:48 +02:00
Mario Fetka
1fb4c0b04c Add action
Some checks failed
Source release / source-package (push) Failing after 2m24s
2026-04-29 01:04:16 +02:00
Mario Fetka
90097c46c3 Add generated release headers 2026-04-28 23:20:33 +02:00
Mario Fetka
0a8c9594cf Prepare 2.2.7 release build files 2026-04-28 23:12:05 +02:00
Mario Fetka
8345f2d85f Replace BitKeeper dist target with Git archive 2026-04-28 23:08:29 +02:00
Mario Fetka
beb035b65d Convert hgignore to gitignore 2026-04-28 23:06:19 +02:00
Mario Fetka
6afee4d0a6 Convert hgignore to gitignore 2026-04-28 23:03:59 +02:00
Mario Fetka
92858f09f8 Prepare 2.2.7 release 2026-04-28 22:59:47 +02:00
Mario Fetka
4956e08f2e Update LSM metadata for 2.2.7 2026-04-28 21:40:16 +02:00
Mario Fetka
827339ce80 Remove temporary download cache 2026-04-28 21:22:45 +02:00
Mario Fetka
f469f50747 Remove temporary patch cache 2026-04-28 21:20:24 +02:00
Mario Fetka
32bec895a1 Apply patch: ncpfs-2.2.6-r5-nds-null-name.patch 2026-04-28 21:20:24 +02:00
Mario Fetka
df32d2f966 Apply patch: ncpfs-2.2.6-php-install-root.patch 2026-04-28 21:20:24 +02:00
Mario Fetka
ec01e736af Apply patch: ncpfs-2.2.6-php_auth_nds-php8.patch 2026-04-28 21:20:24 +02:00
Mario Fetka
238ee10077 Apply patch: ncpfs-2.2.6-php5x.patch 2026-04-28 21:20:24 +02:00
Mario Fetka
470ed23b98 Apply patch: ncpfs-2.2.6-fix-build-with-gcc14.patch 2026-04-28 21:20:24 +02:00
Mario Fetka
a92164d627 Apply patch: ncpfs-2.2.6-usr-merge.patch 2026-04-28 21:20:24 +02:00
Mario Fetka
e1ee3915bb Apply patch: ncpfs-2.2.6-makefile-fix-soname-link.patch 2026-04-28 21:20:24 +02:00
Mario Fetka
333460aa93 Apply patch: ncpfs-2.2.6-r6-ldflags-support.patch 2026-04-28 20:56:05 +02:00
Mario Fetka
c2011dbfef Apply patch: ncpfs-2.2.6-remove-libncp_atomic-header.patch 2026-04-28 20:56:05 +02:00
Mario Fetka
214c385876 Apply patch: ncpfs-2.2.6-no-suid-root.patch 2026-04-28 20:56:05 +02:00
Mario Fetka
95b744aafe Apply patch: ncpfs-2.2.6-r6-drop-mtab-support.patch 2026-04-28 20:56:05 +02:00
Mario Fetka
3ba8508d21 Apply patch: ncpfs-2.2.6-drop-kernel-check.patch 2026-04-28 20:56:05 +02:00
Mario Fetka
53b90566fa Apply patch: ncpfs-2.2.6-r6-servername-array-fix.patch 2026-04-28 20:56:05 +02:00
Mario Fetka
4a231c2331 Apply patch: ncpfs-2.2.6-pam_ncp_auth-fix.patch 2026-04-28 20:56:05 +02:00
Mario Fetka
f8a818a08e Apply patch: ncpfs-2.2.6-getuid-fix.patch 2026-04-28 20:56:05 +02:00
Mario Fetka
9a1a04bb89 Apply patch: ncpfs-2.2.6-align-fix.patch 2026-04-28 20:56:04 +02:00
Mario Fetka
5cb1ffb0c3 Apply patch: ncpfs-2.2.6-missing-includes.patch 2026-04-28 20:56:04 +02:00
Mario Fetka
25c1bd0cbd Apply patch: ncpfs-2.2.6-CVE-2011-1679+1680.diff 2026-04-28 20:56:04 +02:00
Mario Fetka
ef8bd91ac8 Apply patch: ncpfs-2_2_6_partial.patch 2026-04-28 20:56:04 +02:00
Mario Fetka
96f556756f Apply patch: ncpfs-2.2.6-mount-issue-ver2.patch 2026-04-28 20:56:04 +02:00
Mario Fetka
ac6fbba57f Apply patch: ncpfs.mount_hang.patch 2026-04-28 20:56:04 +02:00
Mario Fetka
4420173152 Apply patch: ncpfs.offsetof.patch 2026-04-28 20:56:04 +02:00
Mario Fetka
2c86c4e4e4 Apply patch: ncpfs.pam_ncp_auth.syslog.patch 2026-04-28 20:56:04 +02:00
Mario Fetka
0335fad01d Apply patch: ncpfs.LDFLAGS.patch 2026-04-28 20:56:04 +02:00
Mario Fetka
3dfee625b2 Apply patch: ncpfs-hg-commit-458.patch 2026-04-28 20:56:04 +02:00
Mario Fetka
1eabb4023c Apply patch: ncpfs-hg-commit-457.patch 2026-04-28 20:56:04 +02:00
Mario Fetka
e86c5b7566 Apply patch: ncpfs-hg-commit-456.patch 2026-04-28 20:56:04 +02:00
Mario Fetka
a6ec57e2dd Apply patch: ncpfs-hg-commit-455.patch 2026-04-28 20:56:04 +02:00
Mario Fetka
6697b0bf1f Apply patch: ncpfs-hg-commit-454.patch 2026-04-28 20:56:04 +02:00
Mario Fetka
3f2f1419a2 Apply patch: ncpfs-hg-commit-453.patch 2026-04-28 20:56:04 +02:00
Mario Fetka
ec8ac65ecd Apply patch: ncpfs-hg-commit-452.patch 2026-04-28 20:56:04 +02:00
Mario Fetka
08931df148 Apply patch: ncpfs-hg-commit-451.patch 2026-04-28 20:56:04 +02:00
Mario Fetka
99d2f50b13 Apply patch: ncpfs-hg-commit-450.patch 2026-04-28 20:56:04 +02:00
Mario Fetka
1e22bb8bb0 Apply patch: ncpfs-hg-commit-449.patch 2026-04-28 20:56:04 +02:00
Mario Fetka
4a212a344a Apply patch: ncpfs-hg-commit-448.patch 2026-04-28 20:56:04 +02:00
Mario Fetka
b8edcafa95 Apply patch: ncpfs-hg-commit-447.patch 2026-04-28 20:56:04 +02:00
Mario Fetka
f1bd71ad2b Apply patch: ncpfs-hg-commit-446.patch 2026-04-28 20:56:04 +02:00
Mario Fetka
3bb01f5f63 Apply patch: ncpfs-hg-commit-445.patch 2026-04-28 20:56:04 +02:00
Mario Fetka
418e9a73f3 Apply patch: ncpfs-hg-commit-444.patch 2026-04-28 20:56:04 +02:00
Mario Fetka
c1f9ff00aa Apply patch: ncpfs-hg-commit-443.patch 2026-04-28 20:56:04 +02:00
Mario Fetka
a3dffd8dd5 Apply patch: ncpfs-hg-commit-442.patch 2026-04-28 20:56:04 +02:00
Mario Fetka
783da0a9d7 Apply patch: ncpfs-hg-commit-441.patch 2026-04-28 20:56:04 +02:00
Mario Fetka
acef0daea1 Apply patch: ncpfs-hg-commit-440.patch 2026-04-28 20:56:04 +02:00
Mario Fetka
639326a47b Apply patch: ncpfs-hg-commit-439.patch 2026-04-28 20:56:04 +02:00
Mario Fetka
4dba55d5b7 Apply patch: ncpfs-hg-commit-438.patch 2026-04-28 20:56:04 +02:00
Mario Fetka
047d713617 Apply patch: ncpfs-hg-commit-437.patch 2026-04-28 20:56:03 +02:00
Mario Fetka
b3c6ede15c Apply patch: ncpfs-hg-commit-436.patch 2026-04-28 20:56:03 +02:00
Mario Fetka
3100445250 Apply patch: ncpfs-hg-commit-435.patch 2026-04-28 20:56:03 +02:00
Mario Fetka
d763fcf8d8 Apply patch: ncpfs-hg-commit-434.patch 2026-04-28 20:56:03 +02:00
Mario Fetka
90ae1620dc Apply patch: ncpfs-hg-commit-433.patch 2026-04-28 20:56:03 +02:00
Mario Fetka
6d512926a0 Apply patch: ncpfs-hg-commit-432.patch 2026-04-28 20:56:03 +02:00
Mario Fetka
4d94ea705a Apply patch: ncpfs-hg-commit-431.patch 2026-04-28 20:56:03 +02:00
Mario Fetka
b417a518c5 Apply patch: ncpfs-hg-commit-430.patch 2026-04-28 20:56:03 +02:00
Mario Fetka
3677b7040d Apply patch: ncpfs-hg-commit-429.patch 2026-04-28 20:56:03 +02:00
Mario Fetka
78bb78fa4e Apply patch: ncpfs-hg-commit-428.patch 2026-04-28 20:56:03 +02:00
Mario Fetka
973fa07c99 Apply patch: ncpfs-hg-commit-427.patch 2026-04-28 20:56:03 +02:00
Mario Fetka
6788b3fc6a Apply patch: ncpfs-hg-commit-426.patch 2026-04-28 20:56:03 +02:00
Mario Fetka
aa5795945d Apply patch: ncpfs-hg-commit-425.patch 2026-04-28 20:56:03 +02:00
Mario Fetka
c5eff7349b Apply patch: ncpfs-hg-commit-424.patch 2026-04-28 20:56:03 +02:00
Mario Fetka
81360b55ad Apply patch: ncpfs-hg-commit-423.patch 2026-04-28 20:56:02 +02:00
Mario Fetka
483fe570c5 Apply patch: ncpfs-hg-commit-422.patch 2026-04-28 20:56:02 +02:00
Mario Fetka
fa8a6d071b Apply patch: ncpfs-hg-commit-421.patch 2026-04-28 20:56:02 +02:00
Mario Fetka
466966b43a Apply patch: ncpfs-hg-commit-420.patch 2026-04-28 20:56:02 +02:00
Mario Fetka
6c6c86dcfb Apply patch: ncpfs-hg-commit-419.patch 2026-04-28 20:56:02 +02:00
Mario Fetka
42f1d0941d Apply patch: ncpfs-hg-commit-417.patch 2026-04-28 20:56:02 +02:00
Mario Fetka
58ca20a4ba Apply patch: ncpfs-hg-commit-416.patch 2026-04-28 20:56:02 +02:00
Mario Fetka
31af4d974c Apply patch: ncpfs-hg-commit-415.patch 2026-04-28 20:56:02 +02:00
Mario Fetka
4740ddf9ae Apply patch: ncpfs-hg-commit-414.patch 2026-04-28 20:56:02 +02:00
Mario Fetka
7589a3691c Apply patch: ncpfs-hg-commit-413.patch 2026-04-28 20:56:02 +02:00
Mario Fetka
d2eb8c0f30 Apply patch: ncpfs-hg-commit-412.patch 2026-04-28 20:56:02 +02:00
Mario Fetka
7283b290db Apply patch: ncpfs-hg-commit-411.patch 2026-04-28 20:56:02 +02:00
Mario Fetka
112bf1c545 Apply patch: ncpfs-hg-commit-410.patch 2026-04-28 20:56:02 +02:00
Mario Fetka
fc1534a821 Apply patch: ncpfs-hg-commit-409.patch 2026-04-28 20:56:02 +02:00
Mario Fetka
cf9a7f8a83 Apply patch: ncpfs-hg-commit-408.patch 2026-04-28 20:56:02 +02:00
Mario Fetka
1d3ed884cc Apply patch: ncpfs-hg-commit-407.patch 2026-04-28 20:56:02 +02:00
Mario Fetka
38655cdcbf Apply patch: ncpfs-hg-commit-406.patch 2026-04-28 20:56:02 +02:00
Mario Fetka
8237cf5dba Apply patch: ncpfs-hg-commit-405.patch 2026-04-28 20:56:02 +02:00
Mario Fetka
d5745d1c9b Apply patch: ncpfs-hg-commit-404.patch 2026-04-28 20:56:02 +02:00
Mario Fetka
6e2b9493f9 Apply patch: ncpfs-hg-commit-403.patch 2026-04-28 20:56:02 +02:00
ncpfs archive import
b34e88bda5 Import ncpfs 2.2.6 2026-04-28 20:40:00 +02:00
374 changed files with 105182 additions and 48772 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,284 @@
name: Source release
on:
push:
tags:
- "v*"
branches:
- master
workflow_dispatch:
jobs:
source-package:
runs-on: ubuntu-latest
env:
GITEA_API: https://gitea.disconnected-by-peer.at/api/v1
OWNER: mars_nwe
REPO: ncpfs
steps:
- name: Check out source
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
token: ${{ secrets.RELEASE_TOKEN }}
- name: Fetch tags explicitly
run: |
git fetch --force --tags
echo "describe:"
git describe --tags --exact-match || true
echo "points-at-head:"
git tag --points-at HEAD || true
- name: Install build dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
autoconf \
automake \
autopoint \
gettext \
gettext-base \
make \
gcc \
g++ \
pkg-config \
curl \
jq \
php-dev \
php-cli \
libpam0g-dev
- name: Determine version
id: version
run: |
set -e
VERSION="$(sed -n 's/^AC_INIT(\[\[ncpfs\]\],\[\[\([^]]*\)\]\].*/\1/p' configure.ac)"
if [ -z "$VERSION" ]; then
echo "Could not determine version from configure.ac"
exit 1
fi
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
echo "distfile=ncpfs-${VERSION}.tar.gz" >> "$GITHUB_OUTPUT"
echo "Version: $VERSION"
- name: Regenerate configure files
run: |
set -e
aclocal
autoheader
autoconf
cd contrib/php
rm -rf autom4te.cache
rm -f configure config.h config.h.in config.log config.status config.cache Makefile Makevars libtool
phpize
cd ../..
- name: Configure
run: |
set -e
./configure --with-php-config="$(command -v php-config)"
- name: Build
run: |
set -e
make
- name: Clean build artifacts
run: |
set -e
make clean || true
rm -rf \
autom4te.cache \
.libs \
modules
rm -f \
Makefile \
Make.rules \
config.log \
config.status \
config.cache \
config.nice \
libtool \
stamp-h1
rm -rf \
contrib/php/autom4te.cache \
contrib/php/.deps \
contrib/php/.libs \
contrib/php/modules \
contrib/php/libs
rm -f \
contrib/php/Makefile \
contrib/php/Makefile.fragments \
contrib/php/Makefile.objects \
contrib/php/Makevars \
contrib/php/config.h \
contrib/php/config.log \
contrib/php/config.status \
contrib/php/config.cache \
contrib/php/config.nice \
contrib/php/config_vars.mk \
contrib/php/libs.mk \
contrib/php/libtool \
contrib/php/run-tests.php \
contrib/php/*.lo \
contrib/php/*.la \
contrib/php/*.o \
contrib/php/*.dep \
contrib/php/*.slo
find . \
\( -name '*.o' \
-o -name '*.do' \
-o -name '*.to' \
-o -name '*.lo' \
-o -name '*.la' \
-o -name '*.a' \
-o -name '*.so' \
-o -name '*.so.*' \
-o -name '*.dep' \
-o -name '*.gcno' \
-o -name '*.gcda' \
-o -name '*.orig' \
-o -name '*.rej' \
-o -name '*~' \) \
-delete
find man -name '*.gz' -delete 2>/dev/null || true
find ipx-1.0 -name '*.gz' -delete 2>/dev/null || true
test -f lib/libncp.vers
- name: Build source tarball
id: pkg
run: |
set -e
VERSION="${{ steps.version.outputs.version }}"
DISTFILE="${{ steps.version.outputs.distfile }}"
git archive \
--format=tar \
--prefix="ncpfs-${VERSION}/" \
HEAD | gzip -9 > "../${DISTFILE}"
FILE="$(realpath "../${DISTFILE}")"
test -s "$FILE"
echo "file=$FILE" >> "$GITHUB_OUTPUT"
echo "name=$DISTFILE" >> "$GITHUB_OUTPUT"
echo "Created: $FILE"
tar -tzf "$FILE" > tarball-list.txt
sed -n '1,20p' tarball-list.txt
- name: Decide release target
id: target
env:
REF_TYPE: ${{ gitea.ref_type || github.ref_type }}
REF_NAME: ${{ gitea.ref_name || github.ref_name }}
SHA: ${{ gitea.sha || github.sha }}
run: |
set -e
if [ "$REF_TYPE" = "tag" ]; then
echo "tag=$REF_NAME" >> "$GITHUB_OUTPUT"
echo "name=$REF_NAME" >> "$GITHUB_OUTPUT"
echo "prerelease=false" >> "$GITHUB_OUTPUT"
else
SHORT_SHA="$(printf '%s' "$SHA" | cut -c1-7)"
echo "tag=development" >> "$GITHUB_OUTPUT"
echo "name=development ($REF_NAME @ $SHORT_SHA)" >> "$GITHUB_OUTPUT"
echo "prerelease=true" >> "$GITHUB_OUTPUT"
fi
- name: Create or update release
env:
GITEA_TOKEN: ${{ secrets.RELEASE_TOKEN }}
REL_TAG: ${{ steps.target.outputs.tag }}
REL_NAME: ${{ steps.target.outputs.name }}
REL_PRERELEASE: ${{ steps.target.outputs.prerelease }}
run: |
set -e
RELEASE_JSON="$(curl -fsS \
-H "Authorization: token ${GITEA_TOKEN}" \
"${GITEA_API}/repos/${OWNER}/${REPO}/releases/tags/${REL_TAG}" || true)"
if [ -z "$RELEASE_JSON" ]; then
RELEASE_JSON="$(curl -fsS -X POST \
-H "Authorization: token ${GITEA_TOKEN}" \
-H "Content-Type: application/json" \
"${GITEA_API}/repos/${OWNER}/${REPO}/releases" \
-d "$(jq -n \
--arg tag "$REL_TAG" \
--arg name "$REL_NAME" \
--argjson prerelease "$REL_PRERELEASE" \
'{tag_name:$tag,name:$name,draft:false,prerelease:$prerelease}')" )"
else
RELEASE_ID="$(printf '%s' "$RELEASE_JSON" | jq -r '.id')"
RELEASE_JSON="$(curl -fsS -X PATCH \
-H "Authorization: token ${GITEA_TOKEN}" \
-H "Content-Type: application/json" \
"${GITEA_API}/repos/${OWNER}/${REPO}/releases/${RELEASE_ID}" \
-d "$(jq -n \
--arg tag "$REL_TAG" \
--arg name "$REL_NAME" \
--argjson prerelease "$REL_PRERELEASE" \
'{tag_name:$tag,name:$name,draft:false,prerelease:$prerelease}')" )"
fi
echo "$RELEASE_JSON" > release.json
- name: Delete old asset with same name if present
env:
GITEA_TOKEN: ${{ secrets.RELEASE_TOKEN }}
NAME: ${{ steps.pkg.outputs.name }}
run: |
set -e
RELEASE_ID="$(jq -r '.id' release.json)"
ASSET_ID="$(curl -fsS \
-H "Authorization: token ${GITEA_TOKEN}" \
"${GITEA_API}/repos/${OWNER}/${REPO}/releases/${RELEASE_ID}" \
| jq -r --arg NAME "$NAME" '.assets[]? | select(.name==$NAME) | .id' \
| head -n1)"
if [ -n "$ASSET_ID" ]; then
curl -fsS -X DELETE \
-H "Authorization: token ${GITEA_TOKEN}" \
"${GITEA_API}/repos/${OWNER}/${REPO}/releases/${RELEASE_ID}/assets/${ASSET_ID}"
fi
- name: Upload tarball to release
env:
GITEA_TOKEN: ${{ secrets.RELEASE_TOKEN }}
FILE: ${{ steps.pkg.outputs.file }}
NAME: ${{ steps.pkg.outputs.name }}
run: |
set -e
RELEASE_ID="$(jq -r '.id' release.json)"
curl -fsS -X POST \
-H "Authorization: token ${GITEA_TOKEN}" \
-H "Content-Type: application/octet-stream" \
--data-binary @"${FILE}" \
"${GITEA_API}/repos/${OWNER}/${REPO}/releases/${RELEASE_ID}/assets?name=${NAME}"

220
.gitignore vendored Normal file
View File

@@ -0,0 +1,220 @@
# Object/build artifacts
*.a
*.d
*.do
*.la
*.lo
*.o
*.so
*.so.*
*.slo
*~
*.orig
*.rej
# Top-level configure/build outputs
/Make.rules
/Makefile
/autom4te.cache/
/config.log
/config.status
/config.cache
/stamp-h1
/libtool
# Generated config headers
/include/config.h
/include/ncp/ext/socket.h
/include/ncp/ext/stdint.h
/include/ncp/kernel/fs.h
/include/ncp/kernel/if.h
/include/ncp/kernel/ipx.h
/include/ncp/kernel/route.h
/include/ncp/kernel/types.h
/include/ncp/nwnet.h
# intl / po generated files
/intl/Makefile
/po/Makefile
/po/Makefile.in
/po/POTFILES
# Library outputs
/lib/Makefile
/lib/libncp.so.*
# manpage outputs
/man/*.gz
/man/Makefile
# ipx generated files
/ipx-1.0/*.gz
/ipx-1.0/Makefile
/ipx-1.0/Samples/Makefile
/ipx-1.0/Samples/ipxrcv
/ipx-1.0/Samples/ipxsend
/ipx-1.0/Samples/rip
/ipx-1.0/Samples/sap
/ipx-1.0/ipx_cmd
/ipx-1.0/ipx_configure
/ipx-1.0/ipx_interface
/ipx-1.0/ipx_internal_net
/ipx-1.0/ipx_route
/ipxdump/Makefile
# sutil binaries
/sutil/Makefile
/sutil/ncplogin
/sutil/ncpmap
/sutil/ncpmount
/sutil/ncpumount
/sutil/nwsfind
# util binaries
/util/Makefile
/util/ncopy
/util/ncptest
/util/nprint
/util/nsend
/util/nwauth
/util/nwbocreate
/util/nwbols
/util/nwboprops
/util/nwborm
/util/nwbpadd
/util/nwbpcreate
/util/nwbprm
/util/nwbpset
/util/nwbpvalues
/util/nwdir
/util/nwdpvalues
/util/nwfsctrl
/util/nwfsinfo
/util/nwfstime
/util/nwgrant
/util/nwlistsalvage
/util/nwmsg
/util/nwpasswd
/util/nwpjmv
/util/nwpqjob
/util/nwpurge
/util/nwrevoke
/util/nwrights
/util/nwsalvage
/util/nwtrustee
/util/nwtrustee2
/util/nwuserlist
/util/nwvolinfo
/util/pqlist
/util/pqstat
/util/pserver
/util/slist
# contrib generated files
/contrib/ncp_nss_lib/libnss_ncp.so.*
/contrib/ncp_nss_lib/test_ncp_nss
/contrib/pam/Makefile
/contrib/php/Makefile
/contrib/php/.deps/
/contrib/php/.libs/
/contrib/php/config.h
/contrib/php/config.log
/contrib/php/config.nice
/contrib/php/config.status
/contrib/php/config.cache
/contrib/php/config_vars.mk
/contrib/php/libs.mk
/contrib/php/php_auth_nds.slo
/contrib/php/modules/
/contrib/php/libs/
/contrib/php/libtool
/contrib/php/Makevars
/contrib/php/run-tests.php
/contrib/tcl-utils/Makefile
/contrib/tknwmsg/Makefile
/contrib/tests/Makefile
# contrib testing binaries
/contrib/testing/Makefile
/contrib/testing/abbrev
/contrib/testing/canon
/contrib/testing/chgpwd
/contrib/testing/cmpattr
/contrib/testing/copyauth
/contrib/testing/dirlimit
/contrib/testing/dirlist2
/contrib/testing/dssearch
/contrib/testing/dsstream
/contrib/testing/eaops
/contrib/testing/effright
/contrib/testing/fileinfo
/contrib/testing/large
/contrib/testing/lic
/contrib/testing/mkattr
/contrib/testing/mkclass
/contrib/testing/mkfile
/contrib/testing/mkobj
/contrib/testing/modclass
/contrib/testing/modobj
/contrib/testing/mvobj
/contrib/testing/nfssetinfo
/contrib/testing/nsfileinfo
/contrib/testing/nwbcast
/contrib/testing/nwdsgethost
/contrib/testing/nwdsgetstat
/contrib/testing/nwdsgetvi
/contrib/testing/nwdslist
/contrib/testing/nwdspartjoin
/contrib/testing/nwdspartlist
/contrib/testing/nwdspartrm
/contrib/testing/nwdspartsplit
/contrib/testing/nwdsresetstat
/contrib/testing/nwgettime
/contrib/testing/partroot
/contrib/testing/physlock
/contrib/testing/readaddr
/contrib/testing/readadef
/contrib/testing/readattr
/contrib/testing/readcc
/contrib/testing/readcls
/contrib/testing/readsynt
/contrib/testing/reloadds
/contrib/testing/renobj
/contrib/testing/replops
/contrib/testing/resint
/contrib/testing/resolve
/contrib/testing/rmattr
/contrib/testing/rmclass
/contrib/testing/rmobj
/contrib/testing/schsync
/contrib/testing/semaphore
/contrib/testing/setkeys
/contrib/testing/time
/contrib/testing/timegv
/contrib/testing/timeinfo
/contrib/testing/verpwd
/contrib/testing/verunix
/contrib/testing/vollist
/contrib/testing/wcsmbs-tst1
# contrib testing/pp binaries
/contrib/testing/pp/Makefile
/contrib/testing/pp/bcastmd
/contrib/testing/pp/getconn_addr
/contrib/testing/pp/getsynt
/contrib/testing/pp/nwc_next_object
/contrib/testing/pp/nwgetconnlist
/contrib/testing/pp/nwwhoami
/contrib/testing/pp/open_conn_by_name
/contrib/testing/pp/readsdef
/contrib/testing/pp/readsynt
/contrib/testing/pp/return_block_of_tree
/contrib/testing/pp/scantree
/contrib/testing/pp/scanvolr
/contrib/testing/pp/semaphor
/contrib/testing/pp/treelist
/contrib/testing/pp/vlist
/contrib/testing/pp/volres

1081
ABOUT-NLS

File diff suppressed because it is too large Load Diff

211
Changes
View File

@@ -1,3 +1,214 @@
ChangeSet@1.306, 2005-01-27 18:25:25+01:00
Fix CAN-2005-0013 and CAN-2005-0014.
Fix CAN-2005-0013: Run with euid == uid for most of time, and switch
to euid == 0 only when really needed.
And although previous change decreases impact of CAN-2005-0014, let's
fix random small static character arrays too.
And when modprobe is spawned (on 2.0.x kernel), start it with empty
environment.
ChangeSet@1.305, 2005-01-27 18:16:38+01:00
Move nds_login_auth prototype where it belongs.
ChangeSet@1.304, 2005-01-13 23:35:33+01:00
Kill strcpy_cw function, it has no right to survive.
ChangeSet@1.303, 2005-01-13 21:54:08+01:00
Obviously when I added nds_login_auth() to nwnet.h header, I should
have removed it from "obsolete" headers...
ChangeSet@1.302, 2005-01-13 20:57:58+01:00
Well, I hoped that nds_login_auth will die before it will become part
of API, but as I did not get to write NWDSLogin()-like function for
about 5 years, it is probably time to finally accept this patch.
Add nds_login_auth to ncpfs headers.
From Novell/SUSE via Olaf Hering.
ChangeSet@1.301, 2005-01-13 20:56:22+01:00
Add missing <string.h> includes here and there.
From Novell/SUSE via Olaf Hering.
ChangeSet@1.300, 2005-01-13 20:55:36+01:00
Create ${DESTDIR}/sbin directory when it does not exist, instead of
failing install.
From Novell/SUSE via Olaf Hering.
ChangeSet@1.299, 2005-01-13 20:54:42+01:00
Disable unused function in pam_ncp_auth.
From Novell/SUSE via Olaf Hering.
ChangeSet@1.298, 2005-01-13 20:46:55+01:00
Regenerate .gmos.
ChangeSet@1.297, 2005-01-13 20:45:55+01:00
Add couple of new translations, update existing ones, and switch
everything to UTF8. Hopefully older gettexts will not break.
From Novell/SUSE via Olaf Hering.
ChangeSet@1.296, 2004-11-30 16:51:35+01:00
Update version to 2.2.5 and regenerate autoconf things.
TAG: ncpfs-2.2.5
ChangeSet@1.295, 2004-11-30 16:43:28+01:00
Oops, this should have been checked before NWDSCreateContextHandleMnt
changes.
ChangeSet@1.294, 2004-11-30 16:42:25+01:00
Fix bad buffer overflow in NWDSCreateContextHandleMnt. Plus fix
bogus interpretation of treeName. And split
NWDSCreateContextHandleMnt into two functions, anything taking string
as argument must take context, as string's encoding is defined by
context settings...
ChangeSet@1.293, 2004-11-30 16:40:03+01:00
NCP extensions support. First version.
ChangeSet@1.292, 2004-11-30 16:39:01+01:00
Use 'GetNearestServer' while looking for connection for bindery resolver.
ChangeSet@1.291, 2004-06-07 20:11:24+02:00
Correct ncpmount manpage: both ncp and ncpfs are allowed filesystem types.
ChangeSet@1.290, 2004-05-30 00:05:33+02:00
Fix php_auth_nds build.
ChangeSet@1.289, 2004-05-30 00:04:58+02:00
Regenerate autotools files.
ChangeSet@1.288, 2004-05-30 00:03:04+02:00
Make code compatible with gcc-3.4 (mainly lvalue casts).
Get rid of all warnings messages.
ChangeSet@1.287, 2004-05-29 19:38:43+02:00
Update PHP module with Patrick's changes.
ChangeSet@1.286, 2004-05-29 19:37:36+02:00
Update PAM module with about two years old changes from Patrick. Sorry
for the delay.
ChangeSet@1.285, 2004-03-15 15:53:18+01:00
Replace tabs with spaces in printed out messages in readattr.
Properly parse NWDSRead output when request type 4 is specified in readattr.
ChangeSet@1.284, 2004-03-15 10:32:26+00:00, aia21@cantab.net
Apply patch (originally written by Ben Harris <bjh21@cam.ac.uk>) to
contrib/testing/readattr.c implementing the -n option to only print
the attribute value to stdout and improving the output formatting of
various things.
ChangeSet@1.283, 2004-02-10 19:27:19+01:00
ncpfs-2.2.4
TAG: ncpfs-2.2.4
ChangeSet@1.282, 2004-02-10 19:15:10+01:00
Fix ncp_path_to_NW_format for some boundary cases.
TAG: ncpfs-2.2.4
ChangeSet@1.281, 2004-02-10 19:13:01+01:00
Force nodev & nosuid when non-root mounts filesystem.
ChangeSet@1.280, 2004-02-02 01:19:30+01:00
Fix out-of-array indexing. RedHat bug 110897.
ChangeSet@1.279, 2003-12-19 16:10:14+01:00
Missed this one in last checkin.
ChangeSet@1.278, 2003-12-19 16:03:50+01:00
Rerun autoconf & phpize.
Fixes autoconf 2.5 vs. 2.13 mismatch between main configure and
code in contrib/php discovered by Robin Cook.
ChangeSet@1.277, 2003-12-10 12:21:04+01:00, esr@thyrsus.com
There was an unbalanced option group in nwpasswd synopsis.
ChangeSet@1.276, 2003-07-20 01:52:32+02:00, vana@evon.vc.cvut.cz
Update perl interface for swig-1.3.20.
ChangeSet@1.275, 2003-07-20 01:17:52+02:00, vana@evon.vc.cvut.cz
Move perl interface from contrib/swig to contrib/perl/ncpfs. MakeMaker
requires directory name identical to .pm.
ChangeSet@1.274, 2003-07-17 00:29:26+02:00
Updated autoconf to the latest code.
ChangeSet@1.273, 2003-07-17 00:27:41+02:00
Rename pqrm to nwpqjob, and add support for resuming held print jobs (resuming code
was contributed by Zdenek Roub).
ChangeSet@1.272, 2003-07-17 00:23:39+02:00, zroub@spss.zcu.cz
Add NWChangeQueueJobEntry to the library.
ChangeSet@1.271, 2003-07-16 23:08:22+02:00, stk@ahs.hist.no
NWDSReadAttrDef request buffers should be filled with NWDSPutAttrName, not with
NWDSPutClassItem.
ChangeSet@1.270, 2003-06-27 21:32:14+02:00
Disable logging questions.
Set default behavior for checkins to do get on modified files automatically.
ChangeSet@1.269, 2003-06-27 21:26:25+02:00
Add support for generating slackware src packages.
ChangeSet@1.268, 2003-06-14 22:37:35+02:00
Wait until ncpd exits when closing NCP connection. Otherwise ncpd can still run while
we are trying to open new connection (which fails due to local address still in use).
ChangeSet@1.267, 2003-06-14 17:05:13+02:00
Add '-a /auth/src' option to the ncpmount.
Originally by Petr Janecek <janecek@ucw.cz>.
ChangeSet@1.266, 2003-06-14 14:59:50+02:00
Fix syslog format string in nwpjmv.
ChangeSet@1.265, 2003-06-14 14:58:49+02:00
Fix changelog entry format for last commit.
ChangeSet@1.264, 2003-06-14 14:55:04+02:00, patrick.pollet@cipcinsa.insa-lyon.fr
Allow '-S /mount/point' in all utilities.
ChangeSet@1.263, 2003-04-23 22:18:08+02:00
Add error code to the nprint error messages.
ChangeSet@1.262, 2003-04-23 22:12:10+02:00
Fix nprint on big endian machines. Reported by Quinten Steenhuis.
ChangeSet@1.261, 2003-04-06 04:11:43+02:00
ignore:
added man/nwpjmv.1.gz util/nwpjmv
ChangeSet@1.260, 2003-04-06 04:09:49+02:00
Use closing of pipe instead of sending signal for signalling watchdog process.
Caller can do set*euid() between ncp_open() and ncp_close(), and it can happen
that caller at ncp_close() time has no rights to send signals to process created
at ncp_open() time :-(
Use doublefork for watchdog process so caller does not see this child...
ChangeSet@1.259, 2003-03-31 21:50:14+02:00
Switch pqstat to getopt() parser.
ChangeSet@1.258, 2003-03-31 21:35:04+02:00
Add version to the ncp_change_job_position symbol.
ChangeSet@1.257, 2003-03-31 21:33:56+02:00
Add -B option to pqstat.
ChangeSet@1.256, 2003-03-31 21:20:58+02:00
Add nwpjmv tool & ncp_change_job_position function. From Bruno Browning.
ChangeSet@1.255, 2003-03-31 21:11:39+02:00
ncpfs 2.2.3 changelog
ChangeSet@1.254, 2003-03-13 15:54:06+01:00
ncpfs-2.2.3
TAG: ncpfs-2.2.3

View File

@@ -2,6 +2,7 @@
INSTALL := @INSTALL@
INSTALL_DATA := @INSTALL_DATA@
CC := @CC@
RANLIB := @RANLIB@
prefix := @prefix@
exec_prefix := @exec_prefix@
@@ -42,11 +43,16 @@ CFLAGS_OPTIONS += $(CWARN)
CFLAGS_DEFINES := -DN_PLAT_LINUX -DLOCALEDIR=\"${localedir}\" -DNCPFS_VERSION=\"${VERSION}\" -DNCPFS_PACKAGE=\"${PACKAGE}\"
CCFLAGS := $(CFLAGS_DEFINES) $(CFLAGS_OPTIONS) $(INCLUDES)
LDFLAGS := @LDFLAGS@
# If your system is ELF, either also do a 'make install', or append the util/
# directory where the dynamic library resides to the environment
# variable LD_LIBRARY_PATH
HAVE_ELF := @ELF_TARGET@
BUILD_SHARED := @BUILD_SHARED@
libext := @libext@
shlibext := @shlibext@
VERSION_SOLIB := 2.3.0
VERSION_SONAME := 2.3

View File

@@ -11,19 +11,19 @@ include ${top_builddir}/Make.rules
.PHONY : tags TAGS clean_me dist tgz
BASE_SUBDIRS := lib sutil util man @ADDON_SUBDIRS@
EXECSUBDIRS = intl @POSUB@ $(BASE_SUBDIRS)
EXECSUBDIRS = @INTLSUB@ @POSUB@ $(BASE_SUBDIRS)
SUBDIRS := $(EXECSUBDIRS)
INSTALL_SUBDIRS := $(SUBDIRS)
INSTALL_DEV_SUBDIRS := lib sutil util man @ADDON_DEV_SUBDIRS@
CLEAN_SUBDIRS := lib sutil util man intl @POSUB@ ipxdump ipx-1.0 ipx-1.0/Samples contrib/testing \
CLEAN_SUBDIRS := lib sutil util man @INTLSUB@ @POSUB@ ipxdump ipx-1.0 ipx-1.0/Samples contrib/testing \
contrib/testing/pp contrib/tests contrib/libtrace contrib/nss64 \
contrib/tcl-utils contrib/php contrib/pam
export INCLUDES VERSION HAVE_ELF CFLAGS
export INCLUDES VERSION BUILD_SHARED CFLAGS
all:
set -e; for i in $(EXECSUBDIRS); do make -C $$i all; done
@if [ "$(HAVE_ELF)" = yes ] ;\
@if [ "$(BUILD_SHARED)" = yes ] ;\
then \
echo ; echo ; echo ;\
echo Please add \'`pwd`/lib\' to the environment ; \
@@ -71,6 +71,7 @@ distclean:
rm -f intl/Makefile po/Makefile po/Makefile.in
rm -f lib/Makefile man/Makefile sutil/Makefile util/Makefile
rm -f include/config.h
rm -f include/private/libncp-atomic.h
rm -f include/ncp/ext/socket.h include/ncp/ext/stdint.h
rm -f include/ncp/kernel/fs.h
rm -f include/ncp/kernel/if.h include/ncp/kernel/route.h include/ncp/kernel/types.h
@@ -89,14 +90,11 @@ dist: tgz
make all
tgz:
if [ -d BitKeeper ]; then \
mkdir ncpfs-$(VERSION) && \
bk export -tplain ncpfs-$(VERSION) && \
tar cvf - ncpfs-$(VERSION) | (cd .. && gzip -9 > $(DISTFILE)) &&
rm -rf ncpfs-$(VERSION); \
if [ -d .git ]; then \
git archive --format=tar --prefix=ncpfs-$(VERSION)/ HEAD | gzip -9 > ../$(DISTFILE); \
else \
make distclean; \
(cd ..; tar cvf - $(SRCDIR) | gzip -9 > $(DISTFILE)); \
(cd ..; tar --exclude='.git' -cvf - $(SRCDIR) | gzip -9 > $(DISTFILE)); \
fi
slackware:

4034
aclocal.m4 vendored

File diff suppressed because it is too large Load Diff

172
cleanup-release.sh Executable file
View File

@@ -0,0 +1,172 @@
#!/usr/bin/env bash
set -euo pipefail
cd "$(dirname "$0")"
echo "Cleaning top-level generated build outputs..."
rm -rf \
autom4te.cache \
.libs \
modules
rm -f \
Makefile \
Make.rules \
config.log \
config.status \
config.cache \
config.nice \
libtool \
stamp-h1
echo "Cleaning generated subdir Makefiles..."
rm -f \
lib/Makefile \
man/Makefile \
util/Makefile \
sutil/Makefile \
ipxdump/Makefile \
ipx-1.0/Makefile \
ipx-1.0/Samples/Makefile \
contrib/pam/Makefile \
contrib/tcl-utils/Makefile \
contrib/tknwmsg/Makefile \
contrib/tests/Makefile \
contrib/testing/Makefile \
contrib/testing/pp/Makefile \
intl/Makefile \
po/Makefile \
po/Makefile.in \
po/POTFILES
echo "Cleaning PHP phpize build outputs, keeping contrib/php/configure..."
rm -rf \
contrib/php/autom4te.cache \
contrib/php/.deps \
contrib/php/.libs \
contrib/php/modules \
contrib/php/libs
rm -f \
contrib/php/Makefile \
contrib/php/Makefile.fragments \
contrib/php/Makefile.objects \
contrib/php/Makevars \
contrib/php/config.h \
contrib/php/config.log \
contrib/php/config.status \
contrib/php/config.cache \
contrib/php/config.nice \
contrib/php/config_vars.mk \
contrib/php/libs.mk \
contrib/php/libtool \
contrib/php/run-tests.php \
contrib/php/*.lo \
contrib/php/*.la \
contrib/php/*.o \
contrib/php/*.dep \
contrib/php/*.slo
echo "Cleaning object files, binaries, generated manpages, backups..."
find . \
\( -name '*.o' \
-o -name '*.do' \
-o -name '*.to' \
-o -name '*.lo' \
-o -name '*.la' \
-o -name '*.a' \
-o -name '*.so' \
-o -name '*.so.*' \
-o -name '*.dep' \
-o -name '*.gcno' \
-o -name '*.gcda' \
-o -name '*.orig' \
-o -name '*.rej' \
-o -name '*~' \) \
-delete
find man -name '*.gz' -delete 2>/dev/null || true
find ipx-1.0 -name '*.gz' -delete 2>/dev/null || true
echo "Cleaning known built binaries..."
rm -f \
sutil/ncplogin \
sutil/ncpmap \
sutil/ncpmount \
sutil/ncpumount \
sutil/nwsfind
rm -f \
util/ncopy \
util/ncptest \
util/nprint \
util/nsend \
util/nwauth \
util/nwbocreate \
util/nwbols \
util/nwboprops \
util/nwborm \
util/nwbpadd \
util/nwbpcreate \
util/nwbprm \
util/nwbpset \
util/nwbpvalues \
util/nwdir \
util/nwdpvalues \
util/nwfsctrl \
util/nwfsinfo \
util/nwfstime \
util/nwgrant \
util/nwlistsalvage \
util/nwmsg \
util/nwpasswd \
util/nwpjmv \
util/nwpqjob \
util/nwpurge \
util/nwrevoke \
util/nwrights \
util/nwsalvage \
util/nwtrustee \
util/nwtrustee2 \
util/nwuserlist \
util/nwvolinfo \
util/pqlist \
util/pqstat \
util/pserver \
util/slist
rm -f \
ipxdump/ipxdump \
ipxdump/ipxparse \
ipx-1.0/ipx_cmd \
ipx-1.0/ipx_configure \
ipx-1.0/ipx_interface \
ipx-1.0/ipx_internal_net \
ipx-1.0/ipx_route \
ipx-1.0/Samples/ipxrcv \
ipx-1.0/Samples/ipxsend \
ipx-1.0/Samples/rip \
ipx-1.0/Samples/sap
echo "Restoring required release files if needed..."
if [ ! -f lib/libncp.vers ]; then
if git cat-file -e HEAD:lib/libncp.vers 2>/dev/null; then
git checkout -- lib/libncp.vers
elif git cat-file -e v2.2.6:lib/libncp.vers 2>/dev/null; then
git show v2.2.6:lib/libncp.vers > lib/libncp.vers
else
echo "Warning: lib/libncp.vers is missing and could not be restored."
fi
fi
echo
echo "Cleanup done."
echo
echo "Remaining untracked/modified files:"
git status --short

2029
config.guess vendored

File diff suppressed because it is too large Load Diff

View File

@@ -2,28 +2,13 @@
# Output a system dependent set of variables, describing how to set the
# run time search path of shared libraries in an executable.
#
# Copyright 1996-2002 Free Software Foundation, Inc.
# Copyright 1996-2005 Free Software Foundation, Inc.
# Taken from GNU libtool, 2001
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# This file is free software; the Free Software Foundation gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
#
# The first argument passed to this file is the canonical host specification,
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
@@ -34,43 +19,72 @@
#
# The set of defined variables is at the end of this script.
# Known limitations:
# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer
# than 256 bytes, otherwise the compiler driver will dump core. The only
# known workaround is to choose shorter directory names for the build
# directory and/or the installation directory.
# All known linkers require a `.a' archive for static linking (except M$VC,
# which needs '.lib').
libext=a
shlibext=
shrext=.so
host="$1"
host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
cc_basename=`echo "$CC" | sed -e 's%^.*/%%'`
# Code taken from libtool.m4's AC_LIBTOOL_PROG_COMPILER_PIC.
wl=
if test "$GCC" = yes; then
wl='-Wl,'
else
case "$host_os" in
aix3* | aix4* | aix5*)
aix*)
wl='-Wl,'
;;
darwin*)
case "$cc_basename" in
xlc*)
wl='-Wl,'
;;
esac
;;
mingw* | pw32* | os2*)
;;
hpux9* | hpux10* | hpux11*)
wl='-Wl,'
;;
irix5* | irix6*)
irix5* | irix6* | nonstopux*)
wl='-Wl,'
;;
newsos6)
;;
linux*)
echo '__INTEL_COMPILER' > conftest.$ac_ext
if $CC -E conftest.$ac_ext >/dev/null | grep __INTEL_COMPILER >/dev/null
then
:
else
# Intel icc
wl='-Qoption,ld,'
fi
case $cc_basename in
icc* | ecc*)
wl='-Wl,'
;;
pgcc | pgf77 | pgf90)
wl='-Wl,'
;;
ccc*)
wl='-Wl,'
;;
como)
wl='-lopt='
;;
esac
;;
osf3* | osf4* | osf5*)
wl='-Wl,'
;;
sco3.2v5*)
;;
solaris*)
wl='-Wl,'
;;
@@ -78,15 +92,20 @@ else
wl='-Qoption ld '
;;
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
if test "x$host_vendor" = xsni; then
wl='-LD'
else
wl='-Wl,'
fi
wl='-Wl,'
;;
sysv4*MP*)
;;
unicos*)
wl='-Wl,'
;;
uts4*)
;;
esac
fi
# Code taken from libtool.m4's AC_LIBTOOL_PROG_LD_SHLIBS.
hardcode_libdir_flag_spec=
hardcode_libdir_separator=
hardcode_direct=no
@@ -110,8 +129,10 @@ ld_shlibs=yes
if test "$with_gnu_ld" = yes; then
case "$host_os" in
aix3* | aix4* | aix5*)
# On AIX, the GNU linker is very broken
ld_shlibs=no
# On AIX/PPC, the GNU linker is very broken
if test "$host_cpu" != ia64; then
ld_shlibs=no
fi
;;
amigaos*)
hardcode_libdir_flag_spec='-L$libdir'
@@ -120,12 +141,12 @@ if test "$with_gnu_ld" = yes; then
# that the semantics of dynamic libraries on AmigaOS, at least up
# to version 4, is to share data among multiple programs linked
# with the same dynamic library. Since this doesn't match the
# behavior of shared libraries on other platforms, we can use
# behavior of shared libraries on other platforms, we cannot use
# them.
ld_shlibs=no
;;
beos*)
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
:
else
ld_shlibs=no
@@ -135,11 +156,18 @@ if test "$with_gnu_ld" = yes; then
# hardcode_libdir_flag_spec is actually meaningless, as there is
# no search path for DLLs.
hardcode_libdir_flag_spec='-L$libdir'
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
:
else
ld_shlibs=no
fi
;;
netbsd*)
;;
solaris* | sysv5*)
if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
ld_shlibs=no
elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
:
else
ld_shlibs=no
@@ -148,8 +176,15 @@ if test "$with_gnu_ld" = yes; then
sunos4*)
hardcode_direct=yes
;;
linux*)
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
:
else
ld_shlibs=no
fi
;;
*)
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
:
else
ld_shlibs=no
@@ -157,6 +192,8 @@ if test "$with_gnu_ld" = yes; then
;;
esac
if test "$ld_shlibs" = yes; then
# Unlike libtool, we use -rpath here, not --rpath, since the documented
# option of GNU ld is called -rpath, not --rpath.
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
fi
else
@@ -209,13 +246,27 @@ else
fi
esac
fi
# Begin _LT_AC_SYS_LIBPATH_AIX.
echo 'int main () { return 0; }' > conftest.c
${CC} ${LDFLAGS} conftest.c -o conftest
aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
}'`
if test -z "$aix_libpath"; then
aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
}'`
fi
if test -z "$aix_libpath"; then
aix_libpath="/usr/lib:/lib"
fi
rm -f conftest.c conftest
# End _LT_AC_SYS_LIBPATH_AIX.
if test "$aix_use_runtimelinking" = yes; then
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
else
if test "$host_cpu" = ia64; then
hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
else
hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
fi
fi
;;
@@ -225,6 +276,8 @@ else
# see comment about different semantics on the GNU ld section
ld_shlibs=no
;;
bsdi[45]*)
;;
cygwin* | mingw* | pw32*)
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++.
@@ -234,7 +287,21 @@ else
libext=lib
;;
darwin* | rhapsody*)
hardcode_direct=yes
hardcode_direct=no
if test "$GCC" = yes ; then
:
else
case "$cc_basename" in
xlc*)
;;
*)
ld_shlibs=no
;;
esac
fi
;;
dgux*)
hardcode_libdir_flag_spec='-L$libdir'
;;
freebsd1*)
ld_shlibs=no
@@ -247,18 +314,45 @@ else
hardcode_direct=yes
hardcode_minus_L=yes
;;
freebsd*)
freebsd* | kfreebsd*-gnu | dragonfly*)
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
;;
hpux9* | hpux10* | hpux11*)
hpux9*)
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
hardcode_libdir_separator=:
hardcode_direct=yes
hardcode_minus_L=yes # Not in the search PATH, but as the default
# location of the library.
# hardcode_minus_L: Not really in the search PATH,
# but as the default location of the library.
hardcode_minus_L=yes
;;
irix5* | irix6*)
hpux10* | hpux11*)
if test "$with_gnu_ld" = no; then
case "$host_cpu" in
hppa*64*)
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
hardcode_libdir_separator=:
hardcode_direct=no
;;
ia64*)
hardcode_libdir_flag_spec='-L$libdir'
hardcode_direct=no
# hardcode_minus_L: Not really in the search PATH,
# but as the default location of the library.
hardcode_minus_L=yes
;;
*)
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
hardcode_libdir_separator=:
hardcode_direct=yes
# hardcode_minus_L: Not really in the search PATH,
# but as the default location of the library.
hardcode_minus_L=yes
;;
esac
fi
;;
irix5* | irix6* | nonstopux*)
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator=:
;;
@@ -314,23 +408,20 @@ else
hardcode_minus_L=yes
;;
sysv4)
if test "x$host_vendor" = xsno; then
hardcode_direct=yes # is this really true???
else
hardcode_direct=no # Motorola manual says yes, but my tests say they lie
fi
case $host_vendor in
sni)
hardcode_direct=yes # is this really true???
;;
siemens)
hardcode_direct=no
;;
motorola)
hardcode_direct=no #Motorola manual says yes, but my tests say they lie
;;
esac
;;
sysv4.3*)
;;
sysv5*)
hardcode_libdir_flag_spec=
;;
uts4*)
hardcode_libdir_flag_spec='-L$libdir'
;;
dgux*)
hardcode_libdir_flag_spec='-L$libdir'
;;
sysv4*MP*)
if test -d /usr/nec; then
ld_shlibs=yes
@@ -340,7 +431,13 @@ else
hardcode_direct=yes
hardcode_minus_L=no
;;
sysv5uw7* | unixware7*)
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*)
;;
sysv5*)
hardcode_libdir_flag_spec=
;;
uts4*)
hardcode_libdir_flag_spec='-L$libdir'
;;
*)
ld_shlibs=no
@@ -349,136 +446,103 @@ else
fi
# Check dynamic linker characteristics
# Code taken from libtool.m4's AC_LIBTOOL_SYS_DYNAMIC_LINKER.
libname_spec='lib$name'
sys_lib_dlsearch_path_spec="/lib /usr/lib"
sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
case "$host_os" in
aix3*)
shlibext=so
;;
aix4* | aix5*)
shlibext=so
;;
amigaos*)
shlibext=ixlibrary
;;
beos*)
shlibext=so
;;
bsdi4*)
shlibext=so
sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
bsdi[45]*)
;;
cygwin* | mingw* | pw32*)
case $GCC,$host_os in
yes,cygwin*)
shlibext=dll.a
;;
yes,mingw*)
shlibext=dll
sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"`
;;
yes,pw32*)
shlibext=dll
;;
*)
shlibext=dll
;;
esac
shrext=.dll
;;
darwin* | rhapsody*)
shlibext=dylib
shrext=.dylib
;;
dgux*)
;;
freebsd1*)
;;
kfreebsd*-gnu)
;;
freebsd*)
shlibext=so
;;
gnu*)
shlibext=so
;;
hpux9* | hpux10* | hpux11*)
shlibext=sl
case "$host_cpu" in
ia64*)
shrext=.so
;;
hppa*64*)
shrext=.sl
;;
*)
shrext=.sl
;;
esac
;;
irix5* | irix6*)
shlibext=so
irix5* | irix6* | nonstopux*)
case "$host_os" in
irix5*)
irix5* | nonstopux*)
libsuff= shlibsuff=
;;
*)
case $LD in
*-32|*"-32 ") libsuff= shlibsuff= ;;
*-n32|*"-n32 ") libsuff=32 shlibsuff=N32 ;;
*-64|*"-64 ") libsuff=64 shlibsuff=64 ;;
*-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;;
*-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;;
*-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;;
*) libsuff= shlibsuff= ;;
esac
;;
esac
sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
;;
linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
linux*oldld* | linux*aout* | linux*coff*)
;;
linux-gnu*)
shlibext=so
linux*)
;;
knetbsd*-gnu)
;;
netbsd*)
shlibext=so
;;
newsos6)
shlibext=so
;;
nto-qnx*)
;;
openbsd*)
shlibext=so
;;
os2*)
libname_spec='$name'
shlibext=dll
shrext=.dll
;;
osf3* | osf4* | osf5*)
shlibext=so
sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
;;
sco3.2v5*)
shlibext=so
;;
solaris*)
shlibext=so
;;
sunos4*)
shlibext=so
;;
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
shlibext=so
case "$host_vendor" in
motorola)
sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
;;
esac
;;
uts4*)
shlibext=so
;;
dgux*)
shlibext=so
;;
sysv4*MP*)
if test -d /usr/nec; then
shlibext=so
fi
;;
uts4*)
;;
esac
sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"`
shlibext=`echo "$shrext" | sed -e 's,^\.,,'`
escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
escaped_sys_lib_search_path_spec=`echo "X$sys_lib_search_path_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
escaped_sys_lib_dlsearch_path_spec=`echo "X$sys_lib_dlsearch_path_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
# How to pass a linker flag through the compiler.
wl="$escaped_wl"
@@ -504,10 +568,4 @@ hardcode_direct="$hardcode_direct"
# resulting binary.
hardcode_minus_L="$hardcode_minus_L"
# Compile-time system search path for libraries
sys_lib_search_path_spec="$escaped_sys_lib_search_path_spec"
# Run-time system search path for libraries
sys_lib_dlsearch_path_spec="$escaped_sys_lib_dlsearch_path_spec"
EOF

3264
config.sub vendored

File diff suppressed because it is too large Load Diff

16897
configure vendored

File diff suppressed because it is too large Load Diff

View File

@@ -1,8 +1,8 @@
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.50)
AC_INIT([[ncpfs]],[[2.2.5]],[[vandrove@vc.cvut.cz]])
AC_INIT([[ncpfs]],[[2.2.7]],[[mario.fetka@disconnected-by-peer.at]])
AC_CONFIG_SRCDIR([[lib/ncplib.c]])
AC_REVISION([[2.2.5]])
AC_REVISION([[2.2.7]])
AC_CONFIG_HEADER(include/config.h)
@@ -51,6 +51,9 @@ AC_ARG_ENABLE(versions,
AC_ARG_ENABLE(function_sections,
[ --disable-function-sections do not use -ffunction-sections for static libraries])
AC_ARG_ENABLE(shared,
[ --disable-shared disable build/use of shared libncp])
AC_ARG_ENABLE(trace,
[ --enable-trace enable trace of ncp calls])
@@ -232,20 +235,43 @@ AC_CANONICAL_HOST
dnl Checks for programs.
AC_PROG_MAKE_SET
AC_PROG_CC
AC_PROG_RANLIB
AC_PROG_INSTALL
AC_PROG_LN_S
dnl Mandatory gettext items
AC_SUBST(PACKAGE, ["$PACKAGE_NAME"])
AC_SUBST(VERSION, ["$PACKAGE_VERSION"])
AM_GNU_GETTEXT
AM_GNU_GETTEXT([external])
INTLSUB=""
AC_SUBST([INTLSUB])
localedir="\${prefix}/$DATADIRNAME/locale"
AC_SUBST(localedir)
AC_CHECK_HEADERS([sys/types.h])
AC_CHECK_HEADERS([sys/socket.h], [], [],
[#if HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
])
AC_CHECK_HEADERS([net/if.h], [], [],
[#if HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#if HAVE_SYS_SOCKET_H
# include <sys/socket.h>
#endif
])
dnl Checks for IPX support style
AC_CACHE_CHECK(for GNU style IPX support, ncp_cv_c_ipx_netipx,
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([[[#include <sys/socket.h>
[AC_LANG_PROGRAM([[[#if HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#if HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
#include <sys/ioctl.h>
#include <netipx/ipx.h>]]],
[[[((struct sockaddr_ipx*)0)->sipx_family == AF_IPX]]])],
@@ -259,7 +285,12 @@ if test "$ncp_cv_c_ipx_netipx" = "no"
then
AC_CACHE_CHECK(for Linux style IPX support, ncp_cv_c_ipx_linux,
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([[[#include <sys/socket.h>
[AC_LANG_PROGRAM([[[#if HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#if HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
#include <asm/types.h>
#include <linux/ipx.h>]]],
[[[((struct sockaddr_ipx*)0)->sipx_family == AF_IPX]]])],
@@ -346,48 +377,23 @@ dnl Checks for header files.
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
dnl sys/mount is required by ncpmount
dnl currently code does not work without sys/mount.h
AC_CHECK_HEADER(sys/mount.h)
if test "$ac_cv_header_sys_mount_h" = "no"
then
if test "$USE_KERNEL" = "1"
then
AC_MSG_WARN(Cannot build kernel support because of no sys/mount.h file)
USE_KERNEL=0
fi
ncp_sys_mount_h="/* sys/mount.h does not exist */"
ncp_linux_fs_h="/* linux/fs.h is not needed */"
else
ncp_sys_mount_h="#include <sys/mount.h>"
AC_CACHE_CHECK(for mount constants in sys/mount.h, ncp_cv_linux_fs_needed,
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([[[#include <sys/mount.h>]]],
[[[mount(0,0,0,MS_RDONLY,0); umount(0)]]])],
[ncp_cv_linux_fs_needed="yes"],
[ncp_cv_linux_fs_needed="no"]
)
)
if test "$ncp_cv_linux_fs_needed" = "yes"; then
ncp_linux_fs_h="/* linux/fs.h not needed */"
else
ncp_linux_fs_h="#include <linux/fs.h>"
fi
fi
AC_SUBST(ncp_sys_mount_h)
AC_SUBST(ncp_linux_fs_h)
dnl net/if is required by IPX tools
dnl currently code does not work without net/if.h
AC_CHECK_HEADER(net/if.h,
AC_CHECK_HEADER([net/if.h],
[ncp_net_if_h="#include <net/if.h>"],
[AC_CHECK_HEADER(linux/if.h,
[ncp_net_if_h="#include <linux/if.h>"],
[ncp_net_if_h="/* No interfaces support... */"
AC_DEFINE(NO_NET_IF_SUPPORT, 1, [neither net/if.h nor linux/if.h was found, so ipx_* will not build...])
AC_MSG_WARN(Neither <net/if.h> nor <linux/if.h> does exist, only partial make configured)]
)]
)
)],
[#if HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#if HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
])
AC_SUBST(ncp_net_if_h)
dnl net/route is required for now in ncplib
@@ -400,14 +406,27 @@ AC_CHECK_HEADER(net/route.h,
AC_DEFINE(NO_NET_ROUTE_SUPPORT, 1, [neither net/route.h nor linux/route.h was found ...])
dnl In future, {net|linux}/route.h should be required only by ipx code
AC_MSG_ERROR(Neither <net/route.h> nor <linux/route.h> does exist)]
)]
)
)],
[#if HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#if HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
])
AC_SUBST(ncp_net_route_h)
dnl netinet/if_ether.h vs. linux/if_ether.h
dnl required only in ipxdump/ipxparse
ncp_if_ether_support="yes"
AC_CHECK_HEADER(netinet/if_ether.h)
AC_CHECK_HEADER([netinet/if_ether.h], [], [],
[#if HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#if HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
])
if test "$ac_cv_header_netinet_if_ether_h" = "no"
then
AC_CHECK_HEADER(linux/if_ether.h)
@@ -472,14 +491,56 @@ select(0, &a, &a, &a, 0)]]])],
fi
fi
dnl sys/mount is required by ncpmount
dnl currently code does not work without sys/mount.h
AC_CHECK_HEADER(sys/mount.h)
ncp_sys_mount_h="/* sys/mount.h does not exist */"
ncp_linux_fs_h="/* linux/fs.h not needed */"
if test "$USE_KERNEL" = "1"
then
if test "$ac_cv_header_sys_mount_h" = "no"
then
AC_MSG_WARN(Cannot build kernel support because of no sys/mount.h file)
USE_KERNEL=0
else
ncp_sys_mount_h="#include <sys/mount.h>"
AC_CACHE_CHECK(for mount constants in sys/mount.h, ncp_cv_linux_fs_needed,
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([[[#include <sys/mount.h>]]],
[[[mount(0,0,0,MS_RDONLY,0); umount(0)]]])],
[ncp_cv_linux_fs_needed="no"],
[ncp_cv_linux_fs_needed="yes"]
)
)
if test "$ncp_cv_linux_fs_needed" = "yes"; then
ncp_linux_fs_h="#include <linux/fs.h>"
fi
fi
fi
AC_SUBST(ncp_sys_mount_h)
AC_SUBST(ncp_linux_fs_h)
dnl Third parameter to accept is socklen_t or signed int
AC_CACHE_CHECK(for third parameter to accept,
ncp_cv_socklen_t,
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[[#include <sys/socket.h>]]],
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[[#include <stdlib.h>
#if HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#if HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif]]],
[[[socklen_t a;
accept(0, NULL, &a)]]])],
[ncp_cv_socklen_t="socklen_t"],
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[[#include <sys/socket.h>]]],
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[[#include <stdlib.h>
#if HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#if HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif]]],
[[[int a;
accept(0, NULL, &a)]]])],
[ncp_cv_socklen_t="int"],
@@ -496,6 +557,46 @@ else
fi
AC_SUBST(socklen_t)
AC_CACHE_CHECK(whether SO_NOSIGPIPE exists,
ncp_cv_so_nosigpipe,
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[[#if HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#if HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif]]],
[[[int s;
int o = 0;
s = socket(0, 0, 0);
setsockopt(s, SOL_SOCKET, SO_NOSIGPIPE, &o, sizeof(o))]]])],
[ncp_cv_so_nosigpipe="yes"],
[ncp_cv_so_nosigpipe="no"]
)
)
if test "$ncp_cv_so_nosigpipe" = "yes"
then
AC_DEFINE(HAVE_SO_NOSIGPIPE, 1, [Define when SO_NOSIGPIPE exists])
fi
AC_CACHE_CHECK(whether MSG_NOSIGNAL exists,
ncp_cv_msg_nosignal,
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[[#if HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#if HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
struct msghdr msg;]]],
[[[sendmsg(0, &msg, MSG_NOSIGNAL)]]])],
[ncp_cv_msg_nosignal="yes"],
[ncp_cv_msg_nosignal="no"]
)
)
if test "$ncp_cv_msg_nosignal" = "yes"
then
AC_DEFINE(HAVE_MSG_NOSIGNAL, 1, [Define when MSG_NOSIGNAL exists])
fi
dnl UNICODE
AC_CHECK_TYPE([wchar_t], , [AC_DEFINE([wchar_t], [unsigned int], [Define to 'unsigned int' if wchar_t is not defined.])])
AC_CHECK_HEADERS(wchar.h iconv.h)
@@ -860,6 +961,16 @@ EOF
ELF_TARGET="$ncp_cv_elf_target"
AC_SUBST(ELF_TARGET)
BUILD_SHARED="$ELF_TARGET"
if test "$enable_shared" = "no"
then
BUILD_SHARED="no"
fi
if test "$enable_shared" = "yes"
then
BUILD_SHARED="yes"
fi
FFUNCTION_SECTIONS=""
GC_SECTIONS=""
if test "$function_sections" = "yes"
@@ -892,6 +1003,8 @@ then
GC_SECTIONS="-Wl,--gc-sections "
fi
AC_LIB_RPATH
if test "$VERSIONED_LINK" = "yes"
then
AC_CACHE_CHECK(for working versioned link,
@@ -909,12 +1022,12 @@ EOF
void lsym(void) { };
void gsym(void) { };
EOF
if ${CC} -shared -Wl,-version-script=conftest.vers -o conftest.so conftest.c -lc >/dev/null 2>&1
if ${CC} -shared -Wl,-version-script=conftest.vers -o conftest.${shlibext} conftest.c -lc >/dev/null 2>&1
then
ncp_cv_versioned_link=yes
fi]
)
rm -f conftest.c conftest.vers conftest.so
rm -f conftest.c conftest.vers conftest.${shlibext}
if test "$ncp_cv_versioned_link" = "no"
then
if test "$versions_forced" = "yes"
@@ -967,6 +1080,16 @@ AC_SUBST(ADDON_SUBDIRS)
AC_SUBST(ADDON_DEV_SUBDIRS)
AC_SUBST(FFUNCTION_SECTIONS)
AC_SUBST(GC_SECTIONS)
AC_SUBST(BUILD_SHARED)
if test -z "$libext"; then
libext=a
fi
if test -z "$shlibext"; then
shlibext=so
fi
AC_SUBST(shlibext)
AC_SUBST(libext)
AC_CONFIG_FILES([
Make.rules

View File

@@ -0,0 +1,114 @@
#
#
#
top_srcdir = ../..
top_builddir = ../..
this_srcdir = ${top_srcdir}/lib
include ${top_builddir}/Make.rules
VERSION_SOLIB := 2.3
VERSION_SONAME := 2
vpath %.c ${this_srcdir}
LIBS :=
REENTRANT_CFLAGS := -D_REENTRANT
VERSIONED_LINK := yes
SHARED_NSSLIB := libnss_ncp.so
SHARED_NSSLIB_BIN := $(SHARED_NSSLIB).$(VERSION_SOLIB)
SHARED_NSSLIB_SONAME := $(SHARED_NSSLIB).$(VERSION_SONAME)
O_UTILS1 = test_ncp_nss.o\
#
O_TMP1 =
UTILS1 = $(O_UTILS1:%.o=%)
CCFLAGS += -I.
PIC_FLAGS := -fPIC
NWCOMPAT := 1
SHARED_VLINK :=
SHARED_VLINK_CFLAGS :=
ifeq ($(VERSIONED_LINK),yes)
SHARED_VLINK := -Wl,-version-script=${this_srcdir}/libncp.vers
SHARED_VLINK_CFLAGS := -DMULTIVERSION
endif
ifeq ($(HAVE_ELF),yes)
NCP_LIB = libncp.so
NCPLIB_DIR = ../../lib
LIBDEP = $(NCPLIB_DIR)/$(NCP_LIB)
else
NCP_LIB = libncp.a
NCPLIB_DIR = ../../lib
LIBDEP = $(NCPLIB_DIR)/$(NCP_LIB)
endif
STATIC_BASE_OBJ := nss_ncp.o nss_cfgfile.o
SHARED_BASE_OBJ := $(STATIC_BASE_OBJ:.o=.do)
SHARED_O_OBJ := $(SHARED_BASE_OBJ)
BASE_CFLAGS := -DHAVE_CONFIG_H -DMAKE_NCPLIB -D_GNU_SOURCE
SHARED_CFLAGS := $(CFLAGS) $(CCFLAGS) $(REENTRANT_CFLAGS) $(PIC_FLAGS) $(SHARED_VLINK_CFLAGS)
.PHONY : all dep install install-dev clean mrproper distclean
.PHONY : install_shared install_static install_static_su
all: $(SHARED_NSSLIB) $(UTILS1)
install: install_shared
%.d: %.c %h
set -e; $(CC) -M $(STATIC_CFLAGS) $(CFLAGS_$(@:.d=.o)) $(BASE_CFLAGS) $< \
| sed 's,\($*\)\.o[ :]*,\1.o \1.do \1.to $@ : ,g' > $@; \
[ -s $@ ] || rm -f $@
$(STATIC_BASE_OBJ): %.o: %.c %.h
$(CC) $(STATIC_CFLAGS) $(CFLAGS_$@) $(BASE_CFLAGS) -o $@ -c $<
$(SHARED_BASE_OBJ): %.do: %.c %.h
$(CC) $(SHARED_CFLAGS) $(CFLAGS_$(@:.do=.o)) $(BASE_CFLAGS) -o $@ -c $<
$(O_UTILS1) $(O_TMP1): %.o: %.c
$(CC) $(CCFLAGS) $(CFLAGS) $(CFLAGS_$@) -o $@ -c $<
$(UTILS1):: %: %.o $(O_TMP1) $(SHARED_NSSLIB)
$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(addsuffix .o,$@) $(OBJS_$@) -L. -lnss_ncp -L$(top_builddir)/lib -lncp $(LDFLAGS_$@)
dep:
clean:
rm -f *.o *.do *.to $(SHARED_NSSLIB) $(SHARED_NSSLIB_BIN) $(UTILS1) *~
mrproper: clean
rm -f $(UTILS) $(DISTFILE)
distclean: mrproper
install_shared: $(SHARED_NCPLIB_BIN)
$(INSTALL) -d $(DESTDIR)$(libsodir)
$(INSTALL) $(SHARED_NCPLIB_BIN) $(DESTDIR)$(libsodir)
-ldconfig
$(SHARED_NSSLIB): $(SHARED_NSSLIB_SONAME)
rm -f $@
ln -sf $< $@
$(SHARED_NSSLIB_SONAME): $(SHARED_NSSLIB_BIN)
ln -sf $< $@
$(SHARED_NSSLIB_BIN): $(SHARED_O_OBJ) ${this_srcdir}/libncp.vers
$(CC) -shared -o $@ -Wl,-soname=$(SHARED_NSSLIB_SONAME) $(SHARED_VLINK) $(SHARED_O_OBJ) -L$(NCPLIB_DIR) -lncp ${LIBS}

View File

@@ -0,0 +1,29 @@
[Requester]
[ncp_nss]
useTree=1
server=INSA_ROOT
startCtx=
ctrlGroup=
doPasswd=1
doShadow=1
doGroup=1
defGid=100
defShell=/bin/bash
debug=1
fallbackUid=-1
fallbackGid=-1
[pam]
useTree=1
server=INSA_ROOT
searchCtx=PC,S.PC,GCP.PC
debug=1
mountLocally=1
createLocalHome=0
zenOn=
zenOff=

View File

@@ -0,0 +1,347 @@
/*
nss_cfgfile.c - Configuration file handling
Copyright (C) 2000 Petr Vandrovec
Copyright (C) 2003 Patrick Pollet
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Revision history:
1.00 2003, Jan 16 Patrick Pollet <patrick.pollet@insa-lyon.fr>
Initial revision, stronly inspired by ncpfs/lib/cfgfile.c
*/
#include "config.h"
#include "private/libncp-lock.h"
#include <ctype.h>
#include <stdio.h>
#include <string.h>
#include <strings.h>
#include <unistd.h>
#include <stdlib.h>
#include <sys/syslog.h>
#include "nss_cfgfile.h"
#include "nss_ncp.h"
// temporary define (waiting for a better Makefile)
#define GLOBALCFGFILE "/etc/ncpfs.conf"
#ifndef GLOBALCFGFILE
#error "GLOBALCFGFILE must be defined"
#endif
// #define DEBUG 1
static struct nss_ncp_conf*
alloc_nss_ncp_conf(void)
{
struct nss_ncp_conf * conf;
conf = malloc(sizeof(*conf));
if (!conf)
return NULL;
return conf;
}
void
free_nss_ncp_conf(struct nss_ncp_conf *conf)
{
#define FREEFIELD(x) do if (conf->x) { free(conf->x); conf->x = NULL; } while (0);
if (conf) {
FREEFIELD(server);
FREEFIELD(startCtx);
FREEFIELD(ctrlGroup);
FREEFIELD(defShell);
}
#undef FREEFIELD
}
struct cfgFile {
ncpt_mutex_t mutex;
FILE* file;
};
static struct cfgFile*
cfgOpenFile(const char* path,
int writeRequired)
{
struct cfgFile* cfg;
cfg = malloc(sizeof(*cfg));
if (cfg) {
cfg->file = fopen(path, writeRequired ? "r+" : "r");
if (cfg->file) {
ncpt_mutex_init(&cfg->mutex);
} else {
free(cfg);
cfg = NULL;
}
}
return cfg;
}
static void
cfgClose(struct cfgFile* cfg)
{
ncpt_mutex_lock(&cfg->mutex);
fclose(cfg->file);
ncpt_mutex_destroy(&cfg->mutex);
free(cfg);
}
struct check {
const char *option; /* configuration option */
int mandatory; /* can be empty or null */
int found; /* set to TRUE if found in cfg file */
char **char_ptr; /* where to store string value */
int *int_ptr; /* where to store integer value */
const char *defValue; /* default value */
};
#ifdef DEBUG
void
printResults(const char *infos, const struct check *results)
{
const struct check *ptr;
printf ("%s\n", infos);
for (ptr = results; ptr->option; ptr++) {
if (ptr->int_ptr)
printf ("option=%s mandatory=%d found=%d value=%d defvalue=%s\n",
ptr->option, ptr->mandatory, ptr->found, *ptr->int_ptr, ptr->defValue);
else
printf ("option=%s mandatory=%d found=%d value=%s defvalue=%s\n",
ptr->option, ptr->mandatory, ptr->found, *ptr->char_ptr, ptr->defValue);
}
}
void
printConf(const char *infos, const struct nss_ncp_conf *conf)
{
printf ("%s\n", infos);
printf ("debug=%d useTree=%d server=%s startCtx=%s ctrlGroup=%s defGid=%u defShell=%s fallbackUid=%u fallbackGid=%u "
"doPassword=%d doGroup=%d doShadow=%d\n",
conf->debug, conf->useTree, conf->server, conf->startCtx,
conf->ctrlGroup, conf->defGid, conf->defShell, conf->fallbackUid, conf->fallbackGid,
conf->doPassword, conf->doGroup, conf->doShadow);
}
#endif
static int
process_line(const char *cptr, struct check *ptr)
{
const char* sptr; // start of real value
const char* eptr; // end of real value
char ec;
char cc;
while (*cptr && isspace(*cptr))
cptr++;
if (*cptr != '=' && *cptr != ':')
return 1; //no equal sign found
cptr++;
while (*cptr && isspace(*cptr))
cptr++;
// space are allowed in value only if surrounded by " or ' (eg a NDS control group)
if (*cptr == '"' || *cptr == '\'')
ec = *cptr++;
else
ec = 0;
sptr = cptr;
eptr = cptr;
while ((cc = *cptr++) != 0) {
if (cc == '\n')
break;
if (!ec && isspace(cc))
break;
if (cc == ec)
break;
eptr++;
}
if (eptr != sptr) {
if (ptr->int_ptr) {
char* errPtr; // err
*ptr->int_ptr = strtoul(sptr, &errPtr, 0);
ptr->found = errPtr == eptr;
} else {
char *v = malloc(eptr - sptr + 1);
if (v) {
memcpy(v, sptr, eptr - sptr);
v[eptr - sptr] = 0;
*ptr->char_ptr = v;
ptr->found = TRUE;
} else
return 1;
}
}
return 0;
}
static int
fix_conf(struct check *results)
{
struct check* ptr;
for (ptr = results; ptr->option; ptr++) {
if (!ptr->found) {
if (ptr->mandatory) {
traceForce(0, LOG_ERR, "ncp_nss aborting :missing mandatory information '%s=' in config file %s", ptr->option, GLOBALCFGFILE);
return 1;
}
if (ptr->int_ptr) {
*ptr->int_ptr = strtoul(ptr->defValue, NULL, 0);
} else {
char *v = strdup(ptr->defValue);
if (v)
*ptr->char_ptr = v;
else
return 1;
}
}
}
return 0;
}
static struct nss_ncp_conf *
read_conf_file(const char * mySection, struct cfgFile *cfg)
{
struct nss_ncp_conf *conf;
conf = alloc_nss_ncp_conf();
if (!conf)
return NULL;
{
struct check check_confs[] = {
/*option mandati found char_ptr int_ptr defValue */
{"debug", FALSE, FALSE, NULL, &conf->debug, "0"},
{"useTree", FALSE, FALSE, NULL, &conf->useTree, "0"},
{"server", TRUE, FALSE, &conf->server, NULL, ""},
{"startCtx", FALSE, FALSE, &conf->startCtx, NULL, ""},
{"ctrlGroup", FALSE, FALSE, &conf->ctrlGroup, NULL, ""},
{"defGid", FALSE, FALSE, NULL, &conf->defGid, "100"},
{"defShell", FALSE, FALSE, &conf->defShell, NULL, "/bin/bash"},
{"fallbackUid", FALSE, FALSE, NULL, &conf->fallbackUid, "-1"},
{"fallbackGid", FALSE, FALSE, NULL, &conf->fallbackGid, "-1"},
{"doPasswd", FALSE, FALSE, NULL, &conf->doPassword, "0"},
{"doGroup", FALSE, FALSE, NULL, &conf->doGroup, "0"},
{"doShadow", FALSE, FALSE, NULL, &conf->doShadow, "0"},
{NULL, FALSE, FALSE, NULL, NULL, NULL}
};
char cfgline[16384];
size_t seclen = strlen(mySection);
#ifdef DEBUG
// DO NOT DO IT A a second call (using test_ncp_nss -2) coredump !!!
// printResults("before reading CFG", check_confs);
#endif
ncpt_mutex_lock(&cfg->mutex);
//rewind(cfg->file);
while (fgets(cfgline, sizeof(cfgline)-1, cfg->file)) {
char* cptr = cfgline;
struct check* ptr;
while (*cptr && isspace(*cptr))
cptr++;
if (*cptr != '[')
continue;
if (strncasecmp(++cptr, mySection, seclen))
continue;
if (cptr[seclen] != ']')
continue;
while (fgets(cfgline, sizeof(cfgline) - 1, cfg->file)) {
cptr = cfgline;
while (*cptr && isspace(*cptr))
cptr++;
if (!*cptr)
continue; //empty line
if (*cptr == '[') // start of another section
goto ssend;
for (ptr = check_confs; ptr->option; ptr++) {
size_t keylen = strlen(ptr->option);
if (!strncasecmp(cptr, ptr->option, keylen)) {
cptr += keylen;
process_line(cptr, ptr);
}
}
}
}
ssend:
#ifdef DEBUG
printResults("after reading CFG no error", check_confs);
#endif
#ifdef DEBUG
printConf("before fixing ", conf);
#endif
if (!fix_conf (check_confs)) { // fill in missing values with default,
#ifdef DEBUG
printConf("after fixing ", conf);
#endif
ncpt_mutex_unlock(&cfg->mutex);
return conf;
}
#ifdef DEBUG
printResults("after reading CFG error", check_confs);
#endif
ncpt_mutex_unlock(&cfg->mutex);
free_nss_ncp_conf(conf);
return NULL;
}
}
struct nss_ncp_conf*
parse_conf(void)
{
struct cfgFile *cfg;
struct nss_ncp_conf *conf;
#ifdef DEBUG
printf("entering parse_conf\n");
#endif
cfg = cfgOpenFile(GLOBALCFGFILE, FALSE);
if (!cfg)
return NULL;
conf = read_conf_file(NSS_SECTION, cfg);
cfgClose(cfg);
#ifdef DEBUG
if (conf)
printConf("final value ", conf);
#endif
return conf;
}

View File

@@ -0,0 +1,26 @@
#ifndef HAVE_NSS_CFGFILE
#define HAVE_NSS_CFGFILE
#define TRUE 1
#define FALSE 0
#define NSS_SECTION "ncp_nss"
struct nss_ncp_conf {
int debug;
int useTree; // use Tree connection or server connection
char * server; // name of server or tree
char * startCtx; // start searching is this context (and below)
char * ctrlGroup; // limit search to members of this NDS group for passwd and shadow
int defGid; // if no primary group found in NDS use this value
char * defShell; // if no shell found in NDS use this value
int fallbackUid; // if no UID found in NDS use this one (-1= skip user, NFS_NOBODY= use this UID)
int fallbackGid; // if no GID found in NDS use this one (-1= skip group, NFS_NOBODY= use this GID)
int doPassword; // if 0, will return immediarly NSS_STATUS_UNAVAILABLE even if ncp is listed in /etc/nsswitch.conf
int doGroup; // if 0, will return immediarly NSS_STATUS_UNAVAILABLE even if ncp is listed in /etc/nsswitch.conf
int doShadow; // if 0, will return immediarly NSS_STATUS_UNAVAILABLE even if ncp is listed in /etc/nsswitch.conf
};
struct nss_ncp_conf* parse_conf(void);
void free_nss_ncp_conf(struct nss_ncp_conf *conf);
#endif

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,176 @@
/**************************************************************************
nss_ncp.h header for NSS for NDS
Copyright (C) 2002 Patrick Pollet
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Revision history:
1.00 2003, January 06 Patrick Pollet <patrick.pollet@insa-lyon.fr>
initial release
************************************************************************/
#ifndef HAVE_NSS_NCP_H
#define HAVE_NSS_NCP_H
#define TRUE 1
#define FALSE 0
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <ncp/nwnet.h>
#include <unistd.h>
#include <ctype.h>
#include <wchar.h>
#include <string.h>
#include <pwd.h>
#include <grp.h>
#include <shadow.h>
#include <sys/syslog.h>
#include <nss.h>
// USE_DUMMY_ATTRibutes must be set in the Makefile
//#define USING_DUMMY_ATTRIBUTES
#ifndef USING_DUMMY_ATTRIBUTES
// the real ones
#define ATTR_UID "UNIX:UID"
#define ATTR_PGNAME "UNIX:Primary GroupName"
#define ATTR_PGID "UNIX:Primary GroupID"
#define ATTR_GID "UNIX:GID"
#define ATTR_SHELL "UNIX:Login Shell"
#define ATTR_COM "UNIX:Comments"
#define ATTR_HOME "UNIX:Home Directory"
#else
// dummy attributes for testing
// created with Schemax with the same syntax
// and associated to user class and group class
#define ATTR_UID "LINUX:UID"
#define ATTR_PGNAME "LINUX:Primary GroupName"
#define ATTR_PGID "LINUX:Primary GroupID"
#define ATTR_GID "LINUX:GID"
#define ATTR_SHELL "LINUX:Login Shell"
#define ATTR_COM "LINUX:Comments"
#define ATTR_HOME "LINUX:Home Directory"
#endif
// the attribute used to test presence of NDS8
// either real or dummy (not used yet)
#define ATTR_NDS8 ATTR_UID
// other attributes used
// absent NDS8 attributes are searched in L attribute
// also new properties ( Zenux Flags, Other group...)
#define ATTR_CN "CN"
#define ATTR_LOCATION "L"
#define ATTR_GRP_MBS "Group Membership"
#define ATTR_MEMBERS "Member"
#define ATTR_FULL_NAME "Full Name"
#define ATTR_DATE_PWD_EXPIRE "Password Expiration Time"
#define ATTR_INT_PWD_EXPIRE "Password Expiration Interval"
#define ATTR_GRACE_LIMIT "Login Grace Limit"
#define ATTR_DATE_ACCT_EXPIRE "Login Expiration Time"
// the proper naming attribute may be customized here (must be a CI_STRING )
#define ATTR_GECOS ATTR_FULL_NAME
// syntaxes of the used attributes
#define SYN_CN SYN_CI_STRING
#define SYN_LOCATION SYN_CI_STRING
#define SYN_UID SYN_INTEGER
#define SYN_PGNAME SYN_DIST_NAME
#define SYN_PGID SYN_INTEGER
#define SYN_GID SYN_INTEGER
#define SYN_SHELL SYN_CE_STRING
#define SYN_COM SYN_CI_STRING
#define SYN_HOME SYN_CE_STRING
#define SYN_GRP_MBS SYN_DIST_NAME
#define SYN_MEMBERS SYN_DIST_NAME
#define QF_DEBUG 0x0001
#define QF_VERBOSE 0x0002
#define NFS_NOBODY = 65534
#define CNF_FILE "/etc/nss_ncp.conf"
void traceForce(int debugMode, int err, const char* format, ...);
/******************************* NSS API ***************************************/
enum nss_status _nss_ncp_initgroups (const char *userName, gid_t group,
long int *start, long int *size, gid_t * groups,
long int limit,int *errnop);
enum nss_status _nss_ncp_getpwnam_r (const char* name, struct passwd *pwd,
char * buffer, size_t buflen, int * errnop);
enum nss_status _nss_ncp_getpwuid_r (uid_t uid, struct passwd *pwd,
char * buffer, size_t buflen, int * errnop);
enum nss_status _nss_ncp_getgrnam_r (const char* name, struct group *grp,
char * buffer, size_t buflen, int * errnop);
enum nss_status _nss_ncp_getspnam_r (const char * name, struct spwd *spw,
char *buffer, size_t buflen,int * errnop);
enum nss_status _nss_ncp_getgrgid_r (gid_t gid, struct group *grp,
char * buffer, size_t buflen, int * errnop);
enum nss_status _nss_ncp_setpwent(void);
enum nss_status _nss_ncp_setgrent(void);
enum nss_status _nss_ncp_setspent (void);
enum nss_status _nss_ncp_endpwent(void);
enum nss_status _nss_ncp_endgrent(void);
enum nss_status _nss_ncp_endspent (void);
enum nss_status _nss_ncp_getpwent_r(struct passwd *pwd, char * buffer, size_t buflen, int * errnop);
enum nss_status _nss_ncp_getgrent_r(struct group *grp,char * buffer, size_t buflen, int * errnop);
enum nss_status _nss_ncp_getspent_r (struct spwd *spw,char * buffer, size_t buflen,int * errnop);
#endif

View File

@@ -0,0 +1,313 @@
/**************************************************************************
getpwduid.c:test program for NSS for NDS
Copyright (C) 2002 Patrick Pollet
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Revision history:
1.00 2003, January 06 Patrick Pollet <patrick.pollet@insa-lyon.fr>
initial release
1.01 2003, January 08 Patrick Pollet <patrick.pollet@insa-lyon.fr>
added conf structure and control group
added optional fallback UID and GID if none found in NDS (default is to skip user,group)
1.02 2003, January 09 Patrick Pollet <patrick.pollet@insa-lyon.fr>
added initgroups
1.03 2003, January 10 Patrick Pollet <patrick.pollet@insa-lyon.fr>
fixed bug in nds_user_info2 (bad structure received by nds_user_location2)
1.04 2003, January 11 Patrick Pollet <patrick.pollet@insa-lyon.fr>
fixed setting ndsXXX=NULL trees in case of errors in _nss_ncp_setxxent()
made always NAME_CONTEXT=[Root] in CreateContextAndConn
calling NWCCloseIteration only it some errors has occured in the search
1.05
modified to use nss_ncp.so
************************************************************************/
#define TRUE 1
#define FALSE 0
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <ncp/nwnet.h>
#ifdef VERBOSE
#include <ncp/ncplib.h>
#endif
#include <unistd.h>
#include <ctype.h>
#include <wchar.h>
#include <string.h>
#include "private/libintl.h"
#include <pwd.h>
#include <grp.h>
#include <shadow.h>
#include <sys/syslog.h>
#include <nss.h>
#include "nss_ncp.h"
#include "nss_cfgfile.h"
static struct nss_ncp_conf defConf ={0, TRUE, NULL, NULL, NULL, 100, NULL, -1, -1, TRUE, TRUE, TRUE};
/**************** TESTING ******************/
static void print_passwd (struct passwd pwd){
printf("%s:%s:%d:%d:%s:%s:%s\n",pwd.pw_name,pwd.pw_passwd,pwd.pw_uid,pwd.pw_gid,pwd.pw_gecos,pwd.pw_dir,pwd.pw_shell);
}
static void print_group (struct group grp){
char ** mmb; int num;
printf("%s:%s:%d:",grp.gr_name,grp.gr_passwd,grp.gr_gid);
for (mmb=grp.gr_mem,num=0;*mmb; mmb++,num++) {
if (num)
printf(",");
printf ("%s",*mmb);
}
printf("\n");
}
static void print_shadow (struct spwd spw){
printf("%s:%s:%ld:%ld:%ld:%ld:%ld:%ld:%ld\n",spw.sp_namp,spw.sp_pwdp,spw.sp_lstchg,spw.sp_min,spw.sp_max,spw.sp_warn,spw.sp_inact,spw.sp_expire,spw.sp_flag);
}
static void print_user_groups(gid_t * groups, long int start, long int size){
int i;
printf("start=%ld size=%ld\n",start,size);
for (i=0; i<start; i++)
printf("%d ",groups[i]);
printf("\n");
}
static void give_details_on_user_groups(gid_t *groups, long int start){
struct group grp;
char buffer[65000];
long int i;
for (i=0; i<start;i++) {
enum nss_status err=_nss_ncp_getgrgid_r (groups[i],&grp,buffer,sizeof(buffer),&errno);
if (err==NSS_STATUS_SUCCESS)
print_group(grp);
else printf("nss result is %d for group %d\n",err,groups[i]);
}
}
#define _(X) gettext(X)
static char *progname;
static void usage(void)
{
fprintf(stderr, _("usage: %s [options]\n"), progname);
exit (1);
}
static void help(void)
{
printf(_("\n"
"usage: %s [options]\n"), progname);
printf(_("\n"
"-h Print this help text\n"
"-u id Unix User passwd info to search by uid in NDS\n"
"-n login Unix User passwd infos to search by name in NDS\n"
"-s login Unix User shadow infos to search by name in NDS\n"
"-i grpid Unix group to search by gid in NDS\n"
"-g grpname Unix group to search by name in NDS\n"
"-m login Get Unix groups of user login\n"
"-U all Unix users to search in NDS\n"
"-G all Unix groups to search in NDS\n"
"-S all Unix shadows to search in NDS\n"
"-D verbose mode (fill /var/log/secure && screen)\n"
"-T treeName use this Tree \n"
"-B serverName use this server\n"
"-C NDS ctx start in this context (default=[Root])\n"
"-O NDS group restrict user's search to this group\n"
"-f fallbackID if no UID,GID found in NDS use this one (default=-1 skip user & group)\n"
"-2 show the BUG (two calls )\n"
"\n"));
exit (1);
}
/*************************************************************************
** main
*/
int main (int argc, char** argv) {
const char* userName=NULL;
uid_t userId=-1;
const char* groupName=NULL;
gid_t groupId=-1;
const char* shadowName=NULL;
const char* memberName=NULL;
int opt;
int allUsers=0;
int allGroups=0;
int allShadows=0;
char buffer[65000];
int nbCalls=1;
struct passwd pwd;
struct group grp;
struct spwd spw;
progname = argv[0];
while ((opt = getopt(argc, argv, "h?u:n:g:i:s:m:T:B:C:O:f:UGSD2")) != EOF)
{
switch (opt)
{
case 'n':
userName = optarg;
break;
case 'm':
memberName = optarg;
break;
case 's':
shadowName = optarg;
break;
case 'g':
groupName = optarg;
break;
case 'i':
groupId = strtoul(optarg, NULL, 0);
break;
case 'u':
userId = strtoul(optarg, NULL, 0);
break;
case 'U':
allUsers=1;
break;
case 'G':
allGroups=1;
break;
case 'S':
allShadows=1;
break;
case 'D':
defConf.debug=QF_DEBUG;
break;
case 'T':
defConf.server=optarg;
defConf.useTree=1;
break;
case 'B':
defConf.server=optarg;
defConf.useTree=0;
break;
case 'C':
defConf.startCtx=optarg;
break;
case 'O':
defConf.ctrlGroup=optarg;
break;
case 'f':
defConf.fallbackUid=strtoul(optarg, NULL, 0);
defConf.fallbackGid=strtoul(optarg, NULL, 0);
break;
case '2':
nbCalls=2;
break;
case 'h':
case '?':
help();
default:
usage();
}
}
if (defConf.debug)
openlog("ncp_nss", LOG_PID, LOG_AUTHPRIV);
while(nbCalls--) { // do it once or twice (freeze at the second !!!!)
if (userName) {
printf ("searching in passwd for login %s\n",userName);
if (_nss_ncp_getpwnam_r (userName,&pwd,buffer,sizeof(buffer),&errno)==NSS_STATUS_SUCCESS)
print_passwd(pwd);
}
if (memberName) {
#define MAX_GRP 30
gid_t groups[MAX_GRP];
long int start=0;
long int size=MAX_GRP;
printf ("searching groups of %s\n",memberName);
if ( _nss_ncp_initgroups (memberName, /*999 */ defConf.defGid,&start,&size,groups,0,&errno)==NSS_STATUS_SUCCESS) {
//long int *start, long int *size, gid_t * groups,long int limit,int *errnop) {
print_user_groups(groups,start,size);
give_details_on_user_groups(groups,start);// FREEZE AT THIS SECOND CALL to NWCCOpenConnByNAME !!!!
}
}
if (userId != (uid_t)-1) {
printf ("searching in passwd for uid %d\n",userId);
if ( _nss_ncp_getpwuid_r (userId, &pwd,buffer,sizeof(buffer),&errno)==NSS_STATUS_SUCCESS)
print_passwd(pwd);
}
if (allUsers) {
_nss_ncp_setpwent();
while ( _nss_ncp_getpwent_r(&pwd,buffer,sizeof(buffer),&errno)==NSS_STATUS_SUCCESS)
print_passwd(pwd);
_nss_ncp_endpwent();
}
if (groupName) {
printf ("searching in group for %s\n",groupName);
if (_nss_ncp_getgrnam_r (groupName,&grp,buffer,sizeof(buffer),&errno)==NSS_STATUS_SUCCESS) {
print_group(grp);
}
}
if (groupId != (gid_t)-1) {
printf ("searching in group for gid %d\n",groupId);
if ( _nss_ncp_getgrgid_r (groupId, &grp,buffer,sizeof(buffer),&errno)==NSS_STATUS_SUCCESS)
print_group(grp);
}
if (allGroups) {
_nss_ncp_setgrent();
while ( _nss_ncp_getgrent_r(&grp,buffer,sizeof(buffer),&errno)==NSS_STATUS_SUCCESS)
print_group(grp);
_nss_ncp_endgrent();
}
if (shadowName) {
printf ("searching in shadow for login %s\n",shadowName);
if (_nss_ncp_getspnam_r (shadowName,&spw,buffer,sizeof(buffer),&errno)==NSS_STATUS_SUCCESS)
print_shadow(spw);
}
if (allShadows) {
_nss_ncp_setspent();
while ( _nss_ncp_getspent_r(&spw,buffer,sizeof(buffer),&errno)==NSS_STATUS_SUCCESS)
print_shadow(spw);
_nss_ncp_endspent();
}
}
if (defConf.debug)
closelog();
exit(0);
}

View File

@@ -10,13 +10,14 @@ include $(top_builddir)/Make.rules
LIBS = @INTLLIBS@ @LIBS@
LIB_PAM_SECURITY = @LIB_PAM_SECURITY@
NCP_LIB = libncp.so
NCP_LIB = libncp.$(shlibext)
NCPLIB_DIR = ../../lib
PAM_LIBRARY = pam_ncp_auth.so
PAM_LIBRARY = pam_ncp_auth.$(shlibext)
PAM_OBJECTS = pam_ncp_auth.do support.do
CFLAGS_pam_ncp_auth.do := -DNCPMOUNT_PATH=\"$(bindir)/ncpmount\" -DNCPUMOUNT_PATH=\"$(bindir)/ncpumount\"
LDFLAGS = @LDFLAGS@
.PHONY : all install install-dev dep clean mrproper distclean
.PHONY : default
@@ -45,7 +46,7 @@ $(PAM_OBJECTS): %.do: %.c
$(PAM_LIBRARY): $(PAM_OBJECTS)
$(CC) $(CFLAGS) -shared -o $@ $(PAM_OBJECTS) -L$(NCPLIB_DIR) -lncp -lpam ${LIBS}
$(CC) $(CFLAGS) -shared $(LDFLAGS) -o $@ $(PAM_OBJECTS) -L$(NCPLIB_DIR) -lncp -lpam ${LIBS}
dep:

View File

@@ -257,6 +257,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <syslog.h>
#include <unistd.h>
#include <pwd.h>
#include <grp.h>
@@ -266,6 +267,7 @@
#include <fcntl.h>
#include <errno.h>
#include <ctype.h>
#include <syslog.h>
#include "support.h"
@@ -902,7 +904,7 @@ nw_ctx_search(const char *user_cn, NWCONN_HANDLE conn, char *contexts, size_t ma
NWDSContextHandle context;
NWDSCCODE ccode;
nuint32 iterationHandle;
nint32 countObjectsSearched;
nuint32 countObjectsSearched;
nuint32 objCntr;
nuint32 objCount;
char objectName[MAX_DN_CHARS + 1];
@@ -1472,7 +1474,7 @@ nw_retrieve_bindery_user_info(struct nw_user_info *ui, NWCONN_HANDLE conn, UNUSE
if (ui->qflag & QF_DEBUG)
syslog(LOG_NOTICE, "%s:got a full name %s for %s\n ", me, p.value, userName);
v = strdup(p.value);
v = strdup((char*)p.value);
if (!v) {
syslog(LOG_WARNING, "%s:Not enough memory for strdup()\n", me);
return ENOMEM;
@@ -1490,13 +1492,13 @@ nw_retrieve_bindery_user_info(struct nw_user_info *ui, NWCONN_HANDLE conn, UNUSE
err = ncp_read_property_value(conn, NCP_BINDERY_USER, userName, 1, "HOME_DIRECTORY", &p);
if (!err && p.value[0]) {
char *v1;
char *mark = strchr(p.value, ':');
char *mark = strchr((char*)p.value, ':');
if (mark && *(mark + 1)) {
if (ui->qflag & QF_DEBUG)
syslog(LOG_NOTICE, "%s:got a home directory %s for %s\n ", me, p.value, userName);
*mark = 0;
v = strdup(p.value);
v = strdup((char*)p.value);
if (!v) {
syslog(LOG_WARNING, "%s:Not enough memory for strdup()\n", me);
return ENOMEM;
@@ -1793,7 +1795,7 @@ nds_group_name(UNUSED(NWDSContextHandle ctx), const NWDSChar * objname, struct n
syslog(LOG_WARNING, "Not enough memory for strdup()\n");
return ENOMEM;
}
f = objname;
f = (const unsigned char*)objname;
for (; (c = *f++) != 0; *buff++ = c) {
if (c >= 'a' && c <= 'z')
continue;
@@ -2534,7 +2536,7 @@ nw_retrieve_nds_user_info(struct nw_user_info *ui, NWCONN_HANDLE conn, NWObjectI
bailoutctx:;
NWDSFreeContext(ctx);
bailout:;
if (!err & (ui->qflag & QF_DEBUG))
if ((!err) && (ui->qflag & QF_DEBUG))
syslog(LOG_NOTICE, "%u %u %s %s %s\n", ui->uid, ui->gid, ui->dir, ui->gecos, ui->shell);
return err;
}
@@ -3837,7 +3839,7 @@ nw_process_forward_file(UNUSED(const char *uname), const struct nw_user_info *ui
/******************************* check for allowed remote access by zen ***/
#if 1
#if 0
static void
report(int err, const char *what, const char *info)
{

384
contrib/php/Makefile.in Normal file
View File

@@ -0,0 +1,384 @@
# Makefile for PO directory in any package using GNU gettext.
# Copyright (C) 1995-1997, 2000-2005 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
#
# This file can be copied and used freely without restrictions. It can
# be used in projects which are not available under the GNU General Public
# License but which still want to provide support for the GNU gettext
# functionality.
# Please note that the actual code of GNU gettext is covered by the GNU
# General Public License and is *not* in the public domain.
#
# Origin: gettext-0.14.4
PACKAGE = ncpfs
VERSION = 2.2.7
PACKAGE_BUGREPORT = mario.fetka@disconnected-by-peer.at
SHELL = /bin/sh
srcdir = .
top_srcdir = ../..
prefix = /usr/local
exec_prefix = ${prefix}
datadir = ${prefix}/share
localedir = $(datadir)/locale
gettextsrcdir = $(datadir)/gettext/po
INSTALL = /usr/bin/install -c
INSTALL_DATA = ${INSTALL} -m 644
MKINSTALLDIRS = @MKINSTALLDIRS@
mkinstalldirs = $(SHELL) $(MKINSTALLDIRS)
GMSGFMT = /usr/bin/gmsgfmt
MSGFMT = /usr/bin/msgfmt
XGETTEXT = /usr/bin/xgettext
MSGMERGE = msgmerge
MSGMERGE_UPDATE = /usr/bin/msgmerge --update
MSGINIT = msginit
MSGCONV = msgconv
MSGFILTER = msgfilter
POFILES = @POFILES@
GMOFILES = @GMOFILES@
UPDATEPOFILES = @UPDATEPOFILES@
DUMMYPOFILES = @DUMMYPOFILES@
DISTFILES.common = Makefile.in.in remove-potcdate.sin \
$(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3)
DISTFILES = $(DISTFILES.common) Makevars POTFILES.in \
$(POFILES) $(GMOFILES) \
$(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3)
POTFILES = \
CATALOGS = @CATALOGS@
# Makevars gets inserted here. (Don't remove this line!)
.SUFFIXES:
.SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update
.po.mo:
@echo "$(MSGFMT) -c -o $@ $<"; \
$(MSGFMT) -c -o t-$@ $< && mv t-$@ $@
.po.gmo:
@lang=`echo $* | sed -e 's,.*/,,'`; \
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o $${lang}.gmo $${lang}.po"; \
cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo
.sin.sed:
sed -e '/^#/d' $< > t-$@
mv t-$@ $@
all: all-yes
all-yes: stamp-po
all-no:
# $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no
# internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because
# we don't want to bother translators with empty POT files). We assume that
# LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty.
# In this case, stamp-po is a nop (i.e. a phony target).
# stamp-po is a timestamp denoting the last time at which the CATALOGS have
# been loosely updated. Its purpose is that when a developer or translator
# checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS,
# "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent
# invocations of "make" will do nothing. This timestamp would not be necessary
# if updating the $(CATALOGS) would always touch them; however, the rule for
# $(POFILES) has been designed to not touch files that don't need to be
# changed.
stamp-po: $(srcdir)/$(DOMAIN).pot
test ! -f $(srcdir)/$(DOMAIN).pot || \
test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES)
@test ! -f $(srcdir)/$(DOMAIN).pot || { \
echo "touch stamp-po" && \
echo timestamp > stamp-poT && \
mv stamp-poT stamp-po; \
}
# Note: Target 'all' must not depend on target '$(DOMAIN).pot-update',
# otherwise packages like GCC can not be built if only parts of the source
# have been downloaded.
# This target rebuilds $(DOMAIN).pot; it is an expensive operation.
# Note that $(DOMAIN).pot is not touched if it doesn't need to be changed.
$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \
msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \
else \
msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \
fi; \
$(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
--add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) \
--files-from=$(srcdir)/POTFILES.in \
--copyright-holder='$(COPYRIGHT_HOLDER)' \
--msgid-bugs-address="$$msgid_bugs_address"
test ! -f $(DOMAIN).po || { \
if test -f $(srcdir)/$(DOMAIN).pot; then \
sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \
sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \
if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \
rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \
else \
rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \
mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
fi; \
else \
mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
fi; \
}
# This rule has no dependencies: we don't need to update $(DOMAIN).pot at
# every "make" invocation, only create it when it is missing.
# Only "make $(DOMAIN).pot-update" or "make dist" will force an update.
$(srcdir)/$(DOMAIN).pot:
$(MAKE) $(DOMAIN).pot-update
# This target rebuilds a PO file if $(DOMAIN).pot has changed.
# Note that a PO file is not touched if it doesn't need to be changed.
$(POFILES): $(srcdir)/$(DOMAIN).pot
@lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
if test -f "$(srcdir)/$${lang}.po"; then \
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \
cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot; \
else \
$(MAKE) $${lang}.po-create; \
fi
install: install-exec install-data
install-exec:
install-data: install-data-yes
if test "$(PACKAGE)" = "gettext-tools"; then \
$(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
for file in $(DISTFILES.common) Makevars.template; do \
$(INSTALL_DATA) $(srcdir)/$$file \
$(DESTDIR)$(gettextsrcdir)/$$file; \
done; \
for file in Makevars; do \
rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
done; \
else \
: ; \
fi
install-data-no: all
install-data-yes: all
$(mkinstalldirs) $(DESTDIR)$(datadir)
@catalogs='$(CATALOGS)'; \
for cat in $$catalogs; do \
cat=`basename $$cat`; \
lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
dir=$(localedir)/$$lang/LC_MESSAGES; \
$(mkinstalldirs) $(DESTDIR)$$dir; \
if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \
$(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \
echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \
for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
if test -n "$$lc"; then \
if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
(cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
for file in *; do \
if test -f $$file; then \
ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
fi; \
done); \
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
else \
if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
:; \
else \
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
fi; \
fi; \
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \
fi; \
done; \
done
install-strip: install
installdirs: installdirs-exec installdirs-data
installdirs-exec:
installdirs-data: installdirs-data-yes
if test "$(PACKAGE)" = "gettext-tools"; then \
$(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
else \
: ; \
fi
installdirs-data-no:
installdirs-data-yes:
$(mkinstalldirs) $(DESTDIR)$(datadir)
@catalogs='$(CATALOGS)'; \
for cat in $$catalogs; do \
cat=`basename $$cat`; \
lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
dir=$(localedir)/$$lang/LC_MESSAGES; \
$(mkinstalldirs) $(DESTDIR)$$dir; \
for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
if test -n "$$lc"; then \
if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
(cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
for file in *; do \
if test -f $$file; then \
ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
fi; \
done); \
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
else \
if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
:; \
else \
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
fi; \
fi; \
fi; \
done; \
done
# Define this as empty until I found a useful application.
installcheck:
uninstall: uninstall-exec uninstall-data
uninstall-exec:
uninstall-data: uninstall-data-yes
if test "$(PACKAGE)" = "gettext-tools"; then \
for file in $(DISTFILES.common) Makevars.template; do \
rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
done; \
else \
: ; \
fi
uninstall-data-no:
uninstall-data-yes:
catalogs='$(CATALOGS)'; \
for cat in $$catalogs; do \
cat=`basename $$cat`; \
lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
done; \
done
check: all
info dvi ps pdf html tags TAGS ctags CTAGS ID:
mostlyclean:
rm -f remove-potcdate.sed
rm -f stamp-poT
rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
rm -fr *.o
clean: mostlyclean
distclean: clean
rm -f Makefile Makefile.in POTFILES *.mo
maintainer-clean: distclean
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
rm -f stamp-po $(GMOFILES)
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
dist distdir:
$(MAKE) update-po
@$(MAKE) dist2
# This is a separate target because 'update-po' must be executed before.
dist2: stamp-po $(DISTFILES)
dists="$(DISTFILES)"; \
if test "$(PACKAGE)" = "gettext-tools"; then \
dists="$$dists Makevars.template"; \
fi; \
if test -f $(srcdir)/$(DOMAIN).pot; then \
dists="$$dists $(DOMAIN).pot stamp-po"; \
fi; \
if test -f $(srcdir)/ChangeLog; then \
dists="$$dists ChangeLog"; \
fi; \
for i in 0 1 2 3 4 5 6 7 8 9; do \
if test -f $(srcdir)/ChangeLog.$$i; then \
dists="$$dists ChangeLog.$$i"; \
fi; \
done; \
if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \
for file in $$dists; do \
if test -f $$file; then \
cp -p $$file $(distdir) || exit 1; \
else \
cp -p $(srcdir)/$$file $(distdir) || exit 1; \
fi; \
done
update-po: Makefile
$(MAKE) $(DOMAIN).pot-update
test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES)
$(MAKE) update-gmo
# General rule for creating PO files.
.nop.po-create:
@lang=`echo $@ | sed -e 's/\.po-create$$//'`; \
echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \
exit 1
# General rule for updating PO files.
.nop.po-update:
@lang=`echo $@ | sed -e 's/\.po-update$$//'`; \
if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; fi; \
tmpdir=`pwd`; \
echo "$$lang:"; \
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \
cd $(srcdir); \
if $(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$tmpdir/$$lang.new.po; then \
if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
rm -f $$tmpdir/$$lang.new.po; \
else \
if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
:; \
else \
echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
exit 1; \
fi; \
fi; \
else \
echo "msgmerge for $$lang.po failed!" 1>&2; \
rm -f $$tmpdir/$$lang.new.po; \
fi
$(DUMMYPOFILES):
update-gmo: Makefile $(GMOFILES)
@:
Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@
cd $(top_builddir) \
&& CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \
$(SHELL) ./config.status
force:
# Tell versions [3.59,3.63) of GNU make not to export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View File

@@ -1,6 +1,384 @@
LTLIBRARY_SHARED_NAME = php_auth_nds.la
LTLIBRARY_SOURCES = php_auth_nds.c
LTLIBRARY_LDFLAGS = -L../../lib -lncp
EXTRA_INCLUDES = -I../../include -DNCPFS_VERSION=\"@VERSION@\"
# Makefile for PO directory in any package using GNU gettext.
# Copyright (C) 1995-1997, 2000-2005 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
#
# This file can be copied and used freely without restrictions. It can
# be used in projects which are not available under the GNU General Public
# License but which still want to provide support for the GNU gettext
# functionality.
# Please note that the actual code of GNU gettext is covered by the GNU
# General Public License and is *not* in the public domain.
#
# Origin: gettext-0.14.4
include $(top_srcdir)/build/dynlib.mk
PACKAGE = @PACKAGE@
VERSION = @VERSION@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
SHELL = /bin/sh
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
datadir = @datadir@
localedir = $(datadir)/locale
gettextsrcdir = $(datadir)/gettext/po
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
MKINSTALLDIRS = @MKINSTALLDIRS@
mkinstalldirs = $(SHELL) $(MKINSTALLDIRS)
GMSGFMT = @GMSGFMT@
MSGFMT = @MSGFMT@
XGETTEXT = @XGETTEXT@
MSGMERGE = msgmerge
MSGMERGE_UPDATE = @MSGMERGE@ --update
MSGINIT = msginit
MSGCONV = msgconv
MSGFILTER = msgfilter
POFILES = @POFILES@
GMOFILES = @GMOFILES@
UPDATEPOFILES = @UPDATEPOFILES@
DUMMYPOFILES = @DUMMYPOFILES@
DISTFILES.common = Makefile.in.in remove-potcdate.sin \
$(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3)
DISTFILES = $(DISTFILES.common) Makevars POTFILES.in \
$(POFILES) $(GMOFILES) \
$(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3)
POTFILES = \
CATALOGS = @CATALOGS@
# Makevars gets inserted here. (Don't remove this line!)
.SUFFIXES:
.SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update
.po.mo:
@echo "$(MSGFMT) -c -o $@ $<"; \
$(MSGFMT) -c -o t-$@ $< && mv t-$@ $@
.po.gmo:
@lang=`echo $* | sed -e 's,.*/,,'`; \
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o $${lang}.gmo $${lang}.po"; \
cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo
.sin.sed:
sed -e '/^#/d' $< > t-$@
mv t-$@ $@
all: all-@USE_NLS@
all-yes: stamp-po
all-no:
# $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no
# internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because
# we don't want to bother translators with empty POT files). We assume that
# LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty.
# In this case, stamp-po is a nop (i.e. a phony target).
# stamp-po is a timestamp denoting the last time at which the CATALOGS have
# been loosely updated. Its purpose is that when a developer or translator
# checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS,
# "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent
# invocations of "make" will do nothing. This timestamp would not be necessary
# if updating the $(CATALOGS) would always touch them; however, the rule for
# $(POFILES) has been designed to not touch files that don't need to be
# changed.
stamp-po: $(srcdir)/$(DOMAIN).pot
test ! -f $(srcdir)/$(DOMAIN).pot || \
test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES)
@test ! -f $(srcdir)/$(DOMAIN).pot || { \
echo "touch stamp-po" && \
echo timestamp > stamp-poT && \
mv stamp-poT stamp-po; \
}
# Note: Target 'all' must not depend on target '$(DOMAIN).pot-update',
# otherwise packages like GCC can not be built if only parts of the source
# have been downloaded.
# This target rebuilds $(DOMAIN).pot; it is an expensive operation.
# Note that $(DOMAIN).pot is not touched if it doesn't need to be changed.
$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \
msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \
else \
msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \
fi; \
$(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
--add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) \
--files-from=$(srcdir)/POTFILES.in \
--copyright-holder='$(COPYRIGHT_HOLDER)' \
--msgid-bugs-address="$$msgid_bugs_address"
test ! -f $(DOMAIN).po || { \
if test -f $(srcdir)/$(DOMAIN).pot; then \
sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \
sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \
if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \
rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \
else \
rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \
mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
fi; \
else \
mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
fi; \
}
# This rule has no dependencies: we don't need to update $(DOMAIN).pot at
# every "make" invocation, only create it when it is missing.
# Only "make $(DOMAIN).pot-update" or "make dist" will force an update.
$(srcdir)/$(DOMAIN).pot:
$(MAKE) $(DOMAIN).pot-update
# This target rebuilds a PO file if $(DOMAIN).pot has changed.
# Note that a PO file is not touched if it doesn't need to be changed.
$(POFILES): $(srcdir)/$(DOMAIN).pot
@lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
if test -f "$(srcdir)/$${lang}.po"; then \
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \
cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot; \
else \
$(MAKE) $${lang}.po-create; \
fi
install: install-exec install-data
install-exec:
install-data: install-data-@USE_NLS@
if test "$(PACKAGE)" = "gettext-tools"; then \
$(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
for file in $(DISTFILES.common) Makevars.template; do \
$(INSTALL_DATA) $(srcdir)/$$file \
$(DESTDIR)$(gettextsrcdir)/$$file; \
done; \
for file in Makevars; do \
rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
done; \
else \
: ; \
fi
install-data-no: all
install-data-yes: all
$(mkinstalldirs) $(DESTDIR)$(datadir)
@catalogs='$(CATALOGS)'; \
for cat in $$catalogs; do \
cat=`basename $$cat`; \
lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
dir=$(localedir)/$$lang/LC_MESSAGES; \
$(mkinstalldirs) $(DESTDIR)$$dir; \
if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \
$(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \
echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \
for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
if test -n "$$lc"; then \
if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
(cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
for file in *; do \
if test -f $$file; then \
ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
fi; \
done); \
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
else \
if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
:; \
else \
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
fi; \
fi; \
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \
fi; \
done; \
done
install-strip: install
installdirs: installdirs-exec installdirs-data
installdirs-exec:
installdirs-data: installdirs-data-@USE_NLS@
if test "$(PACKAGE)" = "gettext-tools"; then \
$(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
else \
: ; \
fi
installdirs-data-no:
installdirs-data-yes:
$(mkinstalldirs) $(DESTDIR)$(datadir)
@catalogs='$(CATALOGS)'; \
for cat in $$catalogs; do \
cat=`basename $$cat`; \
lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
dir=$(localedir)/$$lang/LC_MESSAGES; \
$(mkinstalldirs) $(DESTDIR)$$dir; \
for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
if test -n "$$lc"; then \
if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
(cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
for file in *; do \
if test -f $$file; then \
ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
fi; \
done); \
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
else \
if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
:; \
else \
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
fi; \
fi; \
fi; \
done; \
done
# Define this as empty until I found a useful application.
installcheck:
uninstall: uninstall-exec uninstall-data
uninstall-exec:
uninstall-data: uninstall-data-@USE_NLS@
if test "$(PACKAGE)" = "gettext-tools"; then \
for file in $(DISTFILES.common) Makevars.template; do \
rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
done; \
else \
: ; \
fi
uninstall-data-no:
uninstall-data-yes:
catalogs='$(CATALOGS)'; \
for cat in $$catalogs; do \
cat=`basename $$cat`; \
lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
done; \
done
check: all
info dvi ps pdf html tags TAGS ctags CTAGS ID:
mostlyclean:
rm -f remove-potcdate.sed
rm -f stamp-poT
rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
rm -fr *.o
clean: mostlyclean
distclean: clean
rm -f Makefile Makefile.in POTFILES *.mo
maintainer-clean: distclean
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
rm -f stamp-po $(GMOFILES)
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
dist distdir:
$(MAKE) update-po
@$(MAKE) dist2
# This is a separate target because 'update-po' must be executed before.
dist2: stamp-po $(DISTFILES)
dists="$(DISTFILES)"; \
if test "$(PACKAGE)" = "gettext-tools"; then \
dists="$$dists Makevars.template"; \
fi; \
if test -f $(srcdir)/$(DOMAIN).pot; then \
dists="$$dists $(DOMAIN).pot stamp-po"; \
fi; \
if test -f $(srcdir)/ChangeLog; then \
dists="$$dists ChangeLog"; \
fi; \
for i in 0 1 2 3 4 5 6 7 8 9; do \
if test -f $(srcdir)/ChangeLog.$$i; then \
dists="$$dists ChangeLog.$$i"; \
fi; \
done; \
if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \
for file in $$dists; do \
if test -f $$file; then \
cp -p $$file $(distdir) || exit 1; \
else \
cp -p $(srcdir)/$$file $(distdir) || exit 1; \
fi; \
done
update-po: Makefile
$(MAKE) $(DOMAIN).pot-update
test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES)
$(MAKE) update-gmo
# General rule for creating PO files.
.nop.po-create:
@lang=`echo $@ | sed -e 's/\.po-create$$//'`; \
echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \
exit 1
# General rule for updating PO files.
.nop.po-update:
@lang=`echo $@ | sed -e 's/\.po-update$$//'`; \
if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; fi; \
tmpdir=`pwd`; \
echo "$$lang:"; \
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \
cd $(srcdir); \
if $(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$tmpdir/$$lang.new.po; then \
if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
rm -f $$tmpdir/$$lang.new.po; \
else \
if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
:; \
else \
echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
exit 1; \
fi; \
fi; \
else \
echo "msgmerge for $$lang.po failed!" 1>&2; \
rm -f $$tmpdir/$$lang.new.po; \
fi
$(DUMMYPOFILES):
update-gmo: Makefile $(GMOFILES)
@:
Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@
cd $(top_builddir) \
&& CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \
$(SHELL) ./config.status
force:
# Tell versions [3.59,3.63) of GNU make not to export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,167 @@
mkinstalldirs = $(top_srcdir)/build/shtool mkdir -p
INSTALL = $(top_srcdir)/build/shtool install -c
INSTALL_DATA = $(INSTALL) -m 644
DEFS = -I$(top_builddir)/include -I$(top_builddir)/main -I$(top_srcdir)
COMMON_FLAGS = $(DEFS) $(INCLUDES) $(EXTRA_INCLUDES) $(CPPFLAGS) $(PHP_FRAMEWORKPATH)
all: $(all_targets)
@echo
@echo "Build complete."
@echo "Don't forget to run 'make test'."
@echo
build-modules: $(PHP_MODULES) $(PHP_ZEND_EX)
build-binaries: $(PHP_BINARIES)
libphp.la: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
$(LIBTOOL) --tag=CC --mode=link $(CC) $(LIBPHP_CFLAGS) $(CFLAGS) $(EXTRA_CFLAGS) -rpath $(phptempdir) $(EXTRA_LDFLAGS) $(LDFLAGS) $(PHP_RPATHS) $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@
-@$(LIBTOOL) --silent --tag=CC --mode=install cp $@ $(phptempdir)/$@ >/dev/null 2>&1
libphp.dylib: libphp.la
$(LIBTOOL) --tag=CC --mode=link $(CC) -dynamiclib $(LIBPHP_CFLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) -rpath $(phptempdir) -install_name @rpath/$@ $(EXTRA_LDFLAGS) $(LDFLAGS) $(PHP_RPATHS) $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@
-@$(LIBTOOL) --silent --tag=CC --mode=install cp $@ $(phptempdir)/$@ >/dev/null 2>&1
libs/libphp.bundle: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
$(CC) $(MH_BUNDLE_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(PHP_GLOBAL_OBJS:.lo=.o) $(PHP_SAPI_OBJS:.lo=.o) $(PHP_FRAMEWORKS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@ && cp $@ libs/libphp.so
install: $(all_targets) $(install_targets)
install-sapi: $(OVERALL_TARGET)
@echo "Installing PHP SAPI module: $(PHP_SAPI)"
-@$(mkinstalldirs) $(INSTALL_ROOT)$(bindir)
-@if test ! -r $(phptempdir)/libphp.$(SHLIB_DL_SUFFIX_NAME); then \
for i in 0.0.0 0.0 0; do \
if test -r $(phptempdir)/libphp.$(SHLIB_DL_SUFFIX_NAME).$$i; then \
$(LN_S) $(phptempdir)/libphp.$(SHLIB_DL_SUFFIX_NAME).$$i $(phptempdir)/libphp.$(SHLIB_DL_SUFFIX_NAME); \
break; \
fi; \
done; \
fi
@$(INSTALL_IT)
install-binaries: build-binaries $(install_binary_targets)
install-modules: build-modules
@test -d modules && \
$(mkinstalldirs) $(INSTALL_ROOT)$(EXTENSION_DIR)
@echo "Installing shared extensions: $(INSTALL_ROOT)$(EXTENSION_DIR)/"
@rm -f modules/*.la >/dev/null 2>&1
@$(INSTALL) modules/* $(INSTALL_ROOT)$(EXTENSION_DIR)
install-headers:
-@if test "$(INSTALL_HEADERS)"; then \
for i in `echo $(INSTALL_HEADERS)`; do \
i=`$(top_srcdir)/build/shtool path -d $$i`; \
paths="$$paths $(INSTALL_ROOT)$(phpincludedir)/$$i"; \
done; \
$(mkinstalldirs) $$paths && \
echo "Installing header files: $(INSTALL_ROOT)$(phpincludedir)/" && \
for i in `echo $(INSTALL_HEADERS)`; do \
if test "$(PHP_PECL_EXTENSION)"; then \
src=`echo $$i | $(SED) -e "s#ext/$(PHP_PECL_EXTENSION)/##g"`; \
else \
src=$$i; \
fi; \
if test -f "$(top_srcdir)/$$src"; then \
$(INSTALL_DATA) $(top_srcdir)/$$src $(INSTALL_ROOT)$(phpincludedir)/$$i; \
elif test -f "$(top_builddir)/$$src"; then \
$(INSTALL_DATA) $(top_builddir)/$$src $(INSTALL_ROOT)$(phpincludedir)/$$i; \
else \
(cd $(top_srcdir)/$$src && $(INSTALL_DATA) *.h $(INSTALL_ROOT)$(phpincludedir)/$$i; \
cd $(top_builddir)/$$src && $(INSTALL_DATA) *.h $(INSTALL_ROOT)$(phpincludedir)/$$i) 2>/dev/null || true; \
fi \
done; \
fi
PHP_TEST_SETTINGS = -d 'open_basedir=' -d 'output_buffering=0' -d 'memory_limit=-1'
PHP_TEST_SHARED_EXTENSIONS = ` \
if test "x$(PHP_MODULES)" != "x"; then \
for i in $(PHP_MODULES)""; do \
. $$i; \
if test "x$$dlname" != "xdl_test.so"; then \
$(top_srcdir)/build/shtool echo -n -- " -d extension=$$dlname"; \
fi; \
done; \
fi; \
if test "x$(PHP_ZEND_EX)" != "x"; then \
for i in $(PHP_ZEND_EX)""; do \
. $$i; $(top_srcdir)/build/shtool echo -n -- " -d zend_extension=$(top_builddir)/modules/$$dlname"; \
done; \
fi`
PHP_DEPRECATED_DIRECTIVES_REGEX = '^[\t\ ]*(magic_quotes_(gpc|runtime|sybase)?|(zend_)?extension(_debug)?(_ts)?)[\t\ ]*='
test: all
@if test ! -z "$(PHP_EXECUTABLE)" && test -x "$(PHP_EXECUTABLE)"; then \
INI_FILE=`$(PHP_EXECUTABLE) -d 'display_errors=stderr' -r 'echo php_ini_loaded_file();' 2> /dev/null`; \
if test "$$INI_FILE"; then \
$(EGREP) -h -v $(PHP_DEPRECATED_DIRECTIVES_REGEX) "$$INI_FILE" > $(top_builddir)/tmp-php.ini; \
else \
echo > $(top_builddir)/tmp-php.ini; \
fi; \
INI_SCANNED_PATH=`$(PHP_EXECUTABLE) -d 'display_errors=stderr' -r '$$a = explode(",\n", trim(php_ini_scanned_files())); echo $$a[0];' 2> /dev/null`; \
if test "$$INI_SCANNED_PATH"; then \
INI_SCANNED_PATH=`$(top_srcdir)/build/shtool path -d $$INI_SCANNED_PATH`; \
$(EGREP) -h -v $(PHP_DEPRECATED_DIRECTIVES_REGEX) "$$INI_SCANNED_PATH"/*.ini >> $(top_builddir)/tmp-php.ini; \
fi; \
TEST_PHP_EXECUTABLE=$(PHP_EXECUTABLE) \
TEST_PHP_SRCDIR=$(top_srcdir) \
CC="$(CC)" \
$(PHP_EXECUTABLE) -n -c $(top_builddir)/tmp-php.ini $(PHP_TEST_SETTINGS) $(top_srcdir)/run-tests.php -n -c $(top_builddir)/tmp-php.ini -d extension_dir=$(top_builddir)/modules/ $(PHP_TEST_SHARED_EXTENSIONS) $(TESTS); \
TEST_RESULT_EXIT_CODE=$$?; \
rm $(top_builddir)/tmp-php.ini; \
exit $$TEST_RESULT_EXIT_CODE; \
else \
echo "ERROR: Cannot run tests without CLI sapi."; \
fi
clean:
find . -name \*.gcno -o -name \*.gcda | xargs rm -f
find . -name \*.lo -o -name \*.o -o -name \*.dep | xargs rm -f
find . -name \*.la -o -name \*.a | xargs rm -f
find . -name \*.so | xargs rm -f
find . -name .libs -a -type d|xargs rm -rf
rm -f libphp.la $(SAPI_CLI_PATH) $(SAPI_CGI_PATH) $(SAPI_LITESPEED_PATH) $(SAPI_FPM_PATH) $(OVERALL_TARGET) modules/* libs/*
rm -f ext/opcache/jit/zend_jit_x86.c
rm -f ext/opcache/jit/zend_jit_arm64.c
rm -f ext/opcache/minilua
distclean: clean
rm -f Makefile config.cache config.log config.status Makefile.objects Makefile.fragments libtool main/php_config.h main/internal_functions_cli.c main/internal_functions.c Zend/zend_dtrace_gen.h Zend/zend_dtrace_gen.h.bak Zend/zend_config.h
rm -f main/build-defs.h scripts/phpize
rm -f ext/date/lib/timelib_config.h ext/mbstring/libmbfl/config.h ext/oci8/oci8_dtrace_gen.h ext/oci8/oci8_dtrace_gen.h.bak
rm -f scripts/man1/phpize.1 scripts/php-config scripts/man1/php-config.1 sapi/cli/php.1 sapi/cgi/php-cgi.1 sapi/phpdbg/phpdbg.1 ext/phar/phar.1 ext/phar/phar.phar.1
rm -f sapi/fpm/php-fpm.conf sapi/fpm/init.d.php-fpm sapi/fpm/php-fpm.service sapi/fpm/php-fpm.8 sapi/fpm/status.html
rm -f ext/phar/phar.phar ext/phar/phar.php
if test "$(srcdir)" != "$(builddir)"; then \
rm -f ext/phar/phar/phar.inc; \
fi
$(EGREP) define'.*include/php' $(top_srcdir)/configure | $(SED) 's/.*>//'|xargs rm -f
prof-gen:
CCACHE_DISABLE=1 $(MAKE) PROF_FLAGS=-fprofile-generate all
find . -name \*.gcda | xargs rm -f
prof-clean:
find . -name \*.lo -o -name \*.o | xargs rm -f
find . -name \*.la -o -name \*.a | xargs rm -f
find . -name \*.so | xargs rm -f
rm -f libphp.la $(SAPI_CLI_PATH) $(SAPI_CGI_PATH) $(SAPI_LITESPEED_PATH) $(SAPI_FPM_PATH) $(OVERALL_TARGET) modules/* libs/*
prof-use:
CCACHE_DISABLE=1 $(MAKE) PROF_FLAGS=-fprofile-use all
%_arginfo.h: %.stub.php
@if test -e "$(top_srcdir)/build/gen_stub.php"; then \
if test ! -z "$(PHP)"; then \
echo Parse $< to generate $@;\
$(PHP) $(top_srcdir)/build/gen_stub.php $<; \
elif test ! -z "$(PHP_EXECUTABLE)" && test -x "$(PHP_EXECUTABLE)"; then \
echo Parse $< to generate $@;\
$(PHP_EXECUTABLE) $(top_srcdir)/build/gen_stub.php $<; \
fi; \
fi;
.PHONY: all clean install distclean test prof-gen prof-clean prof-use
.NOEXPORT:

View File

@@ -0,0 +1,53 @@
# ===========================================================================
# https://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT])
#
# DESCRIPTION
#
# Check whether the given FLAG works with the current language's compiler
# or gives an error. (Warnings, however, are ignored)
#
# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
# success/failure.
#
# If EXTRA-FLAGS is defined, it is added to the current language's default
# flags (e.g. CFLAGS) when the check is done. The check is thus made with
# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to
# force the compiler to issue an error when a bad flag is given.
#
# INPUT gives an alternative input source to AC_COMPILE_IFELSE.
#
# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
# macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG.
#
# LICENSE
#
# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.
#serial 6
AC_DEFUN([AX_CHECK_COMPILE_FLAG],
[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl
AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [
ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS
_AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1"
AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
[AS_VAR_SET(CACHEVAR,[yes])],
[AS_VAR_SET(CACHEVAR,[no])])
_AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags])
AS_VAR_IF(CACHEVAR,yes,
[m4_default([$2], :)],
[m4_default([$3], :)])
AS_VAR_POPDEF([CACHEVAR])dnl
])dnl AX_CHECK_COMPILE_FLAGS

View File

@@ -0,0 +1,241 @@
# ===========================================================================
# https://www.gnu.org/software/autoconf-archive/ax_gcc_func_attribute.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_GCC_FUNC_ATTRIBUTE(ATTRIBUTE)
#
# DESCRIPTION
#
# This macro checks if the compiler supports one of GCC's function
# attributes; many other compilers also provide function attributes with
# the same syntax. Compiler warnings are used to detect supported
# attributes as unsupported ones are ignored by default so quieting
# warnings when using this macro will yield false positives.
#
# The ATTRIBUTE parameter holds the name of the attribute to be checked.
#
# If ATTRIBUTE is supported define HAVE_FUNC_ATTRIBUTE_<ATTRIBUTE>.
#
# The macro caches its result in the ax_cv_have_func_attribute_<attribute>
# variable.
#
# The macro currently supports the following function attributes:
#
# alias
# aligned
# alloc_size
# always_inline
# artificial
# cold
# const
# constructor
# constructor_priority for constructor attribute with priority
# deprecated
# destructor
# dllexport
# dllimport
# error
# externally_visible
# fallthrough
# flatten
# format
# format_arg
# gnu_inline
# hot
# ifunc
# leaf
# malloc
# noclone
# noinline
# nonnull
# noreturn
# nothrow
# optimize
# pure
# sentinel
# sentinel_position
# unused
# used
# visibility
# warning
# warn_unused_result
# weak
# weakref
#
# Unsupported function attributes will be tested with a prototype
# returning an int and not accepting any arguments and the result of the
# check might be wrong or meaningless so use with care.
#
# LICENSE
#
# Copyright (c) 2013 Gabriele Svelto <gabriele.svelto@gmail.com>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.
#serial 9
AC_DEFUN([AX_GCC_FUNC_ATTRIBUTE], [
AS_VAR_PUSHDEF([ac_var], [ax_cv_have_func_attribute_$1])
AC_CACHE_CHECK([for __attribute__(($1))], [ac_var], [
AC_LINK_IFELSE([AC_LANG_PROGRAM([
m4_case([$1],
[alias], [
int foo( void ) { return 0; }
int bar( void ) __attribute__(($1("foo")));
],
[aligned], [
int foo( void ) __attribute__(($1(32)));
],
[alloc_size], [
void *foo(int a) __attribute__(($1(1)));
],
[always_inline], [
inline __attribute__(($1)) int foo( void ) { return 0; }
],
[artificial], [
inline __attribute__(($1)) int foo( void ) { return 0; }
],
[cold], [
int foo( void ) __attribute__(($1));
],
[const], [
int foo( void ) __attribute__(($1));
],
[constructor_priority], [
int foo( void ) __attribute__((__constructor__(65535/2)));
],
[constructor], [
int foo( void ) __attribute__(($1));
],
[deprecated], [
int foo( void ) __attribute__(($1("")));
],
[destructor], [
int foo( void ) __attribute__(($1));
],
[dllexport], [
__attribute__(($1)) int foo( void ) { return 0; }
],
[dllimport], [
int foo( void ) __attribute__(($1));
],
[error], [
int foo( void ) __attribute__(($1("")));
],
[externally_visible], [
int foo( void ) __attribute__(($1));
],
[fallthrough], [
int foo( void ) {switch (0) { case 1: __attribute__(($1)); case 2: break ; }};
],
[flatten], [
int foo( void ) __attribute__(($1));
],
[format], [
int foo(const char *p, ...) __attribute__(($1(printf, 1, 2)));
],
[format_arg], [
char *foo(const char *p) __attribute__(($1(1)));
],
[gnu_inline], [
inline __attribute__(($1)) int foo( void ) { return 0; }
],
[hot], [
int foo( void ) __attribute__(($1));
],
[ifunc], [
int my_foo( void ) { return 0; }
static int (*resolve_foo(void))(void) { return my_foo; }
int foo( void ) __attribute__(($1("resolve_foo")));
],
[leaf], [
__attribute__(($1)) int foo( void ) { return 0; }
],
[malloc], [
void *foo( void ) __attribute__(($1));
],
[noclone], [
int foo( void ) __attribute__(($1));
],
[noinline], [
__attribute__(($1)) int foo( void ) { return 0; }
],
[nonnull], [
int foo(char *p) __attribute__(($1(1)));
],
[noreturn], [
void foo( void ) __attribute__(($1));
],
[nothrow], [
int foo( void ) __attribute__(($1));
],
[optimize], [
__attribute__(($1(3))) int foo( void ) { return 0; }
],
[pure], [
int foo( void ) __attribute__(($1));
],
[sentinel], [
int foo(void *p, ...) __attribute__(($1));
],
[sentinel_position], [
int foo(void *p, ...) __attribute__(($1(1)));
],
[returns_nonnull], [
void *foo( void ) __attribute__(($1));
],
[unused], [
int foo( void ) __attribute__(($1));
],
[used], [
int foo( void ) __attribute__(($1));
],
[visibility], [
int foo_def( void ) __attribute__(($1("default")));
int foo_hid( void ) __attribute__(($1("hidden")));
int foo_int( void ) __attribute__(($1("internal")));
int foo_pro( void ) __attribute__(($1("protected")));
],
[warning], [
int foo( void ) __attribute__(($1("")));
],
[warn_unused_result], [
int foo( void ) __attribute__(($1));
],
[weak], [
int foo( void ) __attribute__(($1));
],
[weakref], [
static int foo( void ) { return 0; }
static int bar( void ) __attribute__(($1("foo")));
],
[target], [
int bar( void ) __attribute__(($1("sse2")));
],
[
m4_warn([syntax], [Unsupported attribute $1, the test may fail])
int foo( void ) __attribute__(($1));
]
)], [])
],
dnl GCC doesn't exit with an error if an unknown attribute is
dnl provided but only outputs a warning, so accept the attribute
dnl only if no warning were issued.
[AS_IF([test -s conftest.err],
[AS_VAR_SET([ac_var], [no])],
[AS_VAR_SET([ac_var], [yes])])],
[AS_VAR_SET([ac_var], [no])])
])
AS_IF([test yes = AS_VAR_GET([ac_var])],
[AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_FUNC_ATTRIBUTE_$1), 1,
[Define to 1 if the system has the `$1' function attribute])], [])
AS_VAR_POPDEF([ac_var])
])

1818
contrib/php/build/config.guess vendored Executable file

File diff suppressed because it is too large Load Diff

2364
contrib/php/build/config.sub vendored Executable file

File diff suppressed because it is too large Load Diff

View File

@@ -1,24 +0,0 @@
# +----------------------------------------------------------------------+
# | PHP Version 4 |
# +----------------------------------------------------------------------+
# | Copyright (c) 1997-2002 The PHP Group |
# +----------------------------------------------------------------------+
# | This source file is subject to version 2.02 of the PHP license, |
# | that is bundled with this package in the file LICENSE, and is |
# | available at through the world-wide-web at |
# | http://www.php.net/license/2_02.txt. |
# | If you did not receive a copy of the PHP license and are unable to |
# | obtain it through the world-wide-web, please send a note to |
# | license@php.net so we can mail you a copy immediately. |
# +----------------------------------------------------------------------+
# | Author: Sascha Schumann <sascha@schumann.cx> |
# +----------------------------------------------------------------------+
#
# $Id: dynlib.mk,v 1.4 2002/02/28 08:25:30 sebastian Exp $
#
all: all-recursive
include $(builddir)/libs.mk
include $(top_srcdir)/build/rules.mk

View File

@@ -1,80 +0,0 @@
#! /bin/sh
#
# +----------------------------------------------------------------------+
# | PHP Version 4 |
# +----------------------------------------------------------------------+
# | Copyright (c) 1997-2002 The PHP Group |
# +----------------------------------------------------------------------+
# | This source file is subject to version 2.02 of the PHP license, |
# | that is bundled with this package in the file LICENSE, and is |
# | available at through the world-wide-web at |
# | http://www.php.net/license/2_02.txt. |
# | If you did not receive a copy of the PHP license and are unable to |
# | obtain it through the world-wide-web, please send a note to |
# | license@php.net so we can mail you a copy immediately. |
# +----------------------------------------------------------------------+
# | Author: Sascha Schumann <sascha@schumann.cx> |
# +----------------------------------------------------------------------+
#
# $Id: fastgen.sh,v 1.14 2002/02/28 08:25:33 sebastian Exp $
#
if test "$#" = "0"; then
echo "Usage: fastgen.sh <srcdir> <mkdir_p> <bsdmakefile_p> <file>"
fi
srcdir=$1
shift
mkdir_p=$1
shift
bsd_makefile=$1
shift
top_srcdir=`(cd $srcdir; pwd)`
top_builddir=`pwd`
if test "$mkdir_p" = "yes"; then
mkdir_p="mkdir -p"
else
mkdir_p="$top_srcdir/build/shtool mkdir -p"
fi
if test "$bsd_makefile" = "yes"; then
(cd $top_srcdir; ./build/bsd_makefile)
for makefile in $@; do
echo "fastgen.sh: creating $makefile"
dir=`echo $makefile|sed 's%/*[^/][^/]*$%%'`
$mkdir_p "$dir/"
cat - $top_srcdir/$makefile.in <<EOF |sed 's/^include \(.*\)/.include "\1"/' >$makefile
top_srcdir = $top_srcdir
top_builddir = $top_builddir
srcdir = $top_srcdir/$dir
builddir = $top_builddir/$dir
VPATH = $top_srcdir/$dir
EOF
test -z "$dir" && dir=.
touch $dir/.deps
done
else
for makefile in $@; do
echo "fastgen.sh: creating $makefile"
dir=`echo $makefile|sed 's%/*[^/][^/]*$%%'`
$mkdir_p "$dir/"
cat - $top_srcdir/$makefile.in <<EOF >$makefile
top_srcdir = $top_srcdir
top_builddir = $top_builddir
srcdir = $top_srcdir/$dir
builddir = $top_builddir/$dir
VPATH = $top_srcdir/$dir
EOF
test -z "$dir" && dir=.
touch $dir/.deps
done
fi

File diff suppressed because it is too large Load Diff

View File

@@ -1,23 +0,0 @@
# +----------------------------------------------------------------------+
# | PHP Version 4 |
# +----------------------------------------------------------------------+
# | Copyright (c) 1997-2002 The PHP Group |
# +----------------------------------------------------------------------+
# | This source file is subject to version 2.02 of the PHP license, |
# | that is bundled with this package in the file LICENSE, and is |
# | available at through the world-wide-web at |
# | http://www.php.net/license/2_02.txt. |
# | If you did not receive a copy of the PHP license and are unable to |
# | obtain it through the world-wide-web, please send a note to |
# | license@php.net so we can mail you a copy immediately. |
# +----------------------------------------------------------------------+
# | Author: Sascha Schumann <sascha@schumann.cx> |
# +----------------------------------------------------------------------+
#
# $Id: library.mk,v 1.12 2002/02/28 08:25:33 sebastian Exp $
#
LTLIBRARY_OBJECTS = $(LTLIBRARY_SOURCES:.c=.lo) $(LTLIBRARY_OBJECTS_X)
$(LTLIBRARY_NAME): $(LTLIBRARY_OBJECTS) $(LTLIBRARY_DEPENDENCIES)
$(LINK) $(LTLIBRARY_LDFLAGS) $(LTLIBRARY_OBJECTS) $(LTLIBRARY_LIBADD)

File diff suppressed because it is too large Load Diff

View File

@@ -1,24 +0,0 @@
# +----------------------------------------------------------------------+
# | PHP Version 4 |
# +----------------------------------------------------------------------+
# | Copyright (c) 1997-2002 The PHP Group |
# +----------------------------------------------------------------------+
# | This source file is subject to version 2.02 of the PHP license, |
# | that is bundled with this package in the file LICENSE, and is |
# | available at through the world-wide-web at |
# | http://www.php.net/license/2_02.txt. |
# | If you did not receive a copy of the PHP license and are unable to |
# | obtain it through the world-wide-web, please send a note to |
# | license@php.net so we can mail you a copy immediately. |
# +----------------------------------------------------------------------+
# | Author: Sascha Schumann <sascha@schumann.cx> |
# +----------------------------------------------------------------------+
#
# $Id: ltlib.mk,v 1.7 2002/02/28 08:25:34 sebastian Exp $
#
targets = $(LTLIBRARY_NAME)
include $(top_srcdir)/build/rules.mk
include $(top_srcdir)/build/library.mk

File diff suppressed because it is too large Load Diff

View File

@@ -1,75 +0,0 @@
# +----------------------------------------------------------------------+
# | PHP Version 4 |
# +----------------------------------------------------------------------+
# | Copyright (c) 2000 The PHP Group |
# +----------------------------------------------------------------------+
# | This source file is subject to version 2.02 of the PHP license, |
# | that is bundled with this package in the file LICENSE, and is |
# | available at through the world-wide-web at |
# | http://www.php.net/license/2_02.txt. |
# | If you did not receive a copy of the PHP license and are unable to |
# | obtain it through the world-wide-web, please send a note to |
# | license@php.net so we can mail you a copy immediately. |
# +----------------------------------------------------------------------+
# | Author: Sascha Schumann <sascha@schumann.cx> |
# +----------------------------------------------------------------------+
#
# $Id: mkdep.awk,v 1.5 2002/02/28 08:25:35 sebastian Exp $
#
# Usage:
#
# echo top_srcdir top_builddir srcdir CPP [CPP-ARGS] filenames | \
# awk -f mkdep.awk > dependencies
{
top_srcdir=$1
top_builddir=$2
srcdir=$3
cmd=$4
for (i = 5; i <= NF; i++) {
if (match($i, "^-[A-Z]") == 0)
break;
cmd=cmd " " $i
}
dif=i-1
for (; i <= NF; i++)
filenames[i-dif]=$i
no_files=NF-dif
for(i = 1; i <= no_files; i++) {
if (system("test -r " filenames[i]) != 0)
continue
target=filenames[i]
sub(srcdir "/", "", target)
target2=target
sub("\.(c|cpp)$", ".lo", target);
sub("\.(c|cpp)$", ".slo", target2);
for (e in used)
delete used[e]
cmdx=cmd " " filenames[i]
done=0
while ((cmdx | getline) > 0) {
if (match($0, "^# [0-9]* \".*\.h\"") != 0) {
if (sub(top_srcdir, "$(top_srcdir)", $3) == 0)
sub(top_builddir, "$(top_builddir)", $3)
if (substr($3,2,1) != "/" && used[$3] != 1) {
if (done == 0)
printf(target " " target2 ":")
done=1
printf(" \\\n\t" substr($3,2,length($3)-2))
used[$3] = 1;
}
}
}
if (done == 1)
print "\n"
}
}

2876
contrib/php/build/php.m4 Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,956 @@
dnl
dnl Based on https://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx.html
dnl Author: Anatol Belski <ab@php.net>
dnl
dnl PHP_CXX_COMPILE_STDCXX(version, mandatory|optional, var_name_to_put_switch_in)
dnl
dnl ARGUMENTS
dnl
dnl first arg - version as 11, 14, 17 or 20
dnl second arg - if mandatory, the configure will fail when no features found.
dnl Optional will make configure silently continue
dnl third arg - a variable name where the corresponding switch would be put. If
dnl the variable is already defined, its contents will be overwritten.
dnl
dnl EXAMPLE
dnl
dnl PHP_CXX_COMPILE_STDCXX(14, mandatory, MY_STDCXX_SWiTCH)
dnl echo $MY_STDCXX_SWITCH
dnl
dnl
dnl PHP specific implementation start.
dnl
AC_DEFUN([PHP_CXX_COMPILE_STDCXX], [dnl
m4_if([$1], [11], [ax_cxx_compile_alternatives="11 0x"],
[$1], [14], [ax_cxx_compile_alternatives="14 1y"],
[$1], [17], [ax_cxx_compile_alternatives="17 1z"],
[$1], [20], [ax_cxx_compile_alternatives="20"],
[m4_fatal([invalid first argument `$1' to PHP_CXX_COMPILE_STDCXX])])[]dnl
m4_if([$2], [], [ax_cxx_compile_cxx$1_required=true],
[$2], [mandatory], [ax_cxx_compile_cxx$1_required=true],
[$2], [optional], [ax_cxx_compile_cxx$1_required=false],
[m4_fatal([invalid third argument `$2' to PHP_CXX_COMPILE_STDCXX])])[]dnl
AC_LANG_PUSH([C++])dnl
ac_success=no
dnl HP's aCC needs +std=c++11 according to:
dnl http://h21007.www2.hp.com/portal/download/files/unprot/aCxx/PDF_Release_Notes/769149-001.pdf
dnl Cray's crayCC needs "-h std=c++11"
for alternative in ${ax_cxx_compile_alternatives}; do
for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch])
AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch,
$cachevar,
[ac_save_CXX="$CXX"
CXX="$CXX $switch"
AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
[eval $cachevar=yes],
[eval $cachevar=no])
CXX="$ac_save_CXX"])
if eval test x\$$cachevar = xyes; then
eval AS_TR_SH([$3])="$switch"
ac_success=yes
break
fi
done
if test x$ac_success = xyes; then
break
fi
done
AC_LANG_POP([C++])
if test x$ax_cxx_compile_cxx$1_required = xtrue; then
if test x$ac_success = xno; then
AC_MSG_ERROR([*** A compiler with support for C++$1 language features is required.])
fi
fi
if test x$ac_success = xno; then
AC_MSG_NOTICE([No compiler with C++$1 support was found])
fi
AC_SUBST(HAVE_CXX$1)
])
dnl
dnl PHP specific implementation end.
dnl The relevant part of the unchanged original implementation is below.
dnl
#
# LICENSE
#
# Copyright (c) 2008 Benjamin Kosnik <bkoz@redhat.com>
# Copyright (c) 2012 Zack Weinberg <zackw@panix.com>
# Copyright (c) 2013 Roy Stogner <roystgnr@ices.utexas.edu>
# Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov <sokolov@google.com>
# Copyright (c) 2015 Paul Norman <penorman@mac.com>
# Copyright (c) 2015 Moritz Klammler <moritz@klammler.eu>
# Copyright (c) 2016, 2018 Krzesimir Nowak <qdlacz@gmail.com>
# Copyright (c) 2019 Enji Cooper <yaneurabeya@gmail.com>
# Copyright (c) 2020 Jason Merrill <jason@redhat.com>
# Copyright (c) 2021 Jörn Heusipp <osmanx@problemloesungsmaschine.de>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.
dnl Test body for checking C++11 support
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_11],
_AX_CXX_COMPILE_STDCXX_testbody_new_in_11
)
dnl Test body for checking C++14 support
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_14],
_AX_CXX_COMPILE_STDCXX_testbody_new_in_11
_AX_CXX_COMPILE_STDCXX_testbody_new_in_14
)
dnl Test body for checking C++17 support
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_17],
_AX_CXX_COMPILE_STDCXX_testbody_new_in_11
_AX_CXX_COMPILE_STDCXX_testbody_new_in_14
_AX_CXX_COMPILE_STDCXX_testbody_new_in_17
)
dnl Test body for checking C++20 support
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_20],
_AX_CXX_COMPILE_STDCXX_testbody_new_in_11
_AX_CXX_COMPILE_STDCXX_testbody_new_in_14
_AX_CXX_COMPILE_STDCXX_testbody_new_in_17
_AX_CXX_COMPILE_STDCXX_testbody_new_in_20
)
dnl Tests for new features in C++11
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_11], [[
// If the compiler admits that it is not ready for C++11, why torture it?
// Hopefully, this will speed up the test.
#ifndef __cplusplus
#error "This is not a C++ compiler"
#elif __cplusplus < 201103L
#error "This is not a C++11 compiler"
#else
namespace cxx11
{
namespace test_static_assert
{
template <typename T>
struct check
{
static_assert(sizeof(int) <= sizeof(T), "not big enough");
};
}
namespace test_final_override
{
struct Base
{
virtual ~Base() {}
virtual void f() {}
};
struct Derived : public Base
{
virtual ~Derived() override {}
virtual void f() override {}
};
}
namespace test_double_right_angle_brackets
{
template < typename T >
struct check {};
typedef check<void> single_type;
typedef check<check<void>> double_type;
typedef check<check<check<void>>> triple_type;
typedef check<check<check<check<void>>>> quadruple_type;
}
namespace test_decltype
{
int
f()
{
int a = 1;
decltype(a) b = 2;
return a + b;
}
}
namespace test_type_deduction
{
template < typename T1, typename T2 >
struct is_same
{
static const bool value = false;
};
template < typename T >
struct is_same<T, T>
{
static const bool value = true;
};
template < typename T1, typename T2 >
auto
add(T1 a1, T2 a2) -> decltype(a1 + a2)
{
return a1 + a2;
}
int
test(const int c, volatile int v)
{
static_assert(is_same<int, decltype(0)>::value == true, "");
static_assert(is_same<int, decltype(c)>::value == false, "");
static_assert(is_same<int, decltype(v)>::value == false, "");
auto ac = c;
auto av = v;
auto sumi = ac + av + 'x';
auto sumf = ac + av + 1.0;
static_assert(is_same<int, decltype(ac)>::value == true, "");
static_assert(is_same<int, decltype(av)>::value == true, "");
static_assert(is_same<int, decltype(sumi)>::value == true, "");
static_assert(is_same<int, decltype(sumf)>::value == false, "");
static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
return (sumf > 0.0) ? sumi : add(c, v);
}
}
namespace test_noexcept
{
int f() { return 0; }
int g() noexcept { return 0; }
static_assert(noexcept(f()) == false, "");
static_assert(noexcept(g()) == true, "");
}
namespace test_constexpr
{
template < typename CharT >
unsigned long constexpr
strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
{
return *s ? strlen_c_r(s + 1, acc + 1) : acc;
}
template < typename CharT >
unsigned long constexpr
strlen_c(const CharT *const s) noexcept
{
return strlen_c_r(s, 0UL);
}
static_assert(strlen_c("") == 0UL, "");
static_assert(strlen_c("1") == 1UL, "");
static_assert(strlen_c("example") == 7UL, "");
static_assert(strlen_c("another\0example") == 7UL, "");
}
namespace test_rvalue_references
{
template < int N >
struct answer
{
static constexpr int value = N;
};
answer<1> f(int&) { return answer<1>(); }
answer<2> f(const int&) { return answer<2>(); }
answer<3> f(int&&) { return answer<3>(); }
void
test()
{
int i = 0;
const int c = 0;
static_assert(decltype(f(i))::value == 1, "");
static_assert(decltype(f(c))::value == 2, "");
static_assert(decltype(f(0))::value == 3, "");
}
}
namespace test_uniform_initialization
{
struct test
{
static const int zero {};
static const int one {1};
};
static_assert(test::zero == 0, "");
static_assert(test::one == 1, "");
}
namespace test_lambdas
{
void
test1()
{
auto lambda1 = [](){};
auto lambda2 = lambda1;
lambda1();
lambda2();
}
int
test2()
{
auto a = [](int i, int j){ return i + j; }(1, 2);
auto b = []() -> int { return '0'; }();
auto c = [=](){ return a + b; }();
auto d = [&](){ return c; }();
auto e = [a, &b](int x) mutable {
const auto identity = [](int y){ return y; };
for (auto i = 0; i < a; ++i)
a += b--;
return x + identity(a + b);
}(0);
return a + b + c + d + e;
}
int
test3()
{
const auto nullary = [](){ return 0; };
const auto unary = [](int x){ return x; };
using nullary_t = decltype(nullary);
using unary_t = decltype(unary);
const auto higher1st = [](nullary_t f){ return f(); };
const auto higher2nd = [unary](nullary_t f1){
return [unary, f1](unary_t f2){ return f2(unary(f1())); };
};
return higher1st(nullary) + higher2nd(nullary)(unary);
}
}
namespace test_variadic_templates
{
template <int...>
struct sum;
template <int N0, int... N1toN>
struct sum<N0, N1toN...>
{
static constexpr auto value = N0 + sum<N1toN...>::value;
};
template <>
struct sum<>
{
static constexpr auto value = 0;
};
static_assert(sum<>::value == 0, "");
static_assert(sum<1>::value == 1, "");
static_assert(sum<23>::value == 23, "");
static_assert(sum<1, 2>::value == 3, "");
static_assert(sum<5, 5, 11>::value == 21, "");
static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
}
// http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
// Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
// because of this.
namespace test_template_alias_sfinae
{
struct foo {};
template<typename T>
using member = typename T::member_type;
template<typename T>
void func(...) {}
template<typename T>
void func(member<T>*) {}
void test();
void test() { func<foo>(0); }
}
} // namespace cxx11
#endif // __cplusplus >= 201103L
]])
dnl Tests for new features in C++14
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_14], [[
// If the compiler admits that it is not ready for C++14, why torture it?
// Hopefully, this will speed up the test.
#ifndef __cplusplus
#error "This is not a C++ compiler"
#elif __cplusplus < 201402L
#error "This is not a C++14 compiler"
#else
namespace cxx14
{
namespace test_polymorphic_lambdas
{
int
test()
{
const auto lambda = [](auto&&... args){
const auto istiny = [](auto x){
return (sizeof(x) == 1UL) ? 1 : 0;
};
const int aretiny[] = { istiny(args)... };
return aretiny[0];
};
return lambda(1, 1L, 1.0f, '1');
}
}
namespace test_binary_literals
{
constexpr auto ivii = 0b0000000000101010;
static_assert(ivii == 42, "wrong value");
}
namespace test_generalized_constexpr
{
template < typename CharT >
constexpr unsigned long
strlen_c(const CharT *const s) noexcept
{
auto length = 0UL;
for (auto p = s; *p; ++p)
++length;
return length;
}
static_assert(strlen_c("") == 0UL, "");
static_assert(strlen_c("x") == 1UL, "");
static_assert(strlen_c("test") == 4UL, "");
static_assert(strlen_c("another\0test") == 7UL, "");
}
namespace test_lambda_init_capture
{
int
test()
{
auto x = 0;
const auto lambda1 = [a = x](int b){ return a + b; };
const auto lambda2 = [a = lambda1(x)](){ return a; };
return lambda2();
}
}
namespace test_digit_separators
{
constexpr auto ten_million = 100'000'000;
static_assert(ten_million == 100000000, "");
}
namespace test_return_type_deduction
{
auto f(int& x) { return x; }
decltype(auto) g(int& x) { return x; }
template < typename T1, typename T2 >
struct is_same
{
static constexpr auto value = false;
};
template < typename T >
struct is_same<T, T>
{
static constexpr auto value = true;
};
int
test()
{
auto x = 0;
static_assert(is_same<int, decltype(f(x))>::value, "");
static_assert(is_same<int&, decltype(g(x))>::value, "");
return x;
}
}
} // namespace cxx14
#endif // __cplusplus >= 201402L
]])
dnl Tests for new features in C++17
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_17], [[
// If the compiler admits that it is not ready for C++17, why torture it?
// Hopefully, this will speed up the test.
#ifndef __cplusplus
#error "This is not a C++ compiler"
#elif __cplusplus < 201703L
#error "This is not a C++17 compiler"
#else
#include <initializer_list>
#include <utility>
#include <type_traits>
namespace cxx17
{
namespace test_constexpr_lambdas
{
constexpr int foo = [](){return 42;}();
}
namespace test::nested_namespace::definitions
{
}
namespace test_fold_expression
{
template<typename... Args>
int multiply(Args... args)
{
return (args * ... * 1);
}
template<typename... Args>
bool all(Args... args)
{
return (args && ...);
}
}
namespace test_extended_static_assert
{
static_assert (true);
}
namespace test_auto_brace_init_list
{
auto foo = {5};
auto bar {5};
static_assert(std::is_same<std::initializer_list<int>, decltype(foo)>::value);
static_assert(std::is_same<int, decltype(bar)>::value);
}
namespace test_typename_in_template_template_parameter
{
template<template<typename> typename X> struct D;
}
namespace test_fallthrough_nodiscard_maybe_unused_attributes
{
int f1()
{
return 42;
}
[[nodiscard]] int f2()
{
[[maybe_unused]] auto unused = f1();
switch (f1())
{
case 17:
f1();
[[fallthrough]];
case 42:
f1();
}
return f1();
}
}
namespace test_extended_aggregate_initialization
{
struct base1
{
int b1, b2 = 42;
};
struct base2
{
base2() {
b3 = 42;
}
int b3;
};
struct derived : base1, base2
{
int d;
};
derived d1 {{1, 2}, {}, 4}; // full initialization
derived d2 {{}, {}, 4}; // value-initialized bases
}
namespace test_general_range_based_for_loop
{
struct iter
{
int i;
int& operator* ()
{
return i;
}
const int& operator* () const
{
return i;
}
iter& operator++()
{
++i;
return *this;
}
};
struct sentinel
{
int i;
};
bool operator== (const iter& i, const sentinel& s)
{
return i.i == s.i;
}
bool operator!= (const iter& i, const sentinel& s)
{
return !(i == s);
}
struct range
{
iter begin() const
{
return {0};
}
sentinel end() const
{
return {5};
}
};
void f()
{
range r {};
for (auto i : r)
{
[[maybe_unused]] auto v = i;
}
}
}
namespace test_lambda_capture_asterisk_this_by_value
{
struct t
{
int i;
int foo()
{
return [*this]()
{
return i;
}();
}
};
}
namespace test_enum_class_construction
{
enum class byte : unsigned char
{};
byte foo {42};
}
namespace test_constexpr_if
{
template <bool cond>
int f ()
{
if constexpr(cond)
{
return 13;
}
else
{
return 42;
}
}
}
namespace test_selection_statement_with_initializer
{
int f()
{
return 13;
}
int f2()
{
if (auto i = f(); i > 0)
{
return 3;
}
switch (auto i = f(); i + 4)
{
case 17:
return 2;
default:
return 1;
}
}
}
namespace test_template_argument_deduction_for_class_templates
{
template <typename T1, typename T2>
struct pair
{
pair (T1 p1, T2 p2)
: m1 {p1},
m2 {p2}
{}
T1 m1;
T2 m2;
};
void f()
{
[[maybe_unused]] auto p = pair{13, 42u};
}
}
namespace test_non_type_auto_template_parameters
{
template <auto n>
struct B
{};
B<5> b1;
B<'a'> b2;
}
namespace test_structured_bindings
{
int arr[2] = { 1, 2 };
std::pair<int, int> pr = { 1, 2 };
auto f1() -> int(&)[2]
{
return arr;
}
auto f2() -> std::pair<int, int>&
{
return pr;
}
struct S
{
int x1 : 2;
volatile double y1;
};
S f3()
{
return {};
}
auto [ x1, y1 ] = f1();
auto& [ xr1, yr1 ] = f1();
auto [ x2, y2 ] = f2();
auto& [ xr2, yr2 ] = f2();
const auto [ x3, y3 ] = f3();
}
namespace test_exception_spec_type_system
{
struct Good {};
struct Bad {};
void g1() noexcept;
void g2();
template<typename T>
Bad
f(T*, T*);
template<typename T1, typename T2>
Good
f(T1*, T2*);
static_assert (std::is_same_v<Good, decltype(f(g1, g2))>);
}
namespace test_inline_variables
{
template<class T> void f(T)
{}
template<class T> inline T g(T)
{
return T{};
}
template<> inline void f<>(int)
{}
template<> int g<>(int)
{
return 5;
}
}
} // namespace cxx17
#endif // __cplusplus < 201703L
]])
dnl Tests for new features in C++20
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_20], [[
#ifndef __cplusplus
#error "This is not a C++ compiler"
#elif __cplusplus < 202002L
#error "This is not a C++20 compiler"
#else
#include <version>
namespace cxx20
{
// As C++20 supports feature test macros in the standard, there is no
// immediate need to actually test for feature availability on the
// Autoconf side.
} // namespace cxx20
#endif // __cplusplus < 202002L
]])

275
contrib/php/build/pkg.m4 Normal file
View File

@@ -0,0 +1,275 @@
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
# serial 12 (pkg-config-0.29.2)
dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
dnl
dnl This program is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
dnl the Free Software Foundation; either version 2 of the License, or
dnl (at your option) any later version.
dnl
dnl This program is distributed in the hope that it will be useful, but
dnl WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
dnl General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public License
dnl along with this program; if not, write to the Free Software
dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
dnl 02110-1301, USA.
dnl
dnl As a special exception to the GNU General Public License, if you
dnl distribute this file as part of a program that contains a
dnl configuration script generated by Autoconf, you may include it under
dnl the same distribution terms that you use for the rest of that
dnl program.
dnl PKG_PREREQ(MIN-VERSION)
dnl -----------------------
dnl Since: 0.29
dnl
dnl Verify that the version of the pkg-config macros are at least
dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
dnl installed version of pkg-config, this checks the developer's version
dnl of pkg.m4 when generating configure.
dnl
dnl To ensure that this macro is defined, also add:
dnl m4_ifndef([PKG_PREREQ],
dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
dnl
dnl See the "Since" comment for each macro you use to see what version
dnl of the macros you require.
m4_defun([PKG_PREREQ],
[m4_define([PKG_MACROS_VERSION], [0.29.2])
m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
[m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
])dnl PKG_PREREQ
dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
dnl ----------------------------------
dnl Since: 0.16
dnl
dnl Search for the pkg-config tool and set the PKG_CONFIG variable to
dnl first found in the path. Checks that the version of pkg-config found
dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
dnl used since that's the first version where most current features of
dnl pkg-config existed.
AC_DEFUN([PKG_PROG_PKG_CONFIG],
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
fi
if test -n "$PKG_CONFIG"; then
_pkg_min_version=m4_default([$1], [0.9.0])
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
PKG_CONFIG=""
fi
fi[]dnl
])dnl PKG_PROG_PKG_CONFIG
dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
dnl -------------------------------------------------------------------
dnl Since: 0.18
dnl
dnl Check to see whether a particular set of modules exists. Similar to
dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
dnl
dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
dnl only at the first occurrence in configure.ac, so if the first place
dnl it's called might be skipped (such as if it is within an "if", you
dnl have to call PKG_CHECK_EXISTS manually
AC_DEFUN([PKG_CHECK_EXISTS],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
if test -n "$PKG_CONFIG" && \
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
m4_default([$2], [:])
m4_ifvaln([$3], [else
$3])dnl
fi])
dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
dnl ---------------------------------------------
dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
dnl pkg_failed based on the result.
m4_define([_PKG_CONFIG],
[if test -n "$$1"; then
pkg_cv_[]$1="$$1"
elif test -n "$PKG_CONFIG"; then
PKG_CHECK_EXISTS([$3],
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes ],
[pkg_failed=yes])
else
pkg_failed=untried
fi[]dnl
])dnl _PKG_CONFIG
dnl _PKG_SHORT_ERRORS_SUPPORTED
dnl ---------------------------
dnl Internal check to see if pkg-config supports short errors.
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
_pkg_short_errors_supported=yes
else
_pkg_short_errors_supported=no
fi[]dnl
])dnl _PKG_SHORT_ERRORS_SUPPORTED
dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
dnl [ACTION-IF-NOT-FOUND])
dnl --------------------------------------------------------------
dnl Since: 0.4.0
dnl
dnl Note that if there is a possibility the first call to
dnl PKG_CHECK_MODULES might not happen, you should be sure to include an
dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
AC_DEFUN([PKG_CHECK_MODULES],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
pkg_failed=no
AC_MSG_CHECKING([for $2])
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
and $1[]_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.])
if test $pkg_failed = yes; then
AC_MSG_RESULT([no])
_PKG_SHORT_ERRORS_SUPPORTED
if test $_pkg_short_errors_supported = yes; then
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
else
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
m4_default([$4], [AC_MSG_ERROR(
[Package requirements ($2) were not met:
$$1_PKG_ERRORS
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
_PKG_TEXT])[]dnl
])
elif test $pkg_failed = untried; then
AC_MSG_RESULT([no])
m4_default([$4], [AC_MSG_FAILURE(
[The pkg-config script could not be found or is too old. Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.
_PKG_TEXT
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
])
else
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
AC_MSG_RESULT([yes])
$3
fi[]dnl
])dnl PKG_CHECK_MODULES
dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
dnl [ACTION-IF-NOT-FOUND])
dnl ---------------------------------------------------------------------
dnl Since: 0.29
dnl
dnl Checks for existence of MODULES and gathers its build flags with
dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
dnl and VARIABLE-PREFIX_LIBS from --libs.
dnl
dnl Note that if there is a possibility the first call to
dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to
dnl include an explicit call to PKG_PROG_PKG_CONFIG in your
dnl configure.ac.
AC_DEFUN([PKG_CHECK_MODULES_STATIC],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
_save_PKG_CONFIG=$PKG_CONFIG
PKG_CONFIG="$PKG_CONFIG --static"
PKG_CHECK_MODULES($@)
PKG_CONFIG=$_save_PKG_CONFIG[]dnl
])dnl PKG_CHECK_MODULES_STATIC
dnl PKG_INSTALLDIR([DIRECTORY])
dnl -------------------------
dnl Since: 0.27
dnl
dnl Substitutes the variable pkgconfigdir as the location where a module
dnl should install pkg-config .pc files. By default the directory is
dnl $libdir/pkgconfig, but the default can be changed by passing
dnl DIRECTORY. The user can override through the --with-pkgconfigdir
dnl parameter.
AC_DEFUN([PKG_INSTALLDIR],
[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
m4_pushdef([pkg_description],
[pkg-config installation directory @<:@]pkg_default[@:>@])
AC_ARG_WITH([pkgconfigdir],
[AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
[with_pkgconfigdir=]pkg_default)
AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
m4_popdef([pkg_default])
m4_popdef([pkg_description])
])dnl PKG_INSTALLDIR
dnl PKG_NOARCH_INSTALLDIR([DIRECTORY])
dnl --------------------------------
dnl Since: 0.27
dnl
dnl Substitutes the variable noarch_pkgconfigdir as the location where a
dnl module should install arch-independent pkg-config .pc files. By
dnl default the directory is $datadir/pkgconfig, but the default can be
dnl changed by passing DIRECTORY. The user can override through the
dnl --with-noarch-pkgconfigdir parameter.
AC_DEFUN([PKG_NOARCH_INSTALLDIR],
[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
m4_pushdef([pkg_description],
[pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
AC_ARG_WITH([noarch-pkgconfigdir],
[AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
[with_noarch_pkgconfigdir=]pkg_default)
AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
m4_popdef([pkg_default])
m4_popdef([pkg_description])
])dnl PKG_NOARCH_INSTALLDIR
dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
dnl -------------------------------------------
dnl Since: 0.28
dnl
dnl Retrieves the value of the pkg-config variable for the given module.
AC_DEFUN([PKG_CHECK_VAR],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
_PKG_CONFIG([$1], [variable="][$3]["], [$2])
AS_VAR_COPY([$1], [pkg_cv_][$1])
AS_VAR_IF([$1], [""], [$5], [$4])dnl
])dnl PKG_CHECK_VAR

View File

@@ -1,23 +0,0 @@
# +----------------------------------------------------------------------+
# | PHP Version 4 |
# +----------------------------------------------------------------------+
# | Copyright (c) 1997-2002 The PHP Group |
# +----------------------------------------------------------------------+
# | This source file is subject to version 2.02 of the PHP license, |
# | that is bundled with this package in the file LICENSE, and is |
# | available at through the world-wide-web at |
# | http://www.php.net/license/2_02.txt. |
# | If you did not receive a copy of the PHP license and are unable to |
# | obtain it through the world-wide-web, please send a note to |
# | license@php.net so we can mail you a copy immediately. |
# +----------------------------------------------------------------------+
# | Author: Sascha Schumann <sascha@schumann.cx> |
# +----------------------------------------------------------------------+
#
# $Id: program.mk,v 1.6 2002/02/28 08:25:35 sebastian Exp $
#
PROGRAM_OBJECTS = $(PROGRAM_SOURCES:.c=.lo)
$(PROGRAM_NAME): $(PROGRAM_DEPENDENCIES) $(PROGRAM_OBJECTS)
$(LINK_CLEAN) $(PROGRAM_LDFLAGS) $(PROGRAM_OBJECTS) $(PROGRAM_LDADD)

View File

@@ -1,76 +0,0 @@
# +----------------------------------------------------------------------+
# | PHP Version 4 |
# +----------------------------------------------------------------------+
# | Copyright (c) 1997-2002 The PHP Group |
# +----------------------------------------------------------------------+
# | This source file is subject to version 2.02 of the PHP license, |
# | that is bundled with this package in the file LICENSE, and is |
# | available at through the world-wide-web at |
# | http://www.php.net/license/2_02.txt. |
# | If you did not receive a copy of the PHP license and are unable to |
# | obtain it through the world-wide-web, please send a note to |
# | license@php.net so we can mail you a copy immediately. |
# +----------------------------------------------------------------------+
# | Author: Sascha Schumann <sascha@schumann.cx> |
# +----------------------------------------------------------------------+
#
# $Id: rules_pear.mk,v 1.16 2002/02/28 08:25:37 sebastian Exp $
#
include $(top_srcdir)/build/rules_common.mk
install_targets = install-modules
all: all-recursive
install: install-recursive
distclean-recursive depend-recursive clean-recursive all-recursive install-recursive:
@otarget=`echo $@|sed s/-recursive//`; \
list='$(SUBDIRS)'; for i in $$list; do \
target="$$otarget"; \
echo "Making $$target in $$i"; \
if test "$$i" = "."; then \
ok=yes; \
target="$$target-p"; \
fi; \
(cd $$i && $(MAKE) $$target) || exit 1; \
done; \
if test "$$otarget" = "all" && test -z '$(targets)'; then ok=yes; fi; \
if test "$$ok" != "yes"; then $(MAKE) "$$otarget-p" || exit 1; fi
all-p: $(targets)
install-p: $(targets) $(install_targets)
distclean-p depend-p clean-p:
depend: depend-recursive
@echo $(top_srcdir) $(top_builddir) $(srcdir) $(CPP) $(INCLUDES) $(EXTRA_INCLUDES) $(DEFS) $(CPPFLAGS) $(srcdir)/*.c *.c | $(AWK) -f $(top_srcdir)/build/mkdep.awk > $(builddir)/.deps || true
clean: clean-recursive clean-x
clean-x:
rm -f $(targets) *.lo *.slo *.la *.o $(CLEANFILES)
rm -rf .libs
distclean: distclean-recursive clean-x
rm -f config.cache config.log config.status config_vars.mk libtool \
config.h stamp-h Makefile build-defs.h php4.spec libphp4.module
cvsclean:
@for i in `find . -name .cvsignore`; do \
(cd `dirname $$i` 2>/dev/null && rm -rf `cat .cvsignore` *.o *.a || true); \
done
@rm -f $(SUBDIRS) 2>/dev/null || true
install-modules:
@test -d modules && \
$(mkinstalldirs) $(moduledir) && \
echo "installing shared modules into $(moduledir)" && \
rm -f modules/*.la && \
cp modules/* $(moduledir) || true
include $(builddir)/.deps
.PHONY: all-recursive clean-recursive install-recursive \
$(install_targets) install all clean depend depend-recursive shared \
distclean-recursive distclean clean-x all-p install-p distclean-p \
depend-p clean-p

View File

@@ -1,77 +0,0 @@
# +----------------------------------------------------------------------+
# | PHP Version 4 |
# +----------------------------------------------------------------------+
# | Copyright (c) 1997-2002 The PHP Group |
# +----------------------------------------------------------------------+
# | This source file is subject to version 2.02 of the PHP license, |
# | that is bundled with this package in the file LICENSE, and is |
# | available at through the world-wide-web at |
# | http://www.php.net/license/2_02.txt. |
# | If you did not receive a copy of the PHP license and are unable to |
# | obtain it through the world-wide-web, please send a note to |
# | license@php.net so we can mail you a copy immediately. |
# +----------------------------------------------------------------------+
# | Author: Sascha Schumann <sascha@schumann.cx> |
# +----------------------------------------------------------------------+
#
# $Id: rules_common.mk,v 1.11 2002/02/28 08:25:36 sebastian Exp $
#
include $(top_builddir)/config_vars.mk
COMMON_FLAGS = $(DEFS) $(INCLUDES) $(EXTRA_INCLUDES) $(CPPFLAGS)
COMPILE = $(CC) $(COMMON_FLAGS) $(CFLAGS) $(EXTRA_CFLAGS)
CXX_COMPILE = $(CXX) $(COMMON_FLAGS) $(CXXFLAGS) $(EXTRA_CXXFLAGS)
SHARED_COMPILE = $(SHARED_LIBTOOL) --mode=compile $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) -prefer-pic $(EXTRA_CFLAGS) -c $< && touch $@
CXX_SHARED_COMPILE = $(SHARED_LIBTOOL) --mode=compile $(CXX) $(COMMON_FLAGS) $(CXXFLAGS_CLEAN) -prefer-pic $(EXTRA_CXXFLAGS) -c $< && touch $@
LINK = $(LIBTOOL) --mode=link $(COMPILE) $(LDFLAGS) -o $@
LINK_CLEAN = $(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@
mkinstalldirs = $(top_srcdir)/build/shtool mkdir -p
INSTALL = $(top_srcdir)/build/shtool install -c
INSTALL_DATA = $(INSTALL) -m 644
DEFS = -I. -I$(srcdir) -I$(top_builddir)/main -I$(top_srcdir)
moduledir = $(EXTENSION_DIR)
CXX_SUFFIX = .cpp
.SUFFIXES:
.SUFFIXES: .slo .c $(CXX_SUFFIX) .lo .o .s .y .l
.c.o:
$(COMPILE) -c $<
$(CXX_SUFFIX).o:
$(CXX_COMPILE) -c $<
.s.o:
$(COMPILE) -c $<
.c.lo:
$(PHP_COMPILE)
$(CXX_SUFFIX).lo:
$(CXX_PHP_COMPILE)
.s.lo:
$(PHP_COMPILE)
.c.slo:
$(SHARED_COMPILE)
$(CXX_SUFFIX).slo:
$(CXX_SHARED_COMPILE)
.y.c:
$(YACC) $(YFLAGS) $< && mv y.tab.c $*.c
if test -f y.tab.h; then \
if cmp -s y.tab.h $*.h; then rm -f y.tab.h; else mv y.tab.h $*.h; fi; \
else :; fi
.l.c:
$(LEX) $(LFLAGS) $< && mv $(LEX_OUTPUT_ROOT).c $@

File diff suppressed because it is too large Load Diff

1415
contrib/php/config.guess vendored

File diff suppressed because it is too large Load Diff

View File

@@ -1,89 +1,57 @@
/* config.h.in. Generated from configure.in by autoheader. */
/* config.h.in. Generated from configure.ac by autoheader. */
/*
Whether to build auth-nds as dynamic module */
/* Whether to build auth_nds as dynamic module */
#undef COMPILE_DL_AUTH_NDS
/*
Define to 1 if you have the <dlfcn.h>
header file. */
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
/*
Define to 1 if you have the <inttypes.h>
header file. */
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/*
Define to 1 if you have the <memory.h>
header file. */
#undef HAVE_MEMORY_H
/*
Define to 1 if you have the <stdint.h>
header file. */
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/*
Define to 1 if you have the <stdlib.h>
header file. */
/* Define to 1 if you have the <stdio.h> header file. */
#undef HAVE_STDIO_H
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/*
Define to 1 if you have the <strings.h>
header file. */
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/*
Define to 1 if you have the <string.h>
header file. */
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/*
Define to 1 if you have the <sys/stat.h>
header file. */
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/*
Define to 1 if you have the <sys/types.h>
header file. */
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/*
Define to 1 if you have the <unistd.h>
header file. */
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/*
Define to 1 if your C compiler doesn't
accept -c and -o together. */
#undef NO_MINUS_C_MINUS_O
/* Define to the address where bug reports for this package should be sent. */
/* #undef PACKAGE_BUGREPORT */
/*
Define to the address where bug reports for
this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
/* #undef PACKAGE_NAME */
/*
Define to the full name of this package.
*/
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
/* #undef PACKAGE_STRING */
/*
Define to the full name and version of
this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
/* #undef PACKAGE_TARNAME */
/*
Define to the one symbol short name of
this package. */
#undef PACKAGE_TARNAME
/* Define to the home page for this package. */
/* #undef PACKAGE_URL */
/*
Define to the version of this package. */
#undef PACKAGE_VERSION
/* Define to the version of this package. */
/* #undef PACKAGE_VERSION */
/*
Define to 1 if you have the ANSI
C header files. */
/* Define to 1 if all of the C89 standard headers exist (not just the ones
required in a freestanding environment). This macro is provided for
backward compatibility; new code need not use it. */
#undef STDC_HEADERS

View File

@@ -1,6 +1,10 @@
PHP_ARG_ENABLE(auth-nds,whether to enable NDS authentication,
PHP_ARG_ENABLE(auth_nds, whether to enable NDS authentication,
[ --enable-auth-nds enable NDS authentication])
if test "$PHP_AUTH_NDS" != "no"; then
PHP_EXTENSION(auth-nds, $ext_shared)
PHP_NEW_EXTENSION(auth_nds, php_auth_nds.c, $ext_shared)
PHP_ADD_INCLUDE(../../include)
PHP_ADD_INCLUDE(../..)
PHP_ADD_LIBRARY_WITH_PATH(ncp, ../../lib, AUTH_NDS_SHARED_LIBADD)
PHP_SUBST(AUTH_NDS_SHARED_LIBADD)
fi

1510
contrib/php/config.sub vendored

File diff suppressed because it is too large Load Diff

20193
contrib/php/configure vendored

File diff suppressed because it is too large Load Diff

221
contrib/php/configure.ac Normal file
View File

@@ -0,0 +1,221 @@
dnl This file becomes configure.ac for self-contained extensions.
dnl Include external macro definitions before the AC_INIT to also remove
dnl comments starting with # and empty newlines from the included files.
m4_include([build/ax_check_compile_flag.m4])
m4_include([build/ax_gcc_func_attribute.m4])
m4_include([build/libtool.m4])
m4_include([build/php_cxx_compile_stdcxx.m4])
m4_include([build/php.m4])
m4_include([build/pkg.m4])
AC_PREREQ([2.68])
AC_INIT
AC_CONFIG_SRCDIR([config.m4])
AC_CONFIG_AUX_DIR([build])
AC_PRESERVE_HELP_ORDER
PHP_CONFIG_NICE(config.nice)
AC_DEFUN([PHP_EXT_BUILDDIR],[.])dnl
AC_DEFUN([PHP_EXT_DIR],[""])dnl
AC_DEFUN([PHP_EXT_SRCDIR],[$abs_srcdir])dnl
AC_DEFUN([PHP_ALWAYS_SHARED],[
ext_output="yes, shared"
ext_shared=yes
test "[$]$1" = "no" && $1=yes
])dnl
test -z "$CFLAGS" && auto_cflags=1
abs_srcdir=`(cd $srcdir && pwd)`
abs_builddir=`pwd`
PKG_PROG_PKG_CONFIG
AC_PROG_CC([cc gcc])
PHP_DETECT_ICC
PHP_DETECT_SUNCC
dnl Support systems with system libraries in e.g. /usr/lib64.
PHP_ARG_WITH([libdir],
[for system library directory],
[AS_HELP_STRING([--with-libdir=NAME],
[Look for libraries in .../NAME rather than .../lib])],
[lib],
[no])
PHP_RUNPATH_SWITCH
PHP_SHLIB_SUFFIX_NAMES
dnl Find php-config script.
PHP_ARG_WITH([php-config],,
[AS_HELP_STRING([--with-php-config=PATH],
[Path to php-config [php-config]])],
[php-config],
[no])
dnl For BC.
PHP_CONFIG=$PHP_PHP_CONFIG
prefix=`$PHP_CONFIG --prefix 2>/dev/null`
phpincludedir=`$PHP_CONFIG --include-dir 2>/dev/null`
INCLUDES=`$PHP_CONFIG --includes 2>/dev/null`
EXTENSION_DIR=`$PHP_CONFIG --extension-dir 2>/dev/null`
PHP_EXECUTABLE=`$PHP_CONFIG --php-binary 2>/dev/null`
if test -z "$prefix"; then
AC_MSG_ERROR([Cannot find php-config. Please use --with-php-config=PATH])
fi
php_shtool=$srcdir/build/shtool
PHP_INIT_BUILD_SYSTEM
AC_MSG_CHECKING([for PHP prefix])
AC_MSG_RESULT([$prefix])
AC_MSG_CHECKING([for PHP includes])
AC_MSG_RESULT([$INCLUDES])
AC_MSG_CHECKING([for PHP extension directory])
AC_MSG_RESULT([$EXTENSION_DIR])
AC_MSG_CHECKING([for PHP installed headers prefix])
AC_MSG_RESULT([$phpincludedir])
dnl Checks for PHP_DEBUG / ZEND_DEBUG / ZTS.
AC_MSG_CHECKING([if debug is enabled])
old_CPPFLAGS=$CPPFLAGS
CPPFLAGS="-I$phpincludedir"
AC_EGREP_CPP(php_debug_is_enabled,[
#include <main/php_config.h>
#if ZEND_DEBUG
php_debug_is_enabled
#endif
],[
PHP_DEBUG=yes
],[
PHP_DEBUG=no
])
CPPFLAGS=$old_CPPFLAGS
AC_MSG_RESULT([$PHP_DEBUG])
AC_MSG_CHECKING([if zts is enabled])
old_CPPFLAGS=$CPPFLAGS
CPPFLAGS="-I$phpincludedir"
AC_EGREP_CPP(php_zts_is_enabled,[
#include <main/php_config.h>
#if ZTS
php_zts_is_enabled
#endif
],[
PHP_THREAD_SAFETY=yes
],[
PHP_THREAD_SAFETY=no
])
CPPFLAGS=$old_CPPFLAGS
AC_MSG_RESULT([$PHP_THREAD_SAFETY])
dnl Discard optimization flags when debugging is enabled.
if test "$PHP_DEBUG" = "yes"; then
PHP_DEBUG=1
ZEND_DEBUG=yes
PHP_REMOVE_OPTIMIZATION_FLAGS
dnl Add -O0 only if GCC or ICC is used.
if test "$GCC" = "yes" || test "$ICC" = "yes"; then
CFLAGS="$CFLAGS -O0"
CXXFLAGS="$CXXFLAGS -g -O0"
fi
if test "$SUNCC" = "yes"; then
if test -n "$auto_cflags"; then
CFLAGS="-g"
CXXFLAGS="-g"
else
CFLAGS="$CFLAGS -g"
CXXFLAGS="$CFLAGS -g"
fi
fi
else
PHP_DEBUG=0
ZEND_DEBUG=no
fi
dnl Always shared.
PHP_BUILD_SHARED
dnl Required programs.
PHP_PROG_AWK
sinclude(config.m4)
enable_static=no
enable_shared=yes
dnl Only allow AC_PROG_CXX and AC_PROG_CXXCPP if they are explicitly called (by
dnl PHP_REQUIRE_CXX). Otherwise AC_PROG_LIBTOOL fails if there is no working C++
dnl compiler.
AC_PROVIDE_IFELSE([PHP_REQUIRE_CXX], [], [
undefine([AC_PROG_CXX])
AC_DEFUN([AC_PROG_CXX], [])
undefine([AC_PROG_CXXCPP])
AC_DEFUN([AC_PROG_CXXCPP], [php_prog_cxxcpp=disabled])
])
AC_PROG_LIBTOOL
all_targets='$(PHP_MODULES) $(PHP_ZEND_EX)'
install_targets="install-modules install-headers"
phplibdir="`pwd`/modules"
CPPFLAGS="$CPPFLAGS -DHAVE_CONFIG_H"
CFLAGS_CLEAN='$(CFLAGS) -D_GNU_SOURCE'
CXXFLAGS_CLEAN='$(CXXFLAGS)'
test "$prefix" = "NONE" && prefix="/usr/local"
test "$exec_prefix" = "NONE" && exec_prefix='$(prefix)'
if test "$cross_compiling" = yes ; then
AC_MSG_CHECKING(for native build C compiler)
AC_CHECK_PROGS(BUILD_CC, [gcc clang c99 c89 cc cl],none)
AC_MSG_RESULT($BUILD_CC)
else
BUILD_CC=$CC
fi
PHP_SUBST(PHP_MODULES)
PHP_SUBST(PHP_ZEND_EX)
PHP_SUBST(all_targets)
PHP_SUBST(install_targets)
PHP_SUBST(prefix)
PHP_SUBST(exec_prefix)
PHP_SUBST(libdir)
PHP_SUBST(prefix)
PHP_SUBST(phplibdir)
PHP_SUBST(phpincludedir)
PHP_SUBST(CC)
PHP_SUBST(CFLAGS)
PHP_SUBST(CFLAGS_CLEAN)
PHP_SUBST(CPP)
PHP_SUBST(CPPFLAGS)
PHP_SUBST(CXX)
PHP_SUBST(CXXFLAGS)
PHP_SUBST(CXXFLAGS_CLEAN)
PHP_SUBST(EXTENSION_DIR)
PHP_SUBST(PHP_EXECUTABLE)
PHP_SUBST(EXTRA_LDFLAGS)
PHP_SUBST(EXTRA_LIBS)
PHP_SUBST(INCLUDES)
PHP_SUBST(LFLAGS)
PHP_SUBST(LDFLAGS)
PHP_SUBST(SHARED_LIBTOOL)
PHP_SUBST(LIBTOOL)
PHP_SUBST(SHELL)
PHP_SUBST(INSTALL_HEADERS)
PHP_SUBST(BUILD_CC)
PHP_GEN_BUILD_DIRS
PHP_GEN_GLOBAL_MAKEFILE
test -d modules || $php_shtool mkdir modules
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_COMMANDS_PRE([PHP_PATCH_CONFIG_HEADERS([config.h.in])])
AC_OUTPUT

View File

@@ -1,90 +0,0 @@
AC_INIT(Makefile.in)
AC_DEFUN(PHP_WITH_PHP_CONFIG,[
AC_ARG_WITH(php-config,
[ --with-php-config=PATH],[
PHP_CONFIG=$withval
],[
PHP_CONFIG=php-config
])
prefix=`$PHP_CONFIG --prefix 2>/dev/null`
INCLUDES=`$PHP_CONFIG --includes 2>/dev/null`
EXTENSION_DIR=`$PHP_CONFIG --extension-dir`
if test -z "$prefix"; then
AC_MSG_ERROR(Cannot find php-config. Please use --with-php-config=PATH)
fi
AC_MSG_CHECKING(for PHP prefix)
AC_MSG_RESULT($prefix)
AC_MSG_CHECKING(for PHP includes)
AC_MSG_RESULT($INCLUDES)
AC_MSG_CHECKING(for PHP extension directory)
AC_MSG_RESULT($EXTENSION_DIR)
])
abs_srcdir=`(cd $srcdir && pwd)`
php_always_shared=yes
PHP_CONFIG_NICE(config.nice)
AC_PROG_CC
AC_PROG_CC_C_O
PHP_SHLIB_SUFFIX_NAME
PHP_WITH_PHP_CONFIG
AC_PREFIX_DEFAULT()
sinclude(config.m4)
enable_static=no
enable_shared=yes
AC_PROG_LIBTOOL
SHARED_LIBTOOL='$(LIBTOOL)'
PHP_COMPILE='$(LIBTOOL) --mode=compile $(COMPILE) -c $<'
phplibdir="`pwd`/modules"
CPPFLAGS="$CPPFLAGS -DHAVE_CONFIG_H"
test "$prefix" = "NONE" && prefix="/usr/local"
test "$exec_prefix" = "NONE" && exec_prefix='$(prefix)'
PHP_SUBST(prefix)
PHP_SUBST(exec_prefix)
PHP_SUBST(libdir)
PHP_SUBST(prefix)
PHP_SUBST(phplibdir)
PHP_SUBST(PHP_COMPILE)
PHP_SUBST(CC)
PHP_SUBST(CFLAGS)
PHP_SUBST(CPP)
PHP_SUBST(CPPFLAGS)
PHP_SUBST(CXX)
PHP_SUBST(DEFS)
PHP_SUBST(EXTENSION_DIR)
PHP_SUBST(EXTRA_LDFLAGS)
PHP_SUBST(EXTRA_LIBS)
PHP_SUBST(INCLUDES)
PHP_SUBST(LEX)
PHP_SUBST(LEX_OUTPUT_ROOT)
PHP_SUBST(LFLAGS)
PHP_SUBST(SHARED_LIBTOOL)
PHP_SUBST(LIBTOOL)
PHP_SUBST(SHELL)
PHP_FAST_OUTPUT(Makefile)
PHP_GEN_CONFIG_VARS
PHP_GEN_MAKEFILES($PHP_FAST_OUTPUT_FILES)
test -d modules || mkdir modules
touch .deps
AC_CONFIG_HEADER(config.h)
AC_OUTPUT()

View File

@@ -1,88 +0,0 @@
# +----------------------------------------------------------------------+
# | PHP Version 4 |
# +----------------------------------------------------------------------+
# | Copyright (c) 1997-2002 The PHP Group |
# +----------------------------------------------------------------------+
# | This source file is subject to version 2.02 of the PHP license, |
# | that is bundled with this package in the file LICENSE, and is |
# | available at through the world-wide-web at |
# | http://www.php.net/license/2_02.txt. |
# | If you did not receive a copy of the PHP license and are unable to |
# | obtain it through the world-wide-web, please send a note to |
# | license@php.net so we can mail you a copy immediately. |
# +----------------------------------------------------------------------+
# | Author: Sascha Schumann <sascha@schumann.cx> |
# +----------------------------------------------------------------------+
#
# $Id: dynlib.m4,v 1.9 2002/02/28 08:25:27 sebastian Exp $
#
AC_DEFUN(LIB_SHARED_CONVENIENCE,[
lib_target="\$(LTLIBRARY_NAME)"
cat >>$1<<EOF
\$(LTLIBRARY_NAME): \$(LTLIBRARY_SHARED_OBJECTS) \$(LTLIBRARY_DEPENDENCIES)
\$(SHARED_LIBTOOL) --mode=link \$(COMPILE) \$(LDFLAGS) -o \[$]@ \$(LTLIBRARY_LDFLAGS) \$(LTLIBRARY_OBJECTS) \$(LTLIBRARY_SHARED_LIBADD)
EOF
])
AC_DEFUN(LIB_SHARED_MODULE,[
lib_target="\$(LTLIBRARY_SHARED_NAME)"
cat >>$1<<EOF
\$(LTLIBRARY_SHARED_NAME): \$(LTLIBRARY_SHARED_OBJECTS) \$(LTLIBRARY_DEPENDENCIES)
\$(SHARED_LIBTOOL) --mode=link \$(CC) \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) -o \[$]@ -avoid-version -module -rpath \$(phplibdir) \$(LTLIBRARY_LDFLAGS) \$(LTLIBRARY_OBJECTS) \$(LTLIBRARY_SHARED_LIBADD)
\$(SHARED_LIBTOOL) --mode=install cp \[$]@ \$(phplibdir)
EOF
])
AC_DEFUN(LIB_STATIC_CONVENIENCE,[
lib_target="\$(LTLIBRARY_NAME)"
cat >>$1<<EOF
\$(LTLIBRARY_NAME): \$(LTLIBRARY_OBJECTS) \$(LTLIBRARY_DEPENDENCIES)
\$(LINK) \$(LTLIBRARY_LDFLAGS) \$(LTLIBRARY_OBJECTS) \$(LTLIBRARY_LIBADD)
EOF
])
dnl LIB_BUILD(path, shared, convenience)
dnl sets up path to build a shared/static convenience/module
AC_DEFUN(LIB_BUILD,[
lib_makefile="$1/libs.mk"
lib_target=""
$php_shtool mkdir -p $1
if test "$BSD_MAKEFILE" = "yes"; then
lib_include_conf=".include \"\$(top_builddir)/config_vars.mk\""
else
lib_include_conf="include \$(top_builddir)/config_vars.mk"
fi
cat >$lib_makefile<<EOF
$lib_include_conf
LTLIBRARY_OBJECTS = \$(LTLIBRARY_SOURCES:.c=.lo) \$(LTLIBRARY_OBJECTS_X)
LTLIBRARY_SHARED_OBJECTS = \$(LTLIBRARY_OBJECTS:.lo=.slo)
EOF
if test "$2" = "shared" || test "$2" = "yes"; then
lib_build_shared=yes
if test -n "$3"; then
dnl ---------------------------------------- Shared Convenience
LIB_SHARED_CONVENIENCE($lib_makefile)
else
dnl ---------------------------------------- Shared Module
LIB_SHARED_MODULE($lib_makefile)
fi
else
dnl ---------------------------------------- Static Convenience = Static Module
LIB_STATIC_CONVENIENCE($lib_makefile)
fi
dnl ---------------------------------------- Generate build targets
if test -n "$lib_target"; then
cat >>$lib_makefile<<EOF
targets = $lib_target
EOF
fi
])

View File

File diff suppressed because it is too large Load Diff

View File

Some files were not shown because too many files have changed in this diff Show More