mirror of https://github.com/nginx/nginx
Compare commits
No commits in common. "master" and "release-0.1.3" have entirely different histories.
master
...
release-0.
|
|
@ -1,15 +0,0 @@
|
|||
---
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
For NGINX troubleshooting/technical help, please visit our community forum instead of asking your questions here. We will politely redirect these types of questions to the forum.
|
||||
- type: textarea
|
||||
id: general
|
||||
attributes:
|
||||
label: What would you like to discuss?
|
||||
description: Please provide as much context as possible. Remember that only general discussions related to the NGINX codebase will be addressed on GitHub. For anything else, please visit our [community forum](https://community.nginx.org/).
|
||||
value: |
|
||||
I would like to discuss...
|
||||
validations:
|
||||
required: true
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
---
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
For NGINX troubleshooting/technical help, please visit our community forum instead of asking your questions here. We will politely redirect these types of questions to the forum.
|
||||
- type: textarea
|
||||
id: ideas
|
||||
attributes:
|
||||
label: What idea would you like to discuss?
|
||||
description: Please provide as much context as possible. Remember that only ideas related to the NGINX codebase will be addressed on GitHub. For anything else, please visit our [community forum](https://community.nginx.org/).
|
||||
value: |
|
||||
I have an idea for...
|
||||
validations:
|
||||
required: true
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
---
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
For NGINX troubleshooting/technical help, please visit our community forum instead of asking your questions here. We will politely redirect these types of questions to the forum.
|
||||
- type: textarea
|
||||
id: q-a
|
||||
attributes:
|
||||
label: What question do you have?
|
||||
description: Please provide as much context as possible. Remember that only questions related to the NGINX codebase will be addressed on GitHub. For anything else, please visit our [community forum](https://community.nginx.org/).
|
||||
value: |
|
||||
I would like to know...
|
||||
validations:
|
||||
required: true
|
||||
|
|
@ -1,106 +0,0 @@
|
|||
---
|
||||
name: 🐛 Bug report
|
||||
description: Create a report to help us improve
|
||||
labels: bug
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thanks for taking the time to fill out this bug report!
|
||||
|
||||
Before you continue filling out this report, please take a moment to check that your bug has not been [already reported on GitHub][issue search], is reproducible with the latest version of nginx, and does not involve any third-party modules 🙌
|
||||
|
||||
Remember to redact any sensitive information such as authentication credentials and/or license keys!
|
||||
|
||||
**Note:** If you are seeking community support, please start a new topic in the [NGINX Community forum][forum]. If you wish to discuss the codebase, please start a new thread via [GitHub discussions][discussions].
|
||||
|
||||
[issue search]: https://github.com/nginx/nginx/search?q=is%3Aissue&type=issues
|
||||
[discussions]: https://github.com/nginx/nginx/discussions
|
||||
[forum]: https://community.nginx.org
|
||||
|
||||
- type: textarea
|
||||
id: overview
|
||||
attributes:
|
||||
label: Bug Overview
|
||||
description: A clear and concise overview of the bug.
|
||||
placeholder: When I do "X", "Y" happens instead of "Z".
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: behavior
|
||||
attributes:
|
||||
label: Expected Behavior
|
||||
description: A clear and concise description of what you expected to happen.
|
||||
placeholder: When I do "X", I expect "Z" to happen.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: steps
|
||||
attributes:
|
||||
label: Steps to Reproduce the Bug
|
||||
description: Detail the series of steps required to reproduce the bug.
|
||||
placeholder: When I run "X" using [...], "X" fails with "Y" error message. If I check the terminal outputs and/or logs, I see the following info.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: configuration
|
||||
attributes:
|
||||
label: NGINX Configuration
|
||||
description: Please provide your NGINX configuration. Minimize it to the smallest possible configuration that reproduces the issue.
|
||||
value: |
|
||||
```
|
||||
# Your NGINX configuration
|
||||
```
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: version
|
||||
attributes:
|
||||
label: NGINX version and build configuration options
|
||||
description: Please provide details about your NGINX build.
|
||||
value: |
|
||||
The output of `nginx -V`: [...]
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: environment
|
||||
attributes:
|
||||
label: Environment where NGINX is being built and/or deployed
|
||||
description: Please provide details about your environment.
|
||||
value: |
|
||||
- Target deployment platform: [e.g. AWS/GCP/local cluster/etc...]
|
||||
- Target OS: [e.g. RHEL 9/Ubuntu 24.04/etc...]
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: architecture
|
||||
attributes:
|
||||
label: Architecture where NGINX is being built and/or deployed
|
||||
description: Please provide details about your deployment environment.
|
||||
value: |
|
||||
The output of `uname -a`: [...]
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: logs
|
||||
attributes:
|
||||
label: NGINX Debug Log
|
||||
description: Please provide your NGINX debug log. See this [doc](http://nginx.org/en/docs/debugging_log.html) for details on how to enable it.
|
||||
value: |
|
||||
```
|
||||
# Your NGINX debug log
|
||||
```
|
||||
|
||||
- type: textarea
|
||||
id: context
|
||||
attributes:
|
||||
label: Additional Context
|
||||
description: Add any other context about the problem here.
|
||||
placeholder: Feel free to add any other context/information/screenshots/etc... that you think might be relevant to this issue in here.
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
---
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: 💬 Talk to the NGINX community!
|
||||
url: https://community.nginx.org
|
||||
about: A community forum for NGINX users, developers, and contributors
|
||||
- name: 📝 Code of Conduct
|
||||
url: https://www.contributor-covenant.org/version/2/1/code_of_conduct
|
||||
about: NGINX follows the Contributor Covenant Code of Conduct to ensure a safe and inclusive community
|
||||
- name: 💼 For commercial & enterprise users
|
||||
url: https://www.f5.com/products/nginx
|
||||
about: F5 offers a wide range of NGINX products for commercial & enterprise users
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
---
|
||||
name: ✨ Feature request
|
||||
description: Suggest an idea for this project
|
||||
labels: enhancement
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thanks for taking the time to fill out this feature request!
|
||||
|
||||
Before you continue filling out this request, please take a moment to check that your feature has not been [already requested on GitHub][issue search] 🙌
|
||||
|
||||
**Note:** If you are seeking community support, please start a new topic in the [NGINX Community forum][forum]. If you wish to discuss the codebase, please start a new thread via [GitHub discussions][discussions].
|
||||
|
||||
[issue search]: https://github.com/nginx/nginx/search?q=is%3Aissue&type=issues
|
||||
[discussions]: https://github.com/nginx/nginx/discussions
|
||||
[forum]: https://community.nginx.org
|
||||
|
||||
- type: textarea
|
||||
id: overview
|
||||
attributes:
|
||||
label: Feature Overview
|
||||
description: A clear and concise description of what the feature request is.
|
||||
placeholder: I would like this project to be able to do "X".
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: alternatives
|
||||
attributes:
|
||||
label: Alternatives Considered
|
||||
description: Detail any potential alternative solutions/workarounds you've used or considered.
|
||||
placeholder: I have done/might be able to do "X" in this project by doing "Y".
|
||||
|
||||
- type: textarea
|
||||
id: context
|
||||
attributes:
|
||||
label: Additional Context
|
||||
description: Add any other context about the problem here.
|
||||
placeholder: Feel free to add any other context/information/screenshots/etc... that you think might be relevant to this feature request here.
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
### Proposed changes
|
||||
|
||||
Describe the use case and detail of the change. If this PR addresses an issue on GitHub, make sure to include a link to that issue using one of the [supported keywords](https://docs.github.com/en/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue) in this PR's description or commit message.
|
||||
|
||||
### Checklist
|
||||
|
||||
Before creating a PR, run through this checklist and mark each as complete:
|
||||
|
||||
- [ ] I have read the [contributing guidelines](/CONTRIBUTING.md).
|
||||
- [ ] I have checked that NGINX compiles and runs after adding my changes.
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
name: buildbot
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- 'stable-1.*'
|
||||
|
||||
jobs:
|
||||
buildbot:
|
||||
uses: nginx/ci-self-hosted/.github/workflows/nginx-buildbot.yml@main
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
name: check-pr
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
check-pr:
|
||||
uses: nginx/ci-self-hosted/.github/workflows/nginx-check-pr.yml@main
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
---
|
||||
name: F5 CLA
|
||||
on:
|
||||
issue_comment:
|
||||
types: [created]
|
||||
pull_request_target:
|
||||
types: [opened, closed, synchronize]
|
||||
permissions: read-all
|
||||
jobs:
|
||||
f5-cla:
|
||||
name: F5 CLA
|
||||
runs-on: ubuntu-24.04
|
||||
permissions:
|
||||
actions: write
|
||||
pull-requests: write
|
||||
statuses: write
|
||||
steps:
|
||||
- name: Run F5 Contributor License Agreement (CLA) assistant
|
||||
if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have hereby read the F5 CLA and agree to its terms') || github.event_name == 'pull_request_target'
|
||||
uses: contributor-assistant/github-action@ca4a40a7d1004f18d9960b404b97e5f30a505a08 # v2.6.1
|
||||
with:
|
||||
# Path to the CLA document.
|
||||
path-to-document: https://github.com/f5/f5-cla/blob/main/docs/f5_cla.md
|
||||
# Custom CLA messages.
|
||||
custom-notsigned-prcomment: '🎉 Thank you for your contribution! It appears you have not yet signed the [F5 Contributor License Agreement (CLA)](https://github.com/f5/f5-cla/blob/main/docs/f5_cla.md), which is required for your changes to be incorporated into an F5 Open Source Software (OSS) project. Please kindly read the [F5 CLA](https://github.com/f5/f5-cla/blob/main/docs/f5_cla.md) and reply on a new comment with the following text to agree:'
|
||||
custom-pr-sign-comment: 'I have hereby read the F5 CLA and agree to its terms'
|
||||
custom-allsigned-prcomment: '✅ All required contributors have signed the F5 CLA for this PR. Thank you!'
|
||||
# Remote repository storing CLA signatures.
|
||||
remote-organization-name: f5
|
||||
remote-repository-name: f5-cla-data
|
||||
# Branch where CLA signatures are stored.
|
||||
branch: main
|
||||
path-to-signatures: signatures/signatures.json
|
||||
# Comma separated list of usernames for maintainers or any other individuals who should not be prompted for a CLA.
|
||||
# NOTE: You will want to edit the usernames to suit your project needs.
|
||||
allowlist: bot*
|
||||
# Do not lock PRs after a merge.
|
||||
lock-pullrequest-aftermerge: false
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
PERSONAL_ACCESS_TOKEN: ${{ secrets.F5_CLA_TOKEN }}
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
/Makefile
|
||||
/objs/
|
||||
/tmp/
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
551102312e19b704cd22bd7254a9444b9ea14e96 release-0.1.0
|
||||
23fb87bddda14ce9faec90f774085634106aded4 release-0.1.1
|
||||
295d97d70c698585705345f1a8f92b02e63d6d0d release-0.1.2
|
||||
|
|
@ -1,126 +0,0 @@
|
|||
# Contributor Covenant Code of Conduct
|
||||
|
||||
## Our Pledge
|
||||
|
||||
We as members, contributors, and leaders pledge to make participation in our
|
||||
community a harassment-free experience for everyone, regardless of age, body
|
||||
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
||||
identity and expression, level of experience, education, socio economic status,
|
||||
nationality, personal appearance, race, caste, color, religion, or sexual
|
||||
identity and orientation.
|
||||
|
||||
We pledge to act and interact in ways that contribute to an open, welcoming,
|
||||
diverse, inclusive, and healthy community.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behavior that contributes to a positive environment for our
|
||||
community include:
|
||||
|
||||
- Demonstrating empathy and kindness toward other people
|
||||
- Being respectful of differing opinions, viewpoints, and experiences
|
||||
- Giving and gracefully accepting constructive feedback
|
||||
- Accepting responsibility and apologizing to those affected by our mistakes
|
||||
and learning from the experience
|
||||
- Focusing on what is best not just for us as individuals, but for the
|
||||
overall community
|
||||
|
||||
Examples of unacceptable behavior include:
|
||||
|
||||
- The use of sexualized language or imagery, and sexual attention or advances
|
||||
of any kind
|
||||
- Trolling, insulting or derogatory comments, and personal or political attacks
|
||||
- Public or private harassment
|
||||
- Publishing others' private information, such as a physical or email address,
|
||||
without their explicit permission
|
||||
- Other conduct which could reasonably be considered inappropriate in a
|
||||
professional setting
|
||||
|
||||
## Enforcement Responsibilities
|
||||
|
||||
Community leaders are responsible for clarifying and enforcing our standards
|
||||
of acceptable behavior and will take appropriate and fair corrective action
|
||||
in response to any behavior that they deem inappropriate, threatening,
|
||||
offensive, or harmful.
|
||||
|
||||
Community leaders have the right and responsibility to remove, edit, or reject
|
||||
comments, commits, code, wiki edits, issues, and other contributions that are
|
||||
not aligned to this Code of Conduct, and will communicate reasons for
|
||||
moderation decisions when appropriate.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies within all community spaces, and also applies when
|
||||
an individual is officially representing the community in public spaces.
|
||||
Examples of representing our community include using an official email address,
|
||||
posting via an official social media account, or acting as an appointed
|
||||
representative at an online or offline event.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||
reported to the community leaders responsible for enforcement at
|
||||
<nginx-oss-community@f5.com>. All complaints will be reviewed and investigated
|
||||
promptly and fairly.
|
||||
|
||||
All community leaders are obligated to respect the privacy and security of the
|
||||
reporter of any incident.
|
||||
|
||||
## Enforcement Guidelines
|
||||
|
||||
Community leaders will follow these Community Impact Guidelines in determining
|
||||
the consequences for any action they deem in violation of this Code of Conduct:
|
||||
|
||||
### 1. Correction
|
||||
|
||||
**Community Impact**: Use of inappropriate language or other behavior deemed
|
||||
unprofessional or unwelcome in the community.
|
||||
|
||||
**Consequence**: A private, written warning from community leaders, providing
|
||||
clarity around the nature of the violation and an explanation of why the
|
||||
behavior was inappropriate. A public apology may be requested.
|
||||
|
||||
### 2. Warning
|
||||
|
||||
**Community Impact**: A violation through a single incident or series of actions.
|
||||
|
||||
**Consequence**: A warning with consequences for continued behavior. No
|
||||
interaction with the people involved, including unsolicited interaction with
|
||||
those enforcing the Code of Conduct, for a specified period of time. This
|
||||
includes avoiding interactions in community spaces as well as external
|
||||
channels like social media. Violating these terms may lead to a temporary or
|
||||
permanent ban.
|
||||
|
||||
### 3. Temporary Ban
|
||||
|
||||
**Community Impact**: A serious violation of community standards, including
|
||||
sustained inappropriate behavior.
|
||||
|
||||
**Consequence**: A temporary ban from any sort of interaction or public
|
||||
communication with the community for a specified period of time. No public or
|
||||
private interaction with the people involved, including unsolicited interaction
|
||||
with those enforcing the Code of Conduct, is allowed during this period.
|
||||
Violating these terms may lead to a permanent ban.
|
||||
|
||||
### 4. Permanent Ban
|
||||
|
||||
**Community Impact**: Demonstrating a pattern of violation of community
|
||||
standards, including sustained inappropriate behavior, harassment of an
|
||||
individual, or aggression toward or disparagement of classes of individuals.
|
||||
|
||||
**Consequence**: A permanent ban from any sort of public interaction within
|
||||
the community.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the
|
||||
[Contributor Covenant](https://www.contributor-covenant.org), version 2.1,
|
||||
available at
|
||||
<https://www.contributor-covenant.org/version/2/1/code_of_conduct.html>.
|
||||
|
||||
Community Impact Guidelines were inspired by
|
||||
[Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/inclusion).
|
||||
|
||||
For answers to common questions about this code of conduct, see the FAQ at
|
||||
<https://www.contributor-covenant.org/faq>. Translations are available at
|
||||
<https://www.contributor-covenant.org/translations>.
|
||||
123
CONTRIBUTING.md
123
CONTRIBUTING.md
|
|
@ -1,123 +0,0 @@
|
|||
# Contributing Guidelines
|
||||
|
||||
The following is a set of guidelines for contributing to nginx project.
|
||||
We really appreciate that you are considering contributing!
|
||||
|
||||
## Table of Contents
|
||||
|
||||
- [Report a Bug](#report-a-bug)
|
||||
- [Suggest a Feature or Enhancement](#suggest-a-feature-or-enhancement)
|
||||
- [Open a Discussion](#open-a-discussion)
|
||||
- [Submit a Pull Request](#submit-a-pull-request)
|
||||
- [Issue Lifecycle](#issue-lifecycle)
|
||||
|
||||
## Report a Bug
|
||||
|
||||
To report a bug, open an issue on GitHub with the label `bug` using the
|
||||
available [bug report issue form](/.github/ISSUE_TEMPLATE/bug_report.yml).
|
||||
Please ensure the bug has not already been reported. **If the bug is a
|
||||
potential security vulnerability, please report it using our
|
||||
[security policy](/SECURITY.md).**
|
||||
|
||||
## Suggest a Feature or Enhancement
|
||||
|
||||
To suggest a feature or enhancement, please create an issue on GitHub with the
|
||||
label `enhancement` using the available
|
||||
[feature request issue form](/.github/ISSUE_TEMPLATE/feature_request.yml).
|
||||
Please ensure the feature or enhancement has not already been suggested.
|
||||
|
||||
## Open a Discussion
|
||||
|
||||
If you want to engage in a conversation with the community and maintainers,
|
||||
we encourage you to use
|
||||
[GitHub Discussions](https://github.com/nginx/nginx/discussions) to discuss
|
||||
the NGINX codebase or the [NGINX Community forum](https://community.nginx.org)
|
||||
to chat anything else NGINX (including troubleshooting).
|
||||
|
||||
## Submit a Pull Request
|
||||
|
||||
Follow this plan to contribute a change to NGINX source code:
|
||||
|
||||
- Fork the NGINX repository
|
||||
- Create a branch
|
||||
- Implement your changes in this branch
|
||||
- Submit a pull request (PR) when your changes are tested and ready for review
|
||||
|
||||
Refer to
|
||||
[NGINX Development Guide](https://nginx.org/en/docs/dev/development_guide.html)
|
||||
for questions about NGINX programming.
|
||||
|
||||
### Formatting Changes
|
||||
|
||||
- Changes should be formatted according to the
|
||||
[code style](https://nginx.org/en/docs/dev/development_guide.html#code_style)
|
||||
used by NGINX; sometimes, there is no clear rule, in which case examine how
|
||||
existing NGINX sources are formatted and mimic this style; changes will more
|
||||
likely be accepted if style corresponds to the surrounding code
|
||||
|
||||
- Keep a clean, concise and meaningful commit history on your branch, rebasing
|
||||
locally and breaking changes logically into commits before submitting a PR
|
||||
|
||||
- Each commit message should have a single-line subject line followed by verbose
|
||||
description after an empty line
|
||||
|
||||
- Limit the subject line to 67 characters, and the rest of the commit message
|
||||
to 76 characters
|
||||
|
||||
- Use subject line prefixes for commits that affect a specific portion of the
|
||||
code; examples include "Upstream:", "QUIC:", or "Core:"; see the commit history
|
||||
to get an idea of the prefixes used
|
||||
|
||||
- Reference issues in the the subject line; if the commit fixes an issue,
|
||||
[name it](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue)
|
||||
accordingly
|
||||
|
||||
### Before Submitting
|
||||
|
||||
- The proposed changes should work properly on a wide range of
|
||||
[supported platforms](https://nginx.org/en/index.html#tested_os_and_platforms)
|
||||
|
||||
- Try to make it clear why the suggested change is needed, and provide a use
|
||||
case, if possible
|
||||
|
||||
- Passing your changes through the test suite is a good way to ensure that they
|
||||
do not cause a regression; the repository with tests can be cloned with the
|
||||
following command:
|
||||
|
||||
```bash
|
||||
git clone https://github.com/nginx/nginx-tests.git
|
||||
```
|
||||
|
||||
- Submitting a change implies granting project a permission to use it under the
|
||||
[BSD-2-Clause license](/LICENSE)
|
||||
|
||||
### F5 Contributor License Agreement (CLA)
|
||||
|
||||
F5 requires all contributors to agree to the terms of the F5 CLA
|
||||
(available [here](https://github.com/f5/f5-cla/blob/main/docs/f5_cla.md))
|
||||
before any of their changes can be incorporated into an F5 Open Source
|
||||
repository (even contributions to the F5 CLA itself!).
|
||||
|
||||
If you have not yet agreed to the F5 CLA terms and submit a PR to this
|
||||
repository, a bot will prompt you to view and agree to the F5 CLA.
|
||||
You will have to agree to the F5 CLA terms through a comment in the PR
|
||||
before any of your changes can be merged. Your agreement signature
|
||||
will be safely stored by F5 and no longer be required in future PRs.
|
||||
|
||||
## Issue Lifecycle
|
||||
|
||||
To ensure a balance between work carried out by the NGINX engineering team
|
||||
while encouraging community involvement on this project, we use the following
|
||||
issue lifecycle:
|
||||
|
||||
- A new issue is created by a community member
|
||||
|
||||
- An owner on the NGINX engineering team is assigned to the issue; this
|
||||
owner shepherds the issue through the subsequent stages in the issue lifecycle
|
||||
|
||||
- The owner assigns one or more
|
||||
[labels](https://github.com/nginx/nginx/issues/labels) to the issue
|
||||
|
||||
- The owner, in collaboration with the wider team (product management and
|
||||
engineering), determines what milestone to attach to an issue;
|
||||
generally, milestones correspond to product releases
|
||||
24
LICENSE
24
LICENSE
|
|
@ -1,24 +0,0 @@
|
|||
Copyright (C) 2002-2021 Igor Sysoev
|
||||
Copyright (C) 2011-2025 Nginx, Inc.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGE.
|
||||
232
README.md
232
README.md
|
|
@ -1,232 +0,0 @@
|
|||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/user-attachments/assets/9335b488-ffcc-4157-8364-2370a0b70ad0">
|
||||
<source media="(prefers-color-scheme: light)" srcset="https://github.com/user-attachments/assets/3a7eeb08-1133-47f5-859c-fad4f5a6a013">
|
||||
<img alt="NGINX Banner">
|
||||
</picture>
|
||||
|
||||
[](https://www.repostatus.org/#active)
|
||||
[](https://community.nginx.org)
|
||||
[](/LICENSE)
|
||||
[](/CODE_OF_CONDUCT.md)
|
||||
|
||||
NGINX (pronounced "engine x" or "en-jin-eks") is the world's most popular Web Server, high performance Load Balancer, Reverse Proxy, API Gateway and Content Cache.
|
||||
|
||||
NGINX is free and open source software, distributed under the terms of a simplified [2-clause BSD-like license](LICENSE).
|
||||
|
||||
Enterprise distributions, commercial support and training are available from [F5, Inc](https://www.f5.com/products/nginx).
|
||||
|
||||
> [!IMPORTANT]
|
||||
> The goal of this README is to provide a basic, structured introduction to NGINX for novice users. Please refer to the [full NGINX documentation](https://nginx.org/en/docs/) for detailed information on [installing](https://nginx.org/en/docs/install.html), [building](https://nginx.org/en/docs/configure.html), [configuring](https://nginx.org/en/docs/dirindex.html), [debugging](https://nginx.org/en/docs/debugging_log.html), and more. These documentation pages also contain a more detailed [Beginners Guide](https://nginx.org/en/docs/beginners_guide.html), How-Tos, [Development guide](https://nginx.org/en/docs/dev/development_guide.html), and a complete module and [directive reference](https://nginx.org/en/docs/dirindex.html).
|
||||
|
||||
# Table of contents
|
||||
- [How it works](#how-it-works)
|
||||
- [Modules](#modules)
|
||||
- [Configurations](#configurations)
|
||||
- [Runtime](#runtime)
|
||||
- [Downloading and installing](#downloading-and-installing)
|
||||
- [Stable and Mainline binaries](#stable-and-mainline-binaries)
|
||||
- [Linux binary installation process](#linux-binary-installation-process)
|
||||
- [FreeBSD installation process](#freebsd-installation-process)
|
||||
- [Windows executables](#windows-executables)
|
||||
- [Dynamic modules](#dynamic-modules)
|
||||
- [Getting started with NGINX](#getting-started-with-nginx)
|
||||
- [Installing SSL certificates and enabling TLS encryption](#installing-ssl-certificates-and-enabling-tls-encryption)
|
||||
- [Load Balancing](#load-balancing)
|
||||
- [Rate limiting](#rate-limiting)
|
||||
- [Content caching](#content-caching)
|
||||
- [Building from source](#building-from-source)
|
||||
- [Installing dependencies](#installing-dependencies)
|
||||
- [Cloning the NGINX GitHub repository](#cloning-the-nginx-github-repository)
|
||||
- [Configuring the build](#configuring-the-build)
|
||||
- [Compiling](#compiling)
|
||||
- [Location of binary and installation](#location-of-binary-and-installation)
|
||||
- [Running and testing the installed binary](#running-and-testing-the-installed-binary)
|
||||
- [Asking questions and reporting issues](#asking-questions-and-reporting-issues)
|
||||
- [Contributing code](#contributing-code)
|
||||
- [Additional help and resources](#additional-help-and-resources)
|
||||
- [Changelog](#changelog)
|
||||
- [License](#license)
|
||||
|
||||
# How it works
|
||||
NGINX is installed software with binary packages available for all major operating systems and Linux distributions. See [Tested OS and Platforms](https://nginx.org/en/#tested_os_and_platforms) for a full list of compatible systems.
|
||||
|
||||
> [!IMPORTANT]
|
||||
> While nearly all popular Linux-based operating systems are distributed with a community version of nginx, we highly advise installation and usage of official [packages](https://nginx.org/en/linux_packages.html) or sources from this repository. Doing so ensures that you're using the most recent release or source code, including the latest feature-set, fixes and security patches.
|
||||
|
||||
## Modules
|
||||
NGINX is comprised of individual modules, each extending core functionality by providing additional, configurable features. See "Modules reference" at the bottom of [nginx documentation](https://nginx.org/en/docs/) for a complete list of official modules.
|
||||
|
||||
NGINX modules can be built and distributed as static or dynamic modules. Static modules are defined at build-time, compiled, and distributed in the resulting binaries. See [Dynamic Modules](#dynamic-modules) for more information on how they work, as well as, how to obtain, install, and configure them.
|
||||
|
||||
> [!TIP]
|
||||
> You can issue the following command to see which static modules your NGINX binaries were built with:
|
||||
```bash
|
||||
nginx -V
|
||||
```
|
||||
> See [Configuring the build](#configuring-the-build) for information on how to include specific Static modules into your nginx build.
|
||||
|
||||
## Configurations
|
||||
NGINX is highly flexible and configurable. Provisioning the software is achieved via text-based config file(s) accepting parameters called "[Directives](https://nginx.org/en/docs/dirindex.html)". See [Configuration File's Structure](https://nginx.org/en/docs/beginners_guide.html#conf_structure) for a comprehensive description of how NGINX configuration files work.
|
||||
|
||||
> [!NOTE]
|
||||
> The set of directives available to your distribution of NGINX is dependent on which [modules](#modules) have been made available to it.
|
||||
|
||||
## Runtime
|
||||
Rather than running in a single, monolithic process, NGINX is architected to scale beyond Operating System process limitations by operating as a collection of processes. They include:
|
||||
- A "master" process that maintains worker processes, as well as, reads and evaluates configuration files.
|
||||
- One or more "worker" processes that process data (eg. HTTP requests).
|
||||
|
||||
The number of [worker processes](https://nginx.org/en/docs/ngx_core_module.html#worker_processes) is defined in the configuration file and may be fixed for a given configuration or automatically adjusted to the number of available CPU cores. In most cases, the latter option optimally balances load across available system resources, as NGINX is designed to efficiently distribute work across all worker processes.
|
||||
|
||||
> [!TIP]
|
||||
> Processes synchronize data through shared memory. For this reason, many NGINX directives require the allocation of shared memory zones. As an example, when configuring [rate limiting](https://nginx.org/en/docs/http/ngx_http_limit_req_module.html#limit_req), connecting clients may need to be tracked in a [common memory zone](https://nginx.org/en/docs/http/ngx_http_limit_req_module.html#limit_req_zone) so all worker processes can know how many times a particular client has accessed the server in a span of time.
|
||||
|
||||
# Downloading and installing
|
||||
Follow these steps to download and install precompiled NGINX binaries. You may also choose to [build NGINX locally from source code](#building-from-source).
|
||||
|
||||
## Stable and Mainline binaries
|
||||
NGINX binaries are built and distributed in two versions: stable and mainline. Stable binaries are built from stable branches and only contain critical fixes backported from the mainline version. Mainline binaries are built from the [master branch](https://github.com/nginx/nginx/tree/master) and contain the latest features and bugfixes. You'll need to [decide which is appropriate for your purposes](https://docs.nginx.com/nginx/admin-guide/installing-nginx/installing-nginx-open-source/#choosing-between-a-stable-or-a-mainline-version).
|
||||
|
||||
## Linux binary installation process
|
||||
The NGINX binary installation process takes advantage of package managers native to specific Linux distributions. For this reason, first-time installations involve adding the official NGINX package repository to your system's package manager. Follow [these steps](https://nginx.org/en/linux_packages.html) to download, verify, and install NGINX binaries using the package manager appropriate for your Linux distribution.
|
||||
|
||||
### Upgrades
|
||||
Future upgrades to the latest version can be managed using the same package manager without the need to manually download and verify binaries.
|
||||
|
||||
## FreeBSD installation process
|
||||
For more information on installing NGINX on FreeBSD system, visit https://nginx.org/en/docs/install.html
|
||||
|
||||
## Windows executables
|
||||
Windows executables for mainline and stable releases can be found on the main [NGINX download page](https://nginx.org/en/download.html). Note that the current implementation of NGINX for Windows is at the Proof-of-Concept stage and should only be used for development and testing purposes. For additional information, please see [nginx for Windows](https://nginx.org/en/docs/windows.html).
|
||||
|
||||
## Dynamic modules
|
||||
NGINX version 1.9.11 added support for [Dynamic Modules](https://nginx.org/en/docs/ngx_core_module.html#load_module). Unlike Static modules, dynamically built modules can be downloaded, installed, and configured after the core NGINX binaries have been built. [Official dynamic module binaries](https://nginx.org/en/linux_packages.html#dynmodules) are available from the same package repository as the core NGINX binaries described in previous steps.
|
||||
|
||||
> [!TIP]
|
||||
> [NGINX JavaScript (njs)](https://github.com/nginx/njs), is a popular NGINX dynamic module that enables the extension of core NGINX functionality using familiar JavaScript syntax.
|
||||
|
||||
> [!IMPORTANT]
|
||||
> If desired, dynamic modules can also be built statically into NGINX at compile time.
|
||||
|
||||
# Getting started with NGINX
|
||||
For a gentle introduction to NGINX basics, please see our [Beginner’s Guide](https://nginx.org/en/docs/beginners_guide.html).
|
||||
|
||||
## Installing SSL certificates and enabling TLS encryption
|
||||
See [Configuring HTTPS servers](https://nginx.org/en/docs/http/configuring_https_servers.html) for a quick guide on how to enable secure traffic to your NGINX installation.
|
||||
|
||||
## Load Balancing
|
||||
For a quick start guide on configuring NGINX as a Load Balancer, please see [Using nginx as HTTP load balancer](https://nginx.org/en/docs/http/load_balancing.html).
|
||||
|
||||
## Rate limiting
|
||||
See our [Rate Limiting with NGINX](https://blog.nginx.org/blog/rate-limiting-nginx) blog post for an overview of core concepts for provisioning NGINX as an API Gateway.
|
||||
|
||||
## Content caching
|
||||
See [A Guide to Caching with NGINX and NGINX Plus](https://blog.nginx.org/blog/nginx-caching-guide) blog post for an overview of how to use NGINX as a content cache (e.g. edge server of a content delivery network).
|
||||
|
||||
# Building from source
|
||||
The following steps can be used to build NGINX from source code available in this repository.
|
||||
|
||||
## Installing dependencies
|
||||
Most Linux distributions will require several dependencies to be installed in order to build NGINX. The following instructions are specific to the `apt` package manager, widely available on most Ubuntu/Debian distributions and their derivatives.
|
||||
|
||||
> [!TIP]
|
||||
> It is always a good idea to update your package repository lists prior to installing new packages.
|
||||
> ```bash
|
||||
> sudo apt update
|
||||
> ```
|
||||
|
||||
### Installing compiler and make utility
|
||||
Use the following command to install the GNU C compiler and Make utility.
|
||||
|
||||
```bash
|
||||
sudo apt install gcc make
|
||||
```
|
||||
|
||||
### Installing dependency libraries
|
||||
|
||||
```bash
|
||||
sudo apt install libpcre3-dev zlib1g-dev
|
||||
```
|
||||
|
||||
> [!WARNING]
|
||||
> This is the minimal set of dependency libraries needed to build NGINX with rewriting and gzip capabilities. Other dependencies may be required if you choose to build NGINX with additional modules. Monitor the output of the `configure` command discussed in the following sections for information on which modules may be missing. For example, if you plan to use SSL certificates to encrypt traffic with TLS, you'll need to install the OpenSSL library. To do so, issue the following command.
|
||||
|
||||
>```bash
|
||||
>sudo apt install libssl-dev
|
||||
|
||||
## Cloning the NGINX GitHub repository
|
||||
Using your preferred method, clone the NGINX repository into your development directory. See [Cloning a GitHub Repository](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository) for additional help.
|
||||
|
||||
```bash
|
||||
git clone https://github.com/nginx/nginx.git
|
||||
```
|
||||
|
||||
## Configuring the build
|
||||
Prior to building NGINX, you must run the `configure` script with [appropriate flags](https://nginx.org/en/docs/configure.html). This will generate a Makefile in your NGINX source root directory that can then be used to compile NGINX with [options specified during configuration](https://nginx.org/en/docs/configure.html).
|
||||
|
||||
From the NGINX source code repository's root directory:
|
||||
|
||||
```bash
|
||||
auto/configure
|
||||
```
|
||||
|
||||
> [!IMPORTANT]
|
||||
> Configuring the build without any flags will compile NGINX with the default set of options. Please refer to https://nginx.org/en/docs/configure.html for a full list of available build configuration options.
|
||||
|
||||
## Compiling
|
||||
The `configure` script will generate a `Makefile` in the NGINX source root directory upon successful execution. To compile NGINX into a binary, issue the following command from that same directory:
|
||||
|
||||
```bash
|
||||
make
|
||||
```
|
||||
|
||||
## Location of binary and installation
|
||||
After successful compilation, a binary will be generated at `<NGINX_SRC_ROOT_DIR>/objs/nginx`. To install this binary, issue the following command from the source root directory:
|
||||
|
||||
```bash
|
||||
sudo make install
|
||||
```
|
||||
|
||||
> [!IMPORTANT]
|
||||
> The binary will be installed into the `/usr/local/nginx/` directory.
|
||||
|
||||
## Running and testing the installed binary
|
||||
To run the installed binary, issue the following command:
|
||||
|
||||
```bash
|
||||
sudo /usr/local/nginx/sbin/nginx
|
||||
```
|
||||
|
||||
You may test NGINX operation using `curl`.
|
||||
|
||||
```bash
|
||||
curl localhost
|
||||
```
|
||||
|
||||
The output of which should start with:
|
||||
|
||||
```html
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Welcome to nginx!</title>
|
||||
```
|
||||
|
||||
# Asking questions and reporting issues
|
||||
See our [Support](SUPPORT.md) guidelines for information on how discuss the codebase, ask troubleshooting questions, and report issues.
|
||||
|
||||
# Contributing code
|
||||
Please see the [Contributing](CONTRIBUTING.md) guide for information on how to contribute code.
|
||||
|
||||
# Additional help and resources
|
||||
- See the [NGINX Community Blog](https://blog.nginx.org/) for more tips, tricks and HOW-TOs related to NGINX and related projects.
|
||||
- Access [nginx.org](https://nginx.org/), your go-to source for all documentation, information and software related to the NGINX suite of projects.
|
||||
|
||||
# Changelog
|
||||
See our [changelog](https://nginx.org/en/CHANGES) to keep track of updates.
|
||||
|
||||
# License
|
||||
[2-clause BSD-like license](LICENSE)
|
||||
|
||||
---
|
||||
Additional documentation available at: https://nginx.org/en/docs
|
||||
103
SECURITY.md
103
SECURITY.md
|
|
@ -1,103 +0,0 @@
|
|||
# Security Policy
|
||||
|
||||
This document provides an overview of security concerns related to nginx
|
||||
deployments, focusing on confidentiality, integrity, availability, and the
|
||||
implications of configurations and misconfigurations.
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
Please report any vulnerabilities via one of the following methods
|
||||
(in order of preference):
|
||||
|
||||
1. [Report a vulnerability](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing-information-about-vulnerabilities/privately-reporting-a-security-vulnerability)
|
||||
within this repository. We are using the GitHub workflow that allows us to
|
||||
manage vulnerabilities in a private manner and interact with reporters
|
||||
securely.
|
||||
|
||||
2. [Report directly to F5](https://www.f5.com/services/support/report-a-vulnerability).
|
||||
|
||||
3. Report via email to security-alert@nginx.org.
|
||||
This method will be deprecated in the future.
|
||||
|
||||
### Vulnerability Disclosure and Fix Process
|
||||
|
||||
The nginx team expects that all suspected vulnerabilities be reported
|
||||
privately via the
|
||||
[Reporting a Vulnerability](SECURITY.md#reporting-a-vulnerability) guidelines.
|
||||
If a publicly released vulnerability is reported, we
|
||||
may request to handle it according to the private disclosure process.
|
||||
If the reporter agrees, we will follow the private disclosure process.
|
||||
|
||||
Security fixes will be applied to all supported stable releases, as well
|
||||
as the mainline version, as applicable. We recommend using the most recent
|
||||
mainline or stable release of nginx. Fixes are created and tested by the core
|
||||
team using a GitHub private fork for security. If necessary, the reporter
|
||||
may be invited to contribute to the fork and assist with the solution.
|
||||
|
||||
The nginx team is committed to responsible information disclosure with
|
||||
sufficient detail, such as the CVSS score and vector. Privately disclosed
|
||||
vulnerabilities are embargoed by default until the fix is released.
|
||||
Communications and fixes remain private until made public. As nginx is
|
||||
supported by F5, we generally follow the
|
||||
[F5 security vulnerability response policy](https://my.f5.com/manage/s/article/K4602).
|
||||
|
||||
### Vulnerability Disclosure and Fix Service Level Objectives
|
||||
|
||||
- We will acknowledge all vulnerability reports within 1 to 3 days.
|
||||
- Fixes will be developed and released within 90 days from the date of
|
||||
disclosure. If an extension is needed, we will work with the disclosing person.
|
||||
- Publicly disclosed (i.e., Zero-Day vulnerabilities) will be addressed ASAP.
|
||||
|
||||
## Confidentiality, Integrity, and Availability
|
||||
|
||||
### Confidentiality and Integrity
|
||||
|
||||
Vulnerabilities compromising data confidentiality or integrity are considered
|
||||
the highest priority. Any issue leading to unauthorized data access, leaks, or
|
||||
manipulation will trigger the security release process.
|
||||
|
||||
### Availability
|
||||
|
||||
Availability issues must meet the following criteria to trigger the security
|
||||
release process:
|
||||
- Is present in a standard module included with nginx.
|
||||
- Arises from traffic that the module is designed to handle.
|
||||
- Resource exhaustion issues are not mitigated by existing timeout, rate
|
||||
limiting, or buffer size configurations, or applying changes is impractical.
|
||||
- Results in highly asymmetric, extreme resource consumption.
|
||||
|
||||
Availability issues excluded from the security release process:
|
||||
- Local file content or upstream response content resulting only in worker
|
||||
process termination.
|
||||
- Issues with experimental features which result only in availability impact.
|
||||
|
||||
## Trusted Configurations and Misconfigurations
|
||||
|
||||
In nginx, configuration files, modules, certificate/key pairs, nginx JavaScript,
|
||||
and local file content are considered trusted sources. Issues arising from
|
||||
loading or execution of these trusted components are not considered
|
||||
vulnerabilities. Operators are responsible for securing and maintaining the
|
||||
integrity of these sources. Misconfigurations can create vulnerabilities, and
|
||||
operators should implement configurations according to best practices, review
|
||||
them regularly, and apply security updates.
|
||||
|
||||
## Data Plane vs. Control Plane
|
||||
|
||||
The data plane handles traffic through nginx, directly interacting with user
|
||||
data. nginx inherently trusts the content and instructions from upstream
|
||||
servers. The control plane governs configuration, management, and orchestration.
|
||||
Misconfigurations or vulnerabilities in the control plane can cause improper
|
||||
behavior in the data plane.
|
||||
|
||||
## Modules Under Scope
|
||||
|
||||
The policy applies to all nginx modules included in this repository. Security
|
||||
considerations and attack vectors for each module will be identified, with
|
||||
recommended configurations to mitigate risks.
|
||||
|
||||
## Debug Logging and Core Files
|
||||
|
||||
Debug logs and core files produced by nginx may contain un-sanitized data,
|
||||
including sensitive information like client requests, server configurations,
|
||||
and private key material. These artifacts must be handled carefully to avoid
|
||||
exposing confidential data.
|
||||
48
SUPPORT.md
48
SUPPORT.md
|
|
@ -1,48 +0,0 @@
|
|||
# Support
|
||||
|
||||
## Ask a Question
|
||||
|
||||
We use GitHub issues for tracking bugs and feature requests
|
||||
related to this project.
|
||||
|
||||
If you don't know how something in the codebase works, are curious if NGINX
|
||||
is capable of achieving your desired functionality or want to discuss the
|
||||
implementation of an existing or in development feature, please start a
|
||||
GitHub discussion!
|
||||
|
||||
## NGINX Specific Questions and/or Issues
|
||||
|
||||
This project isn't the right place to get support for NGINX and/or NGINX
|
||||
troubleshooting questions, but the following resources are available below.
|
||||
Thanks for your understanding!
|
||||
|
||||
### Community Forum
|
||||
|
||||
We have a [community forum](https://community.nginx.org/)!
|
||||
If you have any NGINX specific questions and/or issues,
|
||||
try checking out the [`NGINX category`](https://community.nginx.org/c/projects/nginx/23).
|
||||
For general discussions around anything tangentially NGINX related,
|
||||
check out the [`General Discussion category`](https://community.nginx.org/c/general-discussion/34).
|
||||
Both fellow community members and NGINXers might be able to help you! :)
|
||||
|
||||
### Documentation
|
||||
|
||||
For a comprehensive list of all NGINX directives, check out <https://nginx.org>.
|
||||
|
||||
For a comprehensive list of administration and deployment guides for all
|
||||
NGINX products, check out <https://docs.nginx.com>.
|
||||
|
||||
## Contributing
|
||||
|
||||
Please see the [contributing guide](/CONTRIBUTING.md) for guidelines
|
||||
on how to best contribute to this project.
|
||||
|
||||
## Commercial Support
|
||||
|
||||
Commercial support for this project is available.
|
||||
Please get in touch with [F5 sales](https://www.f5.com/products/get-f5/)
|
||||
or check your contract details for more information!
|
||||
|
||||
## Community Support
|
||||
|
||||
Community support is offered on a best effort basis through any of our active communities.
|
||||
14
auto/cc/acc
14
auto/cc/acc
|
|
@ -1,14 +0,0 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
# aCC: HP ANSI C++ B3910B A.03.55.02
|
||||
|
||||
# C89 mode
|
||||
|
||||
CFLAGS="$CFLAGS -Ae"
|
||||
CC_TEST_FLAGS="-Ae"
|
||||
|
||||
PCRE_OPT="$PCRE_OPT -Ae"
|
||||
ZLIB_OPT="$ZLIB_OPT -Ae"
|
||||
37
auto/cc/bcc
37
auto/cc/bcc
|
|
@ -1,6 +1,5 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
# Borland C++ 5.5
|
||||
|
|
@ -22,11 +21,6 @@ case $CPU in
|
|||
;;
|
||||
esac
|
||||
|
||||
# __stdcall
|
||||
#CPU_OPT="$CPU_OPT -ps"
|
||||
# __fastcall
|
||||
#CPU_OPT="$CPU_OPT -pr"
|
||||
|
||||
CFLAGS="$CFLAGS $CPU_OPT"
|
||||
|
||||
# multithreaded
|
||||
|
|
@ -38,34 +32,17 @@ CFLAGS="$CFLAGS -w!"
|
|||
# disable logo
|
||||
CFLAGS="$CFLAGS -q"
|
||||
|
||||
|
||||
# precompiled headers
|
||||
CORE_DEPS="$CORE_DEPS $NGX_OBJS/ngx_config.csm"
|
||||
NGX_PCH="$NGX_OBJS/ngx_config.csm"
|
||||
NGX_BUILD_PCH="-H=$NGX_OBJS/ngx_config.csm"
|
||||
NGX_USE_PCH="-Hu -H=$NGX_OBJS/ngx_config.csm"
|
||||
|
||||
|
||||
# Win32 GUI mode application
|
||||
#LINK="\$(CC) -laa"
|
||||
|
||||
|
||||
# the resource file
|
||||
NGX_RES="$NGX_OBJS/nginx.res"
|
||||
NGX_RCC="brcc32 -fo$NGX_OBJS/nginx.res \$(CORE_INCS) $NGX_WIN32_RC"
|
||||
# the pragma allows to link the resource file using bcc32 and
|
||||
# to avoid the direct ilink32 calling and the c0w32.obj's WinMain/main problem
|
||||
NGX_PRAGMA="#pragma resource \"$NGX_OBJS/nginx.res\""
|
||||
CORE_DEPS="$CORE_DEPS $OBJS/ngx_config.csm"
|
||||
NGX_PCH="$OBJS/ngx_config.csm"
|
||||
NGX_BUILD_PCH="-H=$OBJS/ngx_config.csm"
|
||||
NGX_USE_PCH="-Hu -H=$OBJS/ngx_config.csm"
|
||||
|
||||
LINK="\$(CC)"
|
||||
|
||||
ngx_include_opt="-I"
|
||||
ngx_objout="-o"
|
||||
ngx_binout="-e"
|
||||
ngx_objext="obj"
|
||||
|
||||
ngx_long_start='@&&|
|
||||
'
|
||||
ngx_long_end='|'
|
||||
|
||||
ngx_regex_dirsep='\\'
|
||||
ngx_dirsep="\\"
|
||||
ngx_binext=".exe"
|
||||
ngx_dirsep='\\'
|
||||
|
|
|
|||
46
auto/cc/ccc
46
auto/cc/ccc
|
|
@ -1,46 +0,0 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
# Compaq C V6.5-207
|
||||
|
||||
ngx_include_opt="-I"
|
||||
|
||||
# warnings
|
||||
|
||||
CFLAGS="$CFLAGS -msg_enable level6 -msg_fatal level6"
|
||||
|
||||
CFLAGS="$CFLAGS -msg_disable unknownmacro"
|
||||
CFLAGS="$CFLAGS -msg_disable unusedincl"
|
||||
CFLAGS="$CFLAGS -msg_disable unnecincl"
|
||||
CFLAGS="$CFLAGS -msg_disable nestincl"
|
||||
CFLAGS="$CFLAGS -msg_disable strctpadding"
|
||||
CFLAGS="$CFLAGS -msg_disable ansialiascast"
|
||||
CFLAGS="$CFLAGS -msg_disable inlinestoclsmod"
|
||||
CFLAGS="$CFLAGS -msg_disable cxxkeyword"
|
||||
CFLAGS="$CFLAGS -msg_disable longlongsufx"
|
||||
CFLAGS="$CFLAGS -msg_disable valuepres"
|
||||
|
||||
# STUB
|
||||
CFLAGS="$CFLAGS -msg_disable truncintcast"
|
||||
CFLAGS="$CFLAGS -msg_disable trunclongcast"
|
||||
|
||||
CFLAGS="$CFLAGS -msg_disable truncintasn"
|
||||
CFLAGS="$CFLAGS -msg_disable trunclongint"
|
||||
CFLAGS="$CFLAGS -msg_disable intconcastsgn"
|
||||
CFLAGS="$CFLAGS -msg_disable intconstsign"
|
||||
CFLAGS="$CFLAGS -msg_disable switchlong"
|
||||
CFLAGS="$CFLAGS -msg_disable subscrbounds2"
|
||||
|
||||
CFLAGS="$CFLAGS -msg_disable hexoctunsign"
|
||||
|
||||
CFLAGS="$CFLAGS -msg_disable ignorecallval"
|
||||
CFLAGS="$CFLAGS -msg_disable nonstandcast"
|
||||
CFLAGS="$CFLAGS -msg_disable embedcomment"
|
||||
CFLAGS="$CFLAGS -msg_disable unreachcode"
|
||||
CFLAGS="$CFLAGS -msg_disable questcompare2"
|
||||
CFLAGS="$CFLAGS -msg_disable unusedtop"
|
||||
CFLAGS="$CFLAGS -msg_disable unrefdecl"
|
||||
|
||||
CFLAGS="$CFLAGS -msg_disable bitnotint"
|
||||
|
|
@ -1,90 +0,0 @@
|
|||
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
# clang
|
||||
|
||||
|
||||
CC_TEST_FLAGS="-pipe"
|
||||
|
||||
|
||||
# optimizations
|
||||
|
||||
#NGX_CLANG_OPT="-O2"
|
||||
#NGX_CLANG_OPT="-Oz"
|
||||
NGX_CLANG_OPT="-O"
|
||||
|
||||
case $CPU in
|
||||
pentium)
|
||||
# optimize for Pentium
|
||||
CPU_OPT="-march=pentium"
|
||||
NGX_CPU_CACHE_LINE=32
|
||||
;;
|
||||
|
||||
pentiumpro | pentium3)
|
||||
# optimize for Pentium Pro, Pentium II and Pentium III
|
||||
CPU_OPT="-march=pentiumpro"
|
||||
NGX_CPU_CACHE_LINE=32
|
||||
;;
|
||||
|
||||
pentium4)
|
||||
# optimize for Pentium 4
|
||||
CPU_OPT="-march=pentium4"
|
||||
NGX_CPU_CACHE_LINE=128
|
||||
;;
|
||||
|
||||
athlon)
|
||||
# optimize for Athlon
|
||||
CPU_OPT="-march=athlon"
|
||||
NGX_CPU_CACHE_LINE=64
|
||||
;;
|
||||
|
||||
opteron)
|
||||
# optimize for Opteron
|
||||
CPU_OPT="-march=opteron"
|
||||
NGX_CPU_CACHE_LINE=64
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
CC_AUX_FLAGS="$CC_AUX_FLAGS $CPU_OPT"
|
||||
|
||||
|
||||
CFLAGS="$CFLAGS -pipe $CPU_OPT"
|
||||
|
||||
if [ ".$PCRE_OPT" = "." ]; then
|
||||
PCRE_OPT="-O2 -pipe $CPU_OPT"
|
||||
else
|
||||
PCRE_OPT="$PCRE_OPT -pipe"
|
||||
fi
|
||||
|
||||
if [ ".$ZLIB_OPT" = "." ]; then
|
||||
ZLIB_OPT="-O2 -pipe $CPU_OPT"
|
||||
else
|
||||
ZLIB_OPT="$ZLIB_OPT -pipe"
|
||||
fi
|
||||
|
||||
|
||||
# warnings
|
||||
|
||||
CFLAGS="$CFLAGS $NGX_CLANG_OPT -Wall -Wextra -Wpointer-arith"
|
||||
CFLAGS="$CFLAGS -Wconditional-uninitialized"
|
||||
#CFLAGS="$CFLAGS -Wmissing-prototypes"
|
||||
|
||||
# we have a lot of unused function arguments
|
||||
CFLAGS="$CFLAGS -Wno-unused-parameter"
|
||||
|
||||
# deprecated system OpenSSL library on OS X
|
||||
if [ "$NGX_SYSTEM" = "Darwin" ]; then
|
||||
CFLAGS="$CFLAGS -Wno-deprecated-declarations"
|
||||
fi
|
||||
|
||||
# stop on warning
|
||||
CFLAGS="$CFLAGS -Werror"
|
||||
|
||||
# debug
|
||||
CFLAGS="$CFLAGS -g"
|
||||
|
||||
if [ ".$CPP" = "." ]; then
|
||||
CPP="$CC -E"
|
||||
fi
|
||||
185
auto/cc/conf
185
auto/cc/conf
|
|
@ -1,24 +1,13 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
LINK="\$(CC)"
|
||||
|
||||
MAIN_LINK=
|
||||
MODULE_LINK="-shared"
|
||||
|
||||
ngx_include_opt="-I "
|
||||
ngx_compile_opt="-c"
|
||||
ngx_pic_opt="-fPIC"
|
||||
ngx_objout="-o "
|
||||
ngx_binout="-o "
|
||||
ngx_objext="o"
|
||||
ngx_binext=
|
||||
ngx_modext=".so"
|
||||
|
||||
ngx_long_start=
|
||||
ngx_long_end=
|
||||
|
||||
ngx_regex_dirsep="\/"
|
||||
ngx_dirsep='/'
|
||||
|
|
@ -31,9 +20,6 @@ ngx_tab=' \
|
|||
'
|
||||
ngx_spacer=
|
||||
|
||||
ngx_long_regex_cont=$ngx_regex_cont
|
||||
ngx_long_cont=$ngx_cont
|
||||
|
||||
. auto/cc/name
|
||||
|
||||
if test -n "$CFLAGS"; then
|
||||
|
|
@ -48,77 +34,38 @@ if test -n "$CFLAGS"; then
|
|||
ngx_include_opt="-I"
|
||||
;;
|
||||
|
||||
sunc)
|
||||
|
||||
MAIN_LINK=
|
||||
MODULE_LINK="-G"
|
||||
|
||||
case "$NGX_MACHINE" in
|
||||
|
||||
i86pc)
|
||||
NGX_AUX=" src/os/unix/ngx_sunpro_x86.il"
|
||||
;;
|
||||
|
||||
sun4u | sun4v)
|
||||
NGX_AUX=" src/os/unix/ngx_sunpro_sparc64.il"
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
case $CPU in
|
||||
|
||||
amd64)
|
||||
NGX_AUX=" src/os/unix/ngx_sunpro_amd64.il"
|
||||
;;
|
||||
|
||||
esac
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
else
|
||||
|
||||
case $NGX_CC_NAME in
|
||||
gcc)
|
||||
# gcc 2.7.2.3, 2.8.1, 2.95.4, egcs-1.1.2
|
||||
# 3.0.4, 3.1.1, 3.2.3, 3.3.2, 3.3.3, 3.3.4, 3.4.0, 3.4.2
|
||||
# 4.0.0, 4.0.1, 4.1.0
|
||||
# gcc 2.7.2.3, 2.8.1, 2.95.4,
|
||||
# 3.0.4, 3.1.1, 3.2.3, 3.3.2, 3.3.3, 3.3.4, 3.4
|
||||
|
||||
. auto/cc/gcc
|
||||
;;
|
||||
|
||||
clang)
|
||||
# Clang C compiler
|
||||
|
||||
. auto/cc/clang
|
||||
;;
|
||||
|
||||
icc)
|
||||
# Intel C++ compiler 7.1, 8.0, 8.1
|
||||
# Intel C++ compiler 7.1, 8.0
|
||||
|
||||
. auto/cc/icc
|
||||
;;
|
||||
|
||||
sunc)
|
||||
# Sun C 5.7 Patch 117837-04 2005/05/11
|
||||
# ccc)
|
||||
# # Compaq C V6.5-207
|
||||
#
|
||||
# . auto/cc/ccc
|
||||
# ;;
|
||||
|
||||
. auto/cc/sunc
|
||||
;;
|
||||
|
||||
ccc)
|
||||
# Compaq C V6.5-207
|
||||
|
||||
. auto/cc/ccc
|
||||
;;
|
||||
|
||||
acc)
|
||||
# aCC: HP ANSI C++ B3910B A.03.55.02
|
||||
|
||||
. auto/cc/acc
|
||||
;;
|
||||
# acc)
|
||||
# # aCC: HP ANSI C++ B3910B A.03.55.02
|
||||
#
|
||||
# . auto/cc/acc
|
||||
# ;;
|
||||
|
||||
msvc)
|
||||
# MSVC++ 6.0 SP2, MSVC++ Toolkit 2003
|
||||
# MSVC 6.0 SP2
|
||||
|
||||
. auto/cc/msvc
|
||||
;;
|
||||
|
|
@ -137,91 +84,20 @@ else
|
|||
|
||||
esac
|
||||
|
||||
CC_TEST_FLAGS="$CC_TEST_FLAGS $NGX_CC_OPT"
|
||||
CC_TEST_FLAGS=$NGX_CC_OPT
|
||||
|
||||
fi
|
||||
|
||||
CFLAGS="$CFLAGS $NGX_CC_OPT"
|
||||
NGX_TEST_LD_OPT="$NGX_LD_OPT"
|
||||
|
||||
if [ "$NGX_PLATFORM" != win32 ]; then
|
||||
|
||||
if test -n "$NGX_LD_OPT"; then
|
||||
ngx_feature=--with-ld-opt=\"$NGX_LD_OPT\"
|
||||
ngx_feature_name=
|
||||
ngx_feature_run=no
|
||||
ngx_feature_incs=
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs=
|
||||
ngx_feature_test=
|
||||
. auto/feature
|
||||
|
||||
if [ $ngx_found = no ]; then
|
||||
echo $0: error: the invalid value in --with-ld-opt=\"$NGX_LD_OPT\"
|
||||
echo
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
ngx_feature="-Wl,-E switch"
|
||||
ngx_feature_name=
|
||||
ngx_feature_run=no
|
||||
ngx_feature_incs=
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs=-Wl,-E
|
||||
ngx_feature_test=
|
||||
. auto/feature
|
||||
|
||||
if [ $ngx_found = yes ]; then
|
||||
MAIN_LINK="-Wl,-E"
|
||||
fi
|
||||
|
||||
|
||||
if [ "$NGX_CC_NAME" = "sunc" ]; then
|
||||
echo "checking for gcc builtin atomic operations ... disabled"
|
||||
else
|
||||
ngx_feature="gcc builtin atomic operations"
|
||||
ngx_feature_name=NGX_HAVE_GCC_ATOMIC
|
||||
ngx_feature_run=yes
|
||||
ngx_feature_incs=
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs=
|
||||
ngx_feature_test="long n = 0;
|
||||
if (!__sync_bool_compare_and_swap(&n, 0, 1))
|
||||
return 1;
|
||||
if (__sync_fetch_and_add(&n, 1) != 1)
|
||||
return 1;
|
||||
if (n != 2)
|
||||
return 1;
|
||||
__sync_synchronize();"
|
||||
. auto/feature
|
||||
fi
|
||||
|
||||
|
||||
if [ "$NGX_CC_NAME" = "ccc" ]; then
|
||||
echo "checking for C99 variadic macros ... disabled"
|
||||
else
|
||||
ngx_feature="C99 variadic macros"
|
||||
ngx_feature_name="NGX_HAVE_C99_VARIADIC_MACROS"
|
||||
ngx_feature_run=yes
|
||||
ngx_feature_incs="#include <stdio.h>
|
||||
#define var(dummy, ...) sprintf(__VA_ARGS__)"
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs=
|
||||
ngx_feature_test="char buf[30]; buf[0] = '0';
|
||||
var(0, buf, \"%d\", 1);
|
||||
if (buf[0] != '1') return 1"
|
||||
. auto/feature
|
||||
fi
|
||||
|
||||
if [ "$PLATFORM" != win32 ]; then
|
||||
|
||||
ngx_feature="gcc variadic macros"
|
||||
ngx_feature_name="NGX_HAVE_GCC_VARIADIC_MACROS"
|
||||
ngx_feature_name=HAVE_GCC_VARIADIC_MACROS
|
||||
ngx_feature_run=yes
|
||||
ngx_feature_incs="#include <stdio.h>
|
||||
#define var(dummy, args...) sprintf(args)"
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs=
|
||||
ngx_feature_test="char buf[30]; buf[0] = '0';
|
||||
var(0, buf, \"%d\", 1);
|
||||
|
|
@ -229,26 +105,15 @@ if [ "$NGX_PLATFORM" != win32 ]; then
|
|||
. auto/feature
|
||||
|
||||
|
||||
ngx_feature="gcc builtin 64 bit byteswap"
|
||||
ngx_feature_name="NGX_HAVE_GCC_BSWAP64"
|
||||
ngx_feature_run=no
|
||||
ngx_feature_incs=
|
||||
ngx_feature_path=
|
||||
ngx_feature="C99 variadic macros"
|
||||
ngx_feature_name=HAVE_C99_VARIADIC_MACROS
|
||||
ngx_feature_run=yes
|
||||
ngx_feature_incs="#include <stdio.h>
|
||||
#define var(dummy, ...) sprintf(__VA_ARGS__)"
|
||||
ngx_feature_libs=
|
||||
ngx_feature_test="if (__builtin_bswap64(0)) return 1"
|
||||
ngx_feature_test="char buf[30]; buf[0] = '0';
|
||||
var(0, buf, \"%d\", 1);
|
||||
if (buf[0] != '1') return 1"
|
||||
. auto/feature
|
||||
|
||||
|
||||
# ngx_feature="inline"
|
||||
# ngx_feature_name=
|
||||
# ngx_feature_run=no
|
||||
# ngx_feature_incs="int inline f(void) { return 1 }"
|
||||
# ngx_feature_path=
|
||||
# ngx_feature_libs=
|
||||
# ngx_feature_test=
|
||||
# . auto/feature
|
||||
#
|
||||
# if [ $ngx_found = yes ]; then
|
||||
# fi
|
||||
|
||||
fi
|
||||
|
|
|
|||
108
auto/cc/gcc
108
auto/cc/gcc
|
|
@ -1,22 +1,19 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
# gcc 2.7.2.3, 2.8.1, 2.95.4, egcs-1.1.2
|
||||
# 3.0.4, 3.1.1, 3.2.3, 3.3.2, 3.3.3, 3.3.4, 3.4.0, 3.4.2
|
||||
# 4.0.0, 4.0.1, 4.1.0
|
||||
# gcc 2.7.2.3, 2.8.1, 2.95.4,
|
||||
# 3.0.4, 3.1.1, 3.2.3, 3.3.2, 3.3.3, 3.3.4, 3.4
|
||||
|
||||
|
||||
# Solaris 7's /usr/ccs/bin/as does not support "-pipe"
|
||||
|
||||
CC_TEST_FLAGS="-pipe"
|
||||
|
||||
ngx_feature="gcc -pipe switch"
|
||||
ngx_feature="gcc -pipe switch"
|
||||
ngx_feature_name=
|
||||
ngx_feature_run=no
|
||||
ngx_feature_incs=
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs=
|
||||
ngx_feature_test=
|
||||
. auto/feature
|
||||
|
|
@ -28,88 +25,38 @@ if [ $ngx_found = yes ]; then
|
|||
fi
|
||||
|
||||
|
||||
case "$NGX_MACHINE" in
|
||||
|
||||
sun4u | sun4v | sparc | sparc64 )
|
||||
# "-mcpu=v9" enables the "casa" assembler instruction
|
||||
CFLAGS="$CFLAGS -mcpu=v9"
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
|
||||
# optimizations
|
||||
|
||||
#NGX_GCC_OPT="-O2"
|
||||
#NGX_GCC_OPT="-Os"
|
||||
NGX_GCC_OPT="-O"
|
||||
|
||||
#CFLAGS="$CFLAGS -fomit-frame-pointer"
|
||||
#CFLAGS="$CFLAGS -O2 -fomit-frame-pointer"
|
||||
|
||||
case $CPU in
|
||||
pentium)
|
||||
# optimize for Pentium and Athlon
|
||||
CPU_OPT="-march=pentium"
|
||||
NGX_CPU_CACHE_LINE=32
|
||||
;;
|
||||
|
||||
pentiumpro | pentium3)
|
||||
pentiumpro)
|
||||
# optimize for Pentium Pro, Pentium II and Pentium III
|
||||
CPU_OPT="-march=pentiumpro"
|
||||
NGX_CPU_CACHE_LINE=32
|
||||
;;
|
||||
|
||||
pentium4)
|
||||
# optimize for Pentium 4, gcc 3.x
|
||||
CPU_OPT="-march=pentium4"
|
||||
NGX_CPU_CACHE_LINE=128
|
||||
;;
|
||||
|
||||
athlon)
|
||||
# optimize for Athlon, gcc 3.x
|
||||
CPU_OPT="-march=athlon"
|
||||
NGX_CPU_CACHE_LINE=64
|
||||
;;
|
||||
|
||||
opteron)
|
||||
# optimize for Opteron, gcc 3.x
|
||||
CPU_OPT="-march=opteron"
|
||||
NGX_CPU_CACHE_LINE=64
|
||||
;;
|
||||
|
||||
sparc32)
|
||||
# build 32-bit UltraSparc binary
|
||||
CPU_OPT="-m32"
|
||||
CORE_LINK="$CORE_LINK -m32"
|
||||
NGX_CPU_CACHE_LINE=64
|
||||
;;
|
||||
|
||||
sparc64)
|
||||
# build 64-bit UltraSparc binary
|
||||
CPU_OPT="-m64"
|
||||
CORE_LINK="$CORE_LINK -m64"
|
||||
NGX_CPU_CACHE_LINE=64
|
||||
;;
|
||||
|
||||
ppc64)
|
||||
# build 64-bit PowerPC binary
|
||||
CPU_OPT="-m64"
|
||||
CPU_OPT="$CPU_OPT -falign-functions=32 -falign-labels=32"
|
||||
CPU_OPT="$CPU_OPT -falign-loops=32 -falign-jumps=32"
|
||||
CORE_LINK="$CORE_LINK -m64"
|
||||
NGX_CPU_CACHE_LINE=128
|
||||
CC_AUX_FLAGS="$CC_AUX_FLAGS -m64"
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
CC_AUX_FLAGS="$CC_AUX_FLAGS $CPU_OPT"
|
||||
|
||||
case "$NGX_CC_VER" in
|
||||
2.7*)
|
||||
# batch build
|
||||
CPU_OPT=
|
||||
;;
|
||||
esac
|
||||
# STUB for batch builds
|
||||
if [ $CC = gcc27 ]; then CPU_OPT=; fi
|
||||
|
||||
|
||||
CFLAGS="$CFLAGS $PIPE $CPU_OPT"
|
||||
|
|
@ -120,6 +67,12 @@ else
|
|||
PCRE_OPT="$PCRE_OPT $PIPE"
|
||||
fi
|
||||
|
||||
if [ ".$MD5_OPT" = "." ]; then
|
||||
MD5_OPT="-O2 -fomit-frame-pointer $PIPE $CPU_OPT"
|
||||
else
|
||||
MD5_OPT="$MD5_OPT $PIPE"
|
||||
fi
|
||||
|
||||
if [ ".$ZLIB_OPT" = "." ]; then
|
||||
ZLIB_OPT="-O2 -fomit-frame-pointer $PIPE $CPU_OPT"
|
||||
else
|
||||
|
|
@ -129,33 +82,13 @@ fi
|
|||
|
||||
# warnings
|
||||
|
||||
# -W requires at least -O
|
||||
CFLAGS="$CFLAGS ${NGX_GCC_OPT:--O} -W"
|
||||
|
||||
CFLAGS="$CFLAGS -O -W"
|
||||
CFLAGS="$CFLAGS -Wall -Wpointer-arith"
|
||||
#CFLAGS="$CFLAGS -Wconversion"
|
||||
#CFLAGS="$CFLAGS -Wconversion"
|
||||
#CFLAGS="$CFLAGS -Winline"
|
||||
#CFLAGS="$CFLAGS -Wmissing-prototypes"
|
||||
|
||||
case "$NGX_CC_VER" in
|
||||
2.*)
|
||||
# we have a lot of the unused function arguments
|
||||
CFLAGS="$CFLAGS -Wno-unused"
|
||||
;;
|
||||
|
||||
*)
|
||||
# we have a lot of the unused function arguments
|
||||
CFLAGS="$CFLAGS -Wno-unused-parameter"
|
||||
# 4.2.1 shows the warning in wrong places
|
||||
#CFLAGS="$CFLAGS -Wunreachable-code"
|
||||
|
||||
# deprecated system OpenSSL library on OS X
|
||||
if [ "$NGX_SYSTEM" = "Darwin" ]; then
|
||||
CFLAGS="$CFLAGS -Wno-deprecated-declarations"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
# we have a lot of the unused function arguments
|
||||
CFLAGS="$CFLAGS -Wno-unused"
|
||||
|
||||
# stop on warning
|
||||
CFLAGS="$CFLAGS -Werror"
|
||||
|
|
@ -169,3 +102,8 @@ CFLAGS="$CFLAGS -g"
|
|||
if [ ".$CPP" = "." ]; then
|
||||
CPP="$CC -E"
|
||||
fi
|
||||
|
||||
LINK="\$(CC)"
|
||||
|
||||
|
||||
CC_STRONG="-Wall -Werror"
|
||||
|
|
|
|||
90
auto/cc/icc
90
auto/cc/icc
|
|
@ -1,16 +1,24 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
# Intel C++ compiler 7.1, 8.0, 8.1, 9.0, 11.1
|
||||
# Intel C++ compiler 7.1, 8.0
|
||||
|
||||
# optimizations
|
||||
|
||||
CFLAGS="$CFLAGS -O"
|
||||
# inline functions declared with __inline
|
||||
#CFLAGS="$CFLAGS -Ob1"
|
||||
# inline any function, at the compiler's discretion
|
||||
CFLAGS="$CFLAGS -Ob2"
|
||||
|
||||
CORE_LINK="$CORE_LINK -opt_report_file=$NGX_OBJS/opt_report_file"
|
||||
|
||||
# single-file IP optimizations
|
||||
#IPO="-ip"
|
||||
# multi-file IP optimizations
|
||||
IPO="-ipo -ipo_obj"
|
||||
CFLAGS="$CFLAGS $IPO"
|
||||
CORE_LINK="$CORE_LINK $IPO"
|
||||
CORE_LINK="$CORE_LINK -opt_report_file=$OBJS/opt_report_file"
|
||||
|
||||
case $CPU in
|
||||
pentium)
|
||||
|
|
@ -32,78 +40,30 @@ esac
|
|||
CFLAGS="$CFLAGS $CPU_OPT"
|
||||
|
||||
if [ ".$PCRE_OPT" = "." ]; then
|
||||
PCRE_OPT="-O $CPU_OPT"
|
||||
PCRE_OPT="-O $IPO $CPU_OPT"
|
||||
fi
|
||||
|
||||
if [ ".$MD5_OPT" = "." ]; then
|
||||
MD5_OPT="-O $IPO $CPU_OPT"
|
||||
fi
|
||||
|
||||
if [ ".$ZLIB_OPT" = "." ]; then
|
||||
ZLIB_OPT="-O $CPU_OPT"
|
||||
ZLIB_OPT="-O $IPO $CPU_OPT"
|
||||
fi
|
||||
|
||||
|
||||
# warnings
|
||||
|
||||
CFLAGS="$CFLAGS -w2"
|
||||
|
||||
# disable some warnings
|
||||
|
||||
# invalid type conversion: "int" to "char *"
|
||||
CFLAGS="$CFLAGS -wd171"
|
||||
# argument is incompatible with corresponding format string conversion
|
||||
CFLAGS="$CFLAGS -wd181"
|
||||
# zero used for undefined preprocessing identifier
|
||||
CFLAGS="$CFLAGS -wd193"
|
||||
# the format string ends before this argument
|
||||
CFLAGS="$CFLAGS -wd268"
|
||||
# invalid format string conversion
|
||||
CFLAGS="$CFLAGS -wd269"
|
||||
# conversion from "long long" to "size_t" may lose significant bits
|
||||
CFLAGS="$CFLAGS -wd810"
|
||||
# parameter was never referenced
|
||||
CFLAGS="$CFLAGS -wd869"
|
||||
# attribute "unused" is only allowed in a function definition, warning on pTHX_
|
||||
CFLAGS="$CFLAGS -wd1301"
|
||||
|
||||
# STUB
|
||||
# enumerated type mixed with another type
|
||||
CFLAGS="$CFLAGS -wd188"
|
||||
# controlling expression is constant
|
||||
CFLAGS="$CFLAGS -wd279"
|
||||
# operands are evaluated in unspecified order
|
||||
CFLAGS="$CFLAGS -wd981"
|
||||
# external definition with no prior declaration
|
||||
CFLAGS="$CFLAGS -wd1418"
|
||||
# external declaration in primary source file
|
||||
CFLAGS="$CFLAGS -wd1419"
|
||||
|
||||
case "$NGX_CC_VER" in
|
||||
9.*)
|
||||
# "cc" clobber ignored, warnings for Linux's htonl()/htons()
|
||||
CFLAGS="$CFLAGS -wd1469"
|
||||
# explicit conversion of a 64-bit integral type to a smaller
|
||||
# integral type
|
||||
CFLAGS="$CFLAGS -wd1683"
|
||||
# conversion from pointer to same-sized integral type,
|
||||
# warning on offsetof()
|
||||
CFLAGS="$CFLAGS -wd1684"
|
||||
# floating-point equality and inequality comparisons are unreliable,
|
||||
# warning on SvTRUE()
|
||||
CFLAGS="$CFLAGS -wd1572"
|
||||
;;
|
||||
|
||||
8.*)
|
||||
# "cc" clobber ignored, warnings for Linux's htonl()/htons()
|
||||
CFLAGS="$CFLAGS -wd1469"
|
||||
# floating-point equality and inequality comparisons are unreliable,
|
||||
# warning on SvTRUE()
|
||||
CFLAGS="$CFLAGS -wd1572"
|
||||
;;
|
||||
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
CFLAGS="$CFLAGS -w1"
|
||||
#CFLAGS="$CFLAGS -w2"
|
||||
|
||||
# stop on warning
|
||||
CFLAGS="$CFLAGS -Werror"
|
||||
|
||||
# debug
|
||||
CFLAGS="$CFLAGS -g"
|
||||
|
||||
LINK="\$(CC)"
|
||||
|
||||
|
||||
CC_STRONG="-w1 -Werror"
|
||||
|
|
|
|||
138
auto/cc/msvc
138
auto/cc/msvc
|
|
@ -1,65 +1,23 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
# MSVC 6.0 SP2 cl 12.00
|
||||
# MSVC Toolkit 2003 (7.1) cl 13.10
|
||||
# MSVC 2005 Express Edition SP1 (8.0) cl 14.00
|
||||
# MSVC 2008 Express Edition (9.0) cl 15.00
|
||||
# MSVC 2010 (10.0) cl 16.00
|
||||
# MSVC 2015 (14.0) cl 19.00
|
||||
|
||||
|
||||
ngx_msvc_ver=`echo $NGX_CC_VER | sed -e 's/^\([0-9]*\).*/\1/'`
|
||||
|
||||
|
||||
# detect x64 builds
|
||||
|
||||
case "$NGX_CC_VER" in
|
||||
|
||||
*ARM64)
|
||||
NGX_MACHINE=arm64
|
||||
;;
|
||||
|
||||
*x64)
|
||||
NGX_MACHINE=amd64
|
||||
;;
|
||||
|
||||
*)
|
||||
NGX_MACHINE=i386
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
# MSVC 6.0 SP2
|
||||
|
||||
# optimizations
|
||||
|
||||
# maximize speed, equivalent to -Og -Oi -Ot -Oy -Ob2 -Gs -GF -Gy
|
||||
# maximize speed
|
||||
CFLAGS="$CFLAGS -O2"
|
||||
|
||||
# enable global optimization
|
||||
#CFLAGS="$CFLAGS -Og"
|
||||
CFLAGS="$CFLAGS -Og"
|
||||
# enable intrinsic functions
|
||||
#CFLAGS="$CFLAGS -Oi"
|
||||
|
||||
# disable inline expansion
|
||||
#CFLAGS="$CFLAGS -Ob0"
|
||||
# explicit inline expansion
|
||||
#CFLAGS="$CFLAGS -Ob1"
|
||||
# explicit and implicit inline expansion
|
||||
#CFLAGS="$CFLAGS -Ob2"
|
||||
|
||||
CFLAGS="$CFLAGS -Oi"
|
||||
# inline expansion
|
||||
CFLAGS="$CFLAGS -Ob1"
|
||||
# enable frame pointer omission
|
||||
#CFLAGS="$CFLAGS -Oy"
|
||||
CFLAGS="$CFLAGS -Oy"
|
||||
# disable stack checking calls
|
||||
#CFLAGS="$CFLAGS -Gs"
|
||||
|
||||
# pools strings as read/write
|
||||
#CFLAGS="$CFLAGS -Gf"
|
||||
# pools strings as read-only
|
||||
#CFLAGS="$CFLAGS -GF"
|
||||
|
||||
CFLAGS="$CFLAGS -Gs"
|
||||
|
||||
case $CPU in
|
||||
pentium)
|
||||
|
|
@ -73,95 +31,51 @@ case $CPU in
|
|||
;;
|
||||
|
||||
pentium4)
|
||||
# optimize for Pentium 4, MSVC 7
|
||||
CPU_OPT="-G7"
|
||||
# optimize for Pentium 4
|
||||
#CPU_OPT="-G7"
|
||||
;;
|
||||
esac
|
||||
|
||||
# __cdecl, default, must be used with OpenSSL, md5 asm, and sha1 asm
|
||||
#CPU_OPT="$CPU_OPT -Gd"
|
||||
# __stdcall
|
||||
#CPU_OPT="$CPU_OPT -Gz"
|
||||
# __fastcall
|
||||
#CPU_OPT="$CPU_OPT -Gr"
|
||||
|
||||
|
||||
CFLAGS="$CFLAGS $CPU_OPT"
|
||||
|
||||
|
||||
# warnings
|
||||
|
||||
#CFLAGS="$CFLAGS -W3"
|
||||
CFLAGS="$CFLAGS -W4"
|
||||
|
||||
# stop on warning
|
||||
CFLAGS="$CFLAGS -WX"
|
||||
|
||||
# disable logo
|
||||
CFLAGS="$CFLAGS -nologo"
|
||||
|
||||
# the link flags
|
||||
CORE_LINK="$CORE_LINK -link -verbose:lib"
|
||||
|
||||
# link with libcmt.lib, multithreaded
|
||||
LIBC="-MT"
|
||||
#LIBC="-MT"
|
||||
# link with msvcrt.dll
|
||||
# however, MSVC Toolkit 2003 has no MSVCRT.LIB
|
||||
#LIBC="-MD"
|
||||
LIBC="-MD"
|
||||
|
||||
CFLAGS="$CFLAGS $LIBC"
|
||||
|
||||
CORE_LIBS="$CORE_LIBS kernel32.lib user32.lib"
|
||||
# disable logo
|
||||
CFLAGS="$CFLAGS -nologo"
|
||||
|
||||
# Win32 GUI mode application
|
||||
#CORE_LINK="$CORE_LINK -subsystem:windows -entry:mainCRTStartup"
|
||||
LINK="\$(CC)"
|
||||
|
||||
# link flags
|
||||
CORE_LINK="$CORE_LINK -link -verbose:lib"
|
||||
|
||||
# debug
|
||||
# msvc under Wine issues
|
||||
# C1902: Program database manager mismatch; please check your installation
|
||||
if [ -z "$NGX_WINE" ]; then
|
||||
CFLAGS="$CFLAGS -Zi -Fd$NGX_OBJS/nginx.pdb"
|
||||
CORE_LINK="$CORE_LINK -debug"
|
||||
fi
|
||||
|
||||
|
||||
# MSVC 2005 supports C99 variadic macros
|
||||
if [ "$ngx_msvc_ver" -ge 14 ]; then
|
||||
have=NGX_HAVE_C99_VARIADIC_MACROS . auto/have
|
||||
fi
|
||||
|
||||
CFLAGS="$CFLAGS -Yd"
|
||||
CORE_LINK="$CORE_LINK -debug -debugtype:coff"
|
||||
|
||||
# precompiled headers
|
||||
CORE_DEPS="$CORE_DEPS $NGX_OBJS/ngx_config.pch"
|
||||
CORE_LINK="$CORE_LINK $NGX_OBJS/ngx_pch.obj"
|
||||
NGX_PCH="$NGX_OBJS/ngx_config.pch"
|
||||
NGX_BUILD_PCH="-Ycngx_config.h -Fp$NGX_OBJS/ngx_config.pch"
|
||||
NGX_USE_PCH="-Yungx_config.h -Fp$NGX_OBJS/ngx_config.pch"
|
||||
CORE_DEPS="$CORE_DEPS $OBJS/ngx_config.pch"
|
||||
NGX_PCH="$OBJS/ngx_config.pch"
|
||||
NGX_BUILD_PCH="-Ycngx_config.h -Fp$OBJS/ngx_config.pch"
|
||||
NGX_USE_PCH="-Yungx_config.h -Fp$OBJS/ngx_config.pch"
|
||||
|
||||
|
||||
# the resource file
|
||||
NGX_RES="$NGX_OBJS/nginx.res"
|
||||
NGX_RCC="rc -fo$NGX_RES \$(CORE_INCS) $NGX_WIN32_RC"
|
||||
CORE_LINK="$NGX_RES $CORE_LINK"
|
||||
|
||||
|
||||
# dynamic modules
|
||||
#MAIN_LINK="-link -def:$NGX_OBJS/nginx.def"
|
||||
#MODULE_LINK="-LD $NGX_OBJS/nginx.lib"
|
||||
|
||||
|
||||
ngx_pic_opt=
|
||||
ngx_objout="-Fo"
|
||||
ngx_binout="-Fe"
|
||||
ngx_objext="obj"
|
||||
ngx_binext=".exe"
|
||||
|
||||
ngx_long_start='@<<
|
||||
'
|
||||
ngx_long_end='<<'
|
||||
ngx_long_regex_cont=' \
|
||||
'
|
||||
ngx_long_cont='
|
||||
'
|
||||
|
||||
# MSVC understand / in path
|
||||
#ngx_regex_dirsep='\\'
|
||||
#ngx_dirsep="\\"
|
||||
|
|
|
|||
134
auto/cc/name
134
auto/cc/name
|
|
@ -1,103 +1,51 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
if [ "$NGX_PLATFORM" != win32 ]; then
|
||||
|
||||
ngx_feature="C compiler"
|
||||
ngx_feature_name=
|
||||
ngx_feature_run=yes
|
||||
ngx_feature_incs=
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs=
|
||||
ngx_feature_test=
|
||||
. auto/feature
|
||||
|
||||
if [ $ngx_found = no ]; then
|
||||
echo
|
||||
echo $0: error: C compiler $CC is not found
|
||||
echo
|
||||
exit 1
|
||||
fi
|
||||
|
||||
fi
|
||||
echo $ngx_n "checking for C compiler ...$ngx_c"
|
||||
|
||||
|
||||
if [ "$CC" = cl ]; then
|
||||
if [ $CC = cl ]; then
|
||||
NGX_CC_NAME=msvc
|
||||
echo " + using Microsoft Visual C++ compiler"
|
||||
|
||||
NGX_CC_VER=`$NGX_WINE $CC 2>&1 \
|
||||
| grep 'C/C++.* [0-9][0-9]*\.[0-9]' 2>&1 \
|
||||
| sed -e 's/^.* \([0-9][0-9]*\.[0-9].*\)/\1/'`
|
||||
echo " + cl version: $NGX_CC_VER"
|
||||
|
||||
have=NGX_COMPILER value="\"cl $NGX_CC_VER\"" . auto/define
|
||||
|
||||
elif [ "$CC" = wcl386 ]; then
|
||||
NGX_CC_NAME=owc
|
||||
echo " + using Open Watcom C compiler"
|
||||
|
||||
elif [ "$CC" = bcc32 ]; then
|
||||
NGX_CC_NAME=bcc
|
||||
echo " + using Borland C++ compiler"
|
||||
|
||||
elif `$CC -V 2>&1 | grep '^Intel(R) C' >/dev/null 2>&1`; then
|
||||
NGX_CC_NAME=icc
|
||||
echo " + using Intel C++ compiler"
|
||||
|
||||
NGX_CC_VER=`$CC -V 2>&1 \
|
||||
| sed -n -e 's/^.* Version \([^ ]*\) *Build.*$/\1/p'`
|
||||
echo " + icc version: $NGX_CC_VER"
|
||||
|
||||
have=NGX_COMPILER value="\"Intel C Compiler $NGX_CC_VER\"" . auto/define
|
||||
|
||||
elif `$CC -v 2>&1 | grep 'gcc version' >/dev/null 2>&1`; then
|
||||
NGX_CC_NAME=gcc
|
||||
echo " + using GNU C compiler"
|
||||
|
||||
NGX_CC_VER=`$CC -v 2>&1 | sed -n -e 's/^.*gcc version \(.*\)/\1/p'`
|
||||
echo " + gcc version: $NGX_CC_VER"
|
||||
|
||||
have=NGX_COMPILER value="\"gcc $NGX_CC_VER\"" . auto/define
|
||||
|
||||
elif `$CC -v 2>&1 | grep 'clang version' >/dev/null 2>&1`; then
|
||||
NGX_CC_NAME=clang
|
||||
echo " + using Clang C compiler"
|
||||
|
||||
NGX_CC_VER=`$CC -v 2>&1 | sed -n -e 's/^.*clang version \(.*\)/\1/p'`
|
||||
echo " + clang version: $NGX_CC_VER"
|
||||
|
||||
have=NGX_COMPILER value="\"clang $NGX_CC_VER\"" . auto/define
|
||||
|
||||
elif `$CC -v 2>&1 | grep 'LLVM version' >/dev/null 2>&1`; then
|
||||
NGX_CC_NAME=clang
|
||||
echo " + using Clang C compiler"
|
||||
|
||||
NGX_CC_VER=`$CC -v 2>&1 | sed -n -e 's/^.*LLVM version \(.*\)/\1/p'`
|
||||
echo " + clang version: $NGX_CC_VER"
|
||||
|
||||
have=NGX_COMPILER value="\"clang $NGX_CC_VER\"" . auto/define
|
||||
|
||||
elif `$CC -V 2>&1 | grep 'Sun C' >/dev/null 2>&1`; then
|
||||
NGX_CC_NAME=sunc
|
||||
echo " + using Sun C compiler"
|
||||
|
||||
NGX_CC_VER=`$CC -V 2>&1 | sed -n -e 's/^.* Sun C \(.*\)/\1/p'`
|
||||
echo " + Sun C version: $NGX_CC_VER"
|
||||
|
||||
have=NGX_COMPILER value="\"Sun C $NGX_CC_VER\"" . auto/define
|
||||
|
||||
elif `$CC -V 2>&1 | grep '^Compaq C' >/dev/null 2>&1`; then
|
||||
NGX_CC_NAME=ccc
|
||||
echo " + using Compaq C compiler"
|
||||
|
||||
elif `$CC -V 2>&1 | grep '^aCC: ' >/dev/null 2>&1`; then
|
||||
NGX_CC_NAME=acc
|
||||
echo " + using HP aC++ compiler"
|
||||
echo " using Microsoft Visual C compiler"
|
||||
|
||||
else
|
||||
NGX_CC_NAME=unknown
|
||||
if [ $CC = wcl386 ]; then
|
||||
NGX_CC_NAME=owc
|
||||
echo " using Open Watcom C compiler"
|
||||
|
||||
fi
|
||||
else
|
||||
if [ $CC = bcc32 ]; then
|
||||
NGX_CC_NAME=bcc
|
||||
echo " using Borland C++ compiler"
|
||||
|
||||
else
|
||||
if `$CC -v 2>&1 | grep '^gcc version' 2>&1 >/dev/null`; then
|
||||
NGX_CC_NAME=gcc
|
||||
echo " using GNU C compiler"
|
||||
|
||||
else
|
||||
if `$CC -V 2>&1 | grep '^Intel(R) C++ Compiler' 2>&1 >/dev/null`; then
|
||||
NGX_CC_NAME=icc
|
||||
echo " using Intel C++ compiler"
|
||||
|
||||
else
|
||||
if `$CC -V 2>&1 | grep '^Compaq C' 2>&1 >/dev/null`; then
|
||||
NGX_CC_NAME=ccc
|
||||
echo " using Compaq C compiler"
|
||||
|
||||
else
|
||||
if `$CC -V 2>&1 | grep '^aCC: ' 2>&1 >/dev/null`; then
|
||||
NGX_CC_NAME=acc
|
||||
echo " using HP aC++ compiler"
|
||||
|
||||
else
|
||||
echo " unknown"
|
||||
|
||||
fi # acc
|
||||
fi # ccc
|
||||
fi # icc
|
||||
fi # gcc
|
||||
fi # bcc
|
||||
fi # owc
|
||||
fi # msvc
|
||||
|
|
|
|||
49
auto/cc/owc
49
auto/cc/owc
|
|
@ -1,15 +1,14 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
# Open Watcom C 1.0, 1.2, 1.3
|
||||
# Open Watcom C 1.0, 1.2
|
||||
|
||||
# optimizations
|
||||
|
||||
# maximize speed
|
||||
CFLAGS="$CFLAGS -ot"
|
||||
# reorder instructions for best pipeline usage
|
||||
# reorder instructions for best pipeline usage
|
||||
CFLAGS="$CFLAGS -op"
|
||||
# inline intrinsic functions
|
||||
CFLAGS="$CFLAGS -oi"
|
||||
|
|
@ -25,7 +24,7 @@ case $CPU in
|
|||
CPU_OPT="-5r"
|
||||
# stack-based arguments passing conventions
|
||||
#CPU_OPT="-5s"
|
||||
;;
|
||||
;;
|
||||
|
||||
pentiumpro)
|
||||
# optimize for Pentium Pro, Pentium II and Pentium III
|
||||
|
|
@ -41,9 +40,8 @@ CFLAGS="$CFLAGS $CPU_OPT"
|
|||
|
||||
# warnings
|
||||
|
||||
# maximum level
|
||||
CFLAGS="$CFLAGS -wx"
|
||||
#CFLAGS="$CFLAGS -w3"
|
||||
CFLAGS="$CFLAGS -wx"
|
||||
|
||||
# stop on warning
|
||||
CFLAGS="$CFLAGS -we"
|
||||
|
|
@ -61,43 +59,24 @@ CFLAGS="$CFLAGS -d2"
|
|||
CFLAGS="$CFLAGS -zq"
|
||||
|
||||
# Open Watcom C 1.2
|
||||
have=NGX_HAVE_C99_VARIADIC_MACROS . auto/have
|
||||
#have=HAVE_C99_VARIADIC_MACROS . auto/have
|
||||
|
||||
# precompiled headers
|
||||
CORE_DEPS="$CORE_DEPS $OBJS/ngx_config.pch"
|
||||
NGX_PCH="$OBJS/ngx_config.pch"
|
||||
NGX_BUILD_PCH="-fhq=$OBJS/ngx_config.pch"
|
||||
NGX_USE_PCH="-fh=$OBJS/ngx_config.pch"
|
||||
|
||||
# the precompiled headers
|
||||
#CORE_DEPS="$CORE_DEPS $NGX_OBJS/ngx_config.pch"
|
||||
#NGX_PCH="$NGX_OBJS/ngx_config.pch"
|
||||
#NGX_BUILD_PCH="-fhq=$NGX_OBJS/ngx_config.pch"
|
||||
#NGX_USE_PCH="-fh=$NGX_OBJS/ngx_config.pch"
|
||||
|
||||
|
||||
# the link flags, built target is NT GUI mode application
|
||||
#CORE_LINK="$CORE_LINK -l=nt_win"
|
||||
|
||||
|
||||
# the resource file
|
||||
NGX_RCC="wrc \$(CORE_INCS) -fo=$NGX_OBJS/nginx.res "
|
||||
NGX_RCC="$NGX_RCC $NGX_WIN32_RC $NGX_OBJS/nginx.exe"
|
||||
LINK="\$(CC)"
|
||||
|
||||
# link flags
|
||||
CORE_LINK="$CORE_LINK -l=nt"
|
||||
|
||||
ngx_include_opt="-i="
|
||||
ngx_objout="-fo"
|
||||
ngx_binout="-fe="
|
||||
ngx_objext="obj"
|
||||
ngx_binext=".exe"
|
||||
|
||||
ngx_regex_dirsep='\\'
|
||||
ngx_dirsep="\\"
|
||||
|
||||
ngx_long_start=' '
|
||||
ngx_long_end=' '
|
||||
ngx_long_regex_cont=' \&\
|
||||
'
|
||||
ngx_long_cont=' &
|
||||
'
|
||||
|
||||
ngx_regex_cont=' \&\
|
||||
'
|
||||
ngx_cont=' &
|
||||
'
|
||||
ngx_tab=' &
|
||||
'
|
||||
|
|
|
|||
156
auto/cc/sunc
156
auto/cc/sunc
|
|
@ -1,156 +0,0 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
# Sun C 5.7 Patch 117837-04 2005/05/11 Sun Studio 10
|
||||
# Sun C 5.8 2005/10/13 Sun Studio 11
|
||||
# Sun C 5.9 SunOS_i386 2007/05/03 Sun Studio 12
|
||||
# Sun C 5.9 SunOS_sparc 2007/05/03
|
||||
# Sun C 5.10 SunOS_i386 2009/06/03 Sun Studio 12.1
|
||||
# Sun C 5.11 SunOS_i386 2010/08/13 Oracle Solaris Studio 12.2
|
||||
# Sun C 5.12 SunOS_i386 2011/11/16 Oracle Solaris Studio 12.3
|
||||
# Sun C 5.13 SunOS_i386 2014/10/20 Oracle Solaris Studio 12.4
|
||||
# Sun C 5.14 SunOS_i386 2016/05/31 Oracle Developer Studio 12.5
|
||||
|
||||
|
||||
cat << END > $NGX_AUTOTEST.c
|
||||
|
||||
int main(void) {
|
||||
printf("%d", __SUNPRO_C);
|
||||
return 0;
|
||||
}
|
||||
|
||||
END
|
||||
|
||||
eval "$CC -o $NGX_AUTOTEST $NGX_AUTOTEST.c >> $NGX_ERR 2>&1"
|
||||
|
||||
if [ -x $NGX_AUTOTEST ]; then
|
||||
ngx_sunc_ver=`$NGX_AUTOTEST`
|
||||
fi
|
||||
|
||||
rm -rf $NGX_AUTOTEST*
|
||||
|
||||
# 1424 == 0x590, Sun Studio 12
|
||||
|
||||
if [ "$ngx_sunc_ver" -ge 1424 ]; then
|
||||
ngx_sparc32="-m32"
|
||||
ngx_sparc64="-m64"
|
||||
ngx_amd64="-m64"
|
||||
|
||||
else
|
||||
ngx_sparc32="-xarch=v8plus"
|
||||
ngx_sparc64="-xarch=v9"
|
||||
ngx_amd64="-xarch=amd64"
|
||||
fi
|
||||
|
||||
case "$NGX_MACHINE" in
|
||||
|
||||
i86pc)
|
||||
NGX_AUX=" src/os/unix/ngx_sunpro_x86.il"
|
||||
;;
|
||||
|
||||
sun4u | sun4v)
|
||||
NGX_AUX=" src/os/unix/ngx_sunpro_sparc64.il"
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
MAIN_LINK=
|
||||
MODULE_LINK="-G"
|
||||
|
||||
|
||||
# optimizations
|
||||
|
||||
# 20736 == 0x5100, Sun Studio 12.1
|
||||
|
||||
if [ "$ngx_sunc_ver" -ge 20736 ]; then
|
||||
ngx_fast="-fast"
|
||||
|
||||
else
|
||||
# older versions had problems with bit-fields
|
||||
ngx_fast="-fast -xalias_level=any"
|
||||
fi
|
||||
|
||||
IPO=-xipo
|
||||
CFLAGS="$CFLAGS $ngx_fast $IPO"
|
||||
CORE_LINK="$CORE_LINK $ngx_fast $IPO"
|
||||
|
||||
|
||||
case $CPU in
|
||||
pentium)
|
||||
# optimize for Pentium and Athlon
|
||||
CPU_OPT="-xchip=pentium"
|
||||
;;
|
||||
|
||||
pentiumpro)
|
||||
# optimize for Pentium Pro, Pentium II
|
||||
CPU_OPT="-xchip=pentium_pro"
|
||||
;;
|
||||
|
||||
pentium3)
|
||||
# optimize for Pentium III
|
||||
CPU_OPT="-xchip=pentium3"
|
||||
#CPU_OPT="$CPU_OPT -xarch=sse"
|
||||
CPU_OPT="$CPU_OPT -xcache=16/32/4:256/32/4"
|
||||
;;
|
||||
|
||||
pentium4)
|
||||
# optimize for Pentium 4
|
||||
CPU_OPT="-xchip=pentium4"
|
||||
#CPU_OPT="$CPU_OPT -xarch=sse2"
|
||||
CPU_OPT="$CPU_OPT -xcache=8/64/4:256/128/8"
|
||||
;;
|
||||
|
||||
opteron)
|
||||
# optimize for Opteron
|
||||
CPU_OPT="-xchip=opteron"
|
||||
#CPU_OPT="$CPU_OPT -xarch=sse2"
|
||||
CPU_OPT="$CPU_OPT -xcache=64/64/2:1024/64/16"
|
||||
;;
|
||||
|
||||
sparc32)
|
||||
# build 32-bit UltraSparc binary
|
||||
CPU_OPT="$ngx_sparc32"
|
||||
CORE_LINK="$CORE_LINK $ngx_sparc32"
|
||||
CC_AUX_FLAGS="$CC_AUX_FLAGS $ngx_sparc32"
|
||||
NGX_CPU_CACHE_LINE=64
|
||||
;;
|
||||
|
||||
sparc64)
|
||||
# build 64-bit UltraSparc binary
|
||||
CPU_OPT="$ngx_sparc64"
|
||||
CORE_LINK="$CORE_LINK $ngx_sparc64"
|
||||
CC_AUX_FLAGS="$CC_AUX_FLAGS $ngx_sparc64"
|
||||
NGX_CPU_CACHE_LINE=64
|
||||
;;
|
||||
|
||||
amd64)
|
||||
# build 64-bit amd64 binary
|
||||
CPU_OPT="$ngx_amd64"
|
||||
CORE_LINK="$CORE_LINK $ngx_amd64"
|
||||
CC_AUX_FLAGS="$CC_AUX_FLAGS $ngx_amd64"
|
||||
NGX_AUX=" src/os/unix/ngx_sunpro_amd64.il"
|
||||
NGX_CPU_CACHE_LINE=64
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
|
||||
CFLAGS="$CFLAGS $CPU_OPT"
|
||||
|
||||
|
||||
if [ ".$PCRE_OPT" = "." ]; then
|
||||
PCRE_OPT="$ngx_fast $IPO $CPU_OPT"
|
||||
fi
|
||||
|
||||
if [ ".$ZLIB_OPT" = "." ]; then
|
||||
ZLIB_OPT="$ngx_fast $IPO $CPU_OPT"
|
||||
fi
|
||||
|
||||
|
||||
# stop on warning
|
||||
CFLAGS="$CFLAGS -errwarn=%all"
|
||||
|
||||
# debug
|
||||
CFLAGS="$CFLAGS -g"
|
||||
|
|
@ -1,121 +1,57 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
LC_ALL=C
|
||||
export LC_ALL
|
||||
|
||||
. auto/options
|
||||
. auto/init
|
||||
. auto/sources
|
||||
|
||||
test -d $NGX_OBJS || mkdir -p $NGX_OBJS
|
||||
test -d $OBJS || mkdir $OBJS
|
||||
|
||||
echo > $NGX_AUTO_HEADERS_H
|
||||
echo > $NGX_AUTOCONF_ERR
|
||||
echo > $NGX_AUTO_CONFIG_H
|
||||
|
||||
echo "#define NGX_CONFIGURE \"$NGX_CONFIGURE\"" > $NGX_AUTO_CONFIG_H
|
||||
|
||||
|
||||
if [ $NGX_DEBUG = YES ]; then
|
||||
if [ $DEBUG = YES ]; then
|
||||
have=NGX_DEBUG . auto/have
|
||||
fi
|
||||
|
||||
|
||||
if test -z "$NGX_PLATFORM"; then
|
||||
echo "checking for OS"
|
||||
|
||||
NGX_SYSTEM=`uname -s 2>/dev/null`
|
||||
NGX_RELEASE=`uname -r 2>/dev/null`
|
||||
NGX_MACHINE=`uname -m 2>/dev/null`
|
||||
|
||||
echo " + $NGX_SYSTEM $NGX_RELEASE $NGX_MACHINE"
|
||||
|
||||
NGX_PLATFORM="$NGX_SYSTEM:$NGX_RELEASE:$NGX_MACHINE";
|
||||
|
||||
case "$NGX_SYSTEM" in
|
||||
MINGW32_* | MINGW64_* | MSYS_*)
|
||||
NGX_PLATFORM=win32
|
||||
;;
|
||||
esac
|
||||
|
||||
else
|
||||
echo "building for $NGX_PLATFORM"
|
||||
NGX_SYSTEM=$NGX_PLATFORM
|
||||
NGX_MACHINE=i386
|
||||
fi
|
||||
|
||||
. auto/cc/conf
|
||||
|
||||
if [ "$NGX_PLATFORM" != win32 ]; then
|
||||
if [ "$PLATFORM" != win32 ]; then
|
||||
. auto/headers
|
||||
fi
|
||||
|
||||
. auto/cc/conf
|
||||
. auto/os/conf
|
||||
|
||||
if [ "$NGX_PLATFORM" != win32 ]; then
|
||||
. auto/unix
|
||||
if [ "$PLATFORM" != win32 ]; then
|
||||
. auto/threads
|
||||
fi
|
||||
|
||||
. auto/threads
|
||||
. auto/modules
|
||||
. auto/lib/conf
|
||||
|
||||
case ".$NGX_PREFIX" in
|
||||
.)
|
||||
NGX_PREFIX=${NGX_PREFIX:-/usr/local/nginx}
|
||||
have=NGX_PREFIX value="\"$NGX_PREFIX/\"" . auto/define
|
||||
;;
|
||||
|
||||
.!)
|
||||
NGX_PREFIX=
|
||||
;;
|
||||
|
||||
*)
|
||||
have=NGX_PREFIX value="\"$NGX_PREFIX/\"" . auto/define
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ ".$NGX_CONF_PREFIX" != "." ]; then
|
||||
have=NGX_CONF_PREFIX value="\"$NGX_CONF_PREFIX/\"" . auto/define
|
||||
fi
|
||||
|
||||
have=NGX_SBIN_PATH value="\"$NGX_SBIN_PATH\"" . auto/define
|
||||
have=NGX_CONF_PATH value="\"$NGX_CONF_PATH\"" . auto/define
|
||||
have=NGX_PID_PATH value="\"$NGX_PID_PATH\"" . auto/define
|
||||
have=NGX_LOCK_PATH value="\"$NGX_LOCK_PATH\"" . auto/define
|
||||
have=NGX_ERROR_LOG_PATH value="\"$NGX_ERROR_LOG_PATH\"" . auto/define
|
||||
|
||||
if [ ".$NGX_ERROR_LOG_PATH" = "." ]; then
|
||||
have=NGX_ERROR_LOG_STDERR . auto/have
|
||||
fi
|
||||
|
||||
have=NGX_HTTP_LOG_PATH value="\"$NGX_HTTP_LOG_PATH\"" . auto/define
|
||||
have=NGX_HTTP_CLIENT_TEMP_PATH value="\"$NGX_HTTP_CLIENT_TEMP_PATH\""
|
||||
. auto/define
|
||||
have=NGX_HTTP_PROXY_TEMP_PATH value="\"$NGX_HTTP_PROXY_TEMP_PATH\""
|
||||
. auto/define
|
||||
have=NGX_HTTP_FASTCGI_TEMP_PATH value="\"$NGX_HTTP_FASTCGI_TEMP_PATH\""
|
||||
. auto/define
|
||||
have=NGX_HTTP_UWSGI_TEMP_PATH value="\"$NGX_HTTP_UWSGI_TEMP_PATH\""
|
||||
. auto/define
|
||||
have=NGX_HTTP_SCGI_TEMP_PATH value="\"$NGX_HTTP_SCGI_TEMP_PATH\""
|
||||
. auto/define
|
||||
|
||||
. auto/make
|
||||
. auto/lib/make
|
||||
. auto/install
|
||||
|
||||
if [ "$PLATFORM" != win32 ]; then
|
||||
. auto/unix
|
||||
fi
|
||||
|
||||
# STUB
|
||||
. auto/stubs
|
||||
|
||||
have=NGX_PREFIX value="\"$PREFIX/\"" . auto/define
|
||||
have=NGX_SBIN_PATH value="\"$SBIN_PATH\"" . auto/define
|
||||
have=NGX_CONF_PATH value="\"$CONF_PATH\"" . auto/define
|
||||
have=NGX_PID_PATH value="\"$PID_PATH\"" . auto/define
|
||||
if [ ".$ERROR_LOG_PATH" != "." ]; then
|
||||
have=NGX_ERROR_LOG_PATH value="\"$ERROR_LOG_PATH\"" . auto/define
|
||||
fi
|
||||
have=NGX_HTTP_LOG_PATH value="\"$HTTP_LOG_PATH\"" . auto/define
|
||||
|
||||
have=NGX_USER value="\"$NGX_USER\"" . auto/define
|
||||
have=NGX_GROUP value="\"$NGX_GROUP\"" . auto/define
|
||||
|
||||
if [ ".$NGX_BUILD" != "." ]; then
|
||||
have=NGX_BUILD value="\"$NGX_BUILD\"" . auto/define
|
||||
fi
|
||||
|
||||
. auto/summary
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
cat << END >> $NGX_AUTO_CONFIG_H
|
||||
|
|
|
|||
|
|
@ -0,0 +1,41 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
|
||||
|
||||
echo $ngx_n "checking for system endianess ...$ngx_c"
|
||||
echo >> $NGX_ERR
|
||||
echo "checking for system endianess" >> $NGX_ERR
|
||||
|
||||
|
||||
cat << END > $NGX_AUTOTEST.c
|
||||
|
||||
int main() {
|
||||
int i = 0x11223344;
|
||||
char *p;
|
||||
|
||||
p = (char *) &i;
|
||||
if (*p == 0x44) return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
END
|
||||
|
||||
eval "${CC} -o $NGX_AUTOTEST $NGX_AUTOTEST.c >> $NGX_ERR 2>&1"
|
||||
|
||||
if [ -x $NGX_AUTOTEST ]; then
|
||||
if $NGX_AUTOTEST 2>&1 > /dev/null; then
|
||||
echo " little endianess"
|
||||
have=HAVE_LITTLE_ENDIAN . auto/have
|
||||
else
|
||||
echo " big endianess"
|
||||
fi
|
||||
|
||||
rm $NGX_AUTOTEST*
|
||||
|
||||
else
|
||||
rm $NGX_AUTOTEST*
|
||||
|
||||
echo
|
||||
echo "$0: error: can not detect system endianess"
|
||||
exit 1
|
||||
fi
|
||||
|
|
@ -1,50 +0,0 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
echo $ngx_n "checking for system byte ordering ...$ngx_c"
|
||||
|
||||
cat << END >> $NGX_AUTOCONF_ERR
|
||||
|
||||
----------------------------------------
|
||||
checking for system byte ordering
|
||||
|
||||
END
|
||||
|
||||
|
||||
cat << END > $NGX_AUTOTEST.c
|
||||
|
||||
int main(void) {
|
||||
int i = 0x11223344;
|
||||
char *p;
|
||||
|
||||
p = (char *) &i;
|
||||
if (*p == 0x44) return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
END
|
||||
|
||||
ngx_test="$CC $CC_TEST_FLAGS $CC_AUX_FLAGS \
|
||||
-o $NGX_AUTOTEST $NGX_AUTOTEST.c $NGX_LD_OPT $ngx_feature_libs"
|
||||
|
||||
eval "$ngx_test >> $NGX_AUTOCONF_ERR 2>&1"
|
||||
|
||||
if [ -x $NGX_AUTOTEST ]; then
|
||||
if $NGX_AUTOTEST >/dev/null 2>&1; then
|
||||
echo " little endian"
|
||||
have=NGX_HAVE_LITTLE_ENDIAN . auto/have
|
||||
else
|
||||
echo " big endian"
|
||||
fi
|
||||
|
||||
rm -rf $NGX_AUTOTEST*
|
||||
|
||||
else
|
||||
rm -rf $NGX_AUTOTEST*
|
||||
|
||||
echo
|
||||
echo "$0: error: cannot detect system byte ordering"
|
||||
exit 1
|
||||
fi
|
||||
102
auto/feature
102
auto/feature
|
|
@ -1,6 +1,5 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
echo $ngx_n "checking for $ngx_feature ...$ngx_c"
|
||||
|
|
@ -15,14 +14,9 @@ END
|
|||
ngx_found=no
|
||||
|
||||
if test -n "$ngx_feature_name"; then
|
||||
ngx_have_feature=`echo $ngx_feature_name \
|
||||
| tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`
|
||||
fi
|
||||
|
||||
if test -n "$ngx_feature_path"; then
|
||||
for ngx_temp in $ngx_feature_path; do
|
||||
ngx_feature_inc_path="$ngx_feature_inc_path -I $ngx_temp"
|
||||
done
|
||||
ngx_have_feature=`echo NGX_$ngx_feature_name | tr '[a-z]' '[A-Z]'`
|
||||
# STUB
|
||||
ngx_have_feature0=`echo HAVE_$ngx_feature_name | tr '[a-z]' '[A-Z]'`
|
||||
fi
|
||||
|
||||
cat << END > $NGX_AUTOTEST.c
|
||||
|
|
@ -31,7 +25,7 @@ cat << END > $NGX_AUTOTEST.c
|
|||
$NGX_INCLUDE_UNISTD_H
|
||||
$ngx_feature_incs
|
||||
|
||||
int main(void) {
|
||||
int main() {
|
||||
$ngx_feature_test;
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -39,76 +33,46 @@ int main(void) {
|
|||
END
|
||||
|
||||
|
||||
ngx_test="$CC $CC_TEST_FLAGS $CC_AUX_FLAGS $ngx_feature_inc_path \
|
||||
-o $NGX_AUTOTEST $NGX_AUTOTEST.c $NGX_TEST_LD_OPT $ngx_feature_libs"
|
||||
|
||||
ngx_feature_inc_path=
|
||||
|
||||
eval "/bin/sh -c \"$ngx_test\" >> $NGX_AUTOCONF_ERR 2>&1"
|
||||
ngx_test="$CC $CC_TEST_FLAGS $CC_WARN $CC_AUX_FLAGS \
|
||||
-o $NGX_AUTOTEST $NGX_AUTOTEST.c $NGX_LD_OPT $ngx_feature_libs"
|
||||
eval "$ngx_test >> $NGX_AUTOCONF_ERR 2>&1"
|
||||
|
||||
|
||||
if [ -x $NGX_AUTOTEST ]; then
|
||||
|
||||
case "$ngx_feature_run" in
|
||||
if [ $ngx_feature_run = yes ]; then
|
||||
|
||||
yes)
|
||||
# /bin/sh is used to intercept "Killed" or "Abort trap" messages
|
||||
if /bin/sh -c $NGX_AUTOTEST >> $NGX_AUTOCONF_ERR 2>&1; then
|
||||
echo " found"
|
||||
ngx_found=yes
|
||||
if $NGX_AUTOTEST 2>&1 > /dev/null; then
|
||||
echo " found"
|
||||
ngx_found=yes
|
||||
|
||||
if test -n "$ngx_feature_name"; then
|
||||
have=$ngx_have_feature . auto/have
|
||||
fi
|
||||
if test -n "$ngx_feature_name"; then
|
||||
have=$ngx_have_feature . auto/have
|
||||
fi
|
||||
|
||||
else
|
||||
echo " found but is not working"
|
||||
fi
|
||||
;;
|
||||
#STUB
|
||||
if test -n "$ngx_feature_name"; then
|
||||
have=$ngx_have_feature0 . auto/have
|
||||
fi
|
||||
|
||||
value)
|
||||
# /bin/sh is used to intercept "Killed" or "Abort trap" messages
|
||||
if /bin/sh -c $NGX_AUTOTEST >> $NGX_AUTOCONF_ERR 2>&1; then
|
||||
echo " found"
|
||||
ngx_found=yes
|
||||
else
|
||||
echo " found but is not working"
|
||||
fi
|
||||
|
||||
cat << END >> $NGX_AUTO_CONFIG_H
|
||||
else
|
||||
echo " found"
|
||||
ngx_found=yes
|
||||
|
||||
#ifndef $ngx_feature_name
|
||||
#define $ngx_feature_name `$NGX_AUTOTEST`
|
||||
#endif
|
||||
if test -n "$ngx_feature_name"; then
|
||||
have=$ngx_have_feature . auto/have
|
||||
fi
|
||||
|
||||
END
|
||||
else
|
||||
echo " found but is not working"
|
||||
fi
|
||||
;;
|
||||
#STUB
|
||||
if test -n "$ngx_feature_name"; then
|
||||
have=$ngx_have_feature0 . auto/have
|
||||
fi
|
||||
|
||||
bug)
|
||||
# /bin/sh is used to intercept "Killed" or "Abort trap" messages
|
||||
if /bin/sh -c $NGX_AUTOTEST >> $NGX_AUTOCONF_ERR 2>&1; then
|
||||
echo " not found"
|
||||
|
||||
else
|
||||
echo " found"
|
||||
ngx_found=yes
|
||||
|
||||
if test -n "$ngx_feature_name"; then
|
||||
have=$ngx_have_feature . auto/have
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
|
||||
*)
|
||||
echo " found"
|
||||
ngx_found=yes
|
||||
|
||||
if test -n "$ngx_feature_name"; then
|
||||
have=$ngx_have_feature . auto/have
|
||||
fi
|
||||
;;
|
||||
|
||||
esac
|
||||
fi
|
||||
|
||||
else
|
||||
echo " not found"
|
||||
|
|
@ -120,4 +84,4 @@ else
|
|||
echo "----------" >> $NGX_AUTOCONF_ERR
|
||||
fi
|
||||
|
||||
rm -rf $NGX_AUTOTEST*
|
||||
rm $NGX_AUTOTEST*
|
||||
|
|
|
|||
|
|
@ -0,0 +1,98 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
|
||||
|
||||
echo $ngx_n "checking for $ngx_type printf() format ...$ngx_c"
|
||||
|
||||
cat << END >> $NGX_AUTOCONF_ERR
|
||||
|
||||
----------------------------------------
|
||||
checking for $ngx_type printf() format
|
||||
|
||||
END
|
||||
|
||||
|
||||
ngx_format=no
|
||||
ngx_comma=
|
||||
|
||||
|
||||
for ngx_fmt in $ngx_formats
|
||||
do
|
||||
|
||||
cat << END > $NGX_AUTOTEST.c
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/resource.h>
|
||||
$NGX_INCLUDE_INTTYPES_H
|
||||
$NGX_INCLUDE_AUTO_CONFIG_H
|
||||
|
||||
int main() {
|
||||
printf("$ngx_fmt", ($ngx_type) $ngx_max_value);
|
||||
return 0;
|
||||
}
|
||||
|
||||
END
|
||||
|
||||
ngx_test="$CC $CC_TEST_FLAGS $CC_WARN $CC_AUX_FLAGS \
|
||||
-o $NGX_AUTOTEST $NGX_AUTOTEST.c"
|
||||
eval "$ngx_test >> $NGX_AUTOCONF_ERR 2>&1"
|
||||
|
||||
ngx_max_val=`echo $ngx_max_value | sed -e "s/L*\$//"`
|
||||
|
||||
if [ -x $NGX_AUTOTEST ]; then
|
||||
|
||||
if [ "`$NGX_AUTOTEST`" = $ngx_max_val ]; then
|
||||
|
||||
if [ $ngx_fmt_collect = yes ]; then
|
||||
echo $ngx_n "$ngx_comma \"${ngx_fmt}\" is appropriate$ngx_c"
|
||||
else
|
||||
echo $ngx_n "$ngx_comma \"${ngx_fmt}\" used$ngx_c"
|
||||
fi
|
||||
|
||||
ngx_format=$ngx_fmt
|
||||
fi
|
||||
fi
|
||||
|
||||
rm -f $NGX_AUTOTEST
|
||||
|
||||
if [ $ngx_format != no ]; then
|
||||
if [ $ngx_fmt_collect = yes ]; then
|
||||
eval "ngx_${ngx_size}_fmt=\"\${ngx_${ngx_size}_fmt} \$ngx_format\""
|
||||
ngx_comma=","
|
||||
continue
|
||||
else
|
||||
break
|
||||
fi
|
||||
fi
|
||||
|
||||
echo $ngx_n "$ngx_comma \"${ngx_fmt}\" is not appropriate$ngx_c"
|
||||
ngx_comma=","
|
||||
|
||||
echo "----------" >> $NGX_AUTOCONF_ERR
|
||||
cat $NGX_AUTOTEST.c >> $NGX_AUTOCONF_ERR
|
||||
echo "----------" >> $NGX_AUTOCONF_ERR
|
||||
echo $ngx_test >> $NGX_AUTOCONF_ERR
|
||||
echo "----------" >> $NGX_AUTOCONF_ERR
|
||||
done
|
||||
|
||||
echo
|
||||
|
||||
if [ $ngx_format = no ]; then
|
||||
echo "$0: error: printf() $ngx_type format not found"
|
||||
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
if [ $ngx_fmt_collect = no ]; then
|
||||
cat << END >> $NGX_AUTO_CONFIG_H
|
||||
|
||||
#ifndef $ngx_fmt_name
|
||||
#define $ngx_fmt_name "$ngx_format"
|
||||
#endif
|
||||
|
||||
END
|
||||
|
||||
fi
|
||||
|
|
@ -0,0 +1,86 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
|
||||
|
||||
echo $ngx_n "checking for $ngx_type printf() format ...$ngx_c"
|
||||
|
||||
cat << END >> $NGX_AUTOCONF_ERR
|
||||
|
||||
----------------------------------------
|
||||
checking for $ngx_type printf() format
|
||||
|
||||
END
|
||||
|
||||
|
||||
ngx_format=no
|
||||
ngx_comma=
|
||||
ngx_fmt_x=
|
||||
|
||||
for ngx_fmt in $ngx_formats
|
||||
do
|
||||
|
||||
cat << END > $NGX_AUTOTEST.c
|
||||
|
||||
int main() {
|
||||
printf("$ngx_fmt", ($ngx_type) $ngx_max_value);
|
||||
return 0;
|
||||
}
|
||||
|
||||
END
|
||||
|
||||
ngx_test="$CC $CC_TEST_FLAGS $CC_WARN $CC_AUX_FLAGS \
|
||||
-o $NGX_AUTOTEST $NGX_AUTOTEST.c"
|
||||
eval "$ngx_test >> $NGX_AUTOCONF_ERR 2>&1"
|
||||
|
||||
ngx_max_val=`echo $ngx_max_value | sed -e "s/L*\$//"`
|
||||
|
||||
if [ -x $NGX_AUTOTEST ]; then
|
||||
if [ "`$NGX_AUTOTEST`" = $ngx_max_val ]; then
|
||||
ngx_format=$ngx_fmt
|
||||
fi
|
||||
fi
|
||||
|
||||
rm $NGX_AUTOTEST
|
||||
|
||||
if [ $ngx_format != no ]; then
|
||||
break
|
||||
fi
|
||||
|
||||
ngx_fmt_x=`echo $ngx_fmt | sed -e "s/d/X/"`
|
||||
|
||||
echo $ngx_n "$ngx_comma \"${ngx_fmt_x}\" is not appropriate$ngx_c"
|
||||
ngx_comma=","
|
||||
|
||||
echo "----------" >> $NGX_AUTOCONF_ERR
|
||||
cat $NGX_AUTOTEST.c >> $NGX_AUTOCONF_ERR
|
||||
echo "----------" >> $NGX_AUTOCONF_ERR
|
||||
echo $ngx_test >> $NGX_AUTOCONF_ERR
|
||||
echo "----------" >> $NGX_AUTOCONF_ERR
|
||||
done
|
||||
|
||||
|
||||
if [ $ngx_format = no ]; then
|
||||
echo "$0: error: printf() $ngx_type format not found"
|
||||
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
if [ $ngx_ptr_size = 4 ]; then
|
||||
ngx_fmt_x="%0`expr 2 \* $ngx_ptr_size`"
|
||||
else
|
||||
ngx_fmt_x="%"
|
||||
fi
|
||||
|
||||
ngx_format=`echo $ngx_format | sed -e "s/d/X/" -e "s/^%/$ngx_fmt_x/"`
|
||||
|
||||
echo "$ngx_comma \"${ngx_format}\" used"
|
||||
|
||||
|
||||
cat << END >> $NGX_AUTO_CONFIG_H
|
||||
|
||||
#ifndef $ngx_fmt_name
|
||||
#define $ngx_fmt_name "$ngx_format"
|
||||
#endif
|
||||
|
||||
END
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
|
||||
|
||||
cat << END | sed -e 's/d"$/x"/' >> $NGX_AUTO_CONFIG_H
|
||||
|
||||
#ifndef $ngx_fmt_name
|
||||
#define $ngx_fmt_name "$ngx_fmt"
|
||||
#endif
|
||||
|
||||
END
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
|
||||
|
||||
echo $ngx_n "checking for $ngx_func ..." $ngx_c
|
||||
echo >> $NGX_ERR
|
||||
echo "checking for $ngx_func" >> $NGX_ERR
|
||||
|
||||
ngx_found=no
|
||||
|
||||
func=`echo $ngx_func | sed -e 's/()$//' | tr '[a-z]' '[A-Z]'`
|
||||
|
||||
cat << END > $NGX_AUTOTEST.c
|
||||
|
||||
#include <sys/types.h>
|
||||
$NGX_UNISTD_H
|
||||
$ngx_func_inc
|
||||
|
||||
int main() {
|
||||
$ngx_func_test;
|
||||
return 0;
|
||||
}
|
||||
|
||||
END
|
||||
|
||||
test="$CC_WARN $CC_TEST_FLAGS -o $NGX_AUTOTEST $NGX_AUTOTEST.c $ngx_func_libs"
|
||||
eval "$test >> $NGX_ERR 2>&1"
|
||||
|
||||
if [ -x $NGX_AUTOTEST ]; then
|
||||
echo " found"
|
||||
have=HAVE_$func . auto/have
|
||||
ngx_found=yes
|
||||
|
||||
else
|
||||
echo " not found"
|
||||
echo "---------" >> $NGX_ERR
|
||||
cat $NGX_AUTOTEST.c >> $NGX_ERR
|
||||
echo "---------" >> $NGX_ERR
|
||||
echo $test >> $NGX_ERR
|
||||
echo "---------" >> $NGX_ERR
|
||||
fi
|
||||
|
||||
rm $NGX_AUTOTEST*
|
||||
|
|
@ -1,6 +1,5 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
cat << END >> $NGX_AUTO_CONFIG_H
|
||||
|
|
|
|||
|
|
@ -1,12 +0,0 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
cat << END >> $NGX_AUTO_HEADERS_H
|
||||
|
||||
#ifndef $have
|
||||
#define $have 1
|
||||
#endif
|
||||
|
||||
END
|
||||
13
auto/headers
13
auto/headers
|
|
@ -1,13 +1,8 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
ngx_include="unistd.h"; . auto/include
|
||||
ngx_include="inttypes.h"; . auto/include
|
||||
ngx_include="limits.h"; . auto/include
|
||||
ngx_include="sys/filio.h"; . auto/include
|
||||
ngx_include="sys/param.h"; . auto/include
|
||||
ngx_include="sys/mount.h"; . auto/include
|
||||
ngx_include="sys/statvfs.h"; . auto/include
|
||||
ngx_include="crypt.h"; . auto/include
|
||||
ngx_include="unistd.h"; . auto/include
|
||||
ngx_include="inttypes.h"; . auto/include
|
||||
ngx_include="limits.h"; . auto/include
|
||||
ngx_include="sys/filio.h"; . auto/include
|
||||
|
|
|
|||
22
auto/include
22
auto/include
|
|
@ -1,6 +1,5 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
echo $ngx_n "checking for $ngx_include ...$ngx_c"
|
||||
|
|
@ -17,10 +16,9 @@ ngx_found=no
|
|||
|
||||
cat << END > $NGX_AUTOTEST.c
|
||||
|
||||
$NGX_INCLUDE_SYS_PARAM_H
|
||||
#include <$ngx_include>
|
||||
|
||||
int main(void) {
|
||||
int main() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -37,14 +35,24 @@ if [ -x $NGX_AUTOTEST ]; then
|
|||
|
||||
echo " found"
|
||||
|
||||
ngx_name=`echo $ngx_include \
|
||||
| tr abcdefghijklmnopqrstuvwxyz/. ABCDEFGHIJKLMNOPQRSTUVWXYZ__`
|
||||
ngx_name=`echo $ngx_include | sed -e 's/\./_/' -e 's/\//_/' \
|
||||
| tr '[a-z]' '[A-Z]'`
|
||||
|
||||
|
||||
have=NGX_HAVE_$ngx_name . auto/have_headers
|
||||
cat << END >> $NGX_AUTO_HEADERS_H
|
||||
|
||||
#ifndef NGX_HAVE_$ngx_name
|
||||
#define NGX_HAVE_$ngx_name 1
|
||||
#endif
|
||||
|
||||
END
|
||||
|
||||
|
||||
eval "NGX_INCLUDE_$ngx_name='#include <$ngx_include>'"
|
||||
|
||||
#STUB
|
||||
eval "NGX_$ngx_name='#include <$ngx_include>'"
|
||||
|
||||
else
|
||||
echo " not found"
|
||||
|
||||
|
|
@ -55,4 +63,4 @@ else
|
|||
echo "----------" >> $NGX_AUTOCONF_ERR
|
||||
fi
|
||||
|
||||
rm -rf $NGX_AUTOTEST*
|
||||
rm $NGX_AUTOTEST*
|
||||
|
|
|
|||
19
auto/init
19
auto/init
|
|
@ -1,6 +1,5 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
NGX_MAKEFILE=$NGX_OBJS/Makefile
|
||||
|
|
@ -13,8 +12,9 @@ NGX_AUTOTEST=$NGX_OBJS/autotest
|
|||
NGX_AUTOCONF_ERR=$NGX_OBJS/autoconf.err
|
||||
|
||||
# STUBs
|
||||
NGX_ERR=$NGX_OBJS/autoconf.err
|
||||
MAKEFILE=$NGX_OBJS/Makefile
|
||||
OBJS=$NGX_OBJS
|
||||
NGX_ERR=$OBJS/autoconf.err
|
||||
MAKEFILE=$OBJS/Makefile
|
||||
|
||||
|
||||
NGX_PCH=
|
||||
|
|
@ -44,10 +44,19 @@ fi
|
|||
|
||||
cat << END > Makefile
|
||||
|
||||
default: build
|
||||
build:
|
||||
\$(MAKE) -f $NGX_MAKEFILE
|
||||
|
||||
install:
|
||||
\$(MAKE) -f $NGX_MAKEFILE install
|
||||
|
||||
clean:
|
||||
rm -rf Makefile $NGX_OBJS
|
||||
|
||||
.PHONY: default clean
|
||||
upgrade:
|
||||
$SBIN_PATH -t
|
||||
kill -USR2 \`cat $PID_PATH\`
|
||||
sleep 1
|
||||
test -f $PID_PATH.newbin
|
||||
kill -WINCH \`cat $PID_PATH\`
|
||||
END
|
||||
|
|
|
|||
238
auto/install
238
auto/install
|
|
@ -1,220 +1,40 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
if [ $USE_PERL != NO ]; then
|
||||
|
||||
cat << END >> $NGX_MAKEFILE
|
||||
|
||||
install_perl_modules:
|
||||
cd $NGX_OBJS/src/http/modules/perl && \$(MAKE) install
|
||||
END
|
||||
|
||||
NGX_INSTALL_PERL_MODULES=install_perl_modules
|
||||
|
||||
fi
|
||||
|
||||
|
||||
case ".$NGX_SBIN_PATH" in
|
||||
./*)
|
||||
;;
|
||||
|
||||
*)
|
||||
NGX_SBIN_PATH=$NGX_PREFIX/$NGX_SBIN_PATH
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
case ".$NGX_MODULES_PATH" in
|
||||
./*)
|
||||
;;
|
||||
|
||||
*)
|
||||
NGX_MODULES_PATH=$NGX_PREFIX/$NGX_MODULES_PATH
|
||||
;;
|
||||
esac
|
||||
|
||||
NGX_MODULES_PATH=`dirname $NGX_MODULES_PATH/.`
|
||||
|
||||
|
||||
case ".$NGX_CONF_PATH" in
|
||||
./*)
|
||||
;;
|
||||
|
||||
*)
|
||||
NGX_CONF_PATH=$NGX_PREFIX/$NGX_CONF_PATH
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
NGX_CONF_PREFIX=`dirname $NGX_CONF_PATH`
|
||||
|
||||
|
||||
case ".$NGX_PID_PATH" in
|
||||
./*)
|
||||
;;
|
||||
|
||||
*)
|
||||
NGX_PID_PATH=$NGX_PREFIX/$NGX_PID_PATH
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
case ".$NGX_ERROR_LOG_PATH" in
|
||||
./* | .)
|
||||
;;
|
||||
|
||||
*)
|
||||
NGX_ERROR_LOG_PATH=$NGX_PREFIX/$NGX_ERROR_LOG_PATH
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
case ".$NGX_HTTP_LOG_PATH" in
|
||||
./*)
|
||||
;;
|
||||
|
||||
*)
|
||||
NGX_HTTP_LOG_PATH=$NGX_PREFIX/$NGX_HTTP_LOG_PATH
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
if test -f man/nginx.8 ; then
|
||||
NGX_MAN=man/nginx.8
|
||||
else
|
||||
NGX_MAN=docs/man/nginx.8
|
||||
fi
|
||||
|
||||
if test -d html ; then
|
||||
NGX_HTML=html
|
||||
else
|
||||
NGX_HTML=docs/html
|
||||
fi
|
||||
|
||||
cat << END >> $NGX_MAKEFILE
|
||||
|
||||
manpage: $NGX_OBJS/nginx.8
|
||||
|
||||
$NGX_OBJS/nginx.8: $NGX_MAN $NGX_AUTO_CONFIG_H
|
||||
sed -e "s|%%PREFIX%%|$NGX_PREFIX|" \\
|
||||
-e "s|%%PID_PATH%%|$NGX_PID_PATH|" \\
|
||||
-e "s|%%CONF_PATH%%|$NGX_CONF_PATH|" \\
|
||||
-e "s|%%ERROR_LOG_PATH%%|${NGX_ERROR_LOG_PATH:-stderr}|" \\
|
||||
< $NGX_MAN > \$@
|
||||
|
||||
install: build $NGX_INSTALL_PERL_MODULES
|
||||
test -d '\$(DESTDIR)$NGX_PREFIX' || mkdir -p '\$(DESTDIR)$NGX_PREFIX'
|
||||
|
||||
test -d '\$(DESTDIR)`dirname "$NGX_SBIN_PATH"`' \\
|
||||
|| mkdir -p '\$(DESTDIR)`dirname "$NGX_SBIN_PATH"`'
|
||||
test ! -f '\$(DESTDIR)$NGX_SBIN_PATH' \\
|
||||
|| mv '\$(DESTDIR)$NGX_SBIN_PATH' \\
|
||||
'\$(DESTDIR)$NGX_SBIN_PATH.old'
|
||||
cp $NGX_OBJS/nginx$ngx_binext '\$(DESTDIR)$NGX_SBIN_PATH'
|
||||
|
||||
test -d '\$(DESTDIR)$NGX_CONF_PREFIX' \\
|
||||
|| mkdir -p '\$(DESTDIR)$NGX_CONF_PREFIX'
|
||||
|
||||
cp conf/koi-win '\$(DESTDIR)$NGX_CONF_PREFIX'
|
||||
cp conf/koi-utf '\$(DESTDIR)$NGX_CONF_PREFIX'
|
||||
cp conf/win-utf '\$(DESTDIR)$NGX_CONF_PREFIX'
|
||||
|
||||
test -f '\$(DESTDIR)$NGX_CONF_PREFIX/mime.types' \\
|
||||
|| cp conf/mime.types '\$(DESTDIR)$NGX_CONF_PREFIX'
|
||||
cp conf/mime.types '\$(DESTDIR)$NGX_CONF_PREFIX/mime.types.default'
|
||||
|
||||
test -f '\$(DESTDIR)$NGX_CONF_PREFIX/fastcgi_params' \\
|
||||
|| cp conf/fastcgi_params '\$(DESTDIR)$NGX_CONF_PREFIX'
|
||||
cp conf/fastcgi_params \\
|
||||
'\$(DESTDIR)$NGX_CONF_PREFIX/fastcgi_params.default'
|
||||
|
||||
test -f '\$(DESTDIR)$NGX_CONF_PREFIX/fastcgi.conf' \\
|
||||
|| cp conf/fastcgi.conf '\$(DESTDIR)$NGX_CONF_PREFIX'
|
||||
cp conf/fastcgi.conf '\$(DESTDIR)$NGX_CONF_PREFIX/fastcgi.conf.default'
|
||||
|
||||
test -f '\$(DESTDIR)$NGX_CONF_PREFIX/uwsgi_params' \\
|
||||
|| cp conf/uwsgi_params '\$(DESTDIR)$NGX_CONF_PREFIX'
|
||||
cp conf/uwsgi_params \\
|
||||
'\$(DESTDIR)$NGX_CONF_PREFIX/uwsgi_params.default'
|
||||
|
||||
test -f '\$(DESTDIR)$NGX_CONF_PREFIX/scgi_params' \\
|
||||
|| cp conf/scgi_params '\$(DESTDIR)$NGX_CONF_PREFIX'
|
||||
cp conf/scgi_params \\
|
||||
'\$(DESTDIR)$NGX_CONF_PREFIX/scgi_params.default'
|
||||
|
||||
test -f '\$(DESTDIR)$NGX_CONF_PATH' \\
|
||||
|| cp conf/nginx.conf '\$(DESTDIR)$NGX_CONF_PATH'
|
||||
cp conf/nginx.conf '\$(DESTDIR)$NGX_CONF_PREFIX/nginx.conf.default'
|
||||
|
||||
test -d '\$(DESTDIR)`dirname "$NGX_PID_PATH"`' \\
|
||||
|| mkdir -p '\$(DESTDIR)`dirname "$NGX_PID_PATH"`'
|
||||
|
||||
test -d '\$(DESTDIR)`dirname "$NGX_HTTP_LOG_PATH"`' \\
|
||||
|| mkdir -p '\$(DESTDIR)`dirname "$NGX_HTTP_LOG_PATH"`'
|
||||
|
||||
test -d '\$(DESTDIR)$NGX_PREFIX/html' \\
|
||||
|| cp -R $NGX_HTML '\$(DESTDIR)$NGX_PREFIX'
|
||||
END
|
||||
|
||||
|
||||
if test -n "$NGX_ERROR_LOG_PATH"; then
|
||||
cat << END >> $NGX_MAKEFILE
|
||||
|
||||
test -d '\$(DESTDIR)`dirname "$NGX_ERROR_LOG_PATH"`' \\
|
||||
|| mkdir -p '\$(DESTDIR)`dirname "$NGX_ERROR_LOG_PATH"`'
|
||||
END
|
||||
|
||||
fi
|
||||
|
||||
|
||||
if test -n "$DYNAMIC_MODULES"; then
|
||||
cat << END >> $NGX_MAKEFILE
|
||||
|
||||
test -d '\$(DESTDIR)$NGX_MODULES_PATH' \\
|
||||
|| mkdir -p '\$(DESTDIR)$NGX_MODULES_PATH'
|
||||
END
|
||||
|
||||
fi
|
||||
|
||||
|
||||
for ngx_module in $DYNAMIC_MODULES
|
||||
do
|
||||
ngx_module=$ngx_module$ngx_modext
|
||||
|
||||
cat << END >> $NGX_MAKEFILE
|
||||
|
||||
test ! -f '\$(DESTDIR)$NGX_MODULES_PATH/$ngx_module' \\
|
||||
|| mv '\$(DESTDIR)$NGX_MODULES_PATH/$ngx_module' \\
|
||||
'\$(DESTDIR)$NGX_MODULES_PATH/$ngx_module.old'
|
||||
cp $NGX_OBJS/$ngx_module '\$(DESTDIR)$NGX_MODULES_PATH/$ngx_module'
|
||||
END
|
||||
|
||||
done
|
||||
|
||||
|
||||
# create Makefile
|
||||
|
||||
cat << END >> Makefile
|
||||
|
||||
build:
|
||||
\$(MAKE) -f $NGX_MAKEFILE
|
||||
|
||||
cat << END >> $MAKEFILE
|
||||
install:
|
||||
\$(MAKE) -f $NGX_MAKEFILE install
|
||||
test -d $PREFIX || mkdir -p $PREFIX
|
||||
|
||||
modules:
|
||||
\$(MAKE) -f $NGX_MAKEFILE modules
|
||||
test -d `dirname $SBIN_PATH` || mkdir -p `dirname $SBIN_PATH`
|
||||
test ! -f $SBIN_PATH || mv $SBIN_PATH $SBIN_PATH.old
|
||||
cp $OBJS/nginx $SBIN_PATH
|
||||
|
||||
upgrade:
|
||||
$NGX_SBIN_PATH -t
|
||||
test -d `dirname $CONF_PATH` || mkdir -p `dirname $CONF_PATH`
|
||||
|
||||
kill -USR2 \`cat $NGX_PID_PATH\`
|
||||
sleep 1
|
||||
test -f $NGX_PID_PATH.oldbin
|
||||
cp conf/koi-win `dirname $CONF_PATH`
|
||||
|
||||
kill -QUIT \`cat $NGX_PID_PATH.oldbin\`
|
||||
test -f `dirname $CONF_PATH`/mime.types || \
|
||||
cp conf/mime.types `dirname $CONF_PATH`/mime.types
|
||||
cp conf/mime.types `dirname $CONF_PATH`/mime.types.default
|
||||
|
||||
.PHONY: build install modules upgrade
|
||||
test -f $CONF_PATH || cp conf/nginx.conf $CONF_PATH
|
||||
cp conf/nginx.conf `dirname $CONF_PATH`/nginx.conf.default
|
||||
|
||||
test -d `dirname $PID_PATH` || mkdir -p `dirname $PID_PATH`
|
||||
|
||||
test -d `dirname $HTTP_LOG_PATH` || mkdir -p `dirname $HTTP_LOG_PATH`
|
||||
|
||||
test -d $PREFIX/html || cp -r html $PREFIX
|
||||
|
||||
#test -d $PREFIX/temp || mkdir -p $PREFIX/temp
|
||||
END
|
||||
|
||||
|
||||
if [ ".$ERROR_LOG_PATH" != "." ]; then
|
||||
cat << END >> $MAKEFILE
|
||||
|
||||
test -d `dirname $ERROR_LOG_PATH` || mkdir -p `dirname $ERROR_LOG_PATH`
|
||||
END
|
||||
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -1,25 +1,14 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
if [ $USE_PCRE = YES -o $PCRE != NONE ]; then
|
||||
if [ $USE_PCRE = YES ]; then
|
||||
. auto/lib/pcre/conf
|
||||
|
||||
else
|
||||
if [ $USE_PCRE = DISABLED -a $HTTP = YES -a $HTTP_REWRITE = YES ]; then
|
||||
|
||||
cat << END
|
||||
|
||||
$0: error: the HTTP rewrite module requires the PCRE library.
|
||||
You can either disable the module by using --without-http_rewrite_module
|
||||
option or you have to enable the PCRE support.
|
||||
|
||||
END
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $USE_MD5 = YES ]; then
|
||||
. auto/lib/md5/conf
|
||||
fi
|
||||
|
||||
if [ $USE_OPENSSL = YES ]; then
|
||||
. auto/lib/openssl/conf
|
||||
|
|
@ -28,27 +17,3 @@ fi
|
|||
if [ $USE_ZLIB = YES ]; then
|
||||
. auto/lib/zlib/conf
|
||||
fi
|
||||
|
||||
if [ $USE_LIBXSLT != NO ]; then
|
||||
. auto/lib/libxslt/conf
|
||||
fi
|
||||
|
||||
if [ $USE_LIBGD != NO ]; then
|
||||
. auto/lib/libgd/conf
|
||||
fi
|
||||
|
||||
if [ $USE_PERL != NO ]; then
|
||||
. auto/lib/perl/conf
|
||||
fi
|
||||
|
||||
if [ $USE_GEOIP != NO ]; then
|
||||
. auto/lib/geoip/conf
|
||||
fi
|
||||
|
||||
if [ $NGX_GOOGLE_PERFTOOLS = YES ]; then
|
||||
. auto/lib/google-perftools/conf
|
||||
fi
|
||||
|
||||
if [ $NGX_LIBATOMIC != NO ]; then
|
||||
. auto/lib/libatomic/conf
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -1,114 +0,0 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
ngx_feature="GeoIP library"
|
||||
ngx_feature_name=
|
||||
ngx_feature_run=no
|
||||
ngx_feature_incs="#include <GeoIP.h>"
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs="-lGeoIP"
|
||||
ngx_feature_test="GeoIP_open(NULL, 0)"
|
||||
. auto/feature
|
||||
|
||||
|
||||
if [ $ngx_found = no ]; then
|
||||
|
||||
# FreeBSD port
|
||||
|
||||
ngx_feature="GeoIP library in /usr/local/"
|
||||
ngx_feature_path="/usr/local/include"
|
||||
|
||||
if [ $NGX_RPATH = YES ]; then
|
||||
ngx_feature_libs="-R/usr/local/lib -L/usr/local/lib -lGeoIP"
|
||||
else
|
||||
ngx_feature_libs="-L/usr/local/lib -lGeoIP"
|
||||
fi
|
||||
|
||||
. auto/feature
|
||||
fi
|
||||
|
||||
|
||||
if [ $ngx_found = no ]; then
|
||||
|
||||
# NetBSD port
|
||||
|
||||
ngx_feature="GeoIP library in /usr/pkg/"
|
||||
ngx_feature_path="/usr/pkg/include"
|
||||
|
||||
if [ $NGX_RPATH = YES ]; then
|
||||
ngx_feature_libs="-R/usr/pkg/lib -L/usr/pkg/lib -lGeoIP"
|
||||
else
|
||||
ngx_feature_libs="-L/usr/pkg/lib -lGeoIP"
|
||||
fi
|
||||
|
||||
. auto/feature
|
||||
fi
|
||||
|
||||
|
||||
if [ $ngx_found = no ]; then
|
||||
|
||||
# MacPorts
|
||||
|
||||
ngx_feature="GeoIP library in /opt/local/"
|
||||
ngx_feature_path="/opt/local/include"
|
||||
|
||||
if [ $NGX_RPATH = YES ]; then
|
||||
ngx_feature_libs="-R/opt/local/lib -L/opt/local/lib -lGeoIP"
|
||||
else
|
||||
ngx_feature_libs="-L/opt/local/lib -lGeoIP"
|
||||
fi
|
||||
|
||||
. auto/feature
|
||||
fi
|
||||
|
||||
|
||||
if [ $ngx_found = no ]; then
|
||||
|
||||
# Homebrew on Apple Silicon
|
||||
|
||||
ngx_feature="GeoIP library in /opt/homebrew/"
|
||||
ngx_feature_path="/opt/homebrew/include"
|
||||
|
||||
if [ $NGX_RPATH = YES ]; then
|
||||
ngx_feature_libs="-R/opt/homebrew/lib -L/opt/homebrew/lib -lGeoIP"
|
||||
else
|
||||
ngx_feature_libs="-L/opt/homebrew/lib -lGeoIP"
|
||||
fi
|
||||
|
||||
. auto/feature
|
||||
fi
|
||||
|
||||
|
||||
if [ $ngx_found = yes ]; then
|
||||
|
||||
CORE_INCS="$CORE_INCS $ngx_feature_path"
|
||||
|
||||
if [ $USE_GEOIP = YES ]; then
|
||||
CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
|
||||
fi
|
||||
|
||||
NGX_LIB_GEOIP=$ngx_feature_libs
|
||||
|
||||
ngx_feature="GeoIP IPv6 support"
|
||||
ngx_feature_name="NGX_HAVE_GEOIP_V6"
|
||||
ngx_feature_run=no
|
||||
ngx_feature_incs="#include <stdio.h>
|
||||
#include <GeoIP.h>"
|
||||
#ngx_feature_path=
|
||||
#ngx_feature_libs=
|
||||
ngx_feature_test="printf(\"%d\", GEOIP_CITY_EDITION_REV0_V6);"
|
||||
. auto/feature
|
||||
|
||||
else
|
||||
|
||||
cat << END
|
||||
|
||||
$0: error: the GeoIP module requires the GeoIP library.
|
||||
You can either do not enable the module or install the library.
|
||||
|
||||
END
|
||||
|
||||
exit 1
|
||||
fi
|
||||
|
|
@ -1,78 +0,0 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
ngx_feature="Google perftools"
|
||||
ngx_feature_name=
|
||||
ngx_feature_run=no
|
||||
ngx_feature_incs=
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs="-lprofiler"
|
||||
ngx_feature_test="void ProfilerStop(void);
|
||||
ProfilerStop()"
|
||||
. auto/feature
|
||||
|
||||
|
||||
if [ $ngx_found = no ]; then
|
||||
|
||||
# FreeBSD port
|
||||
|
||||
ngx_feature="Google perftools in /usr/local/"
|
||||
|
||||
if [ $NGX_RPATH = YES ]; then
|
||||
ngx_feature_libs="-R/usr/local/lib -L/usr/local/lib -lprofiler"
|
||||
else
|
||||
ngx_feature_libs="-L/usr/local/lib -lprofiler"
|
||||
fi
|
||||
|
||||
. auto/feature
|
||||
fi
|
||||
|
||||
|
||||
if [ $ngx_found = no ]; then
|
||||
|
||||
# MacPorts
|
||||
|
||||
ngx_feature="Google perftools in /opt/local/"
|
||||
|
||||
if [ $NGX_RPATH = YES ]; then
|
||||
ngx_feature_libs="-R/opt/local/lib -L/opt/local/lib -lprofiler"
|
||||
else
|
||||
ngx_feature_libs="-L/opt/local/lib -lprofiler"
|
||||
fi
|
||||
|
||||
. auto/feature
|
||||
fi
|
||||
|
||||
|
||||
if [ $ngx_found = no ]; then
|
||||
|
||||
# Homebrew on Apple Silicon
|
||||
|
||||
ngx_feature="Google perftools in /opt/homebrew/"
|
||||
|
||||
if [ $NGX_RPATH = YES ]; then
|
||||
ngx_feature_libs="-R/opt/homebrew/lib -L/opt/homebrew/lib -lprofiler"
|
||||
else
|
||||
ngx_feature_libs="-L/opt/homebrew/lib -lprofiler"
|
||||
fi
|
||||
|
||||
. auto/feature
|
||||
fi
|
||||
|
||||
|
||||
if [ $ngx_found = yes ]; then
|
||||
CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
|
||||
|
||||
else
|
||||
|
||||
cat << END
|
||||
|
||||
$0: error: the Google perftools module requires the Google perftools
|
||||
library. You can either do not enable the module or install the library.
|
||||
|
||||
END
|
||||
|
||||
exit 1
|
||||
fi
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
if [ $NGX_LIBATOMIC != YES ]; then
|
||||
|
||||
have=NGX_HAVE_LIBATOMIC . auto/have
|
||||
CORE_INCS="$CORE_INCS $NGX_LIBATOMIC/src"
|
||||
LINK_DEPS="$LINK_DEPS $NGX_LIBATOMIC/build/lib/libatomic_ops.a"
|
||||
CORE_LIBS="$CORE_LIBS $NGX_LIBATOMIC/build/lib/libatomic_ops.a"
|
||||
|
||||
else
|
||||
|
||||
ngx_feature="atomic_ops library"
|
||||
ngx_feature_name=NGX_HAVE_LIBATOMIC
|
||||
ngx_feature_run=yes
|
||||
ngx_feature_incs="#define AO_REQUIRE_CAS
|
||||
#include <atomic_ops.h>"
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs="-latomic_ops"
|
||||
ngx_feature_test="AO_t n = 0;
|
||||
if (!AO_compare_and_swap(&n, 0, 1))
|
||||
return 1;
|
||||
if (AO_fetch_and_add(&n, 1) != 1)
|
||||
return 1;
|
||||
if (n != 2)
|
||||
return 1;
|
||||
AO_nop();"
|
||||
. auto/feature
|
||||
|
||||
if [ $ngx_found = yes ]; then
|
||||
CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
|
||||
else
|
||||
|
||||
cat << END
|
||||
|
||||
$0: error: libatomic_ops library was not found.
|
||||
|
||||
END
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
case $NGX_LIBATOMIC in
|
||||
/*) ngx_prefix="$NGX_LIBATOMIC/build" ;;
|
||||
*) ngx_prefix="$PWD/$NGX_LIBATOMIC/build" ;;
|
||||
esac
|
||||
|
||||
cat << END >> $NGX_MAKEFILE
|
||||
|
||||
$NGX_LIBATOMIC/build/lib/libatomic_ops.a: $NGX_LIBATOMIC/Makefile
|
||||
cd $NGX_LIBATOMIC && \$(MAKE) && \$(MAKE) install
|
||||
|
||||
$NGX_LIBATOMIC/Makefile: $NGX_MAKEFILE
|
||||
cd $NGX_LIBATOMIC \\
|
||||
&& if [ -f Makefile ]; then \$(MAKE) distclean; fi \\
|
||||
&& ./configure --prefix=$ngx_prefix
|
||||
|
||||
END
|
||||
|
|
@ -1,112 +0,0 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
ngx_feature="GD library"
|
||||
ngx_feature_name=
|
||||
ngx_feature_run=no
|
||||
ngx_feature_incs="#include <gd.h>"
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs="-lgd"
|
||||
ngx_feature_test="gdImagePtr img = gdImageCreateFromGifPtr(1, NULL);
|
||||
(void) img"
|
||||
. auto/feature
|
||||
|
||||
|
||||
if [ $ngx_found = no ]; then
|
||||
|
||||
# FreeBSD port
|
||||
|
||||
ngx_feature="GD library in /usr/local/"
|
||||
ngx_feature_path="/usr/local/include"
|
||||
|
||||
if [ $NGX_RPATH = YES ]; then
|
||||
ngx_feature_libs="-R/usr/local/lib -L/usr/local/lib -lgd"
|
||||
else
|
||||
ngx_feature_libs="-L/usr/local/lib -lgd"
|
||||
fi
|
||||
|
||||
. auto/feature
|
||||
fi
|
||||
|
||||
|
||||
if [ $ngx_found = no ]; then
|
||||
|
||||
# NetBSD port
|
||||
|
||||
ngx_feature="GD library in /usr/pkg/"
|
||||
ngx_feature_path="/usr/pkg/include"
|
||||
|
||||
if [ $NGX_RPATH = YES ]; then
|
||||
ngx_feature_libs="-R/usr/pkg/lib -L/usr/pkg/lib -lgd"
|
||||
else
|
||||
ngx_feature_libs="-L/usr/pkg/lib -lgd"
|
||||
fi
|
||||
|
||||
. auto/feature
|
||||
fi
|
||||
|
||||
|
||||
if [ $ngx_found = no ]; then
|
||||
|
||||
# MacPorts
|
||||
|
||||
ngx_feature="GD library in /opt/local/"
|
||||
ngx_feature_path="/opt/local/include"
|
||||
|
||||
if [ $NGX_RPATH = YES ]; then
|
||||
ngx_feature_libs="-R/opt/local/lib -L/opt/local/lib -lgd"
|
||||
else
|
||||
ngx_feature_libs="-L/opt/local/lib -lgd"
|
||||
fi
|
||||
|
||||
. auto/feature
|
||||
fi
|
||||
|
||||
|
||||
if [ $ngx_found = no ]; then
|
||||
|
||||
# Homebrew on Apple Silicon
|
||||
|
||||
ngx_feature="GD library in /opt/homebrew/"
|
||||
ngx_feature_path="/opt/homebrew/include"
|
||||
|
||||
if [ $NGX_RPATH = YES ]; then
|
||||
ngx_feature_libs="-R/opt/homebrew/lib -L/opt/homebrew/lib -lgd"
|
||||
else
|
||||
ngx_feature_libs="-L/opt/homebrew/lib -lgd"
|
||||
fi
|
||||
|
||||
. auto/feature
|
||||
fi
|
||||
|
||||
|
||||
if [ $ngx_found = yes ]; then
|
||||
|
||||
CORE_INCS="$CORE_INCS $ngx_feature_path"
|
||||
|
||||
if [ $USE_LIBGD = YES ]; then
|
||||
CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
|
||||
fi
|
||||
|
||||
NGX_LIB_LIBGD=$ngx_feature_libs
|
||||
|
||||
ngx_feature="GD WebP support"
|
||||
ngx_feature_name="NGX_HAVE_GD_WEBP"
|
||||
ngx_feature_test="gdImagePtr img = gdImageCreateFromWebpPtr(1, NULL);
|
||||
(void) img"
|
||||
. auto/feature
|
||||
|
||||
else
|
||||
|
||||
cat << END
|
||||
|
||||
$0: error: the HTTP image filter module requires the GD library.
|
||||
You can either do not enable the module or install the libraries.
|
||||
|
||||
END
|
||||
|
||||
exit 1
|
||||
|
||||
fi
|
||||
|
|
@ -1,165 +0,0 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
ngx_feature="libxslt"
|
||||
ngx_feature_name=
|
||||
ngx_feature_run=no
|
||||
ngx_feature_incs="#include <libxml/parser.h>
|
||||
#include <libxml/tree.h>
|
||||
#include <libxslt/xslt.h>
|
||||
#include <libxslt/xsltInternals.h>
|
||||
#include <libxslt/transform.h>
|
||||
#include <libxslt/xsltutils.h>"
|
||||
ngx_feature_path="/usr/include/libxml2"
|
||||
ngx_feature_libs="-lxml2 -lxslt"
|
||||
ngx_feature_test="xmlParserCtxtPtr ctxt = NULL;
|
||||
xsltStylesheetPtr sheet = NULL;
|
||||
xmlDocPtr doc = NULL;
|
||||
xmlParseChunk(ctxt, NULL, 0, 0);
|
||||
xsltApplyStylesheet(sheet, doc, NULL);"
|
||||
. auto/feature
|
||||
|
||||
|
||||
if [ $ngx_found = no ]; then
|
||||
|
||||
# FreeBSD port
|
||||
|
||||
ngx_feature="libxslt in /usr/local/"
|
||||
ngx_feature_path="/usr/local/include/libxml2 /usr/local/include"
|
||||
|
||||
if [ $NGX_RPATH = YES ]; then
|
||||
ngx_feature_libs="-R/usr/local/lib -L/usr/local/lib -lxml2 -lxslt"
|
||||
else
|
||||
ngx_feature_libs="-L/usr/local/lib -lxml2 -lxslt"
|
||||
fi
|
||||
|
||||
. auto/feature
|
||||
fi
|
||||
|
||||
|
||||
if [ $ngx_found = no ]; then
|
||||
|
||||
# NetBSD port
|
||||
|
||||
ngx_feature="libxslt in /usr/pkg/"
|
||||
ngx_feature_path="/usr/pkg/include/libxml2 /usr/pkg/include"
|
||||
|
||||
if [ $NGX_RPATH = YES ]; then
|
||||
ngx_feature_libs="-R/usr/pkg/lib -L/usr/pkg/lib -lxml2 -lxslt"
|
||||
else
|
||||
ngx_feature_libs="-L/usr/pkg/lib -lxml2 -lxslt"
|
||||
fi
|
||||
|
||||
. auto/feature
|
||||
fi
|
||||
|
||||
|
||||
if [ $ngx_found = no ]; then
|
||||
|
||||
# MacPorts
|
||||
|
||||
ngx_feature="libxslt in /opt/local/"
|
||||
ngx_feature_path="/opt/local/include/libxml2 /opt/local/include"
|
||||
|
||||
if [ $NGX_RPATH = YES ]; then
|
||||
ngx_feature_libs="-R/opt/local/lib -L/opt/local/lib -lxml2 -lxslt"
|
||||
else
|
||||
ngx_feature_libs="-L/opt/local/lib -lxml2 -lxslt"
|
||||
fi
|
||||
|
||||
. auto/feature
|
||||
fi
|
||||
|
||||
|
||||
if [ $ngx_found = yes ]; then
|
||||
|
||||
CORE_INCS="$CORE_INCS $ngx_feature_path"
|
||||
|
||||
if [ $USE_LIBXSLT = YES ]; then
|
||||
CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
|
||||
fi
|
||||
|
||||
NGX_LIB_LIBXSLT=$ngx_feature_libs
|
||||
|
||||
else
|
||||
|
||||
cat << END
|
||||
|
||||
$0: error: the HTTP XSLT module requires the libxml2/libxslt
|
||||
libraries. You can either do not enable the module or install the libraries.
|
||||
|
||||
END
|
||||
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
ngx_feature="libexslt"
|
||||
ngx_feature_name=NGX_HAVE_EXSLT
|
||||
ngx_feature_run=no
|
||||
ngx_feature_incs="#include <libexslt/exslt.h>"
|
||||
ngx_feature_path="/usr/include/libxml2"
|
||||
ngx_feature_libs="-lexslt"
|
||||
ngx_feature_test="exsltRegisterAll();"
|
||||
. auto/feature
|
||||
|
||||
if [ $ngx_found = no ]; then
|
||||
|
||||
# FreeBSD port
|
||||
|
||||
ngx_feature="libexslt in /usr/local/"
|
||||
ngx_feature_path="/usr/local/include/libxml2 /usr/local/include"
|
||||
|
||||
if [ $NGX_RPATH = YES ]; then
|
||||
ngx_feature_libs="-R/usr/local/lib -L/usr/local/lib -lexslt"
|
||||
else
|
||||
ngx_feature_libs="-L/usr/local/lib -lexslt"
|
||||
fi
|
||||
|
||||
. auto/feature
|
||||
fi
|
||||
|
||||
|
||||
if [ $ngx_found = no ]; then
|
||||
|
||||
# NetBSD port
|
||||
|
||||
ngx_feature="libexslt in /usr/pkg/"
|
||||
ngx_feature_path="/usr/pkg/include/libxml2 /usr/local/include"
|
||||
|
||||
if [ $NGX_RPATH = YES ]; then
|
||||
ngx_feature_libs="-R/usr/pkg/lib -L/usr/pkg/lib -lexslt"
|
||||
else
|
||||
ngx_feature_libs="-L/usr/pkg/lib -lexslt"
|
||||
fi
|
||||
|
||||
. auto/feature
|
||||
fi
|
||||
|
||||
|
||||
if [ $ngx_found = no ]; then
|
||||
|
||||
# MacPorts
|
||||
|
||||
ngx_feature="libexslt in /opt/local/"
|
||||
ngx_feature_path="/opt/local/include/libxml2 /opt/local/include"
|
||||
|
||||
if [ $NGX_RPATH = YES ]; then
|
||||
ngx_feature_libs="-R/opt/local/lib -L/opt/local/lib -lexslt"
|
||||
else
|
||||
ngx_feature_libs="-L/opt/local/lib -lexslt"
|
||||
fi
|
||||
|
||||
. auto/feature
|
||||
fi
|
||||
|
||||
|
||||
if [ $ngx_found = yes ]; then
|
||||
if [ $USE_LIBXSLT = YES ]; then
|
||||
CORE_LIBS="$CORE_LIBS -lexslt"
|
||||
fi
|
||||
|
||||
NGX_LIB_LIBXSLT="$NGX_LIB_LIBXSLT -lexslt"
|
||||
fi
|
||||
|
|
@ -1,12 +1,15 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
if [ $PCRE != NONE -a $PCRE != NO -a $PCRE != YES ]; then
|
||||
. auto/lib/pcre/make
|
||||
fi
|
||||
|
||||
if [ $MD5 != NONE -a $MD5 != NO -a $MD5 != YES ]; then
|
||||
. auto/lib/md5/make
|
||||
fi
|
||||
|
||||
if [ $OPENSSL != NONE -a $OPENSSL != NO -a $OPENSSL != YES ]; then
|
||||
. auto/lib/openssl/make
|
||||
fi
|
||||
|
|
@ -14,11 +17,3 @@ fi
|
|||
if [ $ZLIB != NONE -a $ZLIB != NO -a $ZLIB != YES ]; then
|
||||
. auto/lib/zlib/make
|
||||
fi
|
||||
|
||||
if [ $NGX_LIBATOMIC != NO -a $NGX_LIBATOMIC != YES ]; then
|
||||
. auto/lib/libatomic/make
|
||||
fi
|
||||
|
||||
if [ $USE_PERL != NO ]; then
|
||||
. auto/lib/perl/make
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -0,0 +1,108 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
|
||||
|
||||
if [ $MD5 != NONE ]; then
|
||||
|
||||
if grep MD5_Init $MD5/md5.h >/dev/null; then
|
||||
# OpenSSL md5
|
||||
OPENSSL_MD5=YES
|
||||
have=HAVE_OPENSSL_MD5 . auto/have
|
||||
else
|
||||
# rsaref md5
|
||||
OPENSSL_MD5=NO
|
||||
fi
|
||||
|
||||
CORE_INCS="$CORE_INCS $MD5"
|
||||
|
||||
case "$NGX_CC_NAME" in
|
||||
|
||||
msvc | owc | bcc)
|
||||
LINK_DEPS="$LINK_DEPS $MD5/md5.lib"
|
||||
CORE_LIBS="$CORE_LIBS $MD5/md5.lib"
|
||||
;;
|
||||
|
||||
icc)
|
||||
LINK_DEPS="$LINK_DEPS $MD5/libmd5.a"
|
||||
|
||||
# to allow -ipo optimization we link with the *.o but not library
|
||||
CORE_LIBS="$CORE_LIBS $MD5/md5_dgst.o"
|
||||
|
||||
if [ $MD5_ASM = YES ]; then
|
||||
CORE_LIBS="$CORE_LIBS $MD5/asm/mx86-elf.o"
|
||||
fi
|
||||
;;
|
||||
|
||||
*)
|
||||
LINK_DEPS="$LINK_DEPS $MD5/libmd5.a"
|
||||
CORE_LIBS="$CORE_LIBS $MD5/libmd5.a"
|
||||
#CORE_LIBS="$CORE_LIBS -L $MD5 -lmd5"
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
else
|
||||
|
||||
if [ $PLATFORM != win32 ]; then
|
||||
MD5=NO
|
||||
|
||||
# Solaris 8/9
|
||||
|
||||
ngx_feature="rsaref md5 library"
|
||||
ngx_feature_name="rsaref_md5"
|
||||
ngx_feature_run=no
|
||||
ngx_feature_incs="#include <md5.h>"
|
||||
ngx_feature_libs="-lmd5"
|
||||
ngx_feature_test="MD5_CTX md5; MD5Init(&md5)"
|
||||
. auto/feature
|
||||
|
||||
if [ $ngx_found = yes ]; then
|
||||
CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
|
||||
MD5=YES
|
||||
MD5_LIB=md5
|
||||
ngx_found=no
|
||||
|
||||
else
|
||||
# FreeBSD
|
||||
|
||||
ngx_feature="rsaref md library"
|
||||
ngx_feature_name="rsaref_md5"
|
||||
ngx_feature_run=no
|
||||
ngx_feature_incs="#include <md5.h>"
|
||||
ngx_feature_libs="-lmd"
|
||||
ngx_feature_test="MD5_CTX md5; MD5Init(&md5)"
|
||||
. auto/feature
|
||||
fi
|
||||
|
||||
|
||||
if [ $ngx_found = yes ]; then
|
||||
CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
|
||||
MD5=YES
|
||||
MD5_LIB=md
|
||||
ngx_found=no
|
||||
|
||||
else
|
||||
if [ $MD5 = NO ]; then
|
||||
|
||||
# OpenSSL crypto library
|
||||
|
||||
ngx_feature="OpenSSL md5 crypto library"
|
||||
ngx_feature_name="OpenSSL_md5"
|
||||
ngx_feature_run=no
|
||||
ngx_feature_incs="#include <openssl/md5.h>"
|
||||
ngx_feature_libs="-lcrypto"
|
||||
ngx_feature_test="MD5_CTX md5; MD5_Init(&md5)"
|
||||
. auto/feature
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
if [ $ngx_found = yes ]; then
|
||||
have=HAVE_OPENSSL_MD5_H . auto/have
|
||||
CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
|
||||
MD5=YES
|
||||
MD5_LIB=crypto
|
||||
fi
|
||||
fi
|
||||
|
||||
fi
|
||||
|
|
@ -0,0 +1,98 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
|
||||
|
||||
case "$CC" in
|
||||
|
||||
cl)
|
||||
makefile=makefile.msvc
|
||||
opt="CPU_OPT=$CPU_OPT LIBC=$LIBC MD5_ASM=$MD5_ASM"
|
||||
;;
|
||||
|
||||
wcl386)
|
||||
makefile=makefile.owc
|
||||
opt="CPU_OPT=$CPU_OPT"
|
||||
;;
|
||||
|
||||
bcc32)
|
||||
makefile=makefile.bcc
|
||||
opt="-DCPU_OPT=$CPU_OPT -DMD5_ASM=$MD5_ASM"
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
|
||||
case $PLATFORM in
|
||||
|
||||
win32)
|
||||
line=`echo $MD5/md5.lib: | sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||
echo "$line" >> $MAKEFILE
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "$MD5/libmd5.a:" >> $MAKEFILE
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
|
||||
done=NO
|
||||
|
||||
|
||||
case $PLATFORM in
|
||||
|
||||
win32)
|
||||
md5=`echo $MD5 | sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||
|
||||
cp auto/lib/md5/$makefile $MD5
|
||||
echo " cd $md5" >> $MAKEFILE
|
||||
echo " \$(MAKE) -f $makefile $opt" >> $MAKEFILE
|
||||
echo " cd ..\\..\\.." >> $MAKEFILE
|
||||
|
||||
done=YES
|
||||
;;
|
||||
|
||||
SunOS:*:i86pc)
|
||||
if [ $MD5_ASM = YES ]; then
|
||||
|
||||
MD5_OPT="CFLAGS=\"$MD5_OPT -DSOL -DMD5_ASM -DL_ENDIAN\""
|
||||
|
||||
echo " cd $MD5 \\" >> $MAKEFILE
|
||||
echo " && \$(MAKE) $MD5_OPT \\" >> $MAKEFILE
|
||||
echo " MD5_ASM_OBJ=asm/mx86-sol.o \\" >> $MAKEFILE
|
||||
echo " CC=\"\$(CC)\" CPP=\"\$(CPP)\" \\" >> $MAKEFILE
|
||||
echo " libmd5.a" >> $MAKEFILE
|
||||
|
||||
done=YES
|
||||
fi
|
||||
;;
|
||||
|
||||
# FreeBSD: i386
|
||||
# Linux: i686
|
||||
|
||||
*:i386 | *:i686)
|
||||
if [ $MD5_ASM = YES ]; then
|
||||
|
||||
MD5_OPT="CFLAGS=\"$MD5_OPT -DELF -DMD5_ASM -DL_ENDIAN\""
|
||||
|
||||
echo " cd $MD5 \\" >> $MAKEFILE
|
||||
echo " && \$(MAKE) $MD5_OPT \\" >> $MAKEFILE
|
||||
echo " MD5_ASM_OBJ=asm/mx86-elf.o \\" >> $MAKEFILE
|
||||
echo " CC=\"\$(CC)\" CPP=\"\$(CPP)\" \\" >> $MAKEFILE
|
||||
echo " libmd5.a" >> $MAKEFILE
|
||||
|
||||
done=YES
|
||||
fi
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
|
||||
if [ $done = NO ]; then
|
||||
echo " cd $MD5 \\" >> $MAKEFILE
|
||||
echo " && \$(MAKE) CFLAGS=\"$MD5_OPT\" \\" >> $MAKEFILE
|
||||
echo " MD5_ASM_OBJ= CC=\"\$(CC)\" libmd5.a" >> $MAKEFILE
|
||||
fi
|
||||
|
||||
|
||||
echo >> $MAKEFILE
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
|
||||
|
||||
CFLAGS = -q -O2 -tWM $(CPU_OPT) -DL_ENDIAN
|
||||
|
||||
!if "$(MD5_ASM)" == "YES"
|
||||
|
||||
md5.lib:
|
||||
bcc32 -c $(CFLAGS) -DMD5_ASM md5_dgst.c
|
||||
tlib md5.lib +md5_dgst.obj +asm/m-win32.obj
|
||||
|
||||
!else
|
||||
|
||||
md5.lib:
|
||||
bcc32 -c $(CFLAGS) md5_dgst.c
|
||||
tlib md5.lib +md5_dgst.obj
|
||||
|
||||
!endif
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
|
||||
|
||||
CFLAGS = -nologo -MT -O2 -Ob1 -Oi -Gs $(LIBC) $(CPU_OPT) -D L_ENDIAN
|
||||
|
||||
!if "$(MD5_ASM)" == "YES"
|
||||
|
||||
md5.lib:
|
||||
cl -c $(CFLAGS) -D MD5_ASM md5_dgst.c
|
||||
link -lib -out:md5.lib md5_dgst.obj asm/m-win32.obj
|
||||
|
||||
!else
|
||||
|
||||
md5.lib:
|
||||
cl -c $(CFLAGS) md5_dgst.c
|
||||
link -lib -out:md5.lib md5_dgst.obj
|
||||
|
||||
!endif
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
|
||||
|
||||
CFLAGS = -zq -bt=nt -bm -ot -op -oi -oe -s $(CPU_OPT)
|
||||
|
||||
md5.lib:
|
||||
wcl386 -c $(CFLAGS) -dL_ENDIAN md5_dgst.c
|
||||
wlib -n md5.lib md5_dgst.obj
|
||||
|
|
@ -1,196 +1,42 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
if [ $OPENSSL != NONE ]; then
|
||||
|
||||
have=NGX_OPENSSL . auto/have
|
||||
have=NGX_SSL . auto/have
|
||||
|
||||
have=NGX_OPENSSL_NO_CONFIG . auto/have
|
||||
|
||||
if [ $USE_OPENSSL_QUIC = YES ]; then
|
||||
have=NGX_QUIC . auto/have
|
||||
fi
|
||||
CORE_INCS="$CORE_INCS $OPENSSL/include"
|
||||
CORE_DEPS="$CORE_DEPS $OPENSSL_DEPS"
|
||||
CORE_SRCS="$CORE_SRCS $OPENSSL_SRCS"
|
||||
|
||||
case "$CC" in
|
||||
|
||||
cl | bcc32)
|
||||
CFLAGS="$CFLAGS -DNO_SYS_TYPES_H"
|
||||
|
||||
CORE_INCS="$CORE_INCS $OPENSSL/openssl/include"
|
||||
CORE_DEPS="$CORE_DEPS $OPENSSL/openssl/include/openssl/ssl.h"
|
||||
|
||||
if [ -f $OPENSSL/ms/do_ms.bat ]; then
|
||||
# before OpenSSL 1.1.0
|
||||
CORE_LIBS="$CORE_LIBS $OPENSSL/openssl/lib/ssleay32.lib"
|
||||
CORE_LIBS="$CORE_LIBS $OPENSSL/openssl/lib/libeay32.lib"
|
||||
else
|
||||
# OpenSSL 1.1.0+
|
||||
CORE_LIBS="$CORE_LIBS $OPENSSL/openssl/lib/libssl.lib"
|
||||
CORE_LIBS="$CORE_LIBS $OPENSSL/openssl/lib/libcrypto.lib"
|
||||
fi
|
||||
|
||||
# libeay32.lib requires gdi32.lib
|
||||
CORE_LIBS="$CORE_LIBS gdi32.lib"
|
||||
# OpenSSL 1.0.0 requires crypt32.lib
|
||||
CORE_LIBS="$CORE_LIBS crypt32.lib"
|
||||
;;
|
||||
|
||||
*)
|
||||
CORE_INCS="$CORE_INCS $OPENSSL/.openssl/include"
|
||||
CORE_DEPS="$CORE_DEPS $OPENSSL/.openssl/include/openssl/ssl.h"
|
||||
CORE_LIBS="$CORE_LIBS $OPENSSL/.openssl/lib/libssl.a"
|
||||
CORE_LIBS="$CORE_LIBS $OPENSSL/.openssl/lib/libcrypto.a"
|
||||
CORE_LIBS="$CORE_LIBS $NGX_LIBDL"
|
||||
CORE_LIBS="$CORE_LIBS $NGX_LIBPTHREAD"
|
||||
|
||||
if [ "$NGX_PLATFORM" = win32 ]; then
|
||||
CORE_LIBS="$CORE_LIBS -lgdi32 -lcrypt32 -lws2_32"
|
||||
fi
|
||||
have=NGX_OPENSSL . auto/have
|
||||
LINK_DEPS="$LINK_DEPS $OPENSSL/libssl.a $OPENSSL/libcrypto.a"
|
||||
CORE_LIBS="$CORE_LIBS $OPENSSL/libssl.a $OPENSSL/libcrypto.a"
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
else
|
||||
|
||||
if [ "$NGX_PLATFORM" != win32 ]; then
|
||||
|
||||
if [ $PLATFORM != win32 ]; then
|
||||
OPENSSL=NO
|
||||
|
||||
ngx_feature="OpenSSL library"
|
||||
ngx_feature_name="NGX_OPENSSL"
|
||||
ngx_feature_name="OpenSSL"
|
||||
ngx_feature_run=no
|
||||
ngx_feature_incs="#include <openssl/ssl.h>"
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs="-lssl -lcrypto $NGX_LIBDL $NGX_LIBPTHREAD"
|
||||
ngx_feature_test="SSL_CTX_set_options(NULL, 0)"
|
||||
ngx_feature_libs="-lssl -lcrypto"
|
||||
ngx_feature_test="SSL_library_init()"
|
||||
. auto/feature
|
||||
|
||||
if [ $ngx_found = no ]; then
|
||||
|
||||
# FreeBSD port
|
||||
|
||||
ngx_feature="OpenSSL library in /usr/local/"
|
||||
ngx_feature_path="/usr/local/include"
|
||||
|
||||
if [ $NGX_RPATH = YES ]; then
|
||||
ngx_feature_libs="-R/usr/local/lib -L/usr/local/lib -lssl -lcrypto"
|
||||
else
|
||||
ngx_feature_libs="-L/usr/local/lib -lssl -lcrypto"
|
||||
fi
|
||||
|
||||
ngx_feature_libs="$ngx_feature_libs $NGX_LIBDL $NGX_LIBPTHREAD"
|
||||
|
||||
. auto/feature
|
||||
fi
|
||||
|
||||
if [ $ngx_found = no ]; then
|
||||
|
||||
# NetBSD port
|
||||
|
||||
ngx_feature="OpenSSL library in /usr/pkg/"
|
||||
ngx_feature_path="/usr/pkg/include"
|
||||
|
||||
if [ $NGX_RPATH = YES ]; then
|
||||
ngx_feature_libs="-R/usr/pkg/lib -L/usr/pkg/lib -lssl -lcrypto"
|
||||
else
|
||||
ngx_feature_libs="-L/usr/pkg/lib -lssl -lcrypto"
|
||||
fi
|
||||
|
||||
ngx_feature_libs="$ngx_feature_libs $NGX_LIBDL $NGX_LIBPTHREAD"
|
||||
|
||||
. auto/feature
|
||||
fi
|
||||
|
||||
if [ $ngx_found = no ]; then
|
||||
|
||||
# MacPorts
|
||||
|
||||
ngx_feature="OpenSSL library in /opt/local/"
|
||||
ngx_feature_path="/opt/local/include"
|
||||
|
||||
if [ $NGX_RPATH = YES ]; then
|
||||
ngx_feature_libs="-R/opt/local/lib -L/opt/local/lib -lssl -lcrypto"
|
||||
else
|
||||
ngx_feature_libs="-L/opt/local/lib -lssl -lcrypto"
|
||||
fi
|
||||
|
||||
ngx_feature_libs="$ngx_feature_libs $NGX_LIBDL $NGX_LIBPTHREAD"
|
||||
|
||||
. auto/feature
|
||||
fi
|
||||
|
||||
if [ $ngx_found = no ]; then
|
||||
|
||||
# Homebrew on Apple Silicon
|
||||
|
||||
ngx_feature="OpenSSL library in /opt/homebrew/"
|
||||
ngx_feature_path="/opt/homebrew/include"
|
||||
|
||||
if [ $NGX_RPATH = YES ]; then
|
||||
ngx_feature_libs="-R/opt/homebrew/lib -L/opt/homebrew/lib -lssl -lcrypto"
|
||||
else
|
||||
ngx_feature_libs="-L/opt/homebrew/lib -lssl -lcrypto"
|
||||
fi
|
||||
|
||||
ngx_feature_libs="$ngx_feature_libs $NGX_LIBDL $NGX_LIBPTHREAD"
|
||||
|
||||
. auto/feature
|
||||
fi
|
||||
|
||||
if [ $ngx_found = yes ]; then
|
||||
have=NGX_SSL . auto/have
|
||||
CORE_INCS="$CORE_INCS $ngx_feature_path"
|
||||
have=NGX_OPENSSL . auto/have
|
||||
CORE_DEPS="$CORE_DEPS $OPENSSL_DEPS"
|
||||
CORE_SRCS="$CORE_SRCS $OPENSSL_SRCS"
|
||||
CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
|
||||
OPENSSL=YES
|
||||
|
||||
if [ $USE_OPENSSL_QUIC = YES ]; then
|
||||
|
||||
ngx_feature="OpenSSL QUIC API"
|
||||
ngx_feature_name="NGX_QUIC"
|
||||
ngx_feature_test="SSL_set_quic_tls_cbs(NULL, NULL, NULL)"
|
||||
. auto/feature
|
||||
|
||||
if [ $ngx_found = no ]; then
|
||||
ngx_feature="BoringSSL-like QUIC API"
|
||||
ngx_feature_test="SSL_set_quic_method(NULL, NULL)"
|
||||
. auto/feature
|
||||
fi
|
||||
|
||||
if [ $ngx_found = no ]; then
|
||||
ngx_feature="OpenSSL QUIC compatibility"
|
||||
ngx_feature_test="SSL_CTX_add_custom_ext(NULL, 0, 0,
|
||||
NULL, NULL, NULL, NULL, NULL)"
|
||||
. auto/feature
|
||||
fi
|
||||
|
||||
if [ $ngx_found = no ]; then
|
||||
cat << END
|
||||
|
||||
$0: error: certain modules require OpenSSL QUIC support.
|
||||
You can either do not enable the modules, or install the OpenSSL library with
|
||||
QUIC support into the system, or build the OpenSSL library with QUIC support
|
||||
statically from the source with nginx by using --with-openssl=<path> option.
|
||||
|
||||
END
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $OPENSSL != YES ]; then
|
||||
|
||||
cat << END
|
||||
|
||||
$0: error: SSL modules require the OpenSSL library.
|
||||
You can either do not enable the modules, or install the OpenSSL library
|
||||
into the system, or build the OpenSSL library statically from the source
|
||||
with nginx by using --with-openssl=<path> option.
|
||||
|
||||
END
|
||||
exit 1
|
||||
fi
|
||||
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -1,79 +1,16 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
case "$CC" in
|
||||
|
||||
cl)
|
||||
|
||||
case "$NGX_MACHINE" in
|
||||
|
||||
amd64)
|
||||
OPENSSL_TARGET=VC-WIN64A
|
||||
;;
|
||||
|
||||
arm64)
|
||||
OPENSSL_TARGET=VC-WIN64-ARM
|
||||
;;
|
||||
|
||||
*)
|
||||
OPENSSL_TARGET=VC-WIN32
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
cat << END >> $NGX_MAKEFILE
|
||||
|
||||
$OPENSSL/openssl/include/openssl/ssl.h: $NGX_MAKEFILE
|
||||
\$(MAKE) -f auto/lib/openssl/makefile.msvc \
|
||||
OPENSSL="$OPENSSL" OPENSSL_OPT="$OPENSSL_OPT" \
|
||||
OPENSSL_TARGET="$OPENSSL_TARGET"
|
||||
|
||||
END
|
||||
|
||||
;;
|
||||
|
||||
bcc32)
|
||||
|
||||
ngx_opt=`echo "-DOPENSSL=\"$OPENSSL\" -DOPENSSL_OPT=\"$OPENSSL_OPT\"" \
|
||||
| sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||
|
||||
cat << END >> $NGX_MAKEFILE
|
||||
|
||||
`echo "$OPENSSL\\openssl\\lib\\libeay32.lib: \
|
||||
$OPENSSL\\openssl\\include\\openssl\\ssl.h" \
|
||||
| sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||
|
||||
`echo "$OPENSSL\\openssl\\lib\\ssleay32.lib: \
|
||||
$OPENSSL\\openssl\\include\\openssl\\ssl.h" \
|
||||
| sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||
|
||||
`echo "$OPENSSL\\openssl\\include\\openssl\\ssl.h: $NGX_MAKEFILE" \
|
||||
| sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||
\$(MAKE) -f auto/lib/openssl/makefile.bcc $ngx_opt
|
||||
|
||||
END
|
||||
|
||||
;;
|
||||
|
||||
case $PLATFORM in
|
||||
*)
|
||||
case $OPENSSL in
|
||||
/*) ngx_prefix="$OPENSSL/.openssl" ;;
|
||||
*) ngx_prefix="$PWD/$OPENSSL/.openssl" ;;
|
||||
esac
|
||||
|
||||
cat << END >> $NGX_MAKEFILE
|
||||
|
||||
$OPENSSL/.openssl/include/openssl/ssl.h: $NGX_MAKEFILE
|
||||
cd $OPENSSL \\
|
||||
&& if [ -f Makefile ]; then \$(MAKE) clean; fi \\
|
||||
&& ./config --prefix=$ngx_prefix no-shared no-threads $OPENSSL_OPT \\
|
||||
&& \$(MAKE) \\
|
||||
&& \$(MAKE) install_sw LIBDIR=lib
|
||||
|
||||
END
|
||||
|
||||
echo "$OPENSSL/libssl.a:" >> $MAKEFILE
|
||||
echo " cd $OPENSSL \\" >> $MAKEFILE
|
||||
echo " && CC=\"\$(CC)\" \\" >> $MAKEFILE
|
||||
echo " ./config threads no-shared \\" >> $MAKEFILE
|
||||
echo " && \$(MAKE)" >> $MAKEFILE
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
echo >> $MAKEFILE
|
||||
|
|
|
|||
|
|
@ -1,18 +0,0 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
all:
|
||||
cd $(OPENSSL)
|
||||
|
||||
perl Configure BC-32 no-shared --prefix=openssl $(OPENSSL_OPT)
|
||||
|
||||
ms\do_nasm
|
||||
|
||||
$(MAKE) -f ms\bcb.mak
|
||||
$(MAKE) -f ms\bcb.mak install
|
||||
|
||||
# Borland's make does not expand "[ch]" in
|
||||
# copy "inc32\openssl\*.[ch]" "openssl\include\openssl"
|
||||
copy inc32\openssl\*.h openssl\include\openssl
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
all:
|
||||
cd $(OPENSSL)
|
||||
|
||||
perl Configure $(OPENSSL_TARGET) no-shared no-threads \
|
||||
--prefix="%cd%/openssl" \
|
||||
--openssldir="%cd%/openssl/ssl" \
|
||||
$(OPENSSL_OPT)
|
||||
|
||||
if exist ms\do_ms.bat ( \
|
||||
ms\do_ms \
|
||||
&& $(MAKE) -f ms\nt.mak \
|
||||
&& $(MAKE) -f ms\nt.mak install \
|
||||
) else ( \
|
||||
$(MAKE) \
|
||||
&& $(MAKE) install_sw \
|
||||
)
|
||||
|
|
@ -1,235 +1,67 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
if [ $PCRE != NONE ]; then
|
||||
CORE_INCS="$CORE_INCS $PCRE"
|
||||
CORE_DEPS="$CORE_DEPS $REGEX_DEPS"
|
||||
CORE_SRCS="$CORE_SRCS $REGEX_SRCS"
|
||||
|
||||
if [ -f $PCRE/src/pcre2.h.generic ]; then
|
||||
case "$NGX_CC_NAME" in
|
||||
|
||||
PCRE_LIBRARY=PCRE2
|
||||
|
||||
have=NGX_PCRE . auto/have
|
||||
have=NGX_PCRE2 . auto/have
|
||||
|
||||
if [ "$NGX_PLATFORM" = win32 ]; then
|
||||
have=PCRE2_STATIC . auto/have
|
||||
fi
|
||||
|
||||
CORE_INCS="$CORE_INCS $PCRE/src/"
|
||||
CORE_DEPS="$CORE_DEPS $PCRE/src/pcre2.h"
|
||||
|
||||
case "$NGX_CC_NAME" in
|
||||
|
||||
msvc)
|
||||
LINK_DEPS="$LINK_DEPS $PCRE/src/pcre2-8.lib"
|
||||
CORE_LIBS="$CORE_LIBS $PCRE/src/pcre2-8.lib"
|
||||
;;
|
||||
|
||||
*)
|
||||
LINK_DEPS="$LINK_DEPS $PCRE/.libs/libpcre2-8.a"
|
||||
CORE_LIBS="$CORE_LIBS $PCRE/.libs/libpcre2-8.a"
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
else
|
||||
|
||||
PCRE_LIBRARY=PCRE
|
||||
|
||||
have=NGX_PCRE . auto/have
|
||||
|
||||
if [ "$NGX_PLATFORM" = win32 ]; then
|
||||
msvc | owc | bcc)
|
||||
have=NGX_PCRE . auto/have
|
||||
have=PCRE_STATIC . auto/have
|
||||
fi
|
||||
CORE_DEPS="$CORE_DEPS $PCRE/pcre.h"
|
||||
LINK_DEPS="$LINK_DEPS $PCRE/pcre.lib"
|
||||
CORE_LIBS="$CORE_LIBS $PCRE/pcre.lib"
|
||||
;;
|
||||
|
||||
CORE_INCS="$CORE_INCS $PCRE"
|
||||
CORE_DEPS="$CORE_DEPS $PCRE/pcre.h"
|
||||
icc)
|
||||
have=NGX_PCRE . auto/have
|
||||
CORE_DEPS="$CORE_DEPS $PCRE/pcre.h"
|
||||
|
||||
case "$NGX_CC_NAME" in
|
||||
LINK_DEPS="$LINK_DEPS $PCRE/.libs/libpcre.a"
|
||||
|
||||
msvc | owc | bcc)
|
||||
LINK_DEPS="$LINK_DEPS $PCRE/pcre.lib"
|
||||
CORE_LIBS="$CORE_LIBS $PCRE/pcre.lib"
|
||||
;;
|
||||
# to allow -ipo optimization we link with the *.o but not library
|
||||
CORE_LIBS="$CORE_LIBS $PCRE/maketables.o"
|
||||
CORE_LIBS="$CORE_LIBS $PCRE/get.o"
|
||||
CORE_LIBS="$CORE_LIBS $PCRE/study.o"
|
||||
CORE_LIBS="$CORE_LIBS $PCRE/pcre.o"
|
||||
;;
|
||||
|
||||
*)
|
||||
LINK_DEPS="$LINK_DEPS $PCRE/.libs/libpcre.a"
|
||||
CORE_LIBS="$CORE_LIBS $PCRE/.libs/libpcre.a"
|
||||
;;
|
||||
*)
|
||||
have=NGX_PCRE . auto/have
|
||||
CORE_DEPS="$CORE_DEPS $PCRE/pcre.h"
|
||||
LINK_DEPS="$LINK_DEPS $PCRE/.libs/libpcre.a"
|
||||
CORE_LIBS="$CORE_LIBS $PCRE/.libs/libpcre.a"
|
||||
#CORE_LIBS="$CORE_LIBS -L $PCRE/.libs -lpcre"
|
||||
;;
|
||||
|
||||
esac
|
||||
fi
|
||||
|
||||
if [ $PCRE_JIT = YES ]; then
|
||||
have=NGX_HAVE_PCRE_JIT . auto/have
|
||||
PCRE_CONF_OPT="$PCRE_CONF_OPT --enable-jit"
|
||||
fi
|
||||
esac
|
||||
|
||||
else
|
||||
|
||||
if [ "$NGX_PLATFORM" != win32 ]; then
|
||||
if [ $PLATFORM != win32 ]; then
|
||||
PCRE=NO
|
||||
fi
|
||||
|
||||
if [ $PCRE = NO -a $PCRE2 != DISABLED ]; then
|
||||
|
||||
ngx_feature="PCRE2 library"
|
||||
ngx_feature_name="NGX_PCRE2"
|
||||
ngx_feature_run=no
|
||||
ngx_feature_incs="#define PCRE2_CODE_UNIT_WIDTH 8
|
||||
#include <pcre2.h>"
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs="-lpcre2-8"
|
||||
ngx_feature_test="pcre2_code *re;
|
||||
re = pcre2_compile(NULL, 0, 0, NULL, NULL, NULL);
|
||||
if (re == NULL) return 1"
|
||||
. auto/feature
|
||||
|
||||
if [ $ngx_found = no ]; then
|
||||
|
||||
# pcre2-config
|
||||
|
||||
ngx_pcre2_prefix=`pcre2-config --prefix 2>/dev/null`
|
||||
|
||||
if [ -n "$ngx_pcre2_prefix" ]; then
|
||||
ngx_feature="PCRE2 library in $ngx_pcre2_prefix"
|
||||
ngx_feature_path=`pcre2-config --cflags \
|
||||
| sed -n -e 's/.*-I *\([^ ][^ ]*\).*/\1/p'`
|
||||
ngx_feature_libs=`pcre2-config --libs8`
|
||||
. auto/feature
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $ngx_found = yes ]; then
|
||||
have=NGX_PCRE . auto/have
|
||||
CORE_INCS="$CORE_INCS $ngx_feature_path"
|
||||
CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
|
||||
PCRE=YES
|
||||
PCRE_LIBRARY=PCRE2
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $PCRE = NO ]; then
|
||||
|
||||
# FreeBSD PCRE port requires --with-cc-opt="-I /usr/local/include"
|
||||
# --with-ld-opt="-L /usr/local/lib"
|
||||
|
||||
ngx_feature="PCRE library"
|
||||
ngx_feature_name="NGX_PCRE"
|
||||
ngx_feature_name="PCRE"
|
||||
ngx_feature_run=no
|
||||
ngx_feature_incs="#include <pcre.h>"
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs="-lpcre"
|
||||
ngx_feature_test="pcre *re;
|
||||
re = pcre_compile(NULL, 0, NULL, 0, NULL);
|
||||
if (re == NULL) return 1"
|
||||
ngx_feature_test="pcre *re; re = pcre_compile(NULL, 0, NULL, 0, NULL)"
|
||||
. auto/feature
|
||||
|
||||
if [ $ngx_found = no ]; then
|
||||
|
||||
# FreeBSD port
|
||||
|
||||
ngx_feature="PCRE library in /usr/local/"
|
||||
ngx_feature_path="/usr/local/include"
|
||||
|
||||
if [ $NGX_RPATH = YES ]; then
|
||||
ngx_feature_libs="-R/usr/local/lib -L/usr/local/lib -lpcre"
|
||||
else
|
||||
ngx_feature_libs="-L/usr/local/lib -lpcre"
|
||||
fi
|
||||
|
||||
. auto/feature
|
||||
fi
|
||||
|
||||
if [ $ngx_found = no ]; then
|
||||
|
||||
# RedHat RPM, Solaris package
|
||||
|
||||
ngx_feature="PCRE library in /usr/include/pcre/"
|
||||
ngx_feature_path="/usr/include/pcre"
|
||||
ngx_feature_libs="-lpcre"
|
||||
|
||||
. auto/feature
|
||||
fi
|
||||
|
||||
if [ $ngx_found = no ]; then
|
||||
|
||||
# NetBSD port
|
||||
|
||||
ngx_feature="PCRE library in /usr/pkg/"
|
||||
ngx_feature_path="/usr/pkg/include"
|
||||
|
||||
if [ $NGX_RPATH = YES ]; then
|
||||
ngx_feature_libs="-R/usr/pkg/lib -L/usr/pkg/lib -lpcre"
|
||||
else
|
||||
ngx_feature_libs="-L/usr/pkg/lib -lpcre"
|
||||
fi
|
||||
|
||||
. auto/feature
|
||||
fi
|
||||
|
||||
if [ $ngx_found = no ]; then
|
||||
|
||||
# MacPorts
|
||||
|
||||
ngx_feature="PCRE library in /opt/local/"
|
||||
ngx_feature_path="/opt/local/include"
|
||||
|
||||
if [ $NGX_RPATH = YES ]; then
|
||||
ngx_feature_libs="-R/opt/local/lib -L/opt/local/lib -lpcre"
|
||||
else
|
||||
ngx_feature_libs="-L/opt/local/lib -lpcre"
|
||||
fi
|
||||
|
||||
. auto/feature
|
||||
fi
|
||||
|
||||
if [ $ngx_found = no ]; then
|
||||
|
||||
# Homebrew on Apple Silicon
|
||||
|
||||
ngx_feature="PCRE library in /opt/homebrew/"
|
||||
ngx_feature_path="/opt/homebrew/include"
|
||||
|
||||
if [ $NGX_RPATH = YES ]; then
|
||||
ngx_feature_libs="-R/opt/homebrew/lib -L/opt/homebrew/lib -lpcre"
|
||||
else
|
||||
ngx_feature_libs="-L/opt/homebrew/lib -lpcre"
|
||||
fi
|
||||
|
||||
. auto/feature
|
||||
fi
|
||||
|
||||
if [ $ngx_found = yes ]; then
|
||||
CORE_INCS="$CORE_INCS $ngx_feature_path"
|
||||
CORE_DEPS="$CORE_DEPS $REGEX_DEPS"
|
||||
CORE_SRCS="$CORE_SRCS $REGEX_SRCS"
|
||||
CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
|
||||
PCRE=YES
|
||||
PCRE_LIBRARY=PCRE
|
||||
fi
|
||||
|
||||
if [ $PCRE = YES ]; then
|
||||
ngx_feature="PCRE JIT support"
|
||||
ngx_feature_name="NGX_HAVE_PCRE_JIT"
|
||||
ngx_feature_test="int jit = 0;
|
||||
pcre_free_study(NULL);
|
||||
pcre_config(PCRE_CONFIG_JIT, &jit);
|
||||
if (jit != 1) return 1;"
|
||||
. auto/feature
|
||||
|
||||
if [ $ngx_found = yes ]; then
|
||||
PCRE_JIT=YES
|
||||
fi
|
||||
ngx_found=no
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $PCRE != YES ]; then
|
||||
cat << END
|
||||
|
||||
$0: error: the HTTP rewrite module requires the PCRE library.
|
||||
You can either disable the module by using --without-http_rewrite_module
|
||||
option, or install the PCRE library into the system, or build the PCRE library
|
||||
statically from the source with nginx by using --with-pcre=<path> option.
|
||||
|
||||
END
|
||||
exit 1
|
||||
fi
|
||||
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -1,171 +1,65 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
if [ $PCRE_LIBRARY = PCRE2 ]; then
|
||||
case "$CC" in
|
||||
|
||||
# PCRE2
|
||||
cl)
|
||||
makefile=makefile.msvc
|
||||
opt="CPU_OPT=$CPU_OPT LIBC=$LIBC"
|
||||
;;
|
||||
|
||||
if [ $NGX_CC_NAME = msvc ]; then
|
||||
wcl386)
|
||||
makefile=makefile.owc
|
||||
opt="CPU_OPT=$CPU_OPT"
|
||||
;;
|
||||
|
||||
# With PCRE2, it is not possible to compile all sources.
|
||||
# Since list of source files changes between versions, we
|
||||
# test files which might not be present.
|
||||
bcc32)
|
||||
makefile=makefile.bcc
|
||||
opt="-DCPU_OPT=$CPU_OPT"
|
||||
;;
|
||||
|
||||
ngx_pcre_srcs="pcre2_auto_possess.c \
|
||||
pcre2_chartables.c \
|
||||
pcre2_compile.c \
|
||||
pcre2_config.c \
|
||||
pcre2_context.c \
|
||||
pcre2_dfa_match.c \
|
||||
pcre2_error.c \
|
||||
pcre2_jit_compile.c \
|
||||
pcre2_maketables.c \
|
||||
pcre2_match.c \
|
||||
pcre2_match_data.c \
|
||||
pcre2_newline.c \
|
||||
pcre2_ord2utf.c \
|
||||
pcre2_pattern_info.c \
|
||||
pcre2_string_utils.c \
|
||||
pcre2_study.c \
|
||||
pcre2_substitute.c \
|
||||
pcre2_substring.c \
|
||||
pcre2_tables.c \
|
||||
pcre2_ucd.c \
|
||||
pcre2_valid_utf.c \
|
||||
pcre2_xclass.c"
|
||||
|
||||
ngx_pcre_test="pcre2_chkdint.c \
|
||||
pcre2_compile_cgroup.c \
|
||||
pcre2_compile_class.c \
|
||||
pcre2_convert.c \
|
||||
pcre2_extuni.c \
|
||||
pcre2_find_bracket.c \
|
||||
pcre2_script_run.c \
|
||||
pcre2_serialize.c"
|
||||
|
||||
for ngx_src in $ngx_pcre_test
|
||||
do
|
||||
if [ -f $PCRE/src/$ngx_src ]; then
|
||||
ngx_pcre_srcs="$ngx_pcre_srcs $ngx_src"
|
||||
fi
|
||||
done
|
||||
|
||||
ngx_pcre_objs=`echo $ngx_pcre_srcs \
|
||||
| sed -e "s#\([^ ]*\.\)c#\1$ngx_objext#g"`
|
||||
|
||||
ngx_pcre_srcs=`echo $ngx_pcre_srcs \
|
||||
| sed -e "s/ *\([^ ][^ ]*\)/$ngx_regex_cont\1/g"`
|
||||
ngx_pcre_objs=`echo $ngx_pcre_objs \
|
||||
| sed -e "s/ *\([^ ][^ ]*\)/$ngx_regex_cont\1/g"`
|
||||
|
||||
cat << END >> $NGX_MAKEFILE
|
||||
|
||||
PCRE_CFLAGS = -O2 -Ob1 -Oi -Gs $LIBC $CPU_OPT
|
||||
PCRE_FLAGS = -DHAVE_CONFIG_H -DPCRE2_STATIC -DPCRE2_CODE_UNIT_WIDTH=8 \\
|
||||
-DHAVE_MEMMOVE
|
||||
|
||||
PCRE_SRCS = $ngx_pcre_srcs
|
||||
PCRE_OBJS = $ngx_pcre_objs
|
||||
|
||||
$PCRE/src/pcre2.h:
|
||||
cd $PCRE/src \\
|
||||
&& copy /y config.h.generic config.h \\
|
||||
&& copy /y pcre2.h.generic pcre2.h \\
|
||||
&& copy /y pcre2_chartables.c.dist pcre2_chartables.c
|
||||
|
||||
$PCRE/src/pcre2-8.lib: $PCRE/src/pcre2.h $NGX_MAKEFILE
|
||||
cd $PCRE/src \\
|
||||
&& cl -nologo -c \$(PCRE_CFLAGS) -I . \$(PCRE_FLAGS) \$(PCRE_SRCS) \\
|
||||
&& link -lib -out:pcre2-8.lib -verbose:lib \$(PCRE_OBJS)
|
||||
|
||||
END
|
||||
|
||||
else
|
||||
|
||||
cat << END >> $NGX_MAKEFILE
|
||||
|
||||
$PCRE/src/pcre2.h: $PCRE/Makefile
|
||||
|
||||
$PCRE/Makefile: $NGX_MAKEFILE
|
||||
cd $PCRE \\
|
||||
&& if [ -f Makefile ]; then \$(MAKE) distclean; fi \\
|
||||
&& CC="\$(CC)" CFLAGS="$PCRE_OPT" \\
|
||||
./configure --disable-shared $PCRE_CONF_OPT
|
||||
|
||||
$PCRE/.libs/libpcre2-8.a: $PCRE/Makefile
|
||||
cd $PCRE \\
|
||||
&& \$(MAKE) libpcre2-8.la
|
||||
|
||||
END
|
||||
|
||||
fi
|
||||
esac
|
||||
|
||||
|
||||
else
|
||||
case $PLATFORM in
|
||||
|
||||
# PCRE
|
||||
win32)
|
||||
cp auto/lib/pcre/patch.pcre.in $PCRE
|
||||
cp auto/lib/pcre/patch.config.in $PCRE
|
||||
cp auto/lib/pcre/$makefile $PCRE
|
||||
|
||||
case "$NGX_CC_NAME" in
|
||||
pcre=`echo $PCRE | sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||
line=`echo $PCRE/pcre.h: | sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||
|
||||
msvc)
|
||||
ngx_makefile=makefile.msvc
|
||||
ngx_opt="CPU_OPT=\"$CPU_OPT\" LIBC=$LIBC"
|
||||
ngx_pcre="PCRE=\"$PCRE\""
|
||||
;;
|
||||
echo "$line" >> $MAKEFILE
|
||||
echo " cd $pcre" >> $MAKEFILE
|
||||
echo " \$(MAKE) -f $makefile pcre.h" >> $MAKEFILE
|
||||
echo " cd ..\\..\\.." >> $MAKEFILE
|
||||
echo >> $MAKEFILE
|
||||
|
||||
owc)
|
||||
ngx_makefile=makefile.owc
|
||||
ngx_opt="CPU_OPT=\"$CPU_OPT\""
|
||||
ngx_pcre=`echo PCRE=\"$PCRE\" | sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||
;;
|
||||
line="$PCRE/pcre.lib: $PCRE/pcre.h"
|
||||
line=`echo $line | sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||
|
||||
bcc)
|
||||
ngx_makefile=makefile.bcc
|
||||
ngx_opt="-DCPU_OPT=\"$CPU_OPT\""
|
||||
ngx_pcre=`echo \-DPCRE=\"$PCRE\" \
|
||||
| sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||
;;
|
||||
echo "$line" >> $MAKEFILE
|
||||
echo " cd $pcre" >> $MAKEFILE
|
||||
echo " \$(MAKE) -f $makefile $opt" >> $MAKEFILE
|
||||
echo " cd ..\\..\\.." >> $MAKEFILE
|
||||
;;
|
||||
|
||||
*)
|
||||
ngx_makefile=
|
||||
;;
|
||||
*)
|
||||
PCRE_OPT="CFLAGS=\"$PCRE_OPT\""
|
||||
|
||||
esac
|
||||
echo "$PCRE/pcre.h:" >> $MAKEFILE
|
||||
echo " cd $PCRE \\" >> $MAKEFILE
|
||||
echo " && CC=\"\$(CC)\" $PCRE_OPT \\" >> $MAKEFILE
|
||||
echo " ./configure --disable-shared" >> $MAKEFILE
|
||||
echo >> $MAKEFILE
|
||||
echo "$PCRE/.libs/libpcre.a: $PCRE/pcre.h" >> $MAKEFILE
|
||||
echo " cd $PCRE \\" >> $MAKEFILE
|
||||
echo " && \$(MAKE) libpcre.la" >> $MAKEFILE
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
if [ -n "$ngx_makefile" ]; then
|
||||
|
||||
cat << END >> $NGX_MAKEFILE
|
||||
|
||||
`echo "$PCRE/pcre.lib: $PCRE/pcre.h $NGX_MAKEFILE" \
|
||||
| sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||
\$(MAKE) -f auto/lib/pcre/$ngx_makefile $ngx_pcre $ngx_opt
|
||||
|
||||
`echo "$PCRE/pcre.h:" | sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||
\$(MAKE) -f auto/lib/pcre/$ngx_makefile $ngx_pcre pcre.h
|
||||
|
||||
END
|
||||
|
||||
else
|
||||
|
||||
cat << END >> $NGX_MAKEFILE
|
||||
|
||||
$PCRE/pcre.h: $PCRE/Makefile
|
||||
|
||||
$PCRE/Makefile: $NGX_MAKEFILE
|
||||
cd $PCRE \\
|
||||
&& if [ -f Makefile ]; then \$(MAKE) distclean; fi \\
|
||||
&& CC="\$(CC)" CFLAGS="$PCRE_OPT" \\
|
||||
./configure --disable-shared $PCRE_CONF_OPT
|
||||
|
||||
$PCRE/.libs/libpcre.a: $PCRE/Makefile
|
||||
cd $PCRE \\
|
||||
&& \$(MAKE) libpcre.la
|
||||
|
||||
END
|
||||
|
||||
fi
|
||||
|
||||
fi
|
||||
echo >> $MAKEFILE
|
||||
|
|
|
|||
|
|
@ -1,27 +1,20 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
CFLAGS = -q -O2 -tWM -w-8004 $(CPU_OPT)
|
||||
PCREFLAGS = -DHAVE_CONFIG_H -DPCRE_STATIC -DPOSIX_MALLOC_THRESHOLD=10 \
|
||||
-DSUPPORT_PCRE8 -DHAVE_MEMMOVE
|
||||
CFLAGS = -q -O2 -tWM $(CPU_OPT)
|
||||
PCREFLAGS = -DPCRE_STATIC -DPOSIX_MALLOC_THRESHOLD=10
|
||||
|
||||
|
||||
pcre.lib:
|
||||
cd $(PCRE)
|
||||
pcre.lib: pcre.h
|
||||
bcc32 -q -edftables dftables.c
|
||||
|
||||
bcc32 -c $(CFLAGS) -I. $(PCREFLAGS) pcre_*.c
|
||||
dftables > chartables.c
|
||||
|
||||
copy /y nul pcre.lst
|
||||
for %n in (*.obj) do @echo +%n ^^& >> pcre.lst
|
||||
echo + >> pcre.lst
|
||||
bcc32 -c $(CFLAGS) $(PCREFLAGS) maketables.c get.c study.c pcre.c
|
||||
|
||||
tlib pcre.lib @pcre.lst
|
||||
tlib pcre.lib +maketables.obj +get.obj +study.obj +pcre.obj
|
||||
|
||||
pcre.h:
|
||||
cd $(PCRE)
|
||||
|
||||
copy /y pcre.h.generic pcre.h
|
||||
copy /y config.h.generic config.h
|
||||
copy /y pcre_chartables.c.dist pcre_chartables.c
|
||||
patch -o pcre.h pcre.in patch.pcre.in
|
||||
patch -o config.h config.in patch.config.in
|
||||
|
|
|
|||
|
|
@ -1,23 +1,22 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
CFLAGS = -O2 -Ob1 -Oi -Gs $(LIBC) $(CPU_OPT)
|
||||
PCREFLAGS = -DHAVE_CONFIG_H -DPCRE_STATIC -DPOSIX_MALLOC_THRESHOLD=10 \
|
||||
-DSUPPORT_PCRE8 -DHAVE_MEMMOVE
|
||||
PCREFLAGS = -DPCRE_STATIC -DPOSIX_MALLOC_THRESHOLD=10
|
||||
|
||||
|
||||
pcre.lib:
|
||||
cd $(PCRE)
|
||||
pcre.lib: pcre.h
|
||||
cl -Fedftables dftables.c
|
||||
|
||||
cl -nologo -c $(CFLAGS) -I . $(PCREFLAGS) pcre_*.c
|
||||
dftables > chartables.c
|
||||
|
||||
link -lib -out:pcre.lib -verbose:lib pcre_*.obj
|
||||
cl -nologo -c $(CFLAGS) $(PCREFLAGS) \
|
||||
maketables.c get.c study.c pcre.c
|
||||
|
||||
link -lib -out:pcre.lib -verbose:lib \
|
||||
maketables.obj get.obj study.obj pcre.obj
|
||||
|
||||
pcre.h:
|
||||
cd $(PCRE)
|
||||
|
||||
copy /y pcre.h.generic pcre.h
|
||||
copy /y config.h.generic config.h
|
||||
copy /y pcre_chartables.c.dist pcre_chartables.c
|
||||
patch -o pcre.h pcre.in patch.pcre.in
|
||||
patch -o config.h config.in patch.config.in
|
||||
|
|
|
|||
|
|
@ -1,25 +1,19 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
CFLAGS = -c -zq -bt=nt -ot -op -oi -oe -s -bm $(CPU_OPT)
|
||||
PCREFLAGS = -DHAVE_CONFIG_H -DPCRE_STATIC -DPOSIX_MALLOC_THRESHOLD=10 &
|
||||
-DSUPPORT_PCRE8 -DHAVE_MEMMOVE
|
||||
PCREFLAGS = -DPCRE_STATIC -DPOSIX_MALLOC_THRESHOLD=10
|
||||
|
||||
|
||||
pcre.lib:
|
||||
cd $(PCRE)
|
||||
pcre.lib: pcre.h
|
||||
wcl386 -zq -bt=nt -l=nt -fe=dftables dftables.c
|
||||
dftables > chartables.c
|
||||
|
||||
wcl386 $(CFLAGS) -i=. $(PCREFLAGS) pcre_*.c
|
||||
wcl386 $(CFLAGS) $(PCREFLAGS) maketables.c get.c study.c pcre.c
|
||||
wlib -n pcre.lib maketables.obj get.obj study.obj pcre.obj
|
||||
|
||||
dir /b *.obj > pcre.lst
|
||||
|
||||
wlib -n pcre.lib @pcre.lst
|
||||
|
||||
pcre.h:
|
||||
cd $(PCRE)
|
||||
|
||||
copy /y pcre.h.generic pcre.h
|
||||
copy /y config.h.generic config.h
|
||||
copy /y pcre_chartables.c.dist pcre_chartables.c
|
||||
patch -o pcre.h pcre.in patch.pcre.in
|
||||
patch -o config.h config.in patch.config.in
|
||||
|
|
|
|||
|
|
@ -0,0 +1,11 @@
|
|||
--- config.in Thu Aug 21 14:43:07 2003
|
||||
+++ config.in Sun Mar 7 02:37:24 2004
|
||||
@@ -28,7 +28,7 @@
|
||||
found. */
|
||||
|
||||
#define HAVE_STRERROR 0
|
||||
-#define HAVE_MEMMOVE 0
|
||||
+#define HAVE_MEMMOVE 1
|
||||
|
||||
/* There are some non-Unix systems that don't even have bcopy(). If this macro
|
||||
is false, an emulation is used. If HAVE_MEMMOVE is set to 1, the value of
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
--- pcre.in Thu Aug 21 14:43:07 2003
|
||||
+++ pcre.in Sun Mar 7 02:10:11 2004
|
||||
@@ -10,9 +10,9 @@
|
||||
/* The file pcre.h is build by "configure". Do not edit it; instead
|
||||
make changes to pcre.in. */
|
||||
|
||||
-#define PCRE_MAJOR @PCRE_MAJOR@
|
||||
-#define PCRE_MINOR @PCRE_MINOR@
|
||||
-#define PCRE_DATE @PCRE_DATE@
|
||||
+#define PCRE_MAJOR 4
|
||||
+#define PCRE_MINOR 4
|
||||
+#define PCRE_DATE 21-August-2003
|
||||
|
||||
/* Win32 uses DLL by default */
|
||||
|
||||
|
|
@ -1,83 +0,0 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
echo "checking for perl"
|
||||
|
||||
|
||||
NGX_PERL_VER=`$NGX_PERL -v 2>&1 | grep '^This is perl' 2>&1 \
|
||||
| sed -e 's/^This is perl, \(.*\)/\1/'`
|
||||
|
||||
if test -n "$NGX_PERL_VER"; then
|
||||
echo " + perl version: $NGX_PERL_VER"
|
||||
|
||||
if [ "`$NGX_PERL -e 'use 5.008006; print "OK"'`" != "OK" ]; then
|
||||
echo
|
||||
echo "$0: error: perl 5.8.6 or higher is required"
|
||||
echo
|
||||
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
if [ "`$NGX_PERL -MExtUtils::Embed -e 'print "OK"'`" != "OK" ]; then
|
||||
echo
|
||||
echo "$0: error: perl module ExtUtils::Embed is required"
|
||||
echo
|
||||
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
NGX_PM_CFLAGS=`$NGX_PERL -MExtUtils::Embed -e ccopts`
|
||||
NGX_PM_LDFLAGS=`$NGX_PERL -MConfig -e 'print $Config{lddlflags}'`
|
||||
|
||||
NGX_PERL_CFLAGS="$CFLAGS `$NGX_PERL -MExtUtils::Embed -e ccopts`"
|
||||
|
||||
# gcc 4.1/4.2 warn about unused values in pTHX_
|
||||
NGX_PERL_CFLAGS=`echo $NGX_PERL_CFLAGS \
|
||||
| sed -e 's/-Wunused-value/-Wno-unused-value/'`
|
||||
# icc8 warns 'declaration hides parameter "my_perl"' in ENTER and LEAVE
|
||||
NGX_PERL_CFLAGS=`echo $NGX_PERL_CFLAGS \
|
||||
| sed -e 's/-wd171/-wd171 -wd1599/'`
|
||||
|
||||
ngx_perl_ldopts=`$NGX_PERL -MExtUtils::Embed -e ldopts`
|
||||
|
||||
ngx_perl_dlext=`$NGX_PERL -MConfig -e 'print $Config{dlext}'`
|
||||
ngx_perl_libdir="src/http/modules/perl/blib/arch/auto"
|
||||
ngx_perl_module="$ngx_perl_libdir/nginx/nginx.$ngx_perl_dlext"
|
||||
|
||||
if $NGX_PERL -V:usemultiplicity | grep define > /dev/null; then
|
||||
have=NGX_HAVE_PERL_MULTIPLICITY . auto/have
|
||||
echo " + perl interpreter multiplicity found"
|
||||
fi
|
||||
|
||||
if $NGX_PERL -V:useithreads | grep undef > /dev/null; then
|
||||
# FreeBSD port wants to link with -pthread non-threaded perl
|
||||
ngx_perl_ldopts=`echo $ngx_perl_ldopts | sed 's/ -pthread//'`
|
||||
fi
|
||||
|
||||
if [ "$NGX_SYSTEM" = "Darwin" ]; then
|
||||
# OS X system perl wants to link universal binaries
|
||||
ngx_perl_ldopts=`echo $ngx_perl_ldopts \
|
||||
| sed -e 's/-arch i386//' -e 's/-arch x86_64//'`
|
||||
fi
|
||||
|
||||
if [ $USE_PERL = YES ]; then
|
||||
CORE_LINK="$CORE_LINK $ngx_perl_ldopts"
|
||||
fi
|
||||
|
||||
NGX_LIB_PERL="$ngx_perl_ldopts"
|
||||
|
||||
if test -n "$NGX_PERL_MODULES"; then
|
||||
have=NGX_PERL_MODULES value="(u_char *) \"$NGX_PERL_MODULES\""
|
||||
. auto/define
|
||||
NGX_PERL_MODULES_MAN=$NGX_PERL_MODULES/man3
|
||||
fi
|
||||
|
||||
else
|
||||
echo
|
||||
echo "$0: error: perl 5.8.6 or higher is required"
|
||||
echo
|
||||
|
||||
exit 1;
|
||||
fi
|
||||
|
|
@ -1,46 +0,0 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
cat << END >> $NGX_MAKEFILE
|
||||
|
||||
$NGX_OBJS/src/http/modules/perl/ngx_http_perl_module.o: \\
|
||||
$NGX_OBJS/$ngx_perl_module
|
||||
|
||||
$NGX_OBJS/$ngx_perl_module: \\
|
||||
\$(CORE_DEPS) \$(HTTP_DEPS) \\
|
||||
src/http/modules/perl/ngx_http_perl_module.h \\
|
||||
$NGX_OBJS/src/http/modules/perl/Makefile
|
||||
cd $NGX_OBJS/src/http/modules/perl && \$(MAKE)
|
||||
|
||||
rm -rf $NGX_OBJS/install_perl
|
||||
|
||||
|
||||
$NGX_OBJS/src/http/modules/perl/Makefile: \\
|
||||
$NGX_AUTO_CONFIG_H \\
|
||||
src/core/nginx.h \\
|
||||
src/http/modules/perl/Makefile.PL \\
|
||||
src/http/modules/perl/nginx.pm \\
|
||||
src/http/modules/perl/nginx.xs \\
|
||||
src/http/modules/perl/typemap
|
||||
grep 'define NGINX_VERSION' src/core/nginx.h \\
|
||||
| sed -e 's/^.*"\(.*\)".*/\1/' > \\
|
||||
$NGX_OBJS/src/http/modules/perl/version
|
||||
sed "s/%%VERSION%%/\`cat $NGX_OBJS/src/http/modules/perl/version\`/" \\
|
||||
src/http/modules/perl/nginx.pm > \\
|
||||
$NGX_OBJS/src/http/modules/perl/nginx.pm
|
||||
cp -p src/http/modules/perl/nginx.xs $NGX_OBJS/src/http/modules/perl/
|
||||
cp -p src/http/modules/perl/typemap $NGX_OBJS/src/http/modules/perl/
|
||||
cp -p src/http/modules/perl/Makefile.PL $NGX_OBJS/src/http/modules/perl/
|
||||
|
||||
cd $NGX_OBJS/src/http/modules/perl \\
|
||||
&& NGX_PM_CFLAGS="\$(NGX_PM_CFLAGS) -g $NGX_CC_OPT" \\
|
||||
NGX_PM_LDFLAGS="$NGX_LD_OPT \$(NGX_PM_LDFLAGS)" \\
|
||||
NGX_INCS="$CORE_INCS $NGX_OBJS $HTTP_INCS" \\
|
||||
NGX_DEPS="\$(CORE_DEPS) \$(HTTP_DEPS)" \\
|
||||
$NGX_PERL Makefile.PL \\
|
||||
LIB=$NGX_PERL_MODULES \\
|
||||
INSTALLSITEMAN3DIR=$NGX_PERL_MODULES_MAN
|
||||
|
||||
END
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
|
||||
|
||||
echo $ngx_n "checking for $ngx_lib ...$ngx_c"
|
||||
|
||||
cat << END >> $NGX_AUTOCONF_ERR
|
||||
|
||||
----------------------------------------
|
||||
checking for $ngx_lib
|
||||
|
||||
END
|
||||
|
||||
ngx_found=no
|
||||
|
||||
cat << END > $NGX_AUTOTEST.c
|
||||
|
||||
$ngx_lib_incs
|
||||
|
||||
int main() {
|
||||
$ngx_lib_test;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
eval "$CC $cc_test_flags $ngx_lib_cflags \
|
||||
-o $NGX_AUTOTEST $NGX_AUTOTEST.c $ngx_libs \
|
||||
>> $NGX_ERR 2>&1"
|
||||
|
||||
if [ -x $NGX_AUTOTEST ]; then
|
||||
echo " found"
|
||||
|
||||
ngx_found=yes
|
||||
|
||||
else
|
||||
echo " not found"
|
||||
fi
|
||||
|
||||
rm $NGX_AUTOTEST*
|
||||
|
|
@ -1,6 +1,5 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
if [ $ZLIB != NONE ]; then
|
||||
|
|
@ -9,13 +8,11 @@ if [ $ZLIB != NONE ]; then
|
|||
case "$NGX_CC_NAME" in
|
||||
|
||||
msvc | owc | bcc)
|
||||
have=NGX_ZLIB . auto/have
|
||||
LINK_DEPS="$LINK_DEPS $ZLIB/zlib.lib"
|
||||
CORE_LIBS="$CORE_LIBS $ZLIB/zlib.lib"
|
||||
;;
|
||||
|
||||
icc)
|
||||
have=NGX_ZLIB . auto/have
|
||||
LINK_DEPS="$LINK_DEPS $ZLIB/libz.a"
|
||||
|
||||
# to allow -ipo optimization we link with the *.o but not library
|
||||
|
|
@ -24,7 +21,6 @@ if [ $ZLIB != NONE ]; then
|
|||
CORE_LIBS="$CORE_LIBS $ZLIB/deflate.o"
|
||||
CORE_LIBS="$CORE_LIBS $ZLIB/trees.o"
|
||||
CORE_LIBS="$CORE_LIBS $ZLIB/zutil.o"
|
||||
CORE_LIBS="$CORE_LIBS $ZLIB/compress.o"
|
||||
|
||||
if [ $ZLIB_ASM != NO ]; then
|
||||
CORE_LIBS="$CORE_LIBS $ZLIB/match.o"
|
||||
|
|
@ -32,7 +28,6 @@ if [ $ZLIB != NONE ]; then
|
|||
;;
|
||||
|
||||
*)
|
||||
have=NGX_ZLIB . auto/have
|
||||
LINK_DEPS="$LINK_DEPS $ZLIB/libz.a"
|
||||
CORE_LIBS="$CORE_LIBS $ZLIB/libz.a"
|
||||
#CORE_LIBS="$CORE_LIBS -L $ZLIB -lz"
|
||||
|
|
@ -42,16 +37,15 @@ if [ $ZLIB != NONE ]; then
|
|||
|
||||
else
|
||||
|
||||
if [ "$NGX_PLATFORM" != win32 ]; then
|
||||
if [ $PLATFORM != win32 ]; then
|
||||
ZLIB=NO
|
||||
|
||||
# FreeBSD, Solaris, Linux
|
||||
|
||||
ngx_feature="zlib library"
|
||||
ngx_feature_name="NGX_ZLIB"
|
||||
ngx_feature_name="zlib"
|
||||
ngx_feature_run=no
|
||||
ngx_feature_incs="#include <zlib.h>"
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs="-lz"
|
||||
ngx_feature_test="z_stream z; deflate(&z, Z_NO_FLUSH)"
|
||||
. auto/feature
|
||||
|
|
@ -64,16 +58,4 @@ else
|
|||
fi
|
||||
fi
|
||||
|
||||
if [ $ZLIB != YES ]; then
|
||||
cat << END
|
||||
|
||||
$0: error: the HTTP gzip module requires the zlib library.
|
||||
You can either disable the module by using --without-http_gzip_module
|
||||
option, or install the zlib library into the system, or build the zlib library
|
||||
statically from the source with nginx by using --with-zlib=<path> option.
|
||||
|
||||
END
|
||||
exit 1
|
||||
fi
|
||||
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -1,31 +1,37 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
case "$NGX_CC_NAME" in
|
||||
case "$CC" in
|
||||
|
||||
msvc)
|
||||
ngx_makefile=makefile.msvc
|
||||
ngx_opt="CPU_OPT=\"$CPU_OPT\" LIBC=$LIBC"
|
||||
ngx_zlib="ZLIB=\"$ZLIB\""
|
||||
cl)
|
||||
makefile=makefile.msvc
|
||||
opt="CPU_OPT=$CPU_OPT LIBC=$LIBC"
|
||||
|
||||
;;
|
||||
|
||||
owc)
|
||||
ngx_makefile=makefile.owc
|
||||
ngx_opt="CPU_OPT=\"$CPU_OPT\""
|
||||
ngx_zlib=`echo ZLIB=\"$ZLIB\" | sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||
wcl386)
|
||||
makefile=makefile.owc
|
||||
opt="CPU_OPT=$CPU_OPT"
|
||||
;;
|
||||
|
||||
bcc)
|
||||
ngx_makefile=makefile.bcc
|
||||
ngx_opt="-DCPU_OPT=\"$CPU_OPT\""
|
||||
ngx_zlib=`echo \-DZLIB=\"$ZLIB\" | sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||
bcc32)
|
||||
makefile=makefile.bcc
|
||||
opt="-DCPU_OPT=$CPU_OPT"
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
|
||||
case $PLATFORM in
|
||||
|
||||
win32)
|
||||
line=`echo $ZLIB/zlib.lib: | sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||
echo "$line" >> $MAKEFILE
|
||||
;;
|
||||
|
||||
*)
|
||||
ngx_makefile=
|
||||
echo "$ZLIB/libz.a:" >> $MAKEFILE
|
||||
;;
|
||||
|
||||
esac
|
||||
|
|
@ -34,32 +40,15 @@ esac
|
|||
done=NO
|
||||
|
||||
|
||||
case "$NGX_PLATFORM" in
|
||||
case $PLATFORM in
|
||||
|
||||
win32)
|
||||
zlib=`echo $ZLIB | sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||
|
||||
if [ -n "$ngx_makefile" ]; then
|
||||
cat << END >> $NGX_MAKEFILE
|
||||
|
||||
`echo "$ZLIB/zlib.lib: $NGX_MAKEFILE" | sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||
\$(MAKE) -f auto/lib/zlib/$ngx_makefile $ngx_opt $ngx_zlib
|
||||
|
||||
END
|
||||
|
||||
else
|
||||
|
||||
cat << END >> $NGX_MAKEFILE
|
||||
|
||||
$ZLIB/libz.a: $NGX_MAKEFILE
|
||||
cd $ZLIB \\
|
||||
&& \$(MAKE) distclean \\
|
||||
&& \$(MAKE) -f win32/Makefile.gcc \\
|
||||
CFLAGS="$ZLIB_OPT" CC="\$(CC)" \\
|
||||
libz.a
|
||||
|
||||
END
|
||||
|
||||
fi
|
||||
cp auto/lib/zlib/$makefile $ZLIB
|
||||
echo " cd $zlib" >> $MAKEFILE
|
||||
echo " \$(MAKE) -f $makefile $opt" >> $MAKEFILE
|
||||
echo " cd ..\\..\\.." >> $MAKEFILE
|
||||
|
||||
done=YES
|
||||
;;
|
||||
|
|
@ -70,35 +59,23 @@ END
|
|||
*:i386 | *:i686)
|
||||
case $ZLIB_ASM in
|
||||
pentium)
|
||||
|
||||
cat << END >> $NGX_MAKEFILE
|
||||
|
||||
$ZLIB/libz.a: $NGX_MAKEFILE
|
||||
cd $ZLIB \\
|
||||
&& \$(MAKE) distclean \\
|
||||
&& cp contrib/asm586/match.S . \\
|
||||
&& CFLAGS="$ZLIB_OPT -DASMV" CC="\$(CC)" \\
|
||||
./configure \\
|
||||
&& \$(MAKE) OBJA=match.o libz.a
|
||||
|
||||
END
|
||||
echo " cd $ZLIB \\" >> $MAKEFILE
|
||||
echo " && cp contrib/asm586/match.S . \\" >> $MAKEFILE
|
||||
echo " && CFLAGS=\"$ZLIB_OPT -DASMV\" \\" >> $MAKEFILE
|
||||
echo " CC=\"\$(CC)\" \\" >> $MAKEFILE
|
||||
echo " ./configure \\" >> $MAKEFILE
|
||||
echo " && \$(MAKE) OBJA=match.o libz.a" >> $MAKEFILE
|
||||
|
||||
done=YES
|
||||
;;
|
||||
|
||||
pentiumpro)
|
||||
|
||||
cat << END >> $NGX_MAKEFILE
|
||||
|
||||
$ZLIB/libz.a: $NGX_MAKEFILE
|
||||
cd $ZLIB \\
|
||||
&& \$(MAKE) distclean \\
|
||||
&& cp contrib/asm686/match.S . \\
|
||||
&& CFLAGS="$ZLIB_OPT -DASMV" CC="\$(CC)" \\
|
||||
./configure \\
|
||||
&& \$(MAKE) OBJA=match.o libz.a
|
||||
|
||||
END
|
||||
echo " cd $ZLIB \\" >> $MAKEFILE
|
||||
echo " && cp contrib/asm686/match.S . \\" >> $MAKEFILE
|
||||
echo " && CFLAGS=\"$ZLIB_OPT -DASMV\" \\" >> $MAKEFILE
|
||||
echo " CC=\"\$(CC)\" \\" >> $MAKEFILE
|
||||
echo " ./configure \\" >> $MAKEFILE
|
||||
echo " && \$(MAKE) OBJA=match.o libz.a" >> $MAKEFILE
|
||||
|
||||
done=YES
|
||||
;;
|
||||
|
|
@ -120,16 +97,11 @@ esac
|
|||
|
||||
|
||||
if [ $done = NO ]; then
|
||||
|
||||
cat << END >> $NGX_MAKEFILE
|
||||
|
||||
$ZLIB/libz.a: $NGX_MAKEFILE
|
||||
cd $ZLIB \\
|
||||
&& \$(MAKE) distclean \\
|
||||
&& CFLAGS="$ZLIB_OPT" CC="\$(CC)" \\
|
||||
./configure \\
|
||||
&& \$(MAKE) libz.a
|
||||
|
||||
END
|
||||
|
||||
echo " cd $ZLIB \\" >> $MAKEFILE
|
||||
echo " && CFLAGS=\"$ZLIB_OPT\" CC=\"\$(CC)\" \\" >> $MAKEFILE
|
||||
echo " ./configure \\" >> $MAKEFILE
|
||||
echo " && \$(MAKE) libz.a" >> $MAKEFILE
|
||||
fi
|
||||
|
||||
|
||||
echo >> $MAKEFILE
|
||||
|
|
|
|||
|
|
@ -1,17 +1,11 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
CFLAGS = -q -O2 -tWM -w-8004 -w-8012 $(CPU_OPT)
|
||||
CFLAGS = -q -O2 -tWM $(CPU_OPT)
|
||||
|
||||
zlib.lib:
|
||||
cd $(ZLIB)
|
||||
|
||||
bcc32 -c $(CFLAGS) adler32.c crc32.c deflate.c \
|
||||
trees.c zutil.c compress.c \
|
||||
inflate.c inffast.c inftrees.c
|
||||
bcc32 -c $(CFLAGS) adler32.c crc32.c deflate.c trees.c zutil.c
|
||||
|
||||
tlib zlib.lib +adler32.obj +crc32.obj +deflate.obj \
|
||||
+trees.obj +zutil.obj +compress.obj \
|
||||
+inflate.obj +inffast.obj +inftrees.obj
|
||||
+trees.obj +zutil.obj
|
||||
|
|
|
|||
|
|
@ -1,17 +1,11 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
CFLAGS = -nologo -O2 -Ob1 -Oi -Gs $(LIBC) $(CPU_OPT)
|
||||
|
||||
zlib.lib:
|
||||
cd $(ZLIB)
|
||||
|
||||
cl -c $(CFLAGS) adler32.c crc32.c deflate.c \
|
||||
trees.c zutil.c compress.c \
|
||||
inflate.c inffast.c inftrees.c
|
||||
cl -c $(CFLAGS) adler32.c crc32.c deflate.c trees.c zutil.c
|
||||
|
||||
link -lib -out:zlib.lib adler32.obj crc32.obj deflate.obj \
|
||||
trees.obj zutil.obj compress.obj \
|
||||
inflate.obj inffast.obj inftrees.obj
|
||||
trees.obj zutil.obj
|
||||
|
|
|
|||
|
|
@ -1,14 +1,9 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
CFLAGS = -zq -bt=nt -ot -op -oi -oe -s -bm $(CPU_OPT)
|
||||
|
||||
zlib.lib:
|
||||
cd $(ZLIB)
|
||||
|
||||
wcl386 -c $(CFLAGS) adler32.c crc32.c deflate.c trees.c zutil.c &
|
||||
compress.c inflate.c inffast.c inftrees.c
|
||||
wlib -n zlib.lib adler32.obj crc32.obj deflate.obj trees.obj &
|
||||
zutil.obj compress.obj inflate.obj inffast.obj inftrees.obj
|
||||
wcl386 -c $(CFLAGS) adler32.c crc32.c deflate.c trees.c zutil.c
|
||||
wlib -n zlib.lib adler32.obj crc32.obj deflate.obj trees.obj zutil.obj
|
||||
|
|
|
|||
532
auto/make
532
auto/make
|
|
@ -1,25 +1,18 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
echo "creating $NGX_MAKEFILE"
|
||||
|
||||
mkdir -p $NGX_OBJS/src/core $NGX_OBJS/src/event $NGX_OBJS/src/event/modules \
|
||||
$NGX_OBJS/src/event/quic \
|
||||
$NGX_OBJS/src/os/unix $NGX_OBJS/src/os/win32 \
|
||||
$NGX_OBJS/src/http $NGX_OBJS/src/http/v2 $NGX_OBJS/src/http/v3 \
|
||||
$NGX_OBJS/src/http/modules $NGX_OBJS/src/http/modules/perl \
|
||||
$NGX_OBJS/src/mail \
|
||||
$NGX_OBJS/src/stream \
|
||||
$NGX_OBJS/src/misc
|
||||
mkdir -p $OBJS/src/core $OBJS/src/event $OBJS/src/event/modules \
|
||||
$OBJS/src/os/unix $OBJS/src/os/win32 \
|
||||
$OBJS/src/http $OBJS/src/http/modules $OBJS/src/http/modules/proxy \
|
||||
$OBJS/src/imap
|
||||
|
||||
|
||||
ngx_objs_dir=$NGX_OBJS$ngx_regex_dirsep
|
||||
ngx_use_pch=`echo $NGX_USE_PCH | sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||
|
||||
|
||||
cat << END > $NGX_MAKEFILE
|
||||
cat << END >> $NGX_MAKEFILE
|
||||
|
||||
CC = $CC
|
||||
CFLAGS = $CFLAGS
|
||||
|
|
@ -28,17 +21,19 @@ LINK = $LINK
|
|||
|
||||
END
|
||||
|
||||
if [ "$CC" = wcl386 ]; then
|
||||
echo MAKE = wmake >> $NGX_MAKEFILE
|
||||
|
||||
ngx_regex_cont=' '
|
||||
ngx_cont=' '
|
||||
ngx_tab=' '
|
||||
|
||||
if test -n "$NGX_PERL_CFLAGS"; then
|
||||
echo NGX_PERL_CFLAGS = $NGX_PERL_CFLAGS >> $NGX_MAKEFILE
|
||||
echo NGX_PM_CFLAGS = $NGX_PM_CFLAGS >> $NGX_MAKEFILE
|
||||
echo NGX_PM_LDFLAGS = $NGX_PM_LDFLAGS >> $NGX_MAKEFILE
|
||||
fi
|
||||
|
||||
|
||||
# ALL_INCS, required by the addons and by OpenWatcom C precompiled headers
|
||||
# ALL_INCS, required by OpenWatcom C precompiled headers
|
||||
|
||||
ngx_incs=`echo $CORE_INCS $NGX_OBJS $HTTP_INCS $MAIL_INCS $STREAM_INCS\
|
||||
ngx_incs=`echo $CORE_INCS $OBJS $HTTP_INCS $IMAP_INCS\
|
||||
| sed -e "s/ *\([^ ][^ ]*\)/$ngx_regex_cont$ngx_include_opt\1/g" \
|
||||
-e "s/\//$ngx_regex_dirsep/g"`
|
||||
|
||||
|
|
@ -52,13 +47,13 @@ END
|
|||
ngx_all_srcs="$CORE_SRCS"
|
||||
|
||||
|
||||
# the core dependencies and include paths
|
||||
# the core dependences and include pathes
|
||||
|
||||
ngx_deps=`echo $CORE_DEPS $NGX_AUTO_CONFIG_H $NGX_PCH \
|
||||
ngx_deps=`echo $CORE_DEPS $NGX_PCH \
|
||||
| sed -e "s/ *\([^ ][^ ]*\)/$ngx_regex_cont\1/g" \
|
||||
-e "s/\//$ngx_regex_dirsep/g"`
|
||||
|
||||
ngx_incs=`echo $CORE_INCS $NGX_OBJS \
|
||||
ngx_incs=`echo $CORE_INCS $OBJS \
|
||||
| sed -e "s/ *\([^ ][^ ]*\)/$ngx_regex_cont$ngx_include_opt\1/g" \
|
||||
-e "s/\//$ngx_regex_dirsep/g"`
|
||||
|
||||
|
|
@ -72,7 +67,7 @@ CORE_INCS = $ngx_include_opt$ngx_incs
|
|||
END
|
||||
|
||||
|
||||
# the http dependencies and include paths
|
||||
# the http dependences and include pathes
|
||||
|
||||
if [ $HTTP = YES ]; then
|
||||
|
||||
|
|
@ -98,70 +93,26 @@ END
|
|||
fi
|
||||
|
||||
|
||||
# the mail dependencies and include paths
|
||||
# the imap dependences and include pathes
|
||||
|
||||
if [ $MAIL != NO ]; then
|
||||
if [ $IMAP = YES ]; then
|
||||
|
||||
if [ $MAIL = YES ]; then
|
||||
ngx_all_srcs="$ngx_all_srcs $MAIL_SRCS"
|
||||
fi
|
||||
ngx_all_srcs="$ngx_all_srcs $IMAP_SRCS"
|
||||
|
||||
ngx_deps=`echo $MAIL_DEPS \
|
||||
ngx_deps=`echo $IMAP_DEPS \
|
||||
| sed -e "s/ *\([^ ][^ ]*\)/$ngx_regex_cont\1/g" \
|
||||
-e "s/\//$ngx_regex_dirsep/g"`
|
||||
|
||||
ngx_incs=`echo $MAIL_INCS \
|
||||
ngx_incs=`echo $IMAP_INCS \
|
||||
| sed -e "s/ *\([^ ][^ ]*\)/$ngx_regex_cont$ngx_include_opt\1/g" \
|
||||
-e "s/\//$ngx_regex_dirsep/g"`
|
||||
|
||||
cat << END >> $NGX_MAKEFILE
|
||||
|
||||
MAIL_DEPS = $ngx_deps
|
||||
IMAP_DEPS = $ngx_deps
|
||||
|
||||
|
||||
MAIL_INCS = $ngx_include_opt$ngx_incs
|
||||
|
||||
END
|
||||
|
||||
fi
|
||||
|
||||
|
||||
# the stream dependencies and include paths
|
||||
|
||||
if [ $STREAM != NO ]; then
|
||||
|
||||
if [ $STREAM = YES ]; then
|
||||
ngx_all_srcs="$ngx_all_srcs $STREAM_SRCS"
|
||||
fi
|
||||
|
||||
ngx_deps=`echo $STREAM_DEPS \
|
||||
| sed -e "s/ *\([^ ][^ ]*\)/$ngx_regex_cont\1/g" \
|
||||
-e "s/\//$ngx_regex_dirsep/g"`
|
||||
|
||||
ngx_incs=`echo $STREAM_INCS \
|
||||
| sed -e "s/ *\([^ ][^ ]*\)/$ngx_regex_cont$ngx_include_opt\1/g" \
|
||||
-e "s/\//$ngx_regex_dirsep/g"`
|
||||
|
||||
cat << END >> $NGX_MAKEFILE
|
||||
|
||||
STREAM_DEPS = $ngx_deps
|
||||
|
||||
|
||||
STREAM_INCS = $ngx_include_opt$ngx_incs
|
||||
|
||||
END
|
||||
|
||||
fi
|
||||
|
||||
|
||||
ngx_all_srcs="$ngx_all_srcs $MISC_SRCS"
|
||||
|
||||
|
||||
if test -n "$NGX_ADDON_SRCS$DYNAMIC_MODULES"; then
|
||||
|
||||
cat << END >> $NGX_MAKEFILE
|
||||
|
||||
ADDON_DEPS = \$(CORE_DEPS) $NGX_ADDON_DEPS
|
||||
IMAP_INCS = $ngx_include_opt$ngx_incs
|
||||
|
||||
END
|
||||
|
||||
|
|
@ -171,70 +122,35 @@ fi
|
|||
# nginx
|
||||
|
||||
ngx_all_srcs=`echo $ngx_all_srcs | sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||
|
||||
for ngx_src in $NGX_ADDON_SRCS
|
||||
do
|
||||
ngx_obj="addon/`basename \`dirname $ngx_src\``"
|
||||
|
||||
test -d $NGX_OBJS/$ngx_obj || mkdir -p $NGX_OBJS/$ngx_obj
|
||||
|
||||
ngx_obj=`echo $ngx_obj/\`basename $ngx_src\` \
|
||||
| sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||
|
||||
ngx_all_srcs="$ngx_all_srcs $ngx_obj"
|
||||
done
|
||||
ngx_modules_c=`echo $NGX_MODULES_C | sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||
|
||||
ngx_all_objs=`echo $ngx_all_srcs \
|
||||
| sed -e "s#\([^ ]*\.\)cpp#$NGX_OBJS\/\1$ngx_objext#g" \
|
||||
-e "s#\([^ ]*\.\)cc#$NGX_OBJS\/\1$ngx_objext#g" \
|
||||
-e "s#\([^ ]*\.\)c#$NGX_OBJS\/\1$ngx_objext#g" \
|
||||
-e "s#\([^ ]*\.\)S#$NGX_OBJS\/\1$ngx_objext#g"`
|
||||
|
||||
ngx_modules_c=`echo $NGX_MODULES_C | sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||
| sed -e "s/\([^ ]*\.\)cpp/$NGX_OBJS\/\1$ngx_objext/g" \
|
||||
-e "s/\([^ ]*\.\)cc/$NGX_OBJS\/\1$ngx_objext/g" \
|
||||
-e "s/\([^ ]*\.\)c/$NGX_OBJS\/\1$ngx_objext/g" \
|
||||
-e "s/\([^ ]*\.\)S/$NGX_OBJS\/\1$ngx_objext/g"`
|
||||
|
||||
ngx_modules_obj=`echo $ngx_modules_c | sed -e "s/\(.*\.\)c/\1$ngx_objext/"`
|
||||
|
||||
|
||||
if test -n "$NGX_RES"; then
|
||||
ngx_res=$NGX_RES
|
||||
else
|
||||
ngx_res="$NGX_RC $NGX_ICONS"
|
||||
ngx_rcc=`echo $NGX_RCC | sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||
fi
|
||||
|
||||
ngx_deps=`echo $ngx_all_objs $ngx_modules_obj $ngx_res $LINK_DEPS \
|
||||
ngx_deps=`echo $ngx_all_objs $ngx_modules_obj $LINK_DEPS \
|
||||
| sed -e "s/ *\([^ ][^ ]*\)/$ngx_regex_cont\1/g" \
|
||||
-e "s/\//$ngx_regex_dirsep/g"`
|
||||
|
||||
ngx_objs=`echo $ngx_all_objs $ngx_modules_obj \
|
||||
| sed -e "s/ *\([^ ][^ ]*\)/$ngx_long_regex_cont\1/g" \
|
||||
| sed -e "s/ *\([^ ][^ ]*\)/$ngx_regex_cont\1/g" \
|
||||
-e "s/\//$ngx_regex_dirsep/g"`
|
||||
|
||||
ngx_libs=
|
||||
if test -n "$NGX_LD_OPT$CORE_LIBS"; then
|
||||
ngx_libs=`echo $NGX_LD_OPT $CORE_LIBS \
|
||||
| sed -e "s/\//$ngx_regex_dirsep/g" -e "s/^/$ngx_long_regex_cont/"`
|
||||
fi
|
||||
ngx_libs=${CORE_LIBS:+`echo $NGX_LD_OPT $CORE_LIBS \
|
||||
| sed -e "s/\//$ngx_regex_dirsep/g" -e "s/^/$ngx_regex_cont/"`}
|
||||
|
||||
ngx_link=${CORE_LINK:+`echo $CORE_LINK \
|
||||
| sed -e "s/\//$ngx_regex_dirsep/g" -e "s/^/$ngx_long_regex_cont/"`}
|
||||
|
||||
ngx_main_link=${MAIN_LINK:+`echo $MAIN_LINK \
|
||||
| sed -e "s/\//$ngx_regex_dirsep/g" -e "s/^/$ngx_long_regex_cont/"`}
|
||||
|
||||
| sed -e "s/\//$ngx_regex_dirsep/g" -e "s/^/$ngx_regex_cont/"`}
|
||||
|
||||
cat << END >> $NGX_MAKEFILE
|
||||
|
||||
build: binary modules manpage
|
||||
$NGX_OBJS${ngx_dirsep}nginx${ngx_binext}: $ngx_deps$ngx_spacer
|
||||
\$(LINK) ${ngx_binout}$NGX_OBJS${ngx_dirsep}nginx$ngx_cont$ngx_objs$ngx_libs$ngx_link
|
||||
|
||||
binary: $NGX_OBJS${ngx_dirsep}nginx$ngx_binext
|
||||
|
||||
$NGX_OBJS${ngx_dirsep}nginx$ngx_binext: $ngx_deps$ngx_spacer
|
||||
\$(LINK) $ngx_long_start$ngx_binout$NGX_OBJS${ngx_dirsep}nginx$ngx_binext$ngx_long_cont$ngx_objs$ngx_libs$ngx_link$ngx_main_link
|
||||
$ngx_rcc
|
||||
$ngx_long_end
|
||||
|
||||
modules:
|
||||
END
|
||||
|
||||
|
||||
|
|
@ -249,7 +165,7 @@ fi
|
|||
cat << END >> $NGX_MAKEFILE
|
||||
|
||||
$ngx_modules_obj: \$(CORE_DEPS)$ngx_cont$ngx_modules_c
|
||||
$ngx_cc$ngx_tab$ngx_objout$ngx_modules_obj$ngx_tab$ngx_modules_c$NGX_AUX
|
||||
$ngx_cc$ngx_tab$ngx_objout$ngx_modules_obj$ngx_tab$ngx_modules_c
|
||||
|
||||
END
|
||||
|
||||
|
|
@ -258,17 +174,18 @@ END
|
|||
|
||||
for ngx_src in $CORE_SRCS
|
||||
do
|
||||
|
||||
ngx_src=`echo $ngx_src | sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||
ngx_obj=`echo $ngx_src \
|
||||
| sed -e "s#^\(.*\.\)cpp\\$#$ngx_objs_dir\1$ngx_objext#g" \
|
||||
-e "s#^\(.*\.\)cc\\$#$ngx_objs_dir\1$ngx_objext#g" \
|
||||
-e "s#^\(.*\.\)c\\$#$ngx_objs_dir\1$ngx_objext#g" \
|
||||
-e "s#^\(.*\.\)S\\$#$ngx_objs_dir\1$ngx_objext#g"`
|
||||
| sed -e "s/^\(.*\.\)cpp$/$ngx_objs_dir\1$ngx_objext/g" \
|
||||
-e "s/^\(.*\.\)cc$/$ngx_objs_dir\1$ngx_objext/g" \
|
||||
-e "s/^\(.*\.\)c$/$ngx_objs_dir\1$ngx_objext/g" \
|
||||
-e "s/^\(.*\.\)S$/$ngx_objs_dir\1$ngx_objext/g"`
|
||||
|
||||
cat << END >> $NGX_MAKEFILE
|
||||
|
||||
$ngx_obj: \$(CORE_DEPS)$ngx_cont$ngx_src
|
||||
$ngx_cc$ngx_tab$ngx_objout$ngx_obj$ngx_tab$ngx_src$NGX_AUX
|
||||
$ngx_cc$ngx_tab$ngx_objout$ngx_obj$ngx_tab$ngx_src
|
||||
|
||||
END
|
||||
|
||||
|
|
@ -283,187 +200,58 @@ if [ $HTTP = YES ]; then
|
|||
ngx_cc="\$(CC) $ngx_compile_opt \$(CFLAGS) $ngx_use_pch \$(ALL_INCS)"
|
||||
else
|
||||
ngx_cc="\$(CC) $ngx_compile_opt \$(CFLAGS) \$(CORE_INCS) \$(HTTP_INCS)"
|
||||
ngx_perl_cc="\$(CC) $ngx_compile_opt \$(NGX_PERL_CFLAGS)"
|
||||
ngx_perl_cc="$ngx_perl_cc \$(CORE_INCS) \$(HTTP_INCS)"
|
||||
fi
|
||||
|
||||
for ngx_source in $HTTP_SRCS
|
||||
for ngx_src in $HTTP_SRCS
|
||||
do
|
||||
ngx_src=`echo $ngx_source | sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||
|
||||
ngx_src=`echo $ngx_src | sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||
ngx_obj=`echo $ngx_src \
|
||||
| sed -e "s#^\(.*\.\)cpp\\$#$ngx_objs_dir\1$ngx_objext#g" \
|
||||
-e "s#^\(.*\.\)cc\\$#$ngx_objs_dir\1$ngx_objext#g" \
|
||||
-e "s#^\(.*\.\)c\\$#$ngx_objs_dir\1$ngx_objext#g" \
|
||||
-e "s#^\(.*\.\)S\\$#$ngx_objs_dir\1$ngx_objext#g"`
|
||||
| sed -e "s/^\(.*\.\)cpp$/$ngx_objs_dir\1$ngx_objext/g" \
|
||||
-e "s/^\(.*\.\)cc$/$ngx_objs_dir\1$ngx_objext/g" \
|
||||
-e "s/^\(.*\.\)c$/$ngx_objs_dir\1$ngx_objext/g" \
|
||||
-e "s/^\(.*\.\)S$/$ngx_objs_dir\1$ngx_objext/g"`
|
||||
|
||||
if [ $ngx_source = src/http/modules/perl/ngx_http_perl_module.c ]; then
|
||||
|
||||
cat << END >> $NGX_MAKEFILE
|
||||
cat << END >> $NGX_MAKEFILE
|
||||
|
||||
$ngx_obj: \$(CORE_DEPS) \$(HTTP_DEPS)$ngx_cont$ngx_src
|
||||
$ngx_perl_cc$ngx_tab$ngx_objout$ngx_obj$ngx_tab$ngx_src$NGX_AUX
|
||||
|
||||
END
|
||||
else
|
||||
|
||||
cat << END >> $NGX_MAKEFILE
|
||||
|
||||
$ngx_obj: \$(CORE_DEPS) \$(HTTP_DEPS)$ngx_cont$ngx_src
|
||||
$ngx_cc$ngx_tab$ngx_objout$ngx_obj$ngx_tab$ngx_src$NGX_AUX
|
||||
$ngx_cc$ngx_tab$ngx_objout$ngx_obj$ngx_tab$ngx_src
|
||||
|
||||
END
|
||||
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
||||
fi
|
||||
|
||||
|
||||
# the mail sources
|
||||
# the imap sources
|
||||
|
||||
if [ $MAIL = YES ]; then
|
||||
if [ $IMAP = YES ]; then
|
||||
|
||||
if test -n "$NGX_PCH"; then
|
||||
ngx_cc="\$(CC) $ngx_compile_opt \$(CFLAGS) $ngx_use_pch \$(ALL_INCS)"
|
||||
else
|
||||
ngx_cc="\$(CC) $ngx_compile_opt \$(CFLAGS) \$(CORE_INCS) \$(MAIL_INCS)"
|
||||
ngx_cc="\$(CC) $ngx_compile_opt \$(CFLAGS) \$(CORE_INCS) \$(IMAP_INCS)"
|
||||
fi
|
||||
|
||||
for ngx_src in $MAIL_SRCS
|
||||
for ngx_src in $IMAP_SRCS
|
||||
do
|
||||
|
||||
ngx_src=`echo $ngx_src | sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||
ngx_obj=`echo $ngx_src \
|
||||
| sed -e "s#^\(.*\.\)cpp\\$#$ngx_objs_dir\1$ngx_objext#g" \
|
||||
-e "s#^\(.*\.\)cc\\$#$ngx_objs_dir\1$ngx_objext#g" \
|
||||
-e "s#^\(.*\.\)c\\$#$ngx_objs_dir\1$ngx_objext#g" \
|
||||
-e "s#^\(.*\.\)S\\$#$ngx_objs_dir\1$ngx_objext#g"`
|
||||
| sed -e "s/^\(.*\.\)cpp$/$ngx_objs_dir\1$ngx_objext/g" \
|
||||
-e "s/^\(.*\.\)cc$/$ngx_objs_dir\1$ngx_objext/g" \
|
||||
-e "s/^\(.*\.\)c$/$ngx_objs_dir\1$ngx_objext/g" \
|
||||
-e "s/^\(.*\.\)S$/$ngx_objs_dir\1$ngx_objext/g"`
|
||||
|
||||
cat << END >> $NGX_MAKEFILE
|
||||
|
||||
$ngx_obj: \$(CORE_DEPS) \$(MAIL_DEPS)$ngx_cont$ngx_src
|
||||
$ngx_cc$ngx_tab$ngx_objout$ngx_obj$ngx_tab$ngx_src$NGX_AUX
|
||||
$ngx_obj: \$(CORE_DEPS) \$(IMAP_DEPS)$ngx_cont$ngx_src
|
||||
$ngx_cc$ngx_tab$ngx_objout$ngx_obj$ngx_tab$ngx_src
|
||||
|
||||
END
|
||||
done
|
||||
|
||||
fi
|
||||
|
||||
|
||||
# the stream sources
|
||||
|
||||
if [ $STREAM = YES ]; then
|
||||
|
||||
if test -n "$NGX_PCH"; then
|
||||
ngx_cc="\$(CC) $ngx_compile_opt \$(CFLAGS) $ngx_use_pch \$(ALL_INCS)"
|
||||
else
|
||||
ngx_cc="\$(CC) $ngx_compile_opt \$(CFLAGS) \$(CORE_INCS) \$(STREAM_INCS)"
|
||||
fi
|
||||
|
||||
for ngx_src in $STREAM_SRCS
|
||||
do
|
||||
ngx_src=`echo $ngx_src | sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||
ngx_obj=`echo $ngx_src \
|
||||
| sed -e "s#^\(.*\.\)cpp\\$#$ngx_objs_dir\1$ngx_objext#g" \
|
||||
-e "s#^\(.*\.\)cc\\$#$ngx_objs_dir\1$ngx_objext#g" \
|
||||
-e "s#^\(.*\.\)c\\$#$ngx_objs_dir\1$ngx_objext#g" \
|
||||
-e "s#^\(.*\.\)S\\$#$ngx_objs_dir\1$ngx_objext#g"`
|
||||
|
||||
cat << END >> $NGX_MAKEFILE
|
||||
|
||||
$ngx_obj: \$(CORE_DEPS) \$(STREAM_DEPS)$ngx_cont$ngx_src
|
||||
$ngx_cc$ngx_tab$ngx_objout$ngx_obj$ngx_tab$ngx_src$NGX_AUX
|
||||
|
||||
END
|
||||
done
|
||||
|
||||
fi
|
||||
|
||||
|
||||
# the misc sources
|
||||
|
||||
if test -n "$MISC_SRCS"; then
|
||||
|
||||
ngx_cc="\$(CC) $ngx_compile_opt \$(CFLAGS) $ngx_use_pch \$(ALL_INCS)"
|
||||
|
||||
for ngx_src in $MISC_SRCS
|
||||
do
|
||||
ngx_src=`echo $ngx_src | sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||
ngx_obj=`echo $ngx_src \
|
||||
| sed -e "s#^\(.*\.\)cpp\\$#$ngx_objs_dir\1$ngx_objext#g" \
|
||||
-e "s#^\(.*\.\)cc\\$#$ngx_objs_dir\1$ngx_objext#g" \
|
||||
-e "s#^\(.*\.\)c\\$#$ngx_objs_dir\1$ngx_objext#g" \
|
||||
-e "s#^\(.*\.\)S\\$#$ngx_objs_dir\1$ngx_objext#g"`
|
||||
|
||||
cat << END >> $NGX_MAKEFILE
|
||||
|
||||
$ngx_obj: \$(CORE_DEPS) $ngx_cont$ngx_src
|
||||
$ngx_cc$ngx_tab$ngx_objout$ngx_obj$ngx_tab$ngx_src$NGX_AUX
|
||||
|
||||
END
|
||||
done
|
||||
|
||||
fi
|
||||
|
||||
|
||||
# the addons sources
|
||||
|
||||
if test -n "$NGX_ADDON_SRCS"; then
|
||||
|
||||
ngx_cc="\$(CC) $ngx_compile_opt \$(CFLAGS) $ngx_use_pch \$(ALL_INCS)"
|
||||
|
||||
for ngx_src in $NGX_ADDON_SRCS
|
||||
do
|
||||
ngx_obj="addon/`basename \`dirname $ngx_src\``"
|
||||
|
||||
ngx_obj=`echo $ngx_obj/\`basename $ngx_src\` \
|
||||
| sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||
|
||||
ngx_obj=`echo $ngx_obj \
|
||||
| sed -e "s#^\(.*\.\)cpp\\$#$ngx_objs_dir\1$ngx_objext#g" \
|
||||
-e "s#^\(.*\.\)cc\\$#$ngx_objs_dir\1$ngx_objext#g" \
|
||||
-e "s#^\(.*\.\)c\\$#$ngx_objs_dir\1$ngx_objext#g" \
|
||||
-e "s#^\(.*\.\)S\\$#$ngx_objs_dir\1$ngx_objext#g"`
|
||||
|
||||
ngx_src=`echo $ngx_src | sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||
|
||||
cat << END >> $NGX_MAKEFILE
|
||||
|
||||
$ngx_obj: \$(ADDON_DEPS)$ngx_cont$ngx_src
|
||||
$ngx_cc$ngx_tab$ngx_objout$ngx_obj$ngx_tab$ngx_src$NGX_AUX
|
||||
|
||||
END
|
||||
done
|
||||
|
||||
fi
|
||||
|
||||
|
||||
# the addons config.make
|
||||
|
||||
if test -n "$NGX_ADDONS$DYNAMIC_ADDONS"; then
|
||||
|
||||
for ngx_addon_dir in $NGX_ADDONS $DYNAMIC_ADDONS
|
||||
do
|
||||
if test -f $ngx_addon_dir/config.make; then
|
||||
. $ngx_addon_dir/config.make
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
|
||||
# Win32 resource file
|
||||
|
||||
if test -n "$NGX_RES"; then
|
||||
|
||||
ngx_res=`echo "$NGX_RES: $NGX_RC $NGX_ICONS" \
|
||||
| sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||
ngx_rcc=`echo $NGX_RCC | sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||
|
||||
cat << END >> $NGX_MAKEFILE
|
||||
|
||||
$ngx_res
|
||||
$ngx_rcc
|
||||
|
||||
END
|
||||
done
|
||||
|
||||
fi
|
||||
|
||||
|
|
@ -471,13 +259,13 @@ fi
|
|||
# the precompiled headers
|
||||
|
||||
if test -n "$NGX_PCH"; then
|
||||
echo "#include <ngx_config.h>" > $NGX_OBJS/ngx_pch.c
|
||||
echo "#include <ngx_config.h>" > $OBJS/ngx_pch.c
|
||||
|
||||
ngx_pch="src/core/ngx_config.h $OS_CONFIG $NGX_OBJS/ngx_auto_config.h"
|
||||
ngx_pch="src/core/ngx_config.h $OS_CONFIG $OBJS/ngx_auto_config.h"
|
||||
ngx_pch=`echo "$NGX_PCH: $ngx_pch" | sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||
|
||||
ngx_src="\$(CC) \$(CFLAGS) $NGX_BUILD_PCH $ngx_compile_opt \$(ALL_INCS)"
|
||||
ngx_src="$ngx_src $ngx_objout$NGX_OBJS/ngx_pch.obj $NGX_OBJS/ngx_pch.c"
|
||||
ngx_src="$ngx_src $ngx_objout$OBJS/ngx_pch.obj $OBJS/ngx_pch.c"
|
||||
ngx_src=`echo $ngx_src | sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||
|
||||
cat << END >> $NGX_MAKEFILE
|
||||
|
|
@ -488,187 +276,3 @@ $ngx_pch
|
|||
END
|
||||
|
||||
fi
|
||||
|
||||
|
||||
# dynamic modules
|
||||
|
||||
if test -n "$NGX_PCH"; then
|
||||
ngx_cc="\$(CC) $ngx_compile_opt $ngx_pic_opt \$(CFLAGS) $ngx_use_pch \$(ALL_INCS)"
|
||||
else
|
||||
ngx_cc="\$(CC) $ngx_compile_opt $ngx_pic_opt \$(CFLAGS) \$(ALL_INCS)"
|
||||
ngx_perl_cc="\$(CC) $ngx_compile_opt $ngx_pic_opt \$(NGX_PERL_CFLAGS)"
|
||||
ngx_perl_cc="$ngx_perl_cc \$(ALL_INCS)"
|
||||
fi
|
||||
|
||||
for ngx_module in $DYNAMIC_MODULES
|
||||
do
|
||||
eval ngx_module_srcs="\$${ngx_module}_SRCS"
|
||||
eval ngx_module_shrd="\$${ngx_module}_SHRD"
|
||||
eval eval ngx_module_libs="\\\"\$${ngx_module}_LIBS\\\""
|
||||
|
||||
eval ngx_module_modules="\$${ngx_module}_MODULES"
|
||||
eval ngx_module_order="\$${ngx_module}_ORDER"
|
||||
|
||||
ngx_modules_c=$NGX_OBJS/${ngx_module}_modules.c
|
||||
|
||||
cat << END > $ngx_modules_c
|
||||
|
||||
#include <ngx_config.h>
|
||||
#include <ngx_core.h>
|
||||
|
||||
END
|
||||
|
||||
for mod in $ngx_module_modules
|
||||
do
|
||||
echo "extern ngx_module_t $mod;" >> $ngx_modules_c
|
||||
done
|
||||
|
||||
echo >> $ngx_modules_c
|
||||
echo 'ngx_module_t *ngx_modules[] = {' >> $ngx_modules_c
|
||||
|
||||
for mod in $ngx_module_modules
|
||||
do
|
||||
echo " &$mod," >> $ngx_modules_c
|
||||
done
|
||||
|
||||
cat << END >> $ngx_modules_c
|
||||
NULL
|
||||
};
|
||||
|
||||
END
|
||||
|
||||
echo 'char *ngx_module_names[] = {' >> $ngx_modules_c
|
||||
|
||||
for mod in $ngx_module_modules
|
||||
do
|
||||
echo " \"$mod\"," >> $ngx_modules_c
|
||||
done
|
||||
|
||||
cat << END >> $ngx_modules_c
|
||||
NULL
|
||||
};
|
||||
|
||||
END
|
||||
|
||||
echo 'char *ngx_module_order[] = {' >> $ngx_modules_c
|
||||
|
||||
for mod in $ngx_module_order
|
||||
do
|
||||
echo " \"$mod\"," >> $ngx_modules_c
|
||||
done
|
||||
|
||||
cat << END >> $ngx_modules_c
|
||||
NULL
|
||||
};
|
||||
|
||||
END
|
||||
|
||||
ngx_modules_c=`echo $ngx_modules_c | sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||
|
||||
ngx_modules_obj=`echo $ngx_modules_c \
|
||||
| sed -e "s/\(.*\.\)c/\1$ngx_objext/"`
|
||||
|
||||
ngx_module_objs=
|
||||
for ngx_src in $ngx_module_srcs $ngx_module_shrd
|
||||
do
|
||||
case "$ngx_src" in
|
||||
src/*)
|
||||
ngx_obj=$ngx_src
|
||||
;;
|
||||
*)
|
||||
ngx_obj="addon/`basename \`dirname $ngx_src\``"
|
||||
mkdir -p $NGX_OBJS/$ngx_obj
|
||||
ngx_obj="$ngx_obj/`basename $ngx_src`"
|
||||
;;
|
||||
esac
|
||||
|
||||
ngx_module_objs="$ngx_module_objs $ngx_obj"
|
||||
done
|
||||
|
||||
ngx_module_objs=`echo $ngx_module_objs \
|
||||
| sed -e "s#\([^ ]*\.\)cpp#$NGX_OBJS\/\1$ngx_objext#g" \
|
||||
-e "s#\([^ ]*\.\)cc#$NGX_OBJS\/\1$ngx_objext#g" \
|
||||
-e "s#\([^ ]*\.\)c#$NGX_OBJS\/\1$ngx_objext#g" \
|
||||
-e "s#\([^ ]*\.\)S#$NGX_OBJS\/\1$ngx_objext#g"`
|
||||
|
||||
ngx_deps=`echo $ngx_module_objs $ngx_modules_obj $LINK_DEPS \
|
||||
| sed -e "s/ *\([^ ][^ ]*\)/$ngx_regex_cont\1/g" \
|
||||
-e "s/\//$ngx_regex_dirsep/g"`
|
||||
|
||||
ngx_objs=`echo $ngx_module_objs $ngx_modules_obj \
|
||||
| sed -e "s/ *\([^ ][^ ]*\)/$ngx_long_regex_cont\1/g" \
|
||||
-e "s/\//$ngx_regex_dirsep/g"`
|
||||
|
||||
ngx_obj=$NGX_OBJS$ngx_dirsep$ngx_module$ngx_modext
|
||||
|
||||
if [ "$NGX_PLATFORM" = win32 ]; then
|
||||
ngx_module_libs="$CORE_LIBS $ngx_module_libs"
|
||||
fi
|
||||
|
||||
ngx_libs=
|
||||
if test -n "$NGX_LD_OPT$ngx_module_libs"; then
|
||||
ngx_libs=`echo $NGX_LD_OPT $ngx_module_libs \
|
||||
| sed -e "s/\//$ngx_regex_dirsep/g" -e "s/^/$ngx_long_regex_cont/"`
|
||||
fi
|
||||
|
||||
ngx_link=${CORE_LINK:+`echo $CORE_LINK \
|
||||
| sed -e "s/\//$ngx_regex_dirsep/g" -e "s/^/$ngx_long_regex_cont/"`}
|
||||
|
||||
ngx_module_link=${MODULE_LINK:+`echo $MODULE_LINK \
|
||||
| sed -e "s/\//$ngx_regex_dirsep/g" -e "s/^/$ngx_long_regex_cont/"`}
|
||||
|
||||
|
||||
cat << END >> $NGX_MAKEFILE
|
||||
|
||||
modules: $ngx_obj
|
||||
|
||||
$ngx_obj: $ngx_deps$ngx_spacer
|
||||
\$(LINK) $ngx_long_start$ngx_binout$ngx_obj$ngx_long_cont$ngx_objs$ngx_libs$ngx_link$ngx_module_link
|
||||
$ngx_long_end
|
||||
|
||||
$ngx_modules_obj: \$(CORE_DEPS)$ngx_cont$ngx_modules_c
|
||||
$ngx_cc$ngx_tab$ngx_objout$ngx_modules_obj$ngx_tab$ngx_modules_c$NGX_AUX
|
||||
|
||||
END
|
||||
|
||||
for ngx_source in $ngx_module_srcs
|
||||
do
|
||||
case "$ngx_source" in
|
||||
src/*)
|
||||
ngx_obj=`echo $ngx_source | sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||
;;
|
||||
*)
|
||||
ngx_obj="addon/`basename \`dirname $ngx_source\``"
|
||||
ngx_obj=`echo $ngx_obj/\`basename $ngx_source\` \
|
||||
| sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||
;;
|
||||
esac
|
||||
|
||||
ngx_obj=`echo $ngx_obj \
|
||||
| sed -e "s#^\(.*\.\)cpp\\$#$ngx_objs_dir\1$ngx_objext#g" \
|
||||
-e "s#^\(.*\.\)cc\\$#$ngx_objs_dir\1$ngx_objext#g" \
|
||||
-e "s#^\(.*\.\)c\\$#$ngx_objs_dir\1$ngx_objext#g" \
|
||||
-e "s#^\(.*\.\)S\\$#$ngx_objs_dir\1$ngx_objext#g"`
|
||||
|
||||
ngx_src=`echo $ngx_source | sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||
|
||||
if [ $ngx_source = src/http/modules/perl/ngx_http_perl_module.c ]; then
|
||||
|
||||
cat << END >> $NGX_MAKEFILE
|
||||
|
||||
$ngx_obj: \$(ADDON_DEPS)$ngx_cont$ngx_src
|
||||
$ngx_perl_cc$ngx_tab$ngx_objout$ngx_obj$ngx_tab$ngx_src$NGX_AUX
|
||||
|
||||
END
|
||||
else
|
||||
|
||||
cat << END >> $NGX_MAKEFILE
|
||||
|
||||
$ngx_obj: \$(ADDON_DEPS)$ngx_cont$ngx_src
|
||||
$ngx_cc$ngx_tab$ngx_objout$ngx_obj$ngx_tab$ngx_src$NGX_AUX
|
||||
|
||||
END
|
||||
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
|
|
|||
178
auto/module
178
auto/module
|
|
@ -1,178 +0,0 @@
|
|||
|
||||
# Copyright (C) Ruslan Ermilov
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
case $ngx_module_type in
|
||||
HTTP_*) ngx_var=HTTP ;;
|
||||
*) ngx_var=$ngx_module_type ;;
|
||||
esac
|
||||
|
||||
|
||||
if [ "$ngx_module_link" = DYNAMIC ]; then
|
||||
|
||||
for ngx_module in $ngx_module_name; do
|
||||
# extract the first name
|
||||
break
|
||||
done
|
||||
|
||||
DYNAMIC_MODULES="$DYNAMIC_MODULES $ngx_module"
|
||||
|
||||
eval ${ngx_module}_MODULES=\"$ngx_module_name\"
|
||||
|
||||
if [ -z "$ngx_module_order" -a \
|
||||
\( "$ngx_module_type" = "HTTP_FILTER" \
|
||||
-o "$ngx_module_type" = "HTTP_AUX_FILTER" \) ]
|
||||
then
|
||||
eval ${ngx_module}_ORDER=\"$ngx_module_name \
|
||||
ngx_http_copy_filter_module\"
|
||||
else
|
||||
eval ${ngx_module}_ORDER=\"$ngx_module_order\"
|
||||
fi
|
||||
|
||||
srcs=
|
||||
shrd=
|
||||
for src in $ngx_module_srcs
|
||||
do
|
||||
found=no
|
||||
for old in $DYNAMIC_MODULES_SRCS
|
||||
do
|
||||
if [ $src = $old ]; then
|
||||
found=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if [ $found = no ]; then
|
||||
srcs="$srcs $src"
|
||||
else
|
||||
shrd="$shrd $src"
|
||||
fi
|
||||
done
|
||||
eval ${ngx_module}_SRCS=\"$srcs\"
|
||||
eval ${ngx_module}_SHRD=\"$shrd\"
|
||||
|
||||
DYNAMIC_MODULES_SRCS="$DYNAMIC_MODULES_SRCS $srcs"
|
||||
|
||||
if test -n "$ngx_module_incs"; then
|
||||
CORE_INCS="$CORE_INCS $ngx_module_incs"
|
||||
fi
|
||||
|
||||
if test -n "$ngx_module_deps"; then
|
||||
NGX_ADDON_DEPS="$NGX_ADDON_DEPS $ngx_module_deps"
|
||||
fi
|
||||
|
||||
libs=
|
||||
for lib in $ngx_module_libs
|
||||
do
|
||||
case $lib in
|
||||
|
||||
LIBXSLT | LIBGD | GEOIP | PERL)
|
||||
libs="$libs \$NGX_LIB_$lib"
|
||||
|
||||
if eval [ "\$USE_${lib}" = NO ] ; then
|
||||
eval USE_${lib}=DYNAMIC
|
||||
fi
|
||||
;;
|
||||
|
||||
PCRE | OPENSSL | ZLIB)
|
||||
eval USE_${lib}=YES
|
||||
;;
|
||||
|
||||
MD5 | SHA1)
|
||||
# obsolete
|
||||
;;
|
||||
|
||||
*)
|
||||
libs="$libs $lib"
|
||||
;;
|
||||
|
||||
esac
|
||||
done
|
||||
eval ${ngx_module}_LIBS=\'$libs\'
|
||||
|
||||
elif [ "$ngx_module_link" = YES ]; then
|
||||
|
||||
eval ${ngx_module_type}_MODULES=\"\$${ngx_module_type}_MODULES \
|
||||
$ngx_module_name\"
|
||||
|
||||
eval ${ngx_var}_SRCS=\"\$${ngx_var}_SRCS $ngx_module_srcs\"
|
||||
|
||||
if test -n "$ngx_module_incs"; then
|
||||
eval ${ngx_var}_INCS=\"\$${ngx_var}_INCS $ngx_module_incs\"
|
||||
fi
|
||||
|
||||
if test -n "$ngx_module_deps"; then
|
||||
eval ${ngx_var}_DEPS=\"\$${ngx_var}_DEPS $ngx_module_deps\"
|
||||
fi
|
||||
|
||||
for lib in $ngx_module_libs
|
||||
do
|
||||
case $lib in
|
||||
|
||||
PCRE | OPENSSL | ZLIB | LIBXSLT | LIBGD | PERL | GEOIP)
|
||||
eval USE_${lib}=YES
|
||||
;;
|
||||
|
||||
MD5 | SHA1)
|
||||
# obsolete
|
||||
;;
|
||||
|
||||
*)
|
||||
CORE_LIBS="$CORE_LIBS $lib"
|
||||
;;
|
||||
|
||||
esac
|
||||
done
|
||||
|
||||
elif [ "$ngx_module_link" = ADDON ]; then
|
||||
|
||||
eval ${ngx_module_type}_MODULES=\"\$${ngx_module_type}_MODULES \
|
||||
$ngx_module_name\"
|
||||
|
||||
srcs=
|
||||
for src in $ngx_module_srcs
|
||||
do
|
||||
found=no
|
||||
for old in $NGX_ADDON_SRCS
|
||||
do
|
||||
if [ $src = $old ]; then
|
||||
found=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if [ $found = no ]; then
|
||||
srcs="$srcs $src"
|
||||
fi
|
||||
done
|
||||
|
||||
NGX_ADDON_SRCS="$NGX_ADDON_SRCS $srcs"
|
||||
|
||||
if test -n "$ngx_module_incs"; then
|
||||
eval ${ngx_var}_INCS=\"\$${ngx_var}_INCS $ngx_module_incs\"
|
||||
fi
|
||||
|
||||
if test -n "$ngx_module_deps"; then
|
||||
NGX_ADDON_DEPS="$NGX_ADDON_DEPS $ngx_module_deps"
|
||||
fi
|
||||
|
||||
for lib in $ngx_module_libs
|
||||
do
|
||||
case $lib in
|
||||
|
||||
PCRE | OPENSSL | ZLIB | LIBXSLT | LIBGD | PERL | GEOIP)
|
||||
eval USE_${lib}=YES
|
||||
;;
|
||||
|
||||
MD5 | SHA1)
|
||||
# obsolete
|
||||
;;
|
||||
|
||||
*)
|
||||
CORE_LIBS="$CORE_LIBS $lib"
|
||||
;;
|
||||
|
||||
esac
|
||||
done
|
||||
fi
|
||||
1565
auto/modules
1565
auto/modules
File diff suppressed because it is too large
Load Diff
|
|
@ -1,6 +1,5 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
cat << END >> $NGX_AUTO_CONFIG_H
|
||||
|
|
|
|||
657
auto/options
657
auto/options
|
|
@ -1,190 +1,74 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
help=no
|
||||
|
||||
NGX_PREFIX=
|
||||
NGX_SBIN_PATH=
|
||||
NGX_MODULES_PATH=
|
||||
NGX_CONF_PREFIX=
|
||||
NGX_CONF_PATH=
|
||||
NGX_ERROR_LOG_PATH=
|
||||
NGX_PID_PATH=
|
||||
NGX_LOCK_PATH=
|
||||
PREFIX=
|
||||
SBIN_PATH=
|
||||
CONF_PATH=
|
||||
ERROR_LOG_PATH=
|
||||
PID_PATH=
|
||||
NGX_USER=
|
||||
NGX_GROUP=
|
||||
NGX_BUILD=
|
||||
HTTP_LOG_PATH=
|
||||
|
||||
CC=${CC:-cc}
|
||||
CC=${CC:-gcc}
|
||||
CPP=
|
||||
NGX_OBJS=objs
|
||||
|
||||
NGX_DEBUG=NO
|
||||
DEBUG=NO
|
||||
NGX_CC_OPT=
|
||||
NGX_LD_OPT=
|
||||
CPU=NO
|
||||
|
||||
NGX_RPATH=NO
|
||||
|
||||
NGX_TEST_BUILD_DEVPOLL=NO
|
||||
NGX_TEST_BUILD_EVENTPORT=NO
|
||||
NGX_TEST_BUILD_EPOLL=NO
|
||||
NGX_TEST_BUILD_SOLARIS_SENDFILEV=NO
|
||||
|
||||
NGX_PLATFORM=
|
||||
NGX_WINE=
|
||||
TEST_BUILD_DEVPOLL=NO
|
||||
TEST_BUILD_EPOLL=NO
|
||||
TEST_BUILD_RTSIG=NO
|
||||
|
||||
EVENT_FOUND=NO
|
||||
|
||||
EVENT_RTSIG=NO
|
||||
EVENT_SELECT=NO
|
||||
EVENT_POLL=NO
|
||||
EVENT_AIO=NO
|
||||
|
||||
USE_THREADS=NO
|
||||
|
||||
NGX_FILE_AIO=NO
|
||||
|
||||
QUIC_BPF=NO
|
||||
|
||||
HTTP=YES
|
||||
|
||||
NGX_HTTP_LOG_PATH=
|
||||
NGX_HTTP_CLIENT_TEMP_PATH=
|
||||
NGX_HTTP_PROXY_TEMP_PATH=
|
||||
NGX_HTTP_FASTCGI_TEMP_PATH=
|
||||
NGX_HTTP_UWSGI_TEMP_PATH=
|
||||
NGX_HTTP_SCGI_TEMP_PATH=
|
||||
|
||||
HTTP_CACHE=YES
|
||||
HTTP_CHARSET=YES
|
||||
HTTP_GZIP=YES
|
||||
HTTP_SSL=NO
|
||||
HTTP_V2=NO
|
||||
HTTP_V3=NO
|
||||
HTTP_SSI=YES
|
||||
HTTP_REALIP=NO
|
||||
HTTP_XSLT=NO
|
||||
HTTP_IMAGE_FILTER=NO
|
||||
HTTP_SUB=NO
|
||||
HTTP_ADDITION=NO
|
||||
HTTP_DAV=NO
|
||||
HTTP_SSI=NO
|
||||
HTTP_ACCESS=YES
|
||||
HTTP_AUTH_BASIC=YES
|
||||
HTTP_AUTH_REQUEST=NO
|
||||
HTTP_MIRROR=YES
|
||||
HTTP_USERID=YES
|
||||
HTTP_SLICE=NO
|
||||
HTTP_AUTOINDEX=YES
|
||||
HTTP_RANDOM_INDEX=NO
|
||||
HTTP_STATUS=NO
|
||||
HTTP_GEO=YES
|
||||
HTTP_GEOIP=NO
|
||||
HTTP_MAP=YES
|
||||
HTTP_SPLIT_CLIENTS=YES
|
||||
HTTP_REFERER=YES
|
||||
HTTP_REWRITE=YES
|
||||
HTTP_PROXY=YES
|
||||
HTTP_FASTCGI=YES
|
||||
HTTP_UWSGI=YES
|
||||
HTTP_SCGI=YES
|
||||
HTTP_GRPC=YES
|
||||
HTTP_PERL=NO
|
||||
HTTP_MEMCACHED=YES
|
||||
HTTP_LIMIT_CONN=YES
|
||||
HTTP_LIMIT_REQ=YES
|
||||
HTTP_EMPTY_GIF=YES
|
||||
HTTP_BROWSER=YES
|
||||
HTTP_SECURE_LINK=NO
|
||||
HTTP_DEGRADATION=NO
|
||||
HTTP_FLV=NO
|
||||
HTTP_MP4=NO
|
||||
HTTP_GUNZIP=NO
|
||||
HTTP_GZIP_STATIC=NO
|
||||
HTTP_UPSTREAM_HASH=YES
|
||||
HTTP_UPSTREAM_IP_HASH=YES
|
||||
HTTP_UPSTREAM_LEAST_CONN=YES
|
||||
HTTP_UPSTREAM_RANDOM=YES
|
||||
HTTP_UPSTREAM_KEEPALIVE=YES
|
||||
HTTP_UPSTREAM_ZONE=YES
|
||||
|
||||
# STUB
|
||||
HTTP_STUB_STATUS=NO
|
||||
|
||||
MAIL=NO
|
||||
MAIL_SSL=NO
|
||||
MAIL_POP3=YES
|
||||
MAIL_IMAP=YES
|
||||
MAIL_SMTP=YES
|
||||
|
||||
STREAM=NO
|
||||
STREAM_SSL=NO
|
||||
STREAM_REALIP=NO
|
||||
STREAM_LIMIT_CONN=YES
|
||||
STREAM_ACCESS=YES
|
||||
STREAM_GEO=YES
|
||||
STREAM_GEOIP=NO
|
||||
STREAM_MAP=YES
|
||||
STREAM_SPLIT_CLIENTS=YES
|
||||
STREAM_RETURN=YES
|
||||
STREAM_PASS=YES
|
||||
STREAM_SET=YES
|
||||
STREAM_UPSTREAM_HASH=YES
|
||||
STREAM_UPSTREAM_LEAST_CONN=YES
|
||||
STREAM_UPSTREAM_RANDOM=YES
|
||||
STREAM_UPSTREAM_ZONE=YES
|
||||
STREAM_SSL_PREREAD=NO
|
||||
|
||||
DYNAMIC_MODULES=
|
||||
DYNAMIC_MODULES_SRCS=
|
||||
|
||||
NGX_ADDONS=
|
||||
NGX_ADDON_SRCS=
|
||||
NGX_ADDON_DEPS=
|
||||
DYNAMIC_ADDONS=
|
||||
|
||||
NGX_COMPAT=NO
|
||||
IMAP=NO
|
||||
|
||||
USE_PCRE=NO
|
||||
PCRE=NONE
|
||||
PCRE_OPT=
|
||||
PCRE_CONF_OPT=
|
||||
PCRE_JIT=NO
|
||||
PCRE2=YES
|
||||
|
||||
USE_OPENSSL=NO
|
||||
USE_OPENSSL_QUIC=NO
|
||||
OPENSSL=NONE
|
||||
|
||||
USE_MD5=NO
|
||||
MD5=NONE
|
||||
MD5_OPT=
|
||||
MD5_ASM=NO
|
||||
|
||||
USE_ZLIB=NO
|
||||
ZLIB=NONE
|
||||
ZLIB_OPT=
|
||||
ZLIB_ASM=NO
|
||||
|
||||
USE_PERL=NO
|
||||
NGX_PERL=perl
|
||||
|
||||
USE_LIBXSLT=NO
|
||||
USE_LIBGD=NO
|
||||
USE_GEOIP=NO
|
||||
|
||||
NGX_GOOGLE_PERFTOOLS=NO
|
||||
NGX_CPP_TEST=NO
|
||||
|
||||
SO_COOKIE_FOUND=NO
|
||||
|
||||
NGX_LIBATOMIC=NO
|
||||
|
||||
NGX_CPU_CACHE_LINE=
|
||||
|
||||
NGX_POST_CONF_MSG=
|
||||
|
||||
opt=
|
||||
|
||||
for option
|
||||
do
|
||||
opt="$opt `echo $option | sed -e \"s/\(--[^=]*=\)\(.* .*\)/\1'\2'/\"`"
|
||||
|
||||
case "$option" in
|
||||
-*=*) value=`echo "$option" | sed -e 's/[-_a-zA-Z0-9]*=//'` ;;
|
||||
*) value="" ;;
|
||||
|
|
@ -193,224 +77,68 @@ do
|
|||
case "$option" in
|
||||
--help) help=yes ;;
|
||||
|
||||
--prefix=) NGX_PREFIX="!" ;;
|
||||
--prefix=*) NGX_PREFIX="$value" ;;
|
||||
--sbin-path=*) NGX_SBIN_PATH="$value" ;;
|
||||
--modules-path=*) NGX_MODULES_PATH="$value" ;;
|
||||
--conf-path=*) NGX_CONF_PATH="$value" ;;
|
||||
--error-log-path=*) NGX_ERROR_LOG_PATH="$value";;
|
||||
--pid-path=*) NGX_PID_PATH="$value" ;;
|
||||
--lock-path=*) NGX_LOCK_PATH="$value" ;;
|
||||
--prefix=*) PREFIX="$value" ;;
|
||||
--sbin-path=*) SBIN_PATH="$value" ;;
|
||||
--conf-path=*) CONF_PATH="$value" ;;
|
||||
--error-log-path=*) ERROR_LOG_PATH="$value" ;;
|
||||
--pid-path=*) PID_PATH="$value" ;;
|
||||
--user=*) NGX_USER="$value" ;;
|
||||
--group=*) NGX_GROUP="$value" ;;
|
||||
|
||||
--crossbuild=*) NGX_PLATFORM="$value" ;;
|
||||
--crossbuild=*) PLATFORM="$value" ;;
|
||||
|
||||
--build=*) NGX_BUILD="$value" ;;
|
||||
--builddir=*) NGX_OBJS="$value" ;;
|
||||
|
||||
--with-rtsig_module) EVENT_RTSIG=YES ;;
|
||||
--with-select_module) EVENT_SELECT=YES ;;
|
||||
--without-select_module) EVENT_SELECT=NONE ;;
|
||||
--with-poll_module) EVENT_POLL=YES ;;
|
||||
--without-poll_module) EVENT_POLL=NONE ;;
|
||||
--with-aio_module) EVENT_AIO=YES ;;
|
||||
|
||||
--with-threads) USE_THREADS=YES ;;
|
||||
|
||||
--with-file-aio) NGX_FILE_AIO=YES ;;
|
||||
|
||||
--without-quic_bpf_module) QUIC_BPF=NONE ;;
|
||||
|
||||
--with-ipv6)
|
||||
NGX_POST_CONF_MSG="$NGX_POST_CONF_MSG
|
||||
$0: warning: the \"--with-ipv6\" option is deprecated"
|
||||
;;
|
||||
--with-threads=*) USE_THREADS="$value" ;;
|
||||
--with-threads) USE_THREADS="pthreads" ;;
|
||||
|
||||
--without-http) HTTP=NO ;;
|
||||
--without-http-cache) HTTP_CACHE=NO ;;
|
||||
|
||||
--http-log-path=*) NGX_HTTP_LOG_PATH="$value" ;;
|
||||
--http-client-body-temp-path=*) NGX_HTTP_CLIENT_TEMP_PATH="$value" ;;
|
||||
--http-proxy-temp-path=*) NGX_HTTP_PROXY_TEMP_PATH="$value" ;;
|
||||
--http-fastcgi-temp-path=*) NGX_HTTP_FASTCGI_TEMP_PATH="$value" ;;
|
||||
--http-uwsgi-temp-path=*) NGX_HTTP_UWSGI_TEMP_PATH="$value" ;;
|
||||
--http-scgi-temp-path=*) NGX_HTTP_SCGI_TEMP_PATH="$value" ;;
|
||||
--http-log-path=*) HTTP_LOG_PATH="$value" ;;
|
||||
|
||||
--with-http_ssl_module) HTTP_SSL=YES ;;
|
||||
--with-http_v2_module) HTTP_V2=YES ;;
|
||||
--with-http_v3_module) HTTP_V3=YES ;;
|
||||
--with-http_realip_module) HTTP_REALIP=YES ;;
|
||||
--with-http_addition_module) HTTP_ADDITION=YES ;;
|
||||
--with-http_xslt_module) HTTP_XSLT=YES ;;
|
||||
--with-http_xslt_module=dynamic) HTTP_XSLT=DYNAMIC ;;
|
||||
--with-http_image_filter_module) HTTP_IMAGE_FILTER=YES ;;
|
||||
--with-http_image_filter_module=dynamic)
|
||||
HTTP_IMAGE_FILTER=DYNAMIC ;;
|
||||
--with-http_geoip_module) HTTP_GEOIP=YES ;;
|
||||
--with-http_geoip_module=dynamic)
|
||||
HTTP_GEOIP=DYNAMIC ;;
|
||||
--with-http_sub_module) HTTP_SUB=YES ;;
|
||||
--with-http_dav_module) HTTP_DAV=YES ;;
|
||||
--with-http_flv_module) HTTP_FLV=YES ;;
|
||||
--with-http_mp4_module) HTTP_MP4=YES ;;
|
||||
--with-http_gunzip_module) HTTP_GUNZIP=YES ;;
|
||||
--with-http_gzip_static_module) HTTP_GZIP_STATIC=YES ;;
|
||||
--with-http_auth_request_module) HTTP_AUTH_REQUEST=YES ;;
|
||||
--with-http_random_index_module) HTTP_RANDOM_INDEX=YES ;;
|
||||
--with-http_secure_link_module) HTTP_SECURE_LINK=YES ;;
|
||||
--with-http_degradation_module) HTTP_DEGRADATION=YES ;;
|
||||
--with-http_slice_module) HTTP_SLICE=YES ;;
|
||||
|
||||
--without-http_charset_module) HTTP_CHARSET=NO ;;
|
||||
--without-http_gzip_module) HTTP_GZIP=NO ;;
|
||||
--without-http_ssi_module) HTTP_SSI=NO ;;
|
||||
--without-http_userid_module) HTTP_USERID=NO ;;
|
||||
--without-http_access_module) HTTP_ACCESS=NO ;;
|
||||
--without-http_auth_basic_module) HTTP_AUTH_BASIC=NO ;;
|
||||
--without-http_mirror_module) HTTP_MIRROR=NO ;;
|
||||
--without-http_autoindex_module) HTTP_AUTOINDEX=NO ;;
|
||||
--without-http_status_module) HTTP_STATUS=NO ;;
|
||||
--without-http_geo_module) HTTP_GEO=NO ;;
|
||||
--without-http_map_module) HTTP_MAP=NO ;;
|
||||
--without-http_split_clients_module) HTTP_SPLIT_CLIENTS=NO ;;
|
||||
--without-http_referer_module) HTTP_REFERER=NO ;;
|
||||
--without-http_rewrite_module) HTTP_REWRITE=NO ;;
|
||||
--without-http_proxy_module) HTTP_PROXY=NO ;;
|
||||
--without-http_fastcgi_module) HTTP_FASTCGI=NO ;;
|
||||
--without-http_uwsgi_module) HTTP_UWSGI=NO ;;
|
||||
--without-http_scgi_module) HTTP_SCGI=NO ;;
|
||||
--without-http_grpc_module) HTTP_GRPC=NO ;;
|
||||
--without-http_memcached_module) HTTP_MEMCACHED=NO ;;
|
||||
--without-http_limit_conn_module) HTTP_LIMIT_CONN=NO ;;
|
||||
--without-http_limit_req_module) HTTP_LIMIT_REQ=NO ;;
|
||||
--without-http_empty_gif_module) HTTP_EMPTY_GIF=NO ;;
|
||||
--without-http_browser_module) HTTP_BROWSER=NO ;;
|
||||
--without-http_upstream_hash_module) HTTP_UPSTREAM_HASH=NO ;;
|
||||
--without-http_upstream_ip_hash_module) HTTP_UPSTREAM_IP_HASH=NO ;;
|
||||
--without-http_upstream_least_conn_module)
|
||||
HTTP_UPSTREAM_LEAST_CONN=NO ;;
|
||||
--without-http_upstream_random_module)
|
||||
HTTP_UPSTREAM_RANDOM=NO ;;
|
||||
--without-http_upstream_keepalive_module) HTTP_UPSTREAM_KEEPALIVE=NO ;;
|
||||
--without-http_upstream_zone_module) HTTP_UPSTREAM_ZONE=NO ;;
|
||||
|
||||
--with-http_perl_module) HTTP_PERL=YES ;;
|
||||
--with-http_perl_module=dynamic) HTTP_PERL=DYNAMIC ;;
|
||||
--with-perl_modules_path=*) NGX_PERL_MODULES="$value" ;;
|
||||
--with-perl=*) NGX_PERL="$value" ;;
|
||||
|
||||
# STUB
|
||||
--with-http_stub_status_module) HTTP_STUB_STATUS=YES ;;
|
||||
|
||||
--with-mail) MAIL=YES ;;
|
||||
--with-mail=dynamic) MAIL=DYNAMIC ;;
|
||||
--with-mail_ssl_module) MAIL_SSL=YES ;;
|
||||
# STUB
|
||||
--with-imap)
|
||||
MAIL=YES
|
||||
NGX_POST_CONF_MSG="$NGX_POST_CONF_MSG
|
||||
$0: warning: the \"--with-imap\" option is deprecated, \
|
||||
use the \"--with-mail\" option instead"
|
||||
;;
|
||||
--with-imap_ssl_module)
|
||||
MAIL_SSL=YES
|
||||
NGX_POST_CONF_MSG="$NGX_POST_CONF_MSG
|
||||
$0: warning: the \"--with-imap_ssl_module\" option is deprecated, \
|
||||
use the \"--with-mail_ssl_module\" option instead"
|
||||
;;
|
||||
--without-mail_pop3_module) MAIL_POP3=NO ;;
|
||||
--without-mail_imap_module) MAIL_IMAP=NO ;;
|
||||
--without-mail_smtp_module) MAIL_SMTP=NO ;;
|
||||
|
||||
--with-stream) STREAM=YES ;;
|
||||
--with-stream=dynamic) STREAM=DYNAMIC ;;
|
||||
--with-stream_ssl_module) STREAM_SSL=YES ;;
|
||||
--with-stream_realip_module) STREAM_REALIP=YES ;;
|
||||
--with-stream_geoip_module) STREAM_GEOIP=YES ;;
|
||||
--with-stream_geoip_module=dynamic)
|
||||
STREAM_GEOIP=DYNAMIC ;;
|
||||
--with-stream_ssl_preread_module)
|
||||
STREAM_SSL_PREREAD=YES ;;
|
||||
--without-stream_limit_conn_module)
|
||||
STREAM_LIMIT_CONN=NO ;;
|
||||
--without-stream_access_module) STREAM_ACCESS=NO ;;
|
||||
--without-stream_geo_module) STREAM_GEO=NO ;;
|
||||
--without-stream_map_module) STREAM_MAP=NO ;;
|
||||
--without-stream_split_clients_module)
|
||||
STREAM_SPLIT_CLIENTS=NO ;;
|
||||
--without-stream_return_module) STREAM_RETURN=NO ;;
|
||||
--without-stream_pass_module) STREAM_PASS=NO ;;
|
||||
--without-stream_set_module) STREAM_SET=NO ;;
|
||||
--without-stream_upstream_hash_module)
|
||||
STREAM_UPSTREAM_HASH=NO ;;
|
||||
--without-stream_upstream_least_conn_module)
|
||||
STREAM_UPSTREAM_LEAST_CONN=NO ;;
|
||||
--without-stream_upstream_random_module)
|
||||
STREAM_UPSTREAM_RANDOM=NO ;;
|
||||
--without-stream_upstream_zone_module)
|
||||
STREAM_UPSTREAM_ZONE=NO ;;
|
||||
|
||||
--with-google_perftools_module) NGX_GOOGLE_PERFTOOLS=YES ;;
|
||||
--with-cpp_test_module) NGX_CPP_TEST=YES ;;
|
||||
|
||||
--add-module=*) NGX_ADDONS="$NGX_ADDONS $value" ;;
|
||||
--add-dynamic-module=*) DYNAMIC_ADDONS="$DYNAMIC_ADDONS $value" ;;
|
||||
|
||||
--with-compat) NGX_COMPAT=YES ;;
|
||||
--with-imap) IMAP=YES ;;
|
||||
|
||||
--with-cc=*) CC="$value" ;;
|
||||
--with-cpp=*) CPP="$value" ;;
|
||||
--with-cc-opt=*) NGX_CC_OPT="$value" ;;
|
||||
--with-ld-opt=*) NGX_LD_OPT="$value" ;;
|
||||
--with-cpu-opt=*) CPU="$value" ;;
|
||||
--with-debug) NGX_DEBUG=YES ;;
|
||||
--with-debug) DEBUG=YES ;;
|
||||
|
||||
--without-pcre) USE_PCRE=DISABLED ;;
|
||||
--with-pcre) USE_PCRE=YES ;;
|
||||
--with-pcre=*) PCRE="$value" ;;
|
||||
--with-pcre-opt=*) PCRE_OPT="$value" ;;
|
||||
--with-pcre-jit) PCRE_JIT=YES ;;
|
||||
--without-pcre2) PCRE2=DISABLED ;;
|
||||
|
||||
--with-openssl=*) OPENSSL="$value" ;;
|
||||
--with-openssl-opt=*) OPENSSL_OPT="$value" ;;
|
||||
|
||||
--with-md5=*)
|
||||
NGX_POST_CONF_MSG="$NGX_POST_CONF_MSG
|
||||
$0: warning: the \"--with-md5\" option is deprecated"
|
||||
;;
|
||||
--with-md5-opt=*)
|
||||
NGX_POST_CONF_MSG="$NGX_POST_CONF_MSG
|
||||
$0: warning: the \"--with-md5-opt\" option is deprecated"
|
||||
;;
|
||||
--with-md5-asm)
|
||||
NGX_POST_CONF_MSG="$NGX_POST_CONF_MSG
|
||||
$0: warning: the \"--with-md5-asm\" option is deprecated"
|
||||
;;
|
||||
|
||||
--with-sha1=*)
|
||||
NGX_POST_CONF_MSG="$NGX_POST_CONF_MSG
|
||||
$0: warning: the \"--with-sha1\" option is deprecated"
|
||||
;;
|
||||
--with-sha1-opt=*)
|
||||
NGX_POST_CONF_MSG="$NGX_POST_CONF_MSG
|
||||
$0: warning: the \"--with-sha1-opt\" option is deprecated"
|
||||
;;
|
||||
--with-sha1-asm)
|
||||
NGX_POST_CONF_MSG="$NGX_POST_CONF_MSG
|
||||
$0: warning: the \"--with-sha1-asm\" option is deprecated"
|
||||
;;
|
||||
--with-md5=*) MD5="$value" ;;
|
||||
--with-md5-opt=*) MD5_OPT="$value" ;;
|
||||
--with-md5-asm) MD5_ASM=YES ;;
|
||||
|
||||
--with-zlib=*) ZLIB="$value" ;;
|
||||
--with-zlib-opt=*) ZLIB_OPT="$value" ;;
|
||||
--with-zlib-asm=*) ZLIB_ASM="$value" ;;
|
||||
|
||||
--with-libatomic) NGX_LIBATOMIC=YES ;;
|
||||
--with-libatomic=*) NGX_LIBATOMIC="$value" ;;
|
||||
|
||||
--test-build-devpoll) NGX_TEST_BUILD_DEVPOLL=YES ;;
|
||||
--test-build-eventport) NGX_TEST_BUILD_EVENTPORT=YES ;;
|
||||
--test-build-epoll) NGX_TEST_BUILD_EPOLL=YES ;;
|
||||
--test-build-solaris-sendfilev) NGX_TEST_BUILD_SOLARIS_SENDFILEV=YES ;;
|
||||
--test-build-devpoll) TEST_BUILD_DEVPOLL=YES ;;
|
||||
--test-build-epoll) TEST_BUILD_EPOLL=YES ;;
|
||||
--test-build-rtsig) TEST_BUILD_RTSIG=YES ;;
|
||||
|
||||
*)
|
||||
echo "$0: error: invalid option \"$option\""
|
||||
|
|
@ -420,191 +148,34 @@ $0: warning: the \"--with-sha1-asm\" option is deprecated"
|
|||
done
|
||||
|
||||
|
||||
NGX_CONFIGURE="$opt"
|
||||
|
||||
|
||||
if [ $help = yes ]; then
|
||||
|
||||
cat << END
|
||||
|
||||
--help print this message
|
||||
--help this message
|
||||
|
||||
--prefix=PATH set installation prefix
|
||||
--sbin-path=PATH set nginx binary pathname
|
||||
--modules-path=PATH set modules path
|
||||
--conf-path=PATH set nginx.conf pathname
|
||||
--error-log-path=PATH set error log pathname
|
||||
--pid-path=PATH set nginx.pid pathname
|
||||
--lock-path=PATH set nginx.lock pathname
|
||||
--user=USER set non-privilege user
|
||||
for the worker processes
|
||||
--group=GROUP set non-privilege group
|
||||
for the worker processes
|
||||
|
||||
--user=USER set non-privileged user for
|
||||
worker processes
|
||||
--group=GROUP set non-privileged group for
|
||||
worker processes
|
||||
--with-select_module enable select module
|
||||
--without-select_module disable select module
|
||||
--with-poll_module enable poll module
|
||||
--without-poll_module disable poll module
|
||||
|
||||
--build=NAME set build name
|
||||
--builddir=DIR set build directory
|
||||
--without-http_charset_module disable ngx_http_charset_module
|
||||
--without-http_rewrite_module disable ngx_http_rewrite_module
|
||||
--without-http_gzip_module disable ngx_http_gzip_module
|
||||
--without-http_proxy_module disable ngx_http_proxy_module
|
||||
|
||||
--with-select_module enable select module
|
||||
--without-select_module disable select module
|
||||
--with-poll_module enable poll module
|
||||
--without-poll_module disable poll module
|
||||
--with-cc-opt=OPTIONS additional options for compiler
|
||||
--with-ld-opt=OPTIONS additional options for linker
|
||||
|
||||
--with-threads enable thread pool support
|
||||
|
||||
--with-file-aio enable file AIO support
|
||||
|
||||
--without-quic_bpf_module disable ngx_quic_bpf_module
|
||||
|
||||
--with-http_ssl_module enable ngx_http_ssl_module
|
||||
--with-http_v2_module enable ngx_http_v2_module
|
||||
--with-http_v3_module enable ngx_http_v3_module
|
||||
--with-http_realip_module enable ngx_http_realip_module
|
||||
--with-http_addition_module enable ngx_http_addition_module
|
||||
--with-http_xslt_module enable ngx_http_xslt_module
|
||||
--with-http_xslt_module=dynamic enable dynamic ngx_http_xslt_module
|
||||
--with-http_image_filter_module enable ngx_http_image_filter_module
|
||||
--with-http_image_filter_module=dynamic
|
||||
enable dynamic ngx_http_image_filter_module
|
||||
--with-http_geoip_module enable ngx_http_geoip_module
|
||||
--with-http_geoip_module=dynamic enable dynamic ngx_http_geoip_module
|
||||
--with-http_sub_module enable ngx_http_sub_module
|
||||
--with-http_dav_module enable ngx_http_dav_module
|
||||
--with-http_flv_module enable ngx_http_flv_module
|
||||
--with-http_mp4_module enable ngx_http_mp4_module
|
||||
--with-http_gunzip_module enable ngx_http_gunzip_module
|
||||
--with-http_gzip_static_module enable ngx_http_gzip_static_module
|
||||
--with-http_auth_request_module enable ngx_http_auth_request_module
|
||||
--with-http_random_index_module enable ngx_http_random_index_module
|
||||
--with-http_secure_link_module enable ngx_http_secure_link_module
|
||||
--with-http_degradation_module enable ngx_http_degradation_module
|
||||
--with-http_slice_module enable ngx_http_slice_module
|
||||
--with-http_stub_status_module enable ngx_http_stub_status_module
|
||||
|
||||
--without-http_charset_module disable ngx_http_charset_module
|
||||
--without-http_gzip_module disable ngx_http_gzip_module
|
||||
--without-http_ssi_module disable ngx_http_ssi_module
|
||||
--without-http_userid_module disable ngx_http_userid_module
|
||||
--without-http_access_module disable ngx_http_access_module
|
||||
--without-http_auth_basic_module disable ngx_http_auth_basic_module
|
||||
--without-http_mirror_module disable ngx_http_mirror_module
|
||||
--without-http_autoindex_module disable ngx_http_autoindex_module
|
||||
--without-http_geo_module disable ngx_http_geo_module
|
||||
--without-http_map_module disable ngx_http_map_module
|
||||
--without-http_split_clients_module disable ngx_http_split_clients_module
|
||||
--without-http_referer_module disable ngx_http_referer_module
|
||||
--without-http_rewrite_module disable ngx_http_rewrite_module
|
||||
--without-http_proxy_module disable ngx_http_proxy_module
|
||||
--without-http_fastcgi_module disable ngx_http_fastcgi_module
|
||||
--without-http_uwsgi_module disable ngx_http_uwsgi_module
|
||||
--without-http_scgi_module disable ngx_http_scgi_module
|
||||
--without-http_grpc_module disable ngx_http_grpc_module
|
||||
--without-http_memcached_module disable ngx_http_memcached_module
|
||||
--without-http_limit_conn_module disable ngx_http_limit_conn_module
|
||||
--without-http_limit_req_module disable ngx_http_limit_req_module
|
||||
--without-http_empty_gif_module disable ngx_http_empty_gif_module
|
||||
--without-http_browser_module disable ngx_http_browser_module
|
||||
--without-http_upstream_hash_module
|
||||
disable ngx_http_upstream_hash_module
|
||||
--without-http_upstream_ip_hash_module
|
||||
disable ngx_http_upstream_ip_hash_module
|
||||
--without-http_upstream_least_conn_module
|
||||
disable ngx_http_upstream_least_conn_module
|
||||
--without-http_upstream_random_module
|
||||
disable ngx_http_upstream_random_module
|
||||
--without-http_upstream_keepalive_module
|
||||
disable ngx_http_upstream_keepalive_module
|
||||
--without-http_upstream_zone_module
|
||||
disable ngx_http_upstream_zone_module
|
||||
|
||||
--with-http_perl_module enable ngx_http_perl_module
|
||||
--with-http_perl_module=dynamic enable dynamic ngx_http_perl_module
|
||||
--with-perl_modules_path=PATH set Perl modules path
|
||||
--with-perl=PATH set perl binary pathname
|
||||
|
||||
--http-log-path=PATH set http access log pathname
|
||||
--http-client-body-temp-path=PATH set path to store
|
||||
http client request body temporary files
|
||||
--http-proxy-temp-path=PATH set path to store
|
||||
http proxy temporary files
|
||||
--http-fastcgi-temp-path=PATH set path to store
|
||||
http fastcgi temporary files
|
||||
--http-uwsgi-temp-path=PATH set path to store
|
||||
http uwsgi temporary files
|
||||
--http-scgi-temp-path=PATH set path to store
|
||||
http scgi temporary files
|
||||
|
||||
--without-http disable HTTP server
|
||||
--without-http-cache disable HTTP cache
|
||||
|
||||
--with-mail enable POP3/IMAP4/SMTP proxy module
|
||||
--with-mail=dynamic enable dynamic POP3/IMAP4/SMTP proxy module
|
||||
--with-mail_ssl_module enable ngx_mail_ssl_module
|
||||
--without-mail_pop3_module disable ngx_mail_pop3_module
|
||||
--without-mail_imap_module disable ngx_mail_imap_module
|
||||
--without-mail_smtp_module disable ngx_mail_smtp_module
|
||||
|
||||
--with-stream enable TCP/UDP proxy module
|
||||
--with-stream=dynamic enable dynamic TCP/UDP proxy module
|
||||
--with-stream_ssl_module enable ngx_stream_ssl_module
|
||||
--with-stream_realip_module enable ngx_stream_realip_module
|
||||
--with-stream_geoip_module enable ngx_stream_geoip_module
|
||||
--with-stream_geoip_module=dynamic enable dynamic ngx_stream_geoip_module
|
||||
--with-stream_ssl_preread_module enable ngx_stream_ssl_preread_module
|
||||
--without-stream_limit_conn_module disable ngx_stream_limit_conn_module
|
||||
--without-stream_access_module disable ngx_stream_access_module
|
||||
--without-stream_geo_module disable ngx_stream_geo_module
|
||||
--without-stream_map_module disable ngx_stream_map_module
|
||||
--without-stream_split_clients_module
|
||||
disable ngx_stream_split_clients_module
|
||||
--without-stream_return_module disable ngx_stream_return_module
|
||||
--without-stream_pass_module disable ngx_stream_pass_module
|
||||
--without-stream_set_module disable ngx_stream_set_module
|
||||
--without-stream_upstream_hash_module
|
||||
disable ngx_stream_upstream_hash_module
|
||||
--without-stream_upstream_least_conn_module
|
||||
disable ngx_stream_upstream_least_conn_module
|
||||
--without-stream_upstream_random_module
|
||||
disable ngx_stream_upstream_random_module
|
||||
--without-stream_upstream_zone_module
|
||||
disable ngx_stream_upstream_zone_module
|
||||
|
||||
--with-google_perftools_module enable ngx_google_perftools_module
|
||||
--with-cpp_test_module enable ngx_cpp_test_module
|
||||
|
||||
--add-module=PATH enable external module
|
||||
--add-dynamic-module=PATH enable dynamic external module
|
||||
|
||||
--with-compat dynamic modules compatibility
|
||||
|
||||
--with-cc=PATH set C compiler pathname
|
||||
--with-cpp=PATH set C preprocessor pathname
|
||||
--with-cc-opt=OPTIONS set additional C compiler options
|
||||
--with-ld-opt=OPTIONS set additional linker options
|
||||
--with-cpu-opt=CPU build for the specified CPU, valid values:
|
||||
pentium, pentiumpro, pentium3, pentium4,
|
||||
athlon, opteron, sparc32, sparc64, ppc64
|
||||
|
||||
--without-pcre disable PCRE library usage
|
||||
--with-pcre force PCRE library usage
|
||||
--with-pcre=DIR set path to PCRE library sources
|
||||
--with-pcre-opt=OPTIONS set additional build options for PCRE
|
||||
--with-pcre-jit build PCRE with JIT compilation support
|
||||
--without-pcre2 do not use PCRE2 library
|
||||
|
||||
--with-zlib=DIR set path to zlib library sources
|
||||
--with-zlib-opt=OPTIONS set additional build options for zlib
|
||||
--with-zlib-asm=CPU use zlib assembler sources optimized
|
||||
for the specified CPU, valid values:
|
||||
pentium, pentiumpro
|
||||
|
||||
--with-libatomic force libatomic_ops library usage
|
||||
--with-libatomic=DIR set path to libatomic_ops library sources
|
||||
|
||||
--with-openssl=DIR set path to OpenSSL library sources
|
||||
--with-openssl-opt=OPTIONS set additional build options for OpenSSL
|
||||
|
||||
--with-debug enable debug logging
|
||||
--with-pcre=DIR path to PCRE library
|
||||
--with-md5=DIR path to md5 library
|
||||
--with-zlib=DIR path to zlib library
|
||||
--with-openssl=DIR path to OpenSSL library
|
||||
|
||||
END
|
||||
|
||||
|
|
@ -612,39 +183,109 @@ END
|
|||
fi
|
||||
|
||||
|
||||
if [ ".$NGX_PLATFORM" = ".win32" ]; then
|
||||
NGX_WINE=$WINE
|
||||
if [ $HTTP = NO ]; then
|
||||
HTTP_CHARSET=NO
|
||||
HTTP_GZIP=NO
|
||||
HTTP_SSI=NO
|
||||
HTTP_USERID=NO
|
||||
HTTP_ACCESS=NO
|
||||
HTTP_STATUS=NO
|
||||
HTTP_REWRITE=NO
|
||||
HTTP_PROXY=NO
|
||||
fi
|
||||
|
||||
|
||||
NGX_SBIN_PATH=${NGX_SBIN_PATH:-sbin/nginx}
|
||||
NGX_MODULES_PATH=${NGX_MODULES_PATH:-modules}
|
||||
NGX_CONF_PATH=${NGX_CONF_PATH:-conf/nginx.conf}
|
||||
NGX_CONF_PREFIX=`dirname $NGX_CONF_PATH`
|
||||
NGX_PID_PATH=${NGX_PID_PATH:-logs/nginx.pid}
|
||||
NGX_LOCK_PATH=${NGX_LOCK_PATH:-logs/nginx.lock}
|
||||
|
||||
if [ ".$NGX_ERROR_LOG_PATH" = ".stderr" ]; then
|
||||
NGX_ERROR_LOG_PATH=
|
||||
else
|
||||
NGX_ERROR_LOG_PATH=${NGX_ERROR_LOG_PATH:-logs/error.log}
|
||||
if [ ".$PLATFORM" = ".win32" -a $EVENT_POLL = YES ]; then
|
||||
EVENT_POLL=NO
|
||||
echo "$0: warning: --with-poll_module option is ignored for win32"
|
||||
fi
|
||||
|
||||
NGX_HTTP_LOG_PATH=${NGX_HTTP_LOG_PATH:-logs/access.log}
|
||||
NGX_HTTP_CLIENT_TEMP_PATH=${NGX_HTTP_CLIENT_TEMP_PATH:-client_body_temp}
|
||||
NGX_HTTP_PROXY_TEMP_PATH=${NGX_HTTP_PROXY_TEMP_PATH:-proxy_temp}
|
||||
NGX_HTTP_FASTCGI_TEMP_PATH=${NGX_HTTP_FASTCGI_TEMP_PATH:-fastcgi_temp}
|
||||
NGX_HTTP_UWSGI_TEMP_PATH=${NGX_HTTP_UWSGI_TEMP_PATH:-uwsgi_temp}
|
||||
NGX_HTTP_SCGI_TEMP_PATH=${NGX_HTTP_SCGI_TEMP_PATH:-scgi_temp}
|
||||
|
||||
case ".$NGX_PERL_MODULES" in
|
||||
if test -z "$PREFIX"; then
|
||||
PREFIX=/usr/local/nginx
|
||||
fi
|
||||
|
||||
|
||||
if test -z "$NGX_GROUP"; then
|
||||
NGX_GROUP=NGX_USER
|
||||
fi
|
||||
|
||||
|
||||
if test -z "$NGX_USER"; then
|
||||
NGX_USER=nobody
|
||||
NGX_GROUP=nobody
|
||||
fi
|
||||
|
||||
|
||||
case ".$SBIN_PATH" in
|
||||
./*)
|
||||
;;
|
||||
|
||||
.)
|
||||
SBIN_PATH=$PREFIX/sbin/nginx
|
||||
;;
|
||||
|
||||
*)
|
||||
NGX_PERL_MODULES=$NGX_PREFIX/$NGX_PERL_MODULES
|
||||
SBIN_PATH=$PREFIX/$SBIN_PATH
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
case ".$CONF_PATH" in
|
||||
./*)
|
||||
;;
|
||||
|
||||
.)
|
||||
CONF_PATH=$PREFIX/conf/nginx.conf
|
||||
;;
|
||||
|
||||
*)
|
||||
CONF_PATH=$PREFIX/$CONF_PATH
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
case ".$PID_PATH" in
|
||||
./*)
|
||||
;;
|
||||
|
||||
.)
|
||||
PID_PATH=$PREFIX/logs/nginx.pid
|
||||
;;
|
||||
|
||||
*)
|
||||
PID_PATH=$PREFIX/$PID_PATH
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
case ".$ERROR_LOG_PATH" in
|
||||
./*)
|
||||
;;
|
||||
|
||||
.)
|
||||
ERROR_LOG_PATH=$PREFIX/logs/error.log
|
||||
;;
|
||||
|
||||
.stderr)
|
||||
ERROR_LOG_PATH=
|
||||
;;
|
||||
|
||||
*)
|
||||
ERROR_LOG_PATH=$PREFIX/$ERROR_LOG_PATH
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
case ".$HTTP_LOG_PATH" in
|
||||
./*)
|
||||
;;
|
||||
|
||||
.)
|
||||
HTTP_LOG_PATH=$PREFIX/logs/access.log
|
||||
;;
|
||||
|
||||
*)
|
||||
HTTP_LOG_PATH=$PREFIX/$HTTP_LOG_PATH
|
||||
;;
|
||||
esac
|
||||
|
|
|
|||
164
auto/os/conf
164
auto/os/conf
|
|
@ -1,13 +1,24 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
echo "checking for $NGX_SYSTEM specific features"
|
||||
if [ ".$PLATFORM" = "." ]; then
|
||||
echo "checking for OS"
|
||||
|
||||
case "$NGX_PLATFORM" in
|
||||
SYSTEM=`uname -s 2>/dev/null`
|
||||
RELEASE=`uname -r 2>/dev/null`
|
||||
MACHINE=`uname -m 2>/dev/null`
|
||||
|
||||
FreeBSD:*)
|
||||
echo " + $SYSTEM $RELEASE $MACHINE"
|
||||
|
||||
PLATFORM="$SYSTEM:$RELEASE:$MACHINE";
|
||||
else
|
||||
echo "building for $PLATFORM"
|
||||
fi
|
||||
|
||||
case $PLATFORM in
|
||||
|
||||
FreeBSD:* | DragonFly:*)
|
||||
. auto/os/freebsd
|
||||
;;
|
||||
|
||||
|
|
@ -19,64 +30,10 @@ case "$NGX_PLATFORM" in
|
|||
. auto/os/solaris
|
||||
;;
|
||||
|
||||
Darwin:*)
|
||||
. auto/os/darwin
|
||||
;;
|
||||
|
||||
win32)
|
||||
. auto/os/win32
|
||||
;;
|
||||
|
||||
DragonFly:*)
|
||||
have=NGX_FREEBSD . auto/have_headers
|
||||
CORE_INCS="$UNIX_INCS"
|
||||
CORE_DEPS="$UNIX_DEPS $FREEBSD_DEPS"
|
||||
CORE_SRCS="$UNIX_SRCS $FREEBSD_SRCS"
|
||||
|
||||
echo " + sendfile() found"
|
||||
have=NGX_HAVE_SENDFILE . auto/have
|
||||
CORE_SRCS="$CORE_SRCS $FREEBSD_SENDFILE_SRCS"
|
||||
|
||||
ngx_spacer='
|
||||
'
|
||||
;;
|
||||
|
||||
NetBSD:*)
|
||||
CORE_INCS="$UNIX_INCS"
|
||||
CORE_DEPS="$UNIX_DEPS $POSIX_DEPS"
|
||||
CORE_SRCS="$UNIX_SRCS"
|
||||
|
||||
NGX_RPATH=YES
|
||||
;;
|
||||
|
||||
HP-UX:*)
|
||||
# HP/UX
|
||||
have=NGX_HPUX . auto/have_headers
|
||||
CORE_INCS="$UNIX_INCS"
|
||||
CORE_DEPS="$UNIX_DEPS $POSIX_DEPS"
|
||||
CORE_SRCS="$UNIX_SRCS"
|
||||
CC_AUX_FLAGS="$CC_AUX_FLAGS -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1"
|
||||
CC_AUX_FLAGS="$CC_AUX_FLAGS -D_HPUX_ALT_XOPEN_SOCKET_API"
|
||||
;;
|
||||
|
||||
OSF1:*)
|
||||
# Tru64 UNIX
|
||||
have=NGX_TRU64 . auto/have_headers
|
||||
have=NGX_HAVE_STRERROR_R . auto/nohave
|
||||
CORE_INCS="$UNIX_INCS"
|
||||
CORE_DEPS="$UNIX_DEPS $POSIX_DEPS"
|
||||
CORE_SRCS="$UNIX_SRCS"
|
||||
;;
|
||||
|
||||
GNU:*)
|
||||
# GNU Hurd
|
||||
have=NGX_GNU_HURD . auto/have_headers
|
||||
CORE_INCS="$UNIX_INCS"
|
||||
CORE_DEPS="$UNIX_DEPS $POSIX_DEPS"
|
||||
CORE_SRCS="$UNIX_SRCS"
|
||||
CC_AUX_FLAGS="$CC_AUX_FLAGS -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64"
|
||||
;;
|
||||
|
||||
*)
|
||||
CORE_INCS="$UNIX_INCS"
|
||||
CORE_DEPS="$UNIX_DEPS $POSIX_DEPS"
|
||||
|
|
@ -86,59 +43,54 @@ case "$NGX_PLATFORM" in
|
|||
esac
|
||||
|
||||
|
||||
case "$NGX_MACHINE" in
|
||||
if [ $PLATFORM != win32 ]; then
|
||||
|
||||
i386 | i686 | i86pc)
|
||||
have=NGX_HAVE_NONALIGNED . auto/have
|
||||
NGX_MACH_CACHE_LINE=32
|
||||
;;
|
||||
ngx_feature="/dev/poll"
|
||||
ngx_feature_name="devpoll"
|
||||
ngx_feature_run=no
|
||||
ngx_feature_incs="#include <sys/devpoll.h>"
|
||||
ngx_feature_libs=
|
||||
ngx_feature_test="int n, dp; struct dvpoll dvp;
|
||||
dp = 0;
|
||||
dvp.dp_fds = NULL;
|
||||
dvp.dp_nfds = 0;
|
||||
dvp.dp_timeout = 0;
|
||||
n = ioctl(dp, DP_POLL, &dvp)"
|
||||
. auto/feature
|
||||
|
||||
amd64 | x86_64)
|
||||
have=NGX_HAVE_NONALIGNED . auto/have
|
||||
NGX_MACH_CACHE_LINE=64
|
||||
;;
|
||||
if [ $ngx_found = yes ]; then
|
||||
have=HAVE_DEVPOLL . auto/have
|
||||
CORE_SRCS="$CORE_SRCS $DEVPOLL_SRCS"
|
||||
EVENT_MODULES="$EVENT_MODULES $DEVPOLL_MODULE"
|
||||
EVENT_FOUND=YES
|
||||
fi
|
||||
|
||||
sun4u | sun4v | sparc | sparc64)
|
||||
have=NGX_ALIGNMENT value=16 . auto/define
|
||||
# TODO
|
||||
NGX_MACH_CACHE_LINE=64
|
||||
;;
|
||||
|
||||
ia64 )
|
||||
have=NGX_ALIGNMENT value=16 . auto/define
|
||||
# TODO
|
||||
NGX_MACH_CACHE_LINE=64
|
||||
;;
|
||||
if test -z "$NGX_KQUEUE_CHECKED"; then
|
||||
ngx_feature="kqueue"
|
||||
ngx_feature_name="kqueue"
|
||||
ngx_feature_run=no
|
||||
ngx_feature_incs="#include <sys/event.h>"
|
||||
ngx_feature_libs=
|
||||
ngx_feature_test="int kq; kq = kqueue()"
|
||||
. auto/feature
|
||||
|
||||
aarch64 | arm64)
|
||||
have=NGX_ALIGNMENT value=16 . auto/define
|
||||
NGX_MACH_CACHE_LINE=64
|
||||
;;
|
||||
if [ $ngx_found = yes ]; then
|
||||
|
||||
ppc64* | powerpc64*)
|
||||
have=NGX_ALIGNMENT value=16 . auto/define
|
||||
NGX_MACH_CACHE_LINE=128
|
||||
;;
|
||||
have=HAVE_KQUEUE . auto/have
|
||||
have=HAVE_CLEAR_EVENT . auto/have
|
||||
EVENT_MODULES="$EVENT_MODULES $KQUEUE_MODULE"
|
||||
CORE_SRCS="$CORE_SRCS $KQUEUE_SRCS"
|
||||
EVENT_FOUND=YES
|
||||
|
||||
riscv64)
|
||||
have=NGX_ALIGNMENT value=16 . auto/define
|
||||
NGX_MACH_CACHE_LINE=64
|
||||
;;
|
||||
|
||||
s390x)
|
||||
have=NGX_ALIGNMENT value=16 . auto/define
|
||||
NGX_MACH_CACHE_LINE=256
|
||||
;;
|
||||
|
||||
*)
|
||||
have=NGX_ALIGNMENT value=16 . auto/define
|
||||
NGX_MACH_CACHE_LINE=32
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
if test -z "$NGX_CPU_CACHE_LINE"; then
|
||||
NGX_CPU_CACHE_LINE=$NGX_MACH_CACHE_LINE
|
||||
ngx_feature="kqueue's NOTE_LOWAT"
|
||||
ngx_feature_name="HAVE_LOWAT_EVENT"
|
||||
ngx_feature_run=no
|
||||
ngx_feature_incs="#include <sys/event.h>"
|
||||
ngx_feature_libs=
|
||||
ngx_feature_test="struct kevent kev;
|
||||
kev.fflags = NOTE_LOWAT;"
|
||||
. auto/feature
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
have=NGX_CPU_CACHE_LINE value=$NGX_CPU_CACHE_LINE . auto/define
|
||||
|
|
|
|||
136
auto/os/darwin
136
auto/os/darwin
|
|
@ -1,136 +0,0 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
have=NGX_DARWIN . auto/have_headers
|
||||
|
||||
CORE_INCS="$UNIX_INCS"
|
||||
CORE_DEPS="$UNIX_DEPS $DARWIN_DEPS"
|
||||
CORE_SRCS="$UNIX_SRCS $DARWIN_SRCS"
|
||||
|
||||
|
||||
|
||||
ngx_spacer='
|
||||
'
|
||||
|
||||
MAIN_LINK=
|
||||
MODULE_LINK="-shared -Wl,-undefined,dynamic_lookup"
|
||||
|
||||
CC_AUX_FLAGS="$CC_AUX_FLAGS -D__APPLE_USE_RFC_3542"
|
||||
|
||||
|
||||
# kqueue
|
||||
|
||||
echo " + kqueue found"
|
||||
have=NGX_HAVE_KQUEUE . auto/have
|
||||
have=NGX_HAVE_CLEAR_EVENT . auto/have
|
||||
EVENT_MODULES="$EVENT_MODULES $KQUEUE_MODULE"
|
||||
CORE_SRCS="$CORE_SRCS $KQUEUE_SRCS"
|
||||
EVENT_FOUND=YES
|
||||
NGX_KQUEUE_CHECKED=YES
|
||||
|
||||
ngx_feature="kqueue's EVFILT_TIMER"
|
||||
ngx_feature_name="NGX_HAVE_TIMER_EVENT"
|
||||
ngx_feature_run=yes
|
||||
ngx_feature_incs="#include <sys/event.h>
|
||||
#include <sys/time.h>"
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs=
|
||||
ngx_feature_test="int kq;
|
||||
struct kevent kev;
|
||||
struct timespec ts;
|
||||
|
||||
if ((kq = kqueue()) == -1) return 1;
|
||||
|
||||
kev.ident = 0;
|
||||
kev.filter = EVFILT_TIMER;
|
||||
kev.flags = EV_ADD|EV_ENABLE;
|
||||
kev.fflags = 0;
|
||||
kev.data = 1000;
|
||||
kev.udata = 0;
|
||||
|
||||
ts.tv_sec = 0;
|
||||
ts.tv_nsec = 0;
|
||||
|
||||
if (kevent(kq, &kev, 1, &kev, 1, &ts) == -1) return 1;
|
||||
|
||||
if (kev.flags & EV_ERROR) return 1;"
|
||||
|
||||
. auto/feature
|
||||
|
||||
|
||||
ngx_feature="Darwin 64-bit kqueue millisecond timeout bug"
|
||||
ngx_feature_name=NGX_DARWIN_KEVENT_BUG
|
||||
ngx_feature_run=bug
|
||||
ngx_feature_incs="#include <sys/event.h>
|
||||
#include <sys/time.h>"
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs=
|
||||
ngx_feature_test="int kq;
|
||||
struct kevent kev;
|
||||
struct timespec ts;
|
||||
struct timeval tv, tv0;
|
||||
|
||||
kq = kqueue();
|
||||
|
||||
ts.tv_sec = 0;
|
||||
ts.tv_nsec = 999000000;
|
||||
|
||||
gettimeofday(&tv, 0);
|
||||
kevent(kq, NULL, 0, &kev, 1, &ts);
|
||||
gettimeofday(&tv0, 0);
|
||||
timersub(&tv0, &tv, &tv);
|
||||
|
||||
if (tv.tv_sec * 1000000 + tv.tv_usec < 900000) return 1;"
|
||||
|
||||
. auto/feature
|
||||
|
||||
|
||||
# sendfile()
|
||||
|
||||
ngx_feature="sendfile()"
|
||||
ngx_feature_name="NGX_HAVE_SENDFILE"
|
||||
ngx_feature_run=yes
|
||||
ngx_feature_incs="#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/uio.h>
|
||||
#include <sys/errno.h>"
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs=
|
||||
ngx_feature_test="int s = 0, fd = 1;
|
||||
off_t n; off_t off = 0;
|
||||
n = sendfile(s, fd, off, &n, NULL, 0);
|
||||
if (n == -1 && errno == ENOSYS) return 1"
|
||||
. auto/feature
|
||||
|
||||
if [ $ngx_found = yes ]; then
|
||||
CORE_SRCS="$CORE_SRCS $DARWIN_SENDFILE_SRCS"
|
||||
fi
|
||||
|
||||
|
||||
ngx_feature="atomic(3)"
|
||||
ngx_feature_name=NGX_DARWIN_ATOMIC
|
||||
ngx_feature_run=no
|
||||
ngx_feature_incs="#include <libkern/OSAtomic.h>"
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs=
|
||||
ngx_feature_test="int32_t lock = 0;
|
||||
if (!OSAtomicCompareAndSwap32Barrier(0, 1, &lock)) return 1"
|
||||
. auto/feature
|
||||
|
||||
|
||||
ngx_feature="TCP_KEEPALIVE"
|
||||
ngx_feature_name="NGX_HAVE_KEEPALIVE_TUNABLE"
|
||||
ngx_feature_run=no
|
||||
ngx_feature_incs="#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/tcp.h>"
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs=
|
||||
ngx_feature_test="setsockopt(0, IPPROTO_TCP, TCP_KEEPALIVE, NULL, 0);
|
||||
setsockopt(0, IPPROTO_TCP, TCP_KEEPINTVL, NULL, 0);
|
||||
setsockopt(0, IPPROTO_TCP, TCP_KEEPCNT, NULL, 0)"
|
||||
. auto/feature
|
||||
|
||||
NGX_KEEPALIVE_CHECKED=YES
|
||||
|
|
@ -1,9 +1,15 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
have=NGX_FREEBSD . auto/have_headers
|
||||
cat << END >> $NGX_AUTO_HEADERS_H
|
||||
|
||||
#ifndef NGX_FREEBSD
|
||||
#define NGX_FREEBSD 1
|
||||
#endif
|
||||
|
||||
END
|
||||
|
||||
|
||||
CORE_INCS="$UNIX_INCS"
|
||||
CORE_DEPS="$UNIX_DEPS $FREEBSD_DEPS"
|
||||
|
|
@ -15,7 +21,7 @@ ngx_spacer='
|
|||
|
||||
# __FreeBSD_version and sysctl kern.osreldate are the best ways
|
||||
# to determine whether some capability exists and is safe to use.
|
||||
# __FreeBSD_version is used for the testing of the build environment.
|
||||
# __FreeBSD_version is used for the testing of the build enviroment.
|
||||
# sysctl kern.osreldate is used for the testing of the kernel capabilities.
|
||||
|
||||
version=`grep "#define __FreeBSD_version" /usr/include/osreldate.h \
|
||||
|
|
@ -32,74 +38,68 @@ then
|
|||
echo " + setproctitle() in libutil"
|
||||
|
||||
CORE_LIBS="$CORE_LIBS -lutil"
|
||||
NGX_SETPROCTITLE_LIB="-lutil"
|
||||
fi
|
||||
|
||||
# sendfile
|
||||
|
||||
if [ $osreldate -gt 300007 ]; then
|
||||
echo " + sendfile() found"
|
||||
echo " + using sendfile()"
|
||||
|
||||
have=NGX_HAVE_SENDFILE . auto/have
|
||||
have=HAVE_SENDFILE . auto/have
|
||||
CORE_SRCS="$CORE_SRCS $FREEBSD_SENDFILE_SRCS"
|
||||
fi
|
||||
|
||||
if [ $osreldate -gt 1100093 ]; then
|
||||
echo " + sendfile()'s SF_NODISKIO found"
|
||||
|
||||
have=NGX_HAVE_SENDFILE_NODISKIO . auto/have
|
||||
fi
|
||||
|
||||
# POSIX semaphores
|
||||
# http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/127545
|
||||
|
||||
if [ $osreldate -ge 701106 ]; then
|
||||
echo " + POSIX semaphores should work"
|
||||
else
|
||||
have=NGX_HAVE_POSIX_SEM . auto/nohave
|
||||
fi
|
||||
|
||||
|
||||
# kqueue
|
||||
|
||||
if [ \( $osreldate -lt 500000 -a $osreldate -ge 410000 \) \
|
||||
-o $osreldate -ge 500011 ]
|
||||
then
|
||||
echo " + kqueue found"
|
||||
echo " + using kqueue"
|
||||
|
||||
have=NGX_HAVE_KQUEUE . auto/have
|
||||
have=NGX_HAVE_CLEAR_EVENT . auto/have
|
||||
have=HAVE_KQUEUE . auto/have
|
||||
have=HAVE_CLEAR_EVENT . auto/have
|
||||
EVENT_MODULES="$EVENT_MODULES $KQUEUE_MODULE"
|
||||
CORE_SRCS="$CORE_SRCS $KQUEUE_SRCS"
|
||||
EVENT_FOUND=YES
|
||||
fi
|
||||
|
||||
|
||||
NGX_KQUEUE_CHECKED=YES
|
||||
|
||||
|
||||
# kqueue's NOTE_LOWAT
|
||||
# kqueue's NOTE_LAWAT
|
||||
|
||||
if [ \( $version -lt 500000 -a $version -ge 430000 \) \
|
||||
-o $version -ge 500018 ]
|
||||
then
|
||||
echo " + kqueue's NOTE_LOWAT found"
|
||||
have=NGX_HAVE_LOWAT_EVENT . auto/have
|
||||
fi
|
||||
|
||||
# kqueue's EVFILT_TIMER
|
||||
|
||||
if [ \( $version -lt 500000 -a $version -ge 440001 \) \
|
||||
-o $version -ge 500023 ]
|
||||
then
|
||||
echo " + kqueue's EVFILT_TIMER found"
|
||||
have=NGX_HAVE_TIMER_EVENT . auto/have
|
||||
echo " + using kqueue's NOTE_LOWAT"
|
||||
have=HAVE_LOWAT_EVENT . auto/have
|
||||
fi
|
||||
|
||||
|
||||
# cpuset_setaffinity()
|
||||
if [ $USE_THREADS = "rfork" ]; then
|
||||
|
||||
if [ $version -ge 701000 ]; then
|
||||
echo " + cpuset_setaffinity() found"
|
||||
have=NGX_HAVE_CPUSET_SETAFFINITY . auto/have
|
||||
echo " + using rfork()"
|
||||
|
||||
# # kqueue's EVFILT_SIGNAL is safe
|
||||
#
|
||||
# if [ $version -gt 460101 ]; then
|
||||
# echo " + kqueue's EVFILT_SIGNAL is safe"
|
||||
# have=HAVE_SAFE_EVFILT_SIGNAL . auto/have
|
||||
# else
|
||||
# echo "$0: error: the kqueue's EVFILT_SIGNAL is unsafe on this"
|
||||
# echo "FreeBSD version, so --with-threads=rfork could not be used"
|
||||
# echo
|
||||
#
|
||||
# exit 1
|
||||
# fi
|
||||
fi
|
||||
|
||||
|
||||
if [ $EVENT_AIO = YES ]; then
|
||||
have=HAVE_AIO . auto/have
|
||||
EVENT_MODULES="$EVENT_MODULES $AIO_MODULE"
|
||||
CORE_SRCS="$CORE_SRCS $AIO_SRCS"
|
||||
else
|
||||
have=HAVE_AIO . auto/nohave
|
||||
fi
|
||||
|
|
|
|||
260
auto/os/linux
260
auto/os/linux
|
|
@ -1,149 +1,77 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
have=NGX_LINUX . auto/have_headers
|
||||
cat << END >> $NGX_AUTO_HEADERS_H
|
||||
|
||||
#ifndef NGX_LINUX
|
||||
#define NGX_LINUX 1
|
||||
#endif
|
||||
|
||||
END
|
||||
|
||||
CORE_INCS="$UNIX_INCS"
|
||||
CORE_DEPS="$UNIX_DEPS $LINUX_DEPS"
|
||||
CORE_SRCS="$UNIX_SRCS $LINUX_SRCS"
|
||||
EVENT_MODULES="$EVENT_MODULES"
|
||||
|
||||
ngx_spacer='
|
||||
'
|
||||
|
||||
cc_aux_flags="$CC_AUX_FLAGS"
|
||||
CC_AUX_FLAGS="$cc_aux_flags -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64"
|
||||
|
||||
CC_AUX_FLAGS="-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64"
|
||||
|
||||
# Linux kernel version
|
||||
|
||||
version=$((`uname -r \
|
||||
| sed -n -e 's/^\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/ \
|
||||
\1*256*256+\2*256+\3/p' \
|
||||
-e 's/^\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\1*256*256+\2*256/p'`))
|
||||
|
||||
version=${version:-0}
|
||||
version=`grep "#define LINUX_VERSION_CODE" /usr/include/linux/version.h \
|
||||
| sed -e 's/^.* \(.*\)$/\1/'`
|
||||
|
||||
|
||||
# posix_fadvise64() had been implemented in 2.5.60
|
||||
# enable the rt signals on Linux 2.2.19 and onward
|
||||
|
||||
if [ $version -lt 132412 ]; then
|
||||
have=NGX_HAVE_POSIX_FADVISE . auto/nohave
|
||||
if [ $version -ge 131609 -o $EVENT_RTSIG = YES ]; then
|
||||
echo " + using rt signals"
|
||||
have=HAVE_RTSIG . auto/have
|
||||
EVENT_MODULES="$EVENT_MODULES $RTSIG_MODULE"
|
||||
CORE_SRCS="$CORE_SRCS $RTSIG_SRCS"
|
||||
EVENT_FOUND=YES
|
||||
fi
|
||||
|
||||
|
||||
# epoll, EPOLLET version
|
||||
|
||||
ngx_feature="epoll"
|
||||
ngx_feature_name="NGX_HAVE_EPOLL"
|
||||
ngx_feature_name="epoll"
|
||||
ngx_feature_run=yes
|
||||
ngx_feature_incs="#include <sys/epoll.h>"
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs=
|
||||
ngx_feature_test="int efd = 0;
|
||||
ngx_feature_test="int efd = 0, fd = 1, n;
|
||||
struct epoll_event ee;
|
||||
ee.events = EPOLLIN|EPOLLOUT|EPOLLET;
|
||||
ee.data.ptr = NULL;
|
||||
(void) ee;
|
||||
efd = epoll_create(100);
|
||||
if (efd == -1) return 1;"
|
||||
. auto/feature
|
||||
|
||||
if [ $ngx_found = yes ]; then
|
||||
have=NGX_HAVE_CLEAR_EVENT . auto/have
|
||||
have=HAVE_EPOLL . auto/have
|
||||
have=HAVE_CLEAR_EVENT . auto/have
|
||||
CORE_SRCS="$CORE_SRCS $EPOLL_SRCS"
|
||||
EVENT_MODULES="$EVENT_MODULES $EPOLL_MODULE"
|
||||
EVENT_FOUND=YES
|
||||
|
||||
|
||||
# EPOLLRDHUP appeared in Linux 2.6.17, glibc 2.8
|
||||
|
||||
ngx_feature="EPOLLRDHUP"
|
||||
ngx_feature_name="NGX_HAVE_EPOLLRDHUP"
|
||||
ngx_feature_run=no
|
||||
ngx_feature_incs="#include <sys/epoll.h>"
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs=
|
||||
ngx_feature_test="int efd = 0, fd = 0;
|
||||
struct epoll_event ee;
|
||||
ee.events = EPOLLIN|EPOLLRDHUP|EPOLLET;
|
||||
ee.data.ptr = NULL;
|
||||
epoll_ctl(efd, EPOLL_CTL_ADD, fd, &ee)"
|
||||
. auto/feature
|
||||
|
||||
|
||||
# EPOLLEXCLUSIVE appeared in Linux 4.5, glibc 2.24
|
||||
|
||||
ngx_feature="EPOLLEXCLUSIVE"
|
||||
ngx_feature_name="NGX_HAVE_EPOLLEXCLUSIVE"
|
||||
ngx_feature_run=no
|
||||
ngx_feature_incs="#include <sys/epoll.h>"
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs=
|
||||
ngx_feature_test="int efd = 0, fd = 0;
|
||||
struct epoll_event ee;
|
||||
ee.events = EPOLLIN|EPOLLEXCLUSIVE;
|
||||
ee.data.ptr = NULL;
|
||||
epoll_ctl(efd, EPOLL_CTL_ADD, fd, &ee)"
|
||||
. auto/feature
|
||||
|
||||
|
||||
# eventfd()
|
||||
|
||||
ngx_feature="eventfd()"
|
||||
ngx_feature_name="NGX_HAVE_EVENTFD"
|
||||
ngx_feature_run=no
|
||||
ngx_feature_incs="#include <sys/eventfd.h>"
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs=
|
||||
ngx_feature_test="(void) eventfd(0, 0)"
|
||||
. auto/feature
|
||||
|
||||
if [ $ngx_found = yes ]; then
|
||||
have=NGX_HAVE_SYS_EVENTFD_H . auto/have
|
||||
fi
|
||||
|
||||
|
||||
if [ $ngx_found = no ]; then
|
||||
|
||||
ngx_feature="eventfd() (SYS_eventfd)"
|
||||
ngx_feature_incs="#include <sys/syscall.h>"
|
||||
ngx_feature_test="(void) SYS_eventfd"
|
||||
. auto/feature
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
# O_PATH and AT_EMPTY_PATH were introduced in 2.6.39, glibc 2.14
|
||||
|
||||
ngx_feature="O_PATH"
|
||||
ngx_feature_name="NGX_HAVE_O_PATH"
|
||||
ngx_feature_run=no
|
||||
ngx_feature_incs="#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>"
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs=
|
||||
ngx_feature_test="int fd; struct stat sb;
|
||||
fd = openat(AT_FDCWD, \".\", O_PATH|O_DIRECTORY|O_NOFOLLOW);
|
||||
if (fstatat(fd, \"\", &sb, AT_EMPTY_PATH) != 0) return 1"
|
||||
. auto/feature
|
||||
|
||||
|
||||
# sendfile()
|
||||
|
||||
CC_AUX_FLAGS="$cc_aux_flags -D_GNU_SOURCE"
|
||||
CC_AUX_FLAGS="-D_GNU_SOURCE"
|
||||
ngx_feature="sendfile()"
|
||||
ngx_feature_name="NGX_HAVE_SENDFILE"
|
||||
ngx_feature_run=yes
|
||||
ngx_feature_incs="#include <sys/sendfile.h>
|
||||
#include <errno.h>"
|
||||
ngx_feature_path=
|
||||
ngx_feature_name="sendfile"
|
||||
ngx_feature_run=no
|
||||
ngx_feature_incs="#include <sys/sendfile.h>"
|
||||
ngx_feature_libs=
|
||||
ngx_feature_test="int s = 0, fd = 1;
|
||||
ssize_t n; off_t off = 0;
|
||||
n = sendfile(s, fd, &off, 1);
|
||||
if (n == -1 && errno == ENOSYS) return 1"
|
||||
n = sendfile(s, fd, &off, 1)"
|
||||
. auto/feature
|
||||
|
||||
if [ $ngx_found = yes ]; then
|
||||
|
|
@ -153,18 +81,15 @@ fi
|
|||
|
||||
# sendfile64()
|
||||
|
||||
CC_AUX_FLAGS="$cc_aux_flags -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64"
|
||||
CC_AUX_FLAGS="-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64"
|
||||
ngx_feature="sendfile64()"
|
||||
ngx_feature_name="NGX_HAVE_SENDFILE64"
|
||||
ngx_feature_run=yes
|
||||
ngx_feature_incs="#include <sys/sendfile.h>
|
||||
#include <errno.h>"
|
||||
ngx_feature_path=
|
||||
ngx_feature_name="HAVE_SENDFILE64"
|
||||
ngx_feature_run=no
|
||||
ngx_feature_incs="#include <sys/sendfile.h>"
|
||||
ngx_feature_libs=
|
||||
ngx_feature_test="int s = 0, fd = 1;
|
||||
ssize_t n; off_t off = 0;
|
||||
n = sendfile(s, fd, &off, 1);
|
||||
if (n == -1 && errno == ENOSYS) return 1"
|
||||
n = sendfile(s, fd, &off, 1)"
|
||||
. auto/feature
|
||||
|
||||
|
||||
|
|
@ -173,126 +98,9 @@ ngx_include="sys/prctl.h"; . auto/include
|
|||
# prctl(PR_SET_DUMPABLE)
|
||||
|
||||
ngx_feature="prctl(PR_SET_DUMPABLE)"
|
||||
ngx_feature_name="NGX_HAVE_PR_SET_DUMPABLE"
|
||||
ngx_feature_name="HAVE_PR_SET_DUMPABLE"
|
||||
ngx_feature_run=yes
|
||||
ngx_feature_incs="#include <sys/prctl.h>"
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs=
|
||||
ngx_feature_test="if (prctl(PR_SET_DUMPABLE, 1, 0, 0, 0) == -1) return 1"
|
||||
. auto/feature
|
||||
|
||||
|
||||
# prctl(PR_SET_KEEPCAPS)
|
||||
|
||||
ngx_feature="prctl(PR_SET_KEEPCAPS)"
|
||||
ngx_feature_name="NGX_HAVE_PR_SET_KEEPCAPS"
|
||||
ngx_feature_run=yes
|
||||
ngx_feature_incs="#include <sys/prctl.h>"
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs=
|
||||
ngx_feature_test="if (prctl(PR_SET_KEEPCAPS, 1, 0, 0, 0) == -1) return 1"
|
||||
. auto/feature
|
||||
|
||||
|
||||
# capabilities
|
||||
|
||||
ngx_feature="capabilities"
|
||||
ngx_feature_name="NGX_HAVE_CAPABILITIES"
|
||||
ngx_feature_run=no
|
||||
ngx_feature_incs="#include <linux/capability.h>
|
||||
#include <sys/syscall.h>"
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs=
|
||||
ngx_feature_test="struct __user_cap_data_struct data;
|
||||
struct __user_cap_header_struct header;
|
||||
|
||||
header.version = _LINUX_CAPABILITY_VERSION_1;
|
||||
data.effective = CAP_TO_MASK(CAP_NET_RAW);
|
||||
data.permitted = 0;
|
||||
|
||||
(void) header;
|
||||
(void) data;
|
||||
(void) SYS_capset"
|
||||
. auto/feature
|
||||
|
||||
|
||||
# crypt_r()
|
||||
|
||||
ngx_feature="crypt_r()"
|
||||
ngx_feature_name="NGX_HAVE_GNU_CRYPT_R"
|
||||
ngx_feature_run=no
|
||||
ngx_feature_incs="#include <crypt.h>"
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs=-lcrypt
|
||||
ngx_feature_test="struct crypt_data cd;
|
||||
crypt_r(\"key\", \"salt\", &cd);"
|
||||
. auto/feature
|
||||
|
||||
if [ $ngx_found = yes ]; then
|
||||
CRYPT_LIB="-lcrypt"
|
||||
fi
|
||||
|
||||
|
||||
ngx_include="sys/vfs.h"; . auto/include
|
||||
|
||||
|
||||
# BPF sockhash
|
||||
|
||||
ngx_feature="BPF sockhash"
|
||||
ngx_feature_name="NGX_HAVE_BPF"
|
||||
ngx_feature_run=no
|
||||
ngx_feature_incs="#include <linux/bpf.h>
|
||||
#include <sys/syscall.h>"
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs=
|
||||
ngx_feature_test="union bpf_attr attr = { 0 };
|
||||
|
||||
attr.map_flags = 0;
|
||||
attr.map_type = BPF_MAP_TYPE_SOCKHASH;
|
||||
|
||||
syscall(__NR_bpf, 0, &attr, 0);"
|
||||
. auto/feature
|
||||
|
||||
if [ $ngx_found = yes ]; then
|
||||
CORE_SRCS="$CORE_SRCS src/core/ngx_bpf.c"
|
||||
CORE_DEPS="$CORE_DEPS src/core/ngx_bpf.h"
|
||||
|
||||
if [ $QUIC_BPF != NONE ]; then
|
||||
QUIC_BPF=YES
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
ngx_feature="SO_COOKIE"
|
||||
ngx_feature_name="NGX_HAVE_SO_COOKIE"
|
||||
ngx_feature_run=no
|
||||
ngx_feature_incs="#include <sys/socket.h>
|
||||
$NGX_INCLUDE_INTTYPES_H"
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs=
|
||||
ngx_feature_test="socklen_t optlen = sizeof(uint64_t);
|
||||
uint64_t cookie;
|
||||
getsockopt(0, SOL_SOCKET, SO_COOKIE, &cookie, &optlen)"
|
||||
. auto/feature
|
||||
|
||||
if [ $ngx_found = yes ]; then
|
||||
SO_COOKIE_FOUND=YES
|
||||
fi
|
||||
|
||||
|
||||
# UDP segmentation offloading
|
||||
|
||||
ngx_feature="UDP_SEGMENT"
|
||||
ngx_feature_name="NGX_HAVE_UDP_SEGMENT"
|
||||
ngx_feature_run=no
|
||||
ngx_feature_incs="#include <sys/socket.h>
|
||||
#include <netinet/udp.h>"
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs=
|
||||
ngx_feature_test="socklen_t optlen = sizeof(int);
|
||||
int val;
|
||||
getsockopt(0, SOL_UDP, UDP_SEGMENT, &val, &optlen)"
|
||||
. auto/feature
|
||||
|
||||
|
||||
CC_AUX_FLAGS="$cc_aux_flags -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64"
|
||||
|
|
|
|||
|
|
@ -1,21 +1,36 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
have=NGX_SOLARIS . auto/have_headers
|
||||
cat << END >> $NGX_AUTO_HEADERS_H
|
||||
|
||||
#ifndef NGX_SOLARIS
|
||||
#define NGX_SOLARIS 1
|
||||
#endif
|
||||
|
||||
END
|
||||
|
||||
CORE_INCS="$UNIX_INCS"
|
||||
CORE_DEPS="$UNIX_DEPS $SOLARIS_DEPS"
|
||||
CORE_SRCS="$UNIX_SRCS $SOLARIS_SRCS "
|
||||
CORE_LIBS="$CORE_LIBS -lsocket -lnsl"
|
||||
EVENT_MODULES="$EVENT_MODULES"
|
||||
|
||||
NGX_RPATH=YES
|
||||
CORE_LIBS="$CORE_LIBS -lsocket -lnsl -lrt"
|
||||
|
||||
# Solaris's make does not support a blank line between target and rules
|
||||
ngx_spacer=
|
||||
|
||||
CC_AUX_FLAGS="$CC_AUX_FLAGS -D_FILE_OFFSET_BITS=64 -lsocket -lnsl"
|
||||
CC_AUX_FLAGS="-D_FILE_OFFSET_BITS=64 -lrt"
|
||||
|
||||
|
||||
case $PLATFORM in
|
||||
|
||||
*:sun4u)
|
||||
# "-mcpu=v9" enables the "casa" assembler instruction
|
||||
CFLAGS="$CFLAGS -mcpu=v9"
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
|
||||
if [ $ZLIB_ASM != NO ]; then
|
||||
|
|
@ -28,34 +43,18 @@ fi
|
|||
|
||||
|
||||
ngx_feature="sendfilev()"
|
||||
ngx_feature_name="NGX_HAVE_SENDFILE"
|
||||
ngx_feature_name="sendfile"
|
||||
ngx_feature_run=no
|
||||
ngx_feature_incs="#include <sys/sendfile.h>"
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs="-lsendfile"
|
||||
ngx_feature_test="int fd = 1; sendfilevec_t vec[1];
|
||||
size_t sent; ssize_t n;
|
||||
n = sendfilev(fd, vec, 1, &sent);
|
||||
if (n == -1) return 1"
|
||||
n = sendfilev(fd, vec, 1, &sent)"
|
||||
. auto/feature
|
||||
|
||||
|
||||
if [ $ngx_found = yes ]; then
|
||||
have=HAVE_SENDFILE . auto/have
|
||||
CORE_SRCS="$CORE_SRCS $SOLARIS_SENDFILEV_SRCS"
|
||||
CORE_LIBS="$CORE_LIBS -lsendfile"
|
||||
fi
|
||||
|
||||
|
||||
ngx_feature="event ports"
|
||||
ngx_feature_name="NGX_HAVE_EVENTPORT"
|
||||
ngx_feature_run=no
|
||||
ngx_feature_incs="#include <port.h>"
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs=
|
||||
ngx_feature_test="(void) port_create()"
|
||||
. auto/feature
|
||||
|
||||
if [ $ngx_found = yes ]; then
|
||||
CORE_SRCS="$CORE_SRCS $EVENTPORT_SRCS"
|
||||
EVENT_MODULES="$EVENT_MODULES $EVENTPORT_MODULE"
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -1,39 +1,29 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
have=NGX_WIN32 . auto/have_headers
|
||||
cat << END >> $NGX_AUTO_HEADERS_H
|
||||
|
||||
#ifndef NGX_WIN32
|
||||
#define NGX_WIN32 1
|
||||
#endif
|
||||
|
||||
END
|
||||
|
||||
|
||||
CORE_INCS="$WIN32_INCS"
|
||||
CORE_DEPS="$WIN32_DEPS"
|
||||
CORE_SRCS="$WIN32_SRCS $IOCP_SRCS"
|
||||
OS_CONFIG="$WIN32_CONFIG"
|
||||
NGX_ICONS="$NGX_WIN32_ICONS"
|
||||
SELECT_SRCS=$WIN32_SELECT_SRCS
|
||||
POLL_SRCS=$WIN32_POLL_SRCS
|
||||
|
||||
ngx_pic_opt=
|
||||
ngx_binext=".exe"
|
||||
|
||||
case "$NGX_CC_NAME" in
|
||||
|
||||
clang | gcc)
|
||||
CORE_LIBS="$CORE_LIBS -ladvapi32 -lws2_32"
|
||||
MAIN_LINK="$MAIN_LINK -Wl,--export-all-symbols"
|
||||
MAIN_LINK="$MAIN_LINK -Wl,--out-implib=$NGX_OBJS/libnginx.a"
|
||||
MODULE_LINK="-shared -L $NGX_OBJS -lnginx"
|
||||
;;
|
||||
|
||||
*)
|
||||
CORE_LIBS="$CORE_LIBS advapi32.lib ws2_32.lib"
|
||||
;;
|
||||
|
||||
esac
|
||||
CORE_LIBS="$CORE_LIBS ws2_32.lib"
|
||||
|
||||
EVENT_MODULES="$EVENT_MODULES $IOCP_MODULE"
|
||||
#EVENT_FOUND=YES
|
||||
EVENT_FOUND=YES
|
||||
|
||||
have=NGX_HAVE_INET6 . auto/have
|
||||
if [ $EVENT_SELECT = NO ]; then
|
||||
CORE_SRCS="$CORE_SRCS $SELECT_SRCS"
|
||||
EVENT_MODULES="$EVENT_MODULES $SELECT_MODULE"
|
||||
fi
|
||||
|
||||
have=NGX_HAVE_IOCP . auto/have
|
||||
have=HAVE_AIO . auto/have
|
||||
have=HAVE_IOCP . auto/have
|
||||
|
|
|
|||
253
auto/sources
253
auto/sources
|
|
@ -1,6 +1,5 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
CORE_MODULES="ngx_core_module ngx_errlog_module ngx_conf_module"
|
||||
|
|
@ -14,100 +13,72 @@ CORE_DEPS="src/core/nginx.h \
|
|||
src/core/ngx_palloc.h \
|
||||
src/core/ngx_array.h \
|
||||
src/core/ngx_list.h \
|
||||
src/core/ngx_hash.h \
|
||||
src/core/ngx_table.h \
|
||||
src/core/ngx_buf.h \
|
||||
src/core/ngx_queue.h \
|
||||
src/core/ngx_string.h \
|
||||
src/core/ngx_parse.h \
|
||||
src/core/ngx_parse_time.h \
|
||||
src/core/ngx_inet.h \
|
||||
src/core/ngx_file.h \
|
||||
src/core/ngx_crc.h \
|
||||
src/core/ngx_crc32.h \
|
||||
src/core/ngx_murmurhash.h \
|
||||
src/core/ngx_md5.h \
|
||||
src/core/ngx_sha1.h \
|
||||
src/core/ngx_rbtree.h \
|
||||
src/core/ngx_radix_tree.h \
|
||||
src/core/ngx_rwlock.h \
|
||||
src/core/ngx_slab.h \
|
||||
src/core/ngx_times.h \
|
||||
src/core/ngx_shmtx.h \
|
||||
src/core/ngx_connection.h \
|
||||
src/core/ngx_cycle.h \
|
||||
src/core/ngx_conf_file.h \
|
||||
src/core/ngx_module.h \
|
||||
src/core/ngx_resolver.h \
|
||||
src/core/ngx_open_file_cache.h \
|
||||
src/core/ngx_crypt.h \
|
||||
src/core/ngx_proxy_protocol.h \
|
||||
src/core/ngx_syslog.h"
|
||||
src/core/ngx_garbage_collector.h"
|
||||
|
||||
# src/core/ngx_radix_tree.h \
|
||||
# src/core/ngx_radix_tree.c \
|
||||
|
||||
CORE_SRCS="src/core/nginx.c \
|
||||
src/core/ngx_log.c \
|
||||
src/core/ngx_palloc.c \
|
||||
src/core/ngx_array.c \
|
||||
src/core/ngx_list.c \
|
||||
src/core/ngx_hash.c \
|
||||
src/core/ngx_buf.c \
|
||||
src/core/ngx_queue.c \
|
||||
src/core/ngx_output_chain.c \
|
||||
src/core/ngx_string.c \
|
||||
src/core/ngx_parse.c \
|
||||
src/core/ngx_parse_time.c \
|
||||
src/core/ngx_inet.c \
|
||||
src/core/ngx_file.c \
|
||||
src/core/ngx_crc32.c \
|
||||
src/core/ngx_murmurhash.c \
|
||||
src/core/ngx_md5.c \
|
||||
src/core/ngx_sha1.c \
|
||||
src/core/ngx_rbtree.c \
|
||||
src/core/ngx_radix_tree.c \
|
||||
src/core/ngx_slab.c \
|
||||
src/core/ngx_times.c \
|
||||
src/core/ngx_shmtx.c \
|
||||
src/core/ngx_connection.c \
|
||||
src/core/ngx_cycle.c \
|
||||
src/core/ngx_spinlock.c \
|
||||
src/core/ngx_rwlock.c \
|
||||
src/core/ngx_cpuinfo.c \
|
||||
src/core/ngx_conf_file.c \
|
||||
src/core/ngx_module.c \
|
||||
src/core/ngx_resolver.c \
|
||||
src/core/ngx_open_file_cache.c \
|
||||
src/core/ngx_crypt.c \
|
||||
src/core/ngx_proxy_protocol.c \
|
||||
src/core/ngx_syslog.c"
|
||||
src/core/ngx_garbage_collector.c"
|
||||
|
||||
|
||||
REGEX_DEPS=src/core/ngx_regex.h
|
||||
REGEX_SRCS=src/core/ngx_regex.c
|
||||
|
||||
|
||||
EVENT_MODULES="ngx_events_module ngx_event_core_module"
|
||||
|
||||
EVENT_INCS="src/event src/event/modules src/event/quic"
|
||||
EVENT_INCS="src/event src/event/modules"
|
||||
|
||||
EVENT_DEPS="src/event/ngx_event.h \
|
||||
src/event/ngx_event_timer.h \
|
||||
src/event/ngx_event_posted.h \
|
||||
src/event/ngx_event_busy_lock.h \
|
||||
src/event/ngx_event_connect.h \
|
||||
src/event/ngx_event_pipe.h \
|
||||
src/event/ngx_event_udp.h"
|
||||
src/event/ngx_event_pipe.h"
|
||||
|
||||
EVENT_SRCS="src/event/ngx_event.c \
|
||||
src/event/ngx_event_timer.c \
|
||||
src/event/ngx_event_posted.c \
|
||||
src/event/ngx_event_busy_lock.c \
|
||||
src/event/ngx_event_accept.c \
|
||||
src/event/ngx_event_udp.c \
|
||||
src/event/ngx_event_connect.c \
|
||||
src/event/ngx_event_pipe.c"
|
||||
|
||||
|
||||
SELECT_MODULE=ngx_select_module
|
||||
SELECT_SRCS=src/event/modules/ngx_select_module.c
|
||||
WIN32_SELECT_SRCS=src/event/modules/ngx_win32_select_module.c
|
||||
|
||||
POLL_MODULE=ngx_poll_module
|
||||
POLL_SRCS=src/event/modules/ngx_poll_module.c
|
||||
WIN32_POLL_SRCS=src/event/modules/ngx_win32_poll_module.c
|
||||
|
||||
KQUEUE_MODULE=ngx_kqueue_module
|
||||
KQUEUE_SRCS=src/event/modules/ngx_kqueue_module.c
|
||||
|
|
@ -115,49 +86,44 @@ KQUEUE_SRCS=src/event/modules/ngx_kqueue_module.c
|
|||
DEVPOLL_MODULE=ngx_devpoll_module
|
||||
DEVPOLL_SRCS=src/event/modules/ngx_devpoll_module.c
|
||||
|
||||
EVENTPORT_MODULE=ngx_eventport_module
|
||||
EVENTPORT_SRCS=src/event/modules/ngx_eventport_module.c
|
||||
|
||||
EPOLL_MODULE=ngx_epoll_module
|
||||
EPOLL_SRCS=src/event/modules/ngx_epoll_module.c
|
||||
|
||||
RTSIG_MODULE=ngx_rtsig_module
|
||||
RTSIG_SRCS=src/event/modules/ngx_rtsig_module.c
|
||||
|
||||
IOCP_MODULE=ngx_iocp_module
|
||||
IOCP_SRCS=src/event/modules/ngx_iocp_module.c
|
||||
|
||||
FILE_AIO_SRCS="src/os/unix/ngx_file_aio_read.c"
|
||||
LINUX_AIO_SRCS="src/os/unix/ngx_linux_aio_read.c"
|
||||
AIO_MODULE=ngx_aio_module
|
||||
AIO_SRCS="src/event/modules/ngx_aio_module.c \
|
||||
src/os/unix/ngx_aio_read.c \
|
||||
src/os/unix/ngx_aio_write.c \
|
||||
src/os/unix/ngx_aio_read_chain.c \
|
||||
src/os/unix/ngx_aio_write_chain.c"
|
||||
|
||||
|
||||
OPENSSL_DEPS=src/event/ngx_event_openssl.h
|
||||
OPENSSL_SRCS=src/event/ngx_event_openssl.c
|
||||
|
||||
|
||||
UNIX_INCS="$CORE_INCS $EVENT_INCS src/os/unix"
|
||||
|
||||
UNIX_DEPS="$CORE_DEPS $EVENT_DEPS \
|
||||
src/os/unix/ngx_time.h \
|
||||
src/os/unix/ngx_types.h \
|
||||
src/os/unix/ngx_errno.h \
|
||||
src/os/unix/ngx_alloc.h \
|
||||
src/os/unix/ngx_files.h \
|
||||
src/os/unix/ngx_channel.h \
|
||||
src/os/unix/ngx_shmem.h \
|
||||
src/os/unix/ngx_shared.h \
|
||||
src/os/unix/ngx_process.h \
|
||||
src/os/unix/ngx_setaffinity.h \
|
||||
src/os/unix/ngx_setproctitle.h \
|
||||
src/os/unix/ngx_atomic.h \
|
||||
src/os/unix/ngx_gcc_atomic_x86.h \
|
||||
src/os/unix/ngx_thread.h \
|
||||
src/os/unix/ngx_socket.h \
|
||||
src/os/unix/ngx_os.h \
|
||||
src/os/unix/ngx_user.h \
|
||||
src/os/unix/ngx_dlopen.h \
|
||||
src/os/unix/ngx_process_cycle.h"
|
||||
|
||||
# add to UNIX_DEPS
|
||||
# src/os/unix/ngx_gcc_atomic_amd64.h \
|
||||
# src/os/unix/ngx_gcc_atomic_sparc64.h \
|
||||
# src/os/unix/ngx_gcc_atomic_ppc.h \
|
||||
# src/os/unix/ngx_sunpro_atomic_sparc64.h \
|
||||
# src/os/unix/ngx_sunpro_x86.il \
|
||||
# src/os/unix/ngx_sunpro_amd64.il \
|
||||
# src/os/unix/ngx_sunpro_sparc64.il \
|
||||
|
||||
|
||||
UNIX_SRCS="$CORE_SRCS $EVENT_SRCS \
|
||||
src/os/unix/ngx_time.c \
|
||||
src/os/unix/ngx_errno.c \
|
||||
|
|
@ -166,66 +132,51 @@ UNIX_SRCS="$CORE_SRCS $EVENT_SRCS \
|
|||
src/os/unix/ngx_socket.c \
|
||||
src/os/unix/ngx_recv.c \
|
||||
src/os/unix/ngx_readv_chain.c \
|
||||
src/os/unix/ngx_udp_recv.c \
|
||||
src/os/unix/ngx_send.c \
|
||||
src/os/unix/ngx_writev_chain.c \
|
||||
src/os/unix/ngx_udp_send.c \
|
||||
src/os/unix/ngx_udp_sendmsg_chain.c \
|
||||
src/os/unix/ngx_channel.c \
|
||||
src/os/unix/ngx_shmem.c \
|
||||
src/os/unix/ngx_shared.c \
|
||||
src/os/unix/ngx_process.c \
|
||||
src/os/unix/ngx_daemon.c \
|
||||
src/os/unix/ngx_setaffinity.c \
|
||||
src/os/unix/ngx_setproctitle.c \
|
||||
src/os/unix/ngx_posix_init.c \
|
||||
src/os/unix/ngx_user.c \
|
||||
src/os/unix/ngx_dlopen.c \
|
||||
src/os/unix/ngx_process_cycle.c"
|
||||
|
||||
POSIX_DEPS=src/os/unix/ngx_posix_config.h
|
||||
|
||||
THREAD_POOL_MODULE=ngx_thread_pool_module
|
||||
THREAD_POOL_DEPS=src/core/ngx_thread_pool.h
|
||||
THREAD_POOL_SRCS="src/core/ngx_thread_pool.c
|
||||
src/os/unix/ngx_thread_cond.c
|
||||
src/os/unix/ngx_thread_mutex.c
|
||||
src/os/unix/ngx_thread_id.c"
|
||||
|
||||
FREEBSD_DEPS="src/os/unix/ngx_freebsd_config.h src/os/unix/ngx_freebsd.h"
|
||||
FREEBSD_DEPS=src/os/unix/ngx_freebsd_config.h
|
||||
FREEBSD_SRCS=src/os/unix/ngx_freebsd_init.c
|
||||
FREEBSD_SENDFILE_SRCS=src/os/unix/ngx_freebsd_sendfile_chain.c
|
||||
FREEBSD_RFORK_DEPS="src/os/unix/ngx_freebsd_rfork_thread.h"
|
||||
FREEBSD_RFORK_SRCS="src/os/unix/ngx_freebsd_rfork_thread.c"
|
||||
FREEBSD_RFORK_THREAD_SRCS="src/os/unix/rfork_thread.S"
|
||||
|
||||
LINUX_DEPS="src/os/unix/ngx_linux_config.h src/os/unix/ngx_linux.h"
|
||||
PTHREAD_SRCS="src/os/unix/ngx_pthread_thread.c"
|
||||
|
||||
LINUX_DEPS=src/os/unix/ngx_linux_config.h
|
||||
LINUX_SRCS=src/os/unix/ngx_linux_init.c
|
||||
LINUX_SENDFILE_SRCS=src/os/unix/ngx_linux_sendfile_chain.c
|
||||
|
||||
|
||||
SOLARIS_DEPS="src/os/unix/ngx_solaris_config.h src/os/unix/ngx_solaris.h"
|
||||
SOLARIS_DEPS=src/os/unix/ngx_solaris_config.h
|
||||
SOLARIS_SRCS=src/os/unix/ngx_solaris_init.c
|
||||
SOLARIS_SENDFILEV_SRCS=src/os/unix/ngx_solaris_sendfilev_chain.c
|
||||
|
||||
|
||||
DARWIN_DEPS="src/os/unix/ngx_darwin_config.h src/os/unix/ngx_darwin.h"
|
||||
DARWIN_SRCS=src/os/unix/ngx_darwin_init.c
|
||||
DARWIN_SENDFILE_SRCS=src/os/unix/ngx_darwin_sendfile_chain.c
|
||||
|
||||
|
||||
WIN32_INCS="$CORE_INCS $EVENT_INCS src/os/win32"
|
||||
|
||||
WIN32_DEPS="$CORE_DEPS $EVENT_DEPS \
|
||||
src/os/win32/ngx_win32_config.h \
|
||||
src/os/win32/ngx_time.h \
|
||||
src/os/win32/ngx_types.h \
|
||||
src/os/win32/ngx_errno.h \
|
||||
src/os/win32/ngx_alloc.h \
|
||||
src/os/win32/ngx_files.h \
|
||||
src/os/win32/ngx_shmem.h \
|
||||
src/os/win32/ngx_shared.h \
|
||||
src/os/win32/ngx_process.h \
|
||||
src/os/win32/ngx_atomic.h \
|
||||
src/os/win32/ngx_thread.h \
|
||||
src/os/win32/ngx_socket.h \
|
||||
src/os/win32/ngx_os.h \
|
||||
src/os/win32/ngx_user.h \
|
||||
src/os/win32/ngx_dlopen.h \
|
||||
src/os/win32/ngx_process_cycle.h"
|
||||
|
||||
WIN32_CONFIG=src/os/win32/ngx_win32_config.h
|
||||
|
|
@ -234,28 +185,128 @@ WIN32_SRCS="$CORE_SRCS $EVENT_SRCS \
|
|||
src/os/win32/ngx_errno.c \
|
||||
src/os/win32/ngx_alloc.c \
|
||||
src/os/win32/ngx_files.c \
|
||||
src/os/win32/ngx_shmem.c \
|
||||
src/os/win32/ngx_time.c \
|
||||
src/os/win32/ngx_process.c \
|
||||
src/os/win32/ngx_thread.c \
|
||||
src/os/win32/ngx_socket.c \
|
||||
src/os/win32/ngx_wsarecv.c \
|
||||
src/os/win32/ngx_wsarecv_chain.c \
|
||||
src/os/win32/ngx_udp_wsarecv.c \
|
||||
src/os/win32/ngx_wsasend.c \
|
||||
src/os/win32/ngx_wsasend_chain.c \
|
||||
src/os/win32/ngx_win32_init.c \
|
||||
src/os/win32/ngx_user.c \
|
||||
src/os/win32/ngx_dlopen.c \
|
||||
src/os/win32/ngx_event_log.c \
|
||||
src/os/win32/ngx_process_cycle.c \
|
||||
src/event/ngx_event_acceptex.c"
|
||||
|
||||
NGX_WIN32_ICONS="src/os/win32/nginx.ico"
|
||||
NGX_WIN32_RC="src/os/win32/nginx.rc"
|
||||
|
||||
HTTP_MODULES="ngx_http_module \
|
||||
ngx_http_core_module \
|
||||
ngx_http_log_module"
|
||||
|
||||
HTTP_FILE_CACHE_MODULE=ngx_http_cache_module
|
||||
|
||||
HTTP_WRITE_FILTER_MODULE="ngx_http_write_filter_module"
|
||||
HTTP_HEADER_FILTER_MODULE="ngx_http_header_filter_module"
|
||||
|
||||
HTTP_CHUNKED_FILTER_MODULE=ngx_http_chunked_filter_module
|
||||
HTTP_HEADERS_FILTER_MODULE=ngx_http_headers_filter_module
|
||||
HTTP_COPY_FILTER_MODULE=ngx_http_copy_filter_module
|
||||
|
||||
HTTP_RANGE_HEADER_FILTER_MODULE=ngx_http_range_header_filter_module
|
||||
HTTP_RANGE_BODY_FILTER_MODULE=ngx_http_range_body_filter_module
|
||||
|
||||
HTTP_NOT_MODIFIED_FILTER_MODULE=ngx_http_not_modified_filter_module
|
||||
|
||||
HTTP_STATIC_MODULE=ngx_http_static_module
|
||||
HTTP_INDEX_MODULE=ngx_http_index_module
|
||||
|
||||
HTTP_INCS="src/http src/http/modules"
|
||||
|
||||
HTTP_DEPS="src/http/ngx_http.h \
|
||||
src/http/ngx_http_request.h \
|
||||
src/http/ngx_http_config.h \
|
||||
src/http/ngx_http_core_module.h \
|
||||
src/http/ngx_http_cache.h \
|
||||
src/http/ngx_http_busy_lock.h \
|
||||
src/http/ngx_http_log_handler.h"
|
||||
|
||||
HTTP_SRCS="src/http/ngx_http.c \
|
||||
src/http/ngx_http_core_module.c \
|
||||
src/http/ngx_http_special_response.c \
|
||||
src/http/ngx_http_request.c \
|
||||
src/http/ngx_http_parse.c \
|
||||
src/http/ngx_http_header_filter.c \
|
||||
src/http/ngx_http_write_filter.c \
|
||||
src/http/ngx_http_copy_filter.c \
|
||||
src/http/ngx_http_log_handler.c \
|
||||
src/http/ngx_http_request_body.c \
|
||||
src/http/ngx_http_parse_time.c \
|
||||
src/http/modules/ngx_http_static_handler.c \
|
||||
src/http/modules/ngx_http_index_handler.c \
|
||||
src/http/modules/ngx_http_chunked_filter.c \
|
||||
src/http/modules/ngx_http_range_filter.c \
|
||||
src/http/modules/ngx_http_headers_filter.c \
|
||||
src/http/modules/ngx_http_not_modified_filter.c"
|
||||
|
||||
# STUB
|
||||
HTTP_SRCS="$HTTP_SRCS src/http/ngx_http_busy_lock.c"
|
||||
|
||||
HTPP_CACHE_SRCS=src/http/ngx_http_cache.c
|
||||
HTPP_FILE_CACHE_SRCS=src/http/ngx_http_file_cache.c
|
||||
|
||||
|
||||
HTTP_FILE_CACHE_SRCS=src/http/ngx_http_file_cache.c
|
||||
HTTP_CHARSET_FILTER_MODULE=ngx_http_charset_filter_module
|
||||
HTTP_CHARSET_SRCS=src/http/modules/ngx_http_charset_filter.c
|
||||
|
||||
HTTP_HUFF_SRCS="src/http/ngx_http_huff_decode.c
|
||||
src/http/ngx_http_huff_encode.c"
|
||||
|
||||
HTTP_GZIP_FILTER_MODULE=ngx_http_gzip_filter_module
|
||||
HTTP_GZIP_SRCS=src/http/modules/ngx_http_gzip_filter.c
|
||||
|
||||
|
||||
HTTP_SSI_FILTER_MODULE=ngx_http_ssi_filter_module
|
||||
HTTP_SSI_SRCS=src/http/modules/ngx_http_ssi_filter.c
|
||||
|
||||
|
||||
HTTP_USERID_FILTER_MODULE=ngx_http_userid_filter_module
|
||||
HTTP_USERID_SRCS=src/http/modules/ngx_http_userid_filter.c
|
||||
|
||||
|
||||
HTTP_ACCESS_MODULE=ngx_http_access_module
|
||||
HTTP_ACCESS_SRCS=src/http/modules/ngx_http_access_handler.c
|
||||
|
||||
|
||||
HTTP_AUTOINDEX_MODULE=ngx_http_autoindex_module
|
||||
HTTP_AUTOINDEX_SRCS=src/http/modules/ngx_http_autoindex_handler.c
|
||||
|
||||
|
||||
HTTP_STATUS_MODULE=ngx_http_status_module
|
||||
HTTP_STATUS_SRCS=src/http/modules/ngx_http_status_handler.c
|
||||
|
||||
|
||||
HTTP_REWRITE_MODULE=ngx_http_rewrite_module
|
||||
HTTP_REWRITE_SRCS=src/http/modules/ngx_http_rewrite_handler.c
|
||||
|
||||
|
||||
HTTP_SSL_MODULE=ngx_http_ssl_module
|
||||
HTTP_SSL_DEPS=src/http/modules/ngx_http_ssl_module.h
|
||||
HTTP_SSL_SRCS=src/http/modules/ngx_http_ssl_module.c
|
||||
|
||||
|
||||
HTTP_PROXY_MODULE=ngx_http_proxy_module
|
||||
HTTP_PROXY_INCS="src/http/modules/proxy"
|
||||
HTTP_PROXY_DEPS=src/http/modules/proxy/ngx_http_proxy_handler.h
|
||||
HTTP_PROXY_SRCS="src/http/modules/proxy/ngx_http_proxy_handler.c \
|
||||
src/http/modules/proxy/ngx_http_proxy_upstream.c \
|
||||
src/http/modules/proxy/ngx_http_proxy_parse.c \
|
||||
src/http/modules/proxy/ngx_http_proxy_header.c"
|
||||
|
||||
# STUB
|
||||
# src/http/modules/proxy/ngx_http_proxy_cache.c \
|
||||
|
||||
|
||||
IMAP_INCS="src/imap"
|
||||
|
||||
IMAP_DEPS="src/imap/ngx_imap.h"
|
||||
|
||||
IMAP_MODULE=ngx_imap_module
|
||||
IMAP_SRCS="src/imap/ngx_imap.c \
|
||||
src/imap/ngx_imap_handler.c \
|
||||
src/imap/ngx_imap_parse.c \
|
||||
src/imap/ngx_imap_proxy.c"
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
have=NGX_USE_HTTP_FILE_CACHE_UNIQ . auto/have
|
||||
have=NGX_SUPPRESS_WARN . auto/have
|
||||
|
||||
have=NGX_SMP . auto/have
|
||||
|
|
|
|||
114
auto/summary
114
auto/summary
|
|
@ -1,82 +1,108 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
echo
|
||||
echo "Configuration summary"
|
||||
|
||||
|
||||
if [ $USE_THREADS = YES ]; then
|
||||
echo " + using threads"
|
||||
fi
|
||||
case $USE_THREADS in
|
||||
rfork) echo " + using rfork()ed threads" ;;
|
||||
pthreads) echo " + using libpthread threads library" ;;
|
||||
libthr) echo " + using FreeBSD libthr threads library" ;;
|
||||
libc_r) echo " + using FreeBSD libc_r threads library" ;;
|
||||
linuxthreads) echo " + using FreeBSD LinuxThreads port library" ;;
|
||||
NO) echo " + threads are not used" ;;
|
||||
*) echo " + using lib$USE_THREADS threads library" ;;
|
||||
esac
|
||||
|
||||
if [ $USE_PCRE = DISABLED ]; then
|
||||
echo " + PCRE library is disabled"
|
||||
echo " + PCRE library is disabled"
|
||||
|
||||
else
|
||||
case $PCRE in
|
||||
YES) echo " + using system $PCRE_LIBRARY library" ;;
|
||||
YES) echo " + using system PCRE library" ;;
|
||||
NONE) echo " + PCRE library is not used" ;;
|
||||
*) echo " + using $PCRE_LIBRARY library: $PCRE" ;;
|
||||
NO) echo " + PCRE library is not found" ;;
|
||||
*) echo " + using PCRE library: $PCRE" ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
case $MD5 in
|
||||
YES) echo " + md5: using system $MD5_LIB library" ;;
|
||||
NONE) echo " + md5 library is not used" ;;
|
||||
NO) echo " + md5 library is not found" ;;
|
||||
*) echo " + using md5 library: $MD5" ;;
|
||||
esac
|
||||
|
||||
case $OPENSSL in
|
||||
YES) echo " + using system OpenSSL library" ;;
|
||||
NONE) echo " + OpenSSL library is not used" ;;
|
||||
NO) echo " + OpenSSL library is not found" ;;
|
||||
*) echo " + using OpenSSL library: $OPENSSL" ;;
|
||||
esac
|
||||
|
||||
case $ZLIB in
|
||||
YES) echo " + using system zlib library" ;;
|
||||
NONE) echo " + zlib library is not used" ;;
|
||||
NO) echo " + zlib library is not found" ;;
|
||||
*) echo " + using zlib library: $ZLIB" ;;
|
||||
esac
|
||||
|
||||
case $NGX_LIBATOMIC in
|
||||
YES) echo " + using system libatomic_ops library" ;;
|
||||
NO) ;; # not used
|
||||
*) echo " + using libatomic_ops library: $NGX_LIBATOMIC" ;;
|
||||
esac
|
||||
|
||||
echo
|
||||
|
||||
|
||||
if [ $HTTP_REWRITE = YES ]; then
|
||||
if [ $USE_PCRE = DISABLED ]; then
|
||||
|
||||
cat << END
|
||||
nginx path prefix: "$NGX_PREFIX"
|
||||
nginx binary file: "$NGX_SBIN_PATH"
|
||||
nginx modules path: "$NGX_MODULES_PATH"
|
||||
nginx configuration prefix: "$NGX_CONF_PREFIX"
|
||||
nginx configuration file: "$NGX_CONF_PATH"
|
||||
nginx pid file: "$NGX_PID_PATH"
|
||||
$0: error: the HTTP rewrite module requires the PCRE library.
|
||||
You can either disable the module by using --without-http_rewrite_module
|
||||
option or you have to enable the PCRE support.
|
||||
|
||||
END
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ $PCRE = NONE -o $PCRE = NO ]; then
|
||||
|
||||
cat << END
|
||||
$0: error: the HTTP rewrite module requires the PCRE library.
|
||||
You can either disable the module by using --without-http_rewrite_module
|
||||
option, or install the PCRE library into the system, or build the PCRE library
|
||||
statically from the source with nginx by using --with-pcre=<path> option.
|
||||
|
||||
END
|
||||
|
||||
if test -n "$NGX_ERROR_LOG_PATH"; then
|
||||
echo " nginx error log file: \"$NGX_ERROR_LOG_PATH\""
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
if [ $HTTP_GZIP = YES ]; then
|
||||
if [ $ZLIB = NONE -o $ZLIB = NO ]; then
|
||||
|
||||
cat << END
|
||||
$0: error: the HTTP gzip module requires the zlib library.
|
||||
You can either disable the module by using --without-http_gzip_module
|
||||
option, or install the zlib library into the system, or build the zlib library
|
||||
statically from the source with nginx by using --with-zlib=<path> option.
|
||||
|
||||
END
|
||||
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
echo " nginx path prefix: $PREFIX"
|
||||
echo " nginx binary file: $SBIN_PATH"
|
||||
echo " nginx configuration file: $CONF_PATH"
|
||||
echo " nginx pid file: $PID_PATH"
|
||||
if [ ".$ERROR_LOG_PATH" != "." ]; then
|
||||
echo " nginx error log file: $ERROR_LOG_PATH"
|
||||
else
|
||||
echo " nginx logs errors to stderr"
|
||||
fi
|
||||
|
||||
cat << END
|
||||
nginx http access log file: "$NGX_HTTP_LOG_PATH"
|
||||
nginx http client request body temporary files: "$NGX_HTTP_CLIENT_TEMP_PATH"
|
||||
END
|
||||
|
||||
if [ $HTTP_PROXY = YES ]; then
|
||||
echo " nginx http proxy temporary files: \"$NGX_HTTP_PROXY_TEMP_PATH\""
|
||||
fi
|
||||
|
||||
if [ $HTTP_FASTCGI = YES ]; then
|
||||
echo " nginx http fastcgi temporary files: \"$NGX_HTTP_FASTCGI_TEMP_PATH\""
|
||||
fi
|
||||
|
||||
if [ $HTTP_UWSGI = YES ]; then
|
||||
echo " nginx http uwsgi temporary files: \"$NGX_HTTP_UWSGI_TEMP_PATH\""
|
||||
fi
|
||||
|
||||
if [ $HTTP_SCGI = YES ]; then
|
||||
echo " nginx http scgi temporary files: \"$NGX_HTTP_SCGI_TEMP_PATH\""
|
||||
fi
|
||||
|
||||
echo "$NGX_POST_CONF_MSG"
|
||||
echo " nginx http access log file: $HTTP_LOG_PATH"
|
||||
echo
|
||||
|
|
|
|||
77
auto/threads
77
auto/threads
|
|
@ -1,21 +1,70 @@
|
|||
|
||||
# Copyright (C) Nginx, Inc.
|
||||
# Copyright (C) Igor Sysoev
|
||||
|
||||
|
||||
if [ $USE_THREADS = YES ]; then
|
||||
case $USE_THREADS in
|
||||
rfork)
|
||||
have=NGX_THREADS . auto/have
|
||||
have=NGX_USE_RFORK . auto/have
|
||||
CORE_DEPS="$CORE_DEPS $FREEBSD_RFORK_DEPS"
|
||||
CORE_SRCS="$CORE_SRCS $FREEBSD_RFORK_SRCS"
|
||||
|
||||
if [ "$NGX_PLATFORM" = win32 ]; then
|
||||
cat << END
|
||||
case $PLATFORM in
|
||||
*:i386)
|
||||
if [ \( $version -gt 500000 -a $version -lt 501000 \) \
|
||||
-o $version -lt 491000 ]
|
||||
then
|
||||
CORE_SRCS="$CORE_SRCS $FREEBSD_RFORK_THREAD_SRCS"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
||||
$0: --with-threads is not supported on Windows
|
||||
pthreads)
|
||||
have=NGX_THREADS . auto/have
|
||||
CORE_SRCS="$CORE_SRCS $PTHREAD_SRCS"
|
||||
CORE_LIBS="$CORE_LIBS -lpthread"
|
||||
;;
|
||||
|
||||
END
|
||||
exit 1
|
||||
fi
|
||||
libthr)
|
||||
have=NGX_THREADS . auto/have
|
||||
CORE_SRCS="$CORE_SRCS $PTHREAD_SRCS"
|
||||
CORE_LIBS="$CORE_LIBS -lthr"
|
||||
;;
|
||||
|
||||
have=NGX_THREADS . auto/have
|
||||
CORE_DEPS="$CORE_DEPS $THREAD_POOL_DEPS"
|
||||
CORE_SRCS="$CORE_SRCS $THREAD_POOL_SRCS"
|
||||
CORE_LIBS="$CORE_LIBS -lpthread"
|
||||
NGX_LIBPTHREAD="-lpthread"
|
||||
fi
|
||||
linuxthreads)
|
||||
have=NGX_THREADS . auto/have
|
||||
have=NGX_LINUXTHREADS . auto/have
|
||||
CFLAGS="$CFLAGS -D_THREAD_SAFE"
|
||||
CFLAGS="$CFLAGS -I /usr/local/include/pthread/linuxthreads"
|
||||
CORE_SRCS="$CORE_SRCS $PTHREAD_SRCS"
|
||||
CORE_LIBS="$CORE_LIBS -L /usr/local/lib -llthread -llgcc_r"
|
||||
;;
|
||||
|
||||
libc_r)
|
||||
case $PLATFORM in
|
||||
FreeBSD:[34]*)
|
||||
have=NGX_THREADS . auto/have
|
||||
CFLAGS="$CFLAGS -pthread"
|
||||
CORE_SRCS="$CORE_SRCS $PTHREAD_SRCS"
|
||||
CORE_LIBS="$CORE_LIBS -pthread"
|
||||
;;
|
||||
|
||||
FreeBSD:5*)
|
||||
have=NGX_THREADS . auto/have
|
||||
CORE_SRCS="$CORE_SRCS $PTHREAD_SRCS"
|
||||
CORE_LIBS="$CORE_LIBS -lc_r"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
||||
NO)
|
||||
;;
|
||||
|
||||
*)
|
||||
have=NGX_THREADS . auto/have
|
||||
CORE_SRCS="$CORE_SRCS $PTHREAD_SRCS"
|
||||
CORE_LIBS="$CORE_LIBS -l$USE_THREADS"
|
||||
;;
|
||||
|
||||
esac
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
echo $ngx_n "checking for $ngx_type size ...$ngx_c"
|
||||
|
|
@ -20,22 +19,19 @@ cat << END > $NGX_AUTOTEST.c
|
|||
#include <sys/time.h>
|
||||
$NGX_INCLUDE_UNISTD_H
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/resource.h>
|
||||
$NGX_INCLUDE_INTTYPES_H
|
||||
$NGX_INCLUDE_AUTO_CONFIG_H
|
||||
|
||||
int main(void) {
|
||||
printf("%d", (int) sizeof($ngx_type));
|
||||
int main() {
|
||||
printf("%d", sizeof($ngx_type));
|
||||
return 0;
|
||||
}
|
||||
|
||||
END
|
||||
|
||||
|
||||
ngx_test="$CC $CC_TEST_FLAGS $CC_AUX_FLAGS \
|
||||
-o $NGX_AUTOTEST $NGX_AUTOTEST.c $NGX_LD_OPT $ngx_feature_libs"
|
||||
|
||||
ngx_test="$CC $CC_TEST_FLAGS $CC_AUX_FLAGS -o $NGX_AUTOTEST $NGX_AUTOTEST.c"
|
||||
eval "$ngx_test >> $NGX_AUTOCONF_ERR 2>&1"
|
||||
|
||||
|
||||
|
|
@ -45,15 +41,28 @@ if [ -x $NGX_AUTOTEST ]; then
|
|||
fi
|
||||
|
||||
|
||||
rm -f $NGX_AUTOTEST
|
||||
|
||||
|
||||
case $ngx_size in
|
||||
4)
|
||||
ngx_max_value=2147483647
|
||||
ngx_max_len='(sizeof("-2147483648") - 1)'
|
||||
if [ "$ngx_type"="long" ]; then
|
||||
ngx_max_value=2147483647L
|
||||
else
|
||||
ngx_max_value=2147483647
|
||||
fi
|
||||
|
||||
ngx_max_len='sizeof("-2147483648") - 1'
|
||||
;;
|
||||
|
||||
8)
|
||||
ngx_max_value=9223372036854775807LL
|
||||
ngx_max_len='(sizeof("-9223372036854775808") - 1)'
|
||||
if [ "$ngx_type"="long long" ]; then
|
||||
ngx_max_value=9223372036854775807LL
|
||||
else
|
||||
ngx_max_value=9223372036854775807L
|
||||
fi
|
||||
|
||||
ngx_max_len='sizeof("-9223372036854775808") - 1'
|
||||
;;
|
||||
|
||||
*)
|
||||
|
|
@ -66,11 +75,6 @@ case $ngx_size in
|
|||
echo $ngx_test >> $NGX_AUTOCONF_ERR
|
||||
echo "----------" >> $NGX_AUTOCONF_ERR
|
||||
|
||||
rm -rf $NGX_AUTOTEST*
|
||||
|
||||
exit 1
|
||||
esac
|
||||
|
||||
|
||||
rm -rf $NGX_AUTOTEST*
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
echo $ngx_n "checking for $ngx_type ...$ngx_c"
|
||||
|
|
@ -27,16 +26,14 @@ do
|
|||
#include <netinet/in.h>
|
||||
$NGX_INCLUDE_INTTYPES_H
|
||||
|
||||
int main(void) {
|
||||
int main() {
|
||||
$ngx_try i = 0;
|
||||
return (int) i;
|
||||
return 0;
|
||||
}
|
||||
|
||||
END
|
||||
|
||||
ngx_test="$CC $CC_TEST_FLAGS $CC_AUX_FLAGS \
|
||||
-o $NGX_AUTOTEST $NGX_AUTOTEST.c $NGX_LD_OPT $ngx_feature_libs"
|
||||
|
||||
ngx_test="$CC $CC_TEST_FLAGS $CC_AUX_FLAGS -o $NGX_AUTOTEST $NGX_AUTOTEST.c"
|
||||
eval "$ngx_test >> $NGX_AUTOCONF_ERR 2>&1"
|
||||
|
||||
if [ -x $NGX_AUTOTEST ]; then
|
||||
|
|
@ -49,23 +46,18 @@ END
|
|||
fi
|
||||
fi
|
||||
|
||||
rm -f $NGX_AUTOTEST
|
||||
|
||||
if [ $ngx_found = no ]; then
|
||||
if [ $ngx_try = $ngx_type ]; then
|
||||
echo $ngx_n " $ngx_try not found$ngx_c"
|
||||
else
|
||||
echo $ngx_n ", $ngx_try not found$ngx_c"
|
||||
fi
|
||||
echo $ngx_n " $ngx_try not found$ngx_c"
|
||||
|
||||
echo "----------" >> $NGX_AUTOCONF_ERR
|
||||
cat $NGX_AUTOTEST.c >> $NGX_AUTOCONF_ERR
|
||||
echo "----------" >> $NGX_AUTOCONF_ERR
|
||||
echo $ngx_test >> $NGX_AUTOCONF_ERR
|
||||
echo "----------" >> $NGX_AUTOCONF_ERR
|
||||
fi
|
||||
|
||||
rm -rf $NGX_AUTOTEST*
|
||||
|
||||
if [ $ngx_found != no ]; then
|
||||
else
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
|
|
|||
|
|
@ -1,35 +1,26 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
echo $ngx_n "checking for uintptr_t ...$ngx_c"
|
||||
|
||||
cat << END >> $NGX_AUTOCONF_ERR
|
||||
|
||||
----------------------------------------
|
||||
checking for uintptr_t
|
||||
|
||||
END
|
||||
echo >> $NGX_ERR
|
||||
echo "checking for uintptr_t" >> $NGX_ERR
|
||||
|
||||
found=no
|
||||
|
||||
cat << END > $NGX_AUTOTEST.c
|
||||
|
||||
#include <sys/types.h>
|
||||
$NGX_INCLUDE_INTTYPES_H
|
||||
$NGX_INTTYPES_H
|
||||
|
||||
int main(void) {
|
||||
int main() {
|
||||
uintptr_t i = 0;
|
||||
return (int) i;
|
||||
return 0;
|
||||
}
|
||||
|
||||
END
|
||||
|
||||
ngx_test="$CC $CC_TEST_FLAGS $CC_AUX_FLAGS \
|
||||
-o $NGX_AUTOTEST $NGX_AUTOTEST.c $NGX_LD_OPT"
|
||||
|
||||
eval "$ngx_test >> $NGX_AUTOCONF_ERR 2>&1"
|
||||
eval "$CC -o $NGX_AUTOTEST $NGX_AUTOTEST.c >> $NGX_ERR 2>&1"
|
||||
|
||||
if [ -x $NGX_AUTOTEST ]; then
|
||||
echo " uintptr_t found"
|
||||
|
|
@ -38,13 +29,12 @@ else
|
|||
echo $ngx_n " uintptr_t not found" $ngx_c
|
||||
fi
|
||||
|
||||
rm -rf $NGX_AUTOTEST*
|
||||
rm $NGX_AUTOTEST*
|
||||
|
||||
|
||||
if [ $found = no ]; then
|
||||
found="uint`expr 8 \* $ngx_ptr_size`_t"
|
||||
echo ", $found used"
|
||||
|
||||
echo "typedef $found uintptr_t;" >> $NGX_AUTO_CONFIG_H
|
||||
echo "typedef $found intptr_t;" | sed -e 's/u//g' >> $NGX_AUTO_CONFIG_H
|
||||
echo "typedef $found uintptr_t;" >> $NGX_AUTO_CONFIG_H
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
cat << END >> $NGX_AUTO_CONFIG_H
|
||||
|
|
@ -8,5 +7,3 @@ cat << END >> $NGX_AUTO_CONFIG_H
|
|||
#ifndef $ngx_param
|
||||
#define $ngx_param $ngx_value
|
||||
#endif
|
||||
|
||||
END
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,26 +0,0 @@
|
|||
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param QUERY_STRING $query_string;
|
||||
fastcgi_param REQUEST_METHOD $request_method;
|
||||
fastcgi_param CONTENT_TYPE $content_type;
|
||||
fastcgi_param CONTENT_LENGTH $content_length;
|
||||
|
||||
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
|
||||
fastcgi_param REQUEST_URI $request_uri;
|
||||
fastcgi_param DOCUMENT_URI $document_uri;
|
||||
fastcgi_param DOCUMENT_ROOT $document_root;
|
||||
fastcgi_param SERVER_PROTOCOL $server_protocol;
|
||||
fastcgi_param REQUEST_SCHEME $scheme;
|
||||
fastcgi_param HTTPS $https if_not_empty;
|
||||
|
||||
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
|
||||
fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;
|
||||
|
||||
fastcgi_param REMOTE_ADDR $remote_addr;
|
||||
fastcgi_param REMOTE_PORT $remote_port;
|
||||
fastcgi_param SERVER_ADDR $server_addr;
|
||||
fastcgi_param SERVER_PORT $server_port;
|
||||
fastcgi_param SERVER_NAME $server_name;
|
||||
|
||||
# PHP only, required if PHP was built with --enable-force-cgi-redirect
|
||||
fastcgi_param REDIRECT_STATUS 200;
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
|
||||
fastcgi_param QUERY_STRING $query_string;
|
||||
fastcgi_param REQUEST_METHOD $request_method;
|
||||
fastcgi_param CONTENT_TYPE $content_type;
|
||||
fastcgi_param CONTENT_LENGTH $content_length;
|
||||
|
||||
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
|
||||
fastcgi_param REQUEST_URI $request_uri;
|
||||
fastcgi_param DOCUMENT_URI $document_uri;
|
||||
fastcgi_param DOCUMENT_ROOT $document_root;
|
||||
fastcgi_param SERVER_PROTOCOL $server_protocol;
|
||||
fastcgi_param REQUEST_SCHEME $scheme;
|
||||
fastcgi_param HTTPS $https if_not_empty;
|
||||
|
||||
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
|
||||
fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;
|
||||
|
||||
fastcgi_param REMOTE_ADDR $remote_addr;
|
||||
fastcgi_param REMOTE_PORT $remote_port;
|
||||
fastcgi_param SERVER_ADDR $server_addr;
|
||||
fastcgi_param SERVER_PORT $server_port;
|
||||
fastcgi_param SERVER_NAME $server_name;
|
||||
|
||||
# PHP only, required if PHP was built with --enable-force-cgi-redirect
|
||||
fastcgi_param REDIRECT_STATUS 200;
|
||||
109
conf/koi-utf
109
conf/koi-utf
|
|
@ -1,109 +0,0 @@
|
|||
|
||||
# This map is not a full koi8-r <> utf8 map: it does not contain
|
||||
# box-drawing and some other characters. Besides this map contains
|
||||
# several koi8-u and Byelorussian letters which are not in koi8-r.
|
||||
# If you need a full and standard map, use contrib/unicode2nginx/koi-utf
|
||||
# map instead.
|
||||
|
||||
charset_map koi8-r utf-8 {
|
||||
|
||||
80 E282AC ; # euro
|
||||
|
||||
95 E280A2 ; # bullet
|
||||
|
||||
9A C2A0 ; #
|
||||
|
||||
9E C2B7 ; # ·
|
||||
|
||||
A3 D191 ; # small yo
|
||||
A4 D194 ; # small Ukrainian ye
|
||||
|
||||
A6 D196 ; # small Ukrainian i
|
||||
A7 D197 ; # small Ukrainian yi
|
||||
|
||||
AD D291 ; # small Ukrainian soft g
|
||||
AE D19E ; # small Byelorussian short u
|
||||
|
||||
B0 C2B0 ; # °
|
||||
|
||||
B3 D081 ; # capital YO
|
||||
B4 D084 ; # capital Ukrainian YE
|
||||
|
||||
B6 D086 ; # capital Ukrainian I
|
||||
B7 D087 ; # capital Ukrainian YI
|
||||
|
||||
B9 E28496 ; # numero sign
|
||||
|
||||
BD D290 ; # capital Ukrainian soft G
|
||||
BE D18E ; # capital Byelorussian short U
|
||||
|
||||
BF C2A9 ; # (C)
|
||||
|
||||
C0 D18E ; # small yu
|
||||
C1 D0B0 ; # small a
|
||||
C2 D0B1 ; # small b
|
||||
C3 D186 ; # small ts
|
||||
C4 D0B4 ; # small d
|
||||
C5 D0B5 ; # small ye
|
||||
C6 D184 ; # small f
|
||||
C7 D0B3 ; # small g
|
||||
C8 D185 ; # small kh
|
||||
C9 D0B8 ; # small i
|
||||
CA D0B9 ; # small j
|
||||
CB D0BA ; # small k
|
||||
CC D0BB ; # small l
|
||||
CD D0BC ; # small m
|
||||
CE D0BD ; # small n
|
||||
CF D0BE ; # small o
|
||||
|
||||
D0 D0BF ; # small p
|
||||
D1 D18F ; # small ya
|
||||
D2 D180 ; # small r
|
||||
D3 D181 ; # small s
|
||||
D4 D182 ; # small t
|
||||
D5 D183 ; # small u
|
||||
D6 D0B6 ; # small zh
|
||||
D7 D0B2 ; # small v
|
||||
D8 D18C ; # small soft sign
|
||||
D9 D18B ; # small y
|
||||
DA D0B7 ; # small z
|
||||
DB D188 ; # small sh
|
||||
DC D18D ; # small e
|
||||
DD D189 ; # small shch
|
||||
DE D187 ; # small ch
|
||||
DF D18A ; # small hard sign
|
||||
|
||||
E0 D0AE ; # capital YU
|
||||
E1 D090 ; # capital A
|
||||
E2 D091 ; # capital B
|
||||
E3 D0A6 ; # capital TS
|
||||
E4 D094 ; # capital D
|
||||
E5 D095 ; # capital YE
|
||||
E6 D0A4 ; # capital F
|
||||
E7 D093 ; # capital G
|
||||
E8 D0A5 ; # capital KH
|
||||
E9 D098 ; # capital I
|
||||
EA D099 ; # capital J
|
||||
EB D09A ; # capital K
|
||||
EC D09B ; # capital L
|
||||
ED D09C ; # capital M
|
||||
EE D09D ; # capital N
|
||||
EF D09E ; # capital O
|
||||
|
||||
F0 D09F ; # capital P
|
||||
F1 D0AF ; # capital YA
|
||||
F2 D0A0 ; # capital R
|
||||
F3 D0A1 ; # capital S
|
||||
F4 D0A2 ; # capital T
|
||||
F5 D0A3 ; # capital U
|
||||
F6 D096 ; # capital ZH
|
||||
F7 D092 ; # capital V
|
||||
F8 D0AC ; # capital soft sign
|
||||
F9 D0AB ; # capital Y
|
||||
FA D097 ; # capital Z
|
||||
FB D0A8 ; # capital SH
|
||||
FC D0AD ; # capital E
|
||||
FD D0A9 ; # capital SHCH
|
||||
FE D0A7 ; # capital CH
|
||||
FF D0AA ; # capital hard sign
|
||||
}
|
||||
22
conf/koi-win
22
conf/koi-win
|
|
@ -1,35 +1,17 @@
|
|||
|
||||
charset_map koi8-r windows-1251 {
|
||||
|
||||
80 88 ; # euro
|
||||
|
||||
95 95 ; # bullet
|
||||
|
||||
9A A0 ; #
|
||||
|
||||
9C B0 ; # °
|
||||
|
||||
9E B7 ; # ·
|
||||
|
||||
A3 B8 ; # small yo
|
||||
A4 BA ; # small Ukrainian ye
|
||||
|
||||
A6 B3 ; # small Ukrainian i
|
||||
A7 BF ; # small Ukrainian yi
|
||||
|
||||
AD B4 ; # small Ukrainian soft g
|
||||
AE A2 ; # small Byelorussian short u
|
||||
|
||||
B0 B0 ; # °
|
||||
|
||||
B3 A8 ; # capital YO
|
||||
B4 AA ; # capital Ukrainian YE
|
||||
|
||||
B6 B2 ; # capital Ukrainian I
|
||||
B7 AF ; # capital Ukrainian YI
|
||||
|
||||
B9 B9 ; # numero sign
|
||||
|
||||
BD A5 ; # capital Ukrainian soft G
|
||||
BE A1 ; # capital Byelorussian short U
|
||||
|
||||
BF A9 ; # (C)
|
||||
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue