Skip to content Navigation Menu Toggle navigation Sign in Appearance settings PlatformAI CODE CREATIONGitHub CopilotWrite better code with AIGitHub Copilot appDirect agents from issue to mergeMCP RegistryNewIntegrate external toolsDEVELOPER WORKFLOWSActionsAutomate any workflowCodespacesInstant dev environmentsIssuesPlan and track workCode ReviewManage code changesAPPLICATION SECURITYGitHub Advanced SecurityFind and fix vulnerabilitiesCode securitySecure your code as you buildSecret protectionStop leaks before they startEXPLOREWhy GitHubDocumentationBlogChangelogMarketplaceView all featuresSolutionsBY COMPANY SIZEEnterprisesSmall and medium teamsStartupsNonprofitsBY USE CASEApp ModernizationDevSecOpsDevOpsCI/CDView all use casesBY INDUSTRYHealthcareFinancial servicesManufacturingGovernmentView all industriesView all solutionsResourcesEXPLORE BY TOPICAISoftware DevelopmentDevOpsSecurityView all topicsEXPLORE BY TYPECustomer storiesEvents & webinarsEbooks & reportsBusiness insightsGitHub SkillsSUPPORT & SERVICESDocumentationCustomer supportCommunity forumTrust centerPartnersView all resourcesOpen SourceCOMMUNITYGitHub SponsorsFund open source developersPROGRAMSSecurity LabMaintainer CommunityAcceleratorGitHub StarsArchive ProgramREPOSITORIESTopicsTrendingCollectionsEnterpriseENTERPRISE SOLUTIONSEnterprise platformAI-powered developer platformAVAILABLE ADD-ONSGitHub Advanced SecurityEnterprise-grade security featuresCopilot for BusinessEnterprise-grade AI featuresPremium SupportEnterprise-grade 24/7 supportPricing Search or jump to... Search code, repositories, users, issues, pull requests... Search Clear Search syntax tips Provide feedback We read every piece of feedback, and take your input very seriously. Include my email address so I can be contacted Saved searches Use saved searches to filter your results more quickly Name Query To see all available qualifiers, see our documentation. Sign in Sign up Appearance settings Resetting focus 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 }} Uh oh! There was an error while loading. Please reload this page. php / php-src Public Notifications You must be signed in to change notification settings Fork 8.1k Star 40.2k Code Issues 939 Pull requests 901 Actions Security and quality 47 Insights Additional navigation options Code Issues Pull requests Actions Security and quality Insights FilesExpand file tree masterBreadcrumbsphp-src/buildconfCopy pathBlameMore file actionsBlameMore file actions Latest commit HistoryHistoryHistoryexecutable file·137 lines (112 loc) · 3.94 KB masterBreadcrumbsphp-src/buildconfCopy pathTopFile metadata and controlsCodeBlameexecutable file·137 lines (112 loc) · 3.94 KBRawCopy raw fileDownload raw fileOpen symbols panelEdit and raw actions123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137#!/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=0debug=0 # Go to project root.cd "$(CDPATH='' cd -- "$(dirname -- "$0")" && pwd -P)" || exit php_extra_version=$(grep '^AC_INIT(' configure.ac) || exitcase "$php_extra_version" in *-dev*) dev=1 ;; *) dev=0 ;;esac while test $# -gt 0; do if test "$1" = "-h" || test "$1" = "--help"; then cat << HELPPHP buildconf A wrapper around the autoconf and autoheader that generate files for buildingPHP on *nix systems (configure and main/php_config.h.in). The configure scriptis used to customize the PHP build based on the provided options and system. PHPreleases downloaded from PHP.net already include the configure script soinstalling Autoconf and running buildconf is not needed. For the PHP sourcesfrom the Git repository, buildconf is used for generating a new configure scriptand 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 ./buildconfHELP exit 0 fi if test "$1" = "-f" || test "$1" = "--force"; then force=1 fi if test "$1" = "--debug"; then debug=1 fi shiftdone 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 fifi 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 1fi # 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 1else 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.