Commit Graph

84 Commits

Author SHA1 Message Date
Peter Kokot
700f6918e6
Fix Autoconf check for development versions (#11532)
When Autoconf version includes also development patch character (for
example, 2.72c), such as in unreleased Autoconf versions, this now
sets proper number for checking minimum required Autoconf version.
2023-07-18 17:54:00 +02:00
Peter Kokot
ef165b4422 Remove build.mk usage
First step when creating the `configure` script is currently using
make. This is helpful when developing buildsystem to only rebuild
`configure` and `main/php_config.h.in` files when one of the *.m4
or configure.ac file changes and saves the developer time a little.

Realistically however, it is not needed that much considering the
times of several seconds to fully rebuild the configure script and
configuration header. The next step when running the `configure`
script is much more time consuming so performance on buildconf
level is a bit questionable and won't be noticed on today's
systems.

Additionally:
- buildconf now removes cache and all targets and uses -f option on
  the first step i.e. autoconf. The autoheader does not need the -f
  option in this case.

Closes GH-4437
2019-07-21 11:40:23 +02:00
Peter Kokot
c79eb107a0 Simplify checking of *nix build tools
The buildmk.stamp file has been created by the *nix build checking step
to run the check step only once. Instead of poluting the project root
directory, the stamp file can be also omitted. Performance difference is
very minimal to not justify having the stamp check at all today anymore.

This patch integrates the buildcheck.sh to buildconf script directly.
2019-04-29 01:30:27 +02:00
Peter Kokot
76df951eb5 Enhance the buildconf force option
The force option used to only remove the Autoconf cache files. Now it
also removes entire configure file so the configure file always gets
rebuilt when needs be done.

Additionally, the buildconf now also accepts the shorter version of the
force option:
  buildconf -f
2019-04-28 21:15:54 +02:00
Peter Kokot
4e7064d173 Move acinclude.m4 to build/php.m4
The acinclude.m4 file is in a usual Autotools build processed with
Automake's aclocal tool. Since PHP currently doesn't use Automake and
aclocal this file can be moved into the build directory. PHP build
system currently generates a combined aclocal.m4 file that Autoconf
can processes automatically.

However, a newer practice is writing all local macros in separate
dedicated files prefixed with package name, in PHP's case PHP_MACRO_NAME
and putting them in a common `m4` directory. PHP uses currently `build`
directory for this purpose.

Name `php.m4` probably most resembles such file for PHP's case.

PHP manually created the aclocal.m4 file from acinclude.m4 and
build/libtool.m4. Which is also not a particularly good practice [1], so
this patch also removes the generated alocal.m4 usage and uses
m4_include() calls manually in the configure.ac and phpize.m4 files
manually.

- sort order is not important but can be alphabetical
- list of *.m4 files prerequisites for configure script generation
  updated
- Moving m4_include() before AC_INIT also removes all comments starting
  with hash character (`#`) in the included files.

[1] https://autotools.io/autoconf/macros.html
2019-04-23 20:28:45 +02:00
Peter Kokot
b1d3509e8c Refactor Zend/acinclude.m4 local macro
There is now only a single M4 macro in the legacy acinclude.m4 file. A
separate acinclude file was once used with a standalone Zend engine
building but with current build system this can be simplified a bit.
2019-04-21 15:53:19 +02:00
Peter Kokot
02c1f3293e Join build makefiles together
Changes:
- Joins build/build.mk and build/build2.mk files together since there
  isn't any practical reason for having two different files with the
  current build system.
- Makefile is now more portable. All special syntaxes are omitted, for
  example, a conditional assignment operators `?=`. This makes buildconf
  more useful on Solaris make derivative, so there is no longer need to
  override make with gmake: `MAKE=gmake ./buildconf`.
- Suppressing autoconf and autoheader warnings is not needed anymore
  with current build system. Instead, the option `-Wall` has been used
  when running `./buildconf --debug` to get more useful debug info
  about current M4.
2019-04-17 21:52:58 +02:00
Peter Kokot
b09fa9ed53 Simplify generated_lists generation
The `generated_lists` file is generated as a helper for build related
Makefile to include a list of *.m4 files prerequisites. When some of
these *.m4 files change, the configure script is regenerated when
buildconf is run. This can be simplified using dynamic environment
variable passed to the Makefile directly so it avoids another file from
being generated in the project root directory and shipping it with the
PHP release or creating a dedicated gitignore rule.

This is portable across all POSIX compatible makes So this patch
includes GNU Make, and everybody elses' make derivative support.
2019-04-16 17:25:08 +02:00
Peter Kokot
afd52f9d99 Refactor AC_INIT in configure.ac and PHP versions
Since Autoconf 2.53 the AC_INIT call with only a single argument has
been made obsolete and now includes several other optional arguments to
make installation experience a bit better by providing program version
and links to the project in the `./configure -h` output. This patch also
updates win build version. The phpize.m4 AC_INIT has been updated with
the call without arguments.
2019-04-07 05:52:14 +02:00
Peter Kokot
78ab79b916 Enhance the buildconf script
Changes:
- Added a short introduction what this script does
- Added usually the expected -h and --help options with explanation
  for a reason for this script and its usage.
- Messages changed a bit so the PHP installation procedure becomes
  simpler without needing to constantly remind the reader what to run
  and what not in the documentations and installation instructions.
- cd into current working directory of the buildconf (this enables
  running the script from other locations and inside other scripts).
- check if make exists
2019-03-16 23:43:25 +01:00
Peter Kokot
b7cef2b008 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  [ci skip] Update NEWS
  [ci skip] Update NEWS
  Fix #77041: buildconf should output error messages to stderr
2018-10-20 09:54:00 +02:00
Peter Kokot
0dc15e1885 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  [ci skip] Update NEWS
  Fix #77041: buildconf should output error messages to stderr
2018-10-20 09:51:22 +02:00
Mizunashi Mana
9f5cb626ed Fix #77041: buildconf should output error messages to stderr 2018-10-20 09:42:56 +02:00
Peter Kokot
8d3f8ca12a Remove unused Git attributes ident
The $Id$ keywords were used in Subversion where they can be substituted
with filename, last revision number change, last changed date, and last
user who changed it.

In Git this functionality is different and can be done with Git attribute
ident. These need to be defined manually for each file in the
.gitattributes file and are afterwards replaced with 40-character
hexadecimal blob object name which is based only on the particular file
contents.

This patch simplifies handling of $Id$ keywords by removing them since
they are not used anymore.
2018-07-25 00:53:25 +02:00
Brian Evans
2fe9208ee3
Use modern autotools name of configure.ac instead of configure.in
configure.ac was introduced in 2001 with automake-1.15 and autoconf-2.50
to replace the file named configure.in.
Autotools is preparing to remove configure.in in Automake 2.0.
All new software should be using configure.ac.
This also fixes Bug #69770 where extensions are creating configure.in

Signed-off-by: Brian Evans <grknight@gentoo.org>
2017-01-27 06:07:40 +00:00
Christopher Jones
15c956050c Make "buildconf --force" more robust, per IRC chat. Not backported to 5.3 to avoid destabilization. 2012-03-06 21:30:59 +00:00
Jani Taskinen
a56e81fe13 - Removed unused parts 2009-07-20 10:51:40 +00:00
David Soria Parra
098d0fcf55 MFH: Get rid of PHP 4 related buildconf and moving around directories. As we switched to svn ZE2 is in Zend by default. 2009-07-11 01:55:41 +00:00
Jani Taskinen
8684e7495f MFH: - Made build system less major version dependant to ease MFB/MFH 2007-07-26 22:45:59 +00:00
foobar
128119b9ab MFH 2005-11-29 22:39:19 +00:00
foobar
996c9d85d7 - Fix buildconf with BSD make 2005-02-03 17:42:42 +00:00
foobar
52e00b8f03 Added --debug option to buildconf 2005-01-19 23:03:29 +00:00
foobar
e4c614285f Revert undiscussed / undecided patch 2003-12-02 08:00:23 +00:00
Ilia Alshanetsky
6bb5ff7137 The least intrusive way to 'import' PECL extensions into the main tree.
For the moment this deals with tidy, further extensions can be added at a
later point.
2003-12-01 21:37:35 +00:00
Sascha Schumann
b97ce9d19f First shot at making ze1/ze2 coexist 2003-06-25 12:56:40 +00:00
foobar
7575a5e1df cleanup 2003-05-19 11:54:00 +00:00
Wez Furlong
0eb791969b MFB buildconf sanity check 2003-05-19 11:47:13 +00:00
Sascha Schumann
2247d61e17 Move autoconf-2.13 check into buildcheck.sh where we already have
version parsing code and (more importantly) proper error checking
for missing autoconf.
2002-07-21 13:09:07 +00:00
James Cox
aa84623d25 proper patch to cvsclean for bad autoconf. 2002-07-20 16:40:14 +00:00
Sascha Schumann
c2cc85d716 reverse bad patch
james, when you send me email about your patch which does not work,
why don't you wait for a reply first before committing the non-working
stuff?
2002-07-20 14:33:09 +00:00
James Cox
dd16444849 more work for buildconf. forces a cvsclean if using a bad am. more ZE/zE2 tests. 2002-07-20 04:02:44 +00:00
Sascha Schumann
5278f12e22 iterate through passed arguments 2002-06-24 03:05:00 +00:00
James Cox
372cab27ad some people would prefer to be able to specify. So, we specify --ZendEngine2 for ZE2 builds, Zend for the rest. 2002-06-23 16:31:54 +00:00
James Cox
bca90b0796 changing this to mv ZendEngine2 Zend instead of shell logic that isn't portable. 2002-06-23 15:47:40 +00:00
Sascha Schumann
a2f126c351 Build compat bridge for makes which support only the BSD .include command.
This is only required for BSD/OS, because BSDI did not merge in changes
from 4.4BSD Lite 1.
2000-09-26 11:19:38 +00:00
Sascha Schumann
0181cae318 Some crappy makes don't handle the .PHONY target correctly.
So we force a rebuild of generated_lists
2000-08-24 05:55:19 +00:00
Sascha Schumann
f2f8d38efa Integration of -ng changes. Changes:
- added support for externally built modules,
- improved support for in-tree shared modules,
- fixed diversion bugs,
- configure displays some informative messages,
- faster static build
  (libtool isn't used anymore for compiling non-PIC objects),
- dependencies comparable to automake's without requiring GNU make or GCC,
- working make clean for non-GNU makes.
1999-12-30 02:59:53 +00:00
Sascha Schumann
117d6a4151 Let user override default setting of ``make'' 1999-12-02 02:14:06 +00:00
Stig Bakken
6c6c0a630c Remove some more redundant checks. buildconf is not but a simple wrapper
for build.mk & co.
1999-11-29 10:22:34 +00:00
Stig Bakken
263c6856dd @buildconf now uses build.mk
Removed redundancy in buildconf/build.mk, buildconf now runs "make -f build.mk"
1999-11-28 22:51:50 +00:00
Andrei Zmievski
103b5cb285 Don't forget the pickle. 1999-11-22 20:47:37 +00:00
Sascha Schumann
7bc251058a Add libtool files to CVS. Advantages:
- PHP-specific changes are easier to maintain
- it removes one dependency for users (i.e. GNU vs. FreeBSD ports)

I have not removed the libtool check in buildconf, since libzend/TSRM still
depend on a local version of libtool.
1999-11-08 11:04:14 +00:00
Stig Bakken
a4c8d7dddc # Workaround needed to run automake in makedist. 1999-11-04 09:34:35 +00:00
Sascha Schumann
966b87e814 Enable hardcoding runpaths for more platforms and allow Solaris' patch to run
buildconf.
1999-10-06 23:26:36 +00:00
Sascha Schumann
1606365a12 Ignore already applied patches.
If somebody could make this work on Solaris, I'd appreciate it.
1999-10-06 19:34:36 +00:00
Sascha Schumann
b2edf87b39 Allow *.a and *.o as libtool objects, and hardcode runpaths into
shared libraries.

    (Both taken from FreeBSD's libtool port.)
1999-10-06 18:58:14 +00:00
Sascha Schumann
4b212d1ce6 * --copy always, since we need to change ltmain.sh
* make patch on some obscure UNIX happy
1999-10-06 12:06:48 +00:00
Sascha Schumann
dff6e711ce Apply patch automatically at buildconf time 1999-10-05 17:43:45 +00:00
Sascha Schumann
1a4f22e4ed automake does not find all subdirectories automatically. 1999-10-05 11:33:00 +00:00
Sascha Schumann
e74b985432 100% speedup in buildconf.
We have a top-level Makefile.am, so find becomes superflicious
1999-10-05 10:23:48 +00:00