Help us understand the problem. What is going on with this article?

PHPをソースからコンパイルした際に前回のconfigureのオプションを調べる方法

More than 5 years have passed since last update.

PHPをソースからインストールしていて、バージョンアップのときに「あれ?前回コンパイルした際のオプションなんだったっけ?」って時には、ソースディレクトリ内にあるconfig.niceまたはconfig.statusを見れば、前回configure時に指定したオプションが記録されています。

config.nice
#! /bin/sh
#
# Created by configure

LDFLAGS='-lstdc++' \
'./configure' \
'--with-apxs2=/usr/sbin/apxs' \
'--enable-mbstring' \
'--enable-zend-multibyte' \
'--without-mysql' \
'--with-ldap' \
'--with-openssl' \
'--with-curl' \
'--enable-sockets' \
"$@"

config.statusの場合は、ファイルの最初の方に書かれています。紛れているので取り出して加工が必要ですが。

config.status
ac_cs_usage="Usage: ./config.status [--recheck] [--version] [--help]"
for ac_option
do
  case "$ac_option" in
  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
    echo "running ${CONFIG_SHELL-/bin/sh} ./configure  --with-apxs2=/usr/sbin/apxs --enable-mbstring --enable-zend-multibyte --with-ldap --with-openssl --with-curl --enable-sockets --no-create --no-recursion"
    exec ${CONFIG_SHELL-/bin/sh} ./configure  --with-apxs2=/usr/sbin/apxs --enable-mbstring --enable-zend-multibyte --with-ldap --with-openssl --with-curl --enable-sockets --no-create --no-recursion ;;
  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
    echo "./config.status generated by autoconf version 2.13"
    exit 0 ;;
  -help | --help | --hel | --he | --h)
    echo "$ac_cs_usage"; exit 0 ;;
  *) echo "$ac_cs_usage"; exit 1 ;;
  esac
done
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away