Home
About
Blog
Products
Forum
Support
Contact
Sunbelt Computer Software
PL/B Language Development and Support
Home
About
Blog
Products
Forum
Support
Contact
php-src/buildconf at master · Wikipedia-Foundation/php-src · GitHub
Skip to content
Navigation Menu
Sign in
Products
Platform
GitHub
Repository hosting, code review, and collaboration
Copilot
AI coding agent for tasks, projects and automated work
Build & Ship
Actions
CI/CD and automation
Code Quality
Quality analysis, fixes, and enforcement
Codespaces
Cloud development environments
Secure
Code Security
Vulnerability detection and remediation
Secret Protection
Secret scanning and leak prevention
All Features
Developers
Learn
Documentation
Training
Certifications
Build
Build with Copilot
Customize Copilot
Integrations
Explore
Trending repos
GitHub Sponsors
Events
Changelog
Changelog
Your source for the latest features, improvements, and fixes across GitHub products, all in one place.
Businesses
By Stage
Enterprises
Team
Startups
Nonprofits
By Industry
Healthcare
Financial services
Manufacturing
Government
See all industries
Evaluate GitHub
Why GitHub
Customer Stories
Business insights
Trust Center
Add-ons
GitHub Advanced Security
Enterprise-grade code security
Copilot for business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Resources
Learn & Connect
Documentation
Resource center
Blog
Events & webinars
Community Forum
Customer Stories
Integrations
Support
Customer support
Training
GitHub Status
Company
About
Partners
Changelog
GitHub Universe
GitHub Universe
The event for developers, by developers — talks, workshops, and what’s next for GitHub.
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
Wikipedia-Foundation
php-src
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
More
items
Files
Expand file tree
master
Breadcrumbs
php-src
/
buildconf
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
executable file
·
137 lines (112 loc) · 3.92 KB
master
Breadcrumbs
php-src
/
buildconf
Copy path
Top
File metadata and controls
Code
Blame
executable file
·
137 lines (112 loc) · 3.92 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
#!
/bin/sh
#
#
A wrapper around Autoconf that generates files to build PHP on *nix systems.
PHP_AUTOCONF=
${PHP_AUTOCONF
:-
autoconf}
PHP_AUTOHEADER=
${PHP_AUTOHEADER
:-
autoheader}
force=0
debug=0
#
Go to project root.
cd
$(
CDPATH=
cd
--
"
$(
dirname --
"
$0
"
)
"
&&
pwd
-P
)
php_extra_version=
$(
grep
'
^AC_INIT(
'
configure.ac
)
case
"
$php_extra_version
"
in
*
-dev
*
)
dev=1
;;
*
)
dev=0
;;
esac
while
test
$#
-gt 0
;
do
if
test
"
$1
"
=
"
-h
"
||
test
"
$1
"
=
"
--help
"
;
then
cat
<<
HELP
PHP buildconf
A wrapper around the autoconf and autoheader that generate files for building
PHP on *nix systems (configure and main/php_config.h.in). The configure script
is used to customize the PHP build based on the provided options and system. PHP
releases downloaded from PHP.net already include the configure script so
installing Autoconf and running buildconf is not needed. For the PHP sources
from the Git repository, buildconf is used for generating a new configure script
and required files.
SYNOPSIS:
buildconf [<options>]
OPTIONS:
-f, --force Regenerate configure files in PHP release packages.
--debug Display warnings emitted by Autoconf.
-h, --help Display this help.
ENVIRONMENT:
The following optional variables are supported:
PHP_AUTOCONF Overrides the path to autoconf tool.
PHP_AUTOCONF=/path/to/autoconf ./buildconf
PHP_AUTOHEADER Overrides the path to autoheader tool.
PHP_AUTOHEADER=/path/to/autoheader ./buildconf
HELP
exit
0
fi
if
test
"
$1
"
=
"
-f
"
||
test
"
$1
"
=
"
--force
"
;
then
force=1
fi
if
test
"
$1
"
=
"
--debug
"
;
then
debug=1
fi
shift
done
if
test
"
$dev
"
=
"
0
"
&&
test
"
$force
"
=
"
0
"
;
then
if
test
-f
"
configure
"
&&
test
-f
"
main/php_config.h.in
"
;
then
echo
"
buildconf: The configure script is already built. All done.
"
echo
"
Run ./configure to proceed with customizing the PHP build.
"
exit
0
else
echo
"
buildconf: Configure files are missing.
"
>&2
echo
"
Run ./buildconf --force to create a configure script.
"
>&2
exit
1
fi
fi
echo
"
buildconf: Checking installation
"
#
Get minimum required autoconf version from the configure.ac file.
min_version=
$(
sed -n
'
s/AC_PREREQ(\[\(.*\)\])/\1/p
'
configure.ac
)
#
Check if autoconf exists.
ac_version=
$(
$PHP_AUTOCONF
--version
2>
/dev/null
|
head -n 1
|
sed -e
'
s/^[^0-9]*//
'
-e
'
s/[^0-9.]*$//
'
)
if
test
-z
"
$ac_version
"
;
then
echo
"
buildconf: autoconf not found.
"
>&2
echo
"
You need autoconf version
$min_version
or newer installed
"
>&2
echo
"
to build PHP from Git.
"
>&2
exit
1
fi
#
Check autoconf version.
set
-f
;
IFS=
'
.
'
;
set
--
$ac_version
;
set
+f
;
IFS=
'
'
ac_version_num=
"
$(
expr
${1}
\*
10000 +
${2}
\*
100
)
"
set
-f
;
IFS=
'
.
'
;
set
--
$min_version
;
set
+f
;
IFS=
'
'
min_version_num=
"
$(
expr
${1}
\*
10000 +
${2}
\*
100
)
"
if
test
"
$ac_version_num
"
-lt
"
$min_version_num
"
;
then
echo
"
buildconf: autoconf version
$ac_version
found.
"
>&2
echo
"
You need autoconf version
$min_version
or newer installed
"
>&2
echo
"
to build PHP from Git.
"
>&2
exit
1
else
echo
"
buildconf: autoconf version
$ac_version
(ok)
"
fi
if
test
"
$force
"
=
"
1
"
;
then
echo
"
buildconf: Forcing buildconf. The configure files will be regenerated.
"
fi
#
Clean cache and explicitly remove all targets if present. Remove also
#
aclocal.m4 if present. It is automatically included by autoconf but not used
#
by the PHP build system since PHP 7.4.
echo
"
buildconf: Cleaning cache and configure files
"
rm -rf \
aclocal.m4 \
autom4te.cache \
config.cache \
configure \
main/php_config.h.in
if
test
"
$debug
"
=
"
1
"
;
then
autoconf_flags=
"
-f -Wall
"
autoheader_flags=
"
-Wall
"
else
autoconf_flags=
"
-f
"
autoheader_flags=
"
"
fi
echo
"
buildconf: Rebuilding configure
"
$PHP_AUTOCONF
$autoconf_flags
echo
"
buildconf: Rebuilding main/php_config.h.in
"
$PHP_AUTOHEADER
$autoheader_flags
echo
"
buildconf: Run ./configure to proceed with customizing the PHP build.
"
You can’t perform that action at this time.