diff options
author | Peter Kokot <peterkokot@gmail.com> | 2019-05-12 18:43:03 +0200 |
---|---|---|
committer | Peter Kokot <peterkokot@gmail.com> | 2019-05-12 18:43:03 +0200 |
commit | 75fb74860da7decd94432a4d211795310308a4a8 (patch) | |
tree | a4a7a4755150cf43bca6c4f7d075ce67e1c4ade2 /ext/oci8 | |
parent | e96c776bd5d03d3042e9b1c91d395ebf81741540 (diff) | |
download | php-git-75fb74860da7decd94432a4d211795310308a4a8.tar.gz |
Normalize comments in *nix build system m4 files
Normalization include:
- Use dnl for everything that can be ommitted when configure is built in
favor of the shell comment character # which is visible in the output.
- Line length normalized to 80 columns
- Dots for most of the one line sentences
- Macro definitions include similar pattern header comments now
Diffstat (limited to 'ext/oci8')
-rw-r--r-- | ext/oci8/config.m4 | 75 |
1 files changed, 40 insertions, 35 deletions
diff --git a/ext/oci8/config.m4 b/ext/oci8/config.m4 index d534f09107..89da625e27 100644 --- a/ext/oci8/config.m4 +++ b/ext/oci8/config.m4 @@ -23,7 +23,8 @@ AC_DEFUN([AC_OCI8_CHECK_LIB_DIR],[ elif test -d "$OCI8_DIR/lib" && test -d "$OCI8_DIR/lib32"; then OCI8_LIB_DIR=$PHP_OCI8_OH_LIBDIR else - dnl This isn't an ORACLE_HOME. Try heuristic examination of the dir to help the user + dnl This isn't an ORACLE_HOME. Try heuristic examination of the dir to help + dnl the user. if test -f "$OCI8_DIR/libociei.$SHLIB_SUFFIX_NAME"; then AC_MSG_ERROR([Expected an ORACLE_HOME top level directory but ${OCI8_DIR} appears to be an Instant Client directory. Try --with-oci8=instantclient,${OCI8_DIR}]) else @@ -36,7 +37,8 @@ AC_DEFUN([AC_OCI8_CHECK_LIB_DIR],[ AC_DEFUN([AC_OCI8IC_VERSION],[ AC_MSG_CHECKING([Oracle Instant Client library version compatibility]) OCI8_LCS_BASE=$PHP_OCI8_INSTANT_CLIENT/libclntsh.$SHLIB_SUFFIX_NAME - OCI8_LCS=`ls $OCI8_LCS_BASE.*.1 2> /dev/null | $PHP_OCI8_TAIL1` # Oracle 10g, 11g etc + dnl Oracle 10g, 11g etc + OCI8_LCS=`ls $OCI8_LCS_BASE.*.1 2> /dev/null | $PHP_OCI8_TAIL1` OCI8_NNZ=`ls $PHP_OCI8_INSTANT_CLIENT/libnnz*.$SHLIB_SUFFIX_NAME 2> /dev/null | $PHP_OCI8_TAIL1` if test -f "$OCI8_NNZ" && test -f "$OCI8_LCS"; then if test ! -f "$OCI8_LCS_BASE"; then @@ -52,15 +54,18 @@ AC_DEFUN([AC_OCI8IC_VERSION],[ AC_DEFUN([AC_OCI8_ORACLE_VERSION],[ AC_MSG_CHECKING([Oracle library version compatibility]) OCI8_LCS_BASE=$OCI8_DIR/$OCI8_LIB_DIR/libclntsh.$SHLIB_SUFFIX_NAME - OCI8_LCS=`ls $OCI8_LCS_BASE.*.1 2> /dev/null | $PHP_OCI8_TAIL1` # Oracle 10g, 11g etc + dnl Oracle 10g, 11g etc + OCI8_LCS=`ls $OCI8_LCS_BASE.*.1 2> /dev/null | $PHP_OCI8_TAIL1` if test -s "$OCI8_DIR/orainst/unix.rgs"; then OCI8_ORACLE_VERSION=`grep '"ocommon"' $OCI8_DIR/orainst/unix.rgs | $PHP_OCI8_SED 's/[ ][ ]*/:/g' | cut -d: -f 6 | cut -c 2-4` test -z "$OCI8_ORACLE_VERSION" && OCI8_ORACLE_VERSION=7.3 elif test -f "$OCI8_LCS"; then - dnl Oracle 10g, 11g etc. The x.2 version libraries are named x.1 for drop in compatibility + dnl Oracle 10g, 11g etc. The x.2 version libraries are named x.1 for drop in + dnl compatibility OCI8_ORACLE_VERSION=`echo $OCI8_LCS | $PHP_OCI8_SED -e 's/.*\.\(.*\)\.1$/\1.1/'` elif test -f $OCI8_LCS_BASE.9.0; then - dnl There is no case for Oracle 9.2. Oracle 9.2 libraries have a 9.0 suffix for drop-in compatibility with Oracle 9.0 + dnl There is no case for Oracle 9.2. Oracle 9.2 libraries have a 9.0 suffix + dnl for drop-in compatibility with Oracle 9.0 OCI8_ORACLE_VERSION=9.0 elif test -f $OCI8_LCS_BASE.8.0; then OCI8_ORACLE_VERSION=8.1 @@ -80,12 +85,11 @@ AC_DEFUN([AC_OCI8_ORACLE_VERSION],[ dnl dnl OCI8_INIT_DTRACE(providerdesc, header-file, sources) -dnl This mimics PHP_INIT_DTRACE from PHP 5.4's acinclude.m4. It is -dnl necessarily different from PHP_INIT_DTRACE which doesn't currently -dnl support DTrace for extensions. Creating OCI8_INIT_DTRACE -dnl independently instead of using a refactored PHP_INIT_DTRACE allows -dnl OCI8 to be DTraced on versions of PHP where core PHP DTrace support -dnl isn't available. +dnl This mimics PHP_INIT_DTRACE from build/php.m4. It is necessarily different +dnl from PHP_INIT_DTRACE which doesn't currently support DTrace for extensions. +dnl Creating OCI8_INIT_DTRACE independently instead of using a refactored +dnl PHP_INIT_DTRACE allows OCI8 to be DTraced on versions of PHP where core PHP +dnl DTrace support isn't available. dnl AC_DEFUN([OCI8_INIT_DTRACE],[ ac_srcdir=[]PHP_EXT_SRCDIR([oci8])/ @@ -112,9 +116,9 @@ dnl DTrace objects dtrace_oci8_objs="[$]dtrace_oci8_objs `echo $ac_lo | $SED -e 's,\.lo$,.o,' -e 's#\(.*\)\/#\1\/.libs\/#'`" done; -dnl Generate Makefile.objects entry -dnl The empty $ac_provsrc command stops an implicit circular dependency -dnl in GNU Make which causes the .d file to be overwritten (Bug 61268) +dnl Generate Makefile.objects entry. The empty $ac_provsrc command stops an +dnl implicit circular dependency in GNU Make which causes the .d file to be +dnl overwritten (Bug 61268). cat>>Makefile.objects<<EOF PHP_EXT_SRCDIR([oci8])/$ac_provsrc:; @@ -135,7 +139,8 @@ EOF for ac_lo in $OCI8_DTRACE_OBJS; do dtrace_oci8_lib_objs="[$]dtrace_oci8_lib_objs `echo $ac_lo | $SED -e 's,\.lo$,.o,' -e 's#\(.*\)\/#\1\/.libs\/#'`" done; -dnl Always attempt to create both PIC and non-PIC DTrace objects (Bug 63692) + + dnl Always attempt to create both PIC and non-PIC DTrace objects (Bug 63692) cat>>Makefile.objects<<EOF $ac_bdir[$]ac_provsrc.lo: \$(OCI8_DTRACE_OBJS) echo "[#] Generated by Makefile for libtool" > \$[]@ @@ -164,7 +169,6 @@ EOF esac ]) - dnl --with-oci8=shared,instantclient,/path/to/client/dir/lib dnl or dnl --with-oci8=shared,/path/to/oracle/home @@ -178,12 +182,12 @@ PHP_ARG_WITH([oci8], if test "$PHP_OCI8" != "no"; then if test -z "$PHP_OCI8"; then - dnl --with-oci8=$ORACLE_HOME where ORACLE_HOME isn't set (or is mistyped) will match this case + dnl --with-oci8=$ORACLE_HOME where ORACLE_HOME isn't set (or is mistyped) + dnl will match this case. AC_MSG_ERROR([Empty parameter value passed to --with-oci8]) fi - dnl Check PHP version is compatible with this extension - + dnl Check PHP version is compatible with this extension. AC_MSG_CHECKING([PHP version]) tmp_version=$PHP_VERSION @@ -212,9 +216,9 @@ if test "$PHP_OCI8" != "no"; then AC_MSG_RESULT([$php_version, ok]) fi - dnl Check whether --enable-dtrace was set. - dnl To use DTrace with a PECL install, extract the OCI8 archive, phpize it, and set - dnl PHP_DTRACE=yes before running configure + dnl Check whether --enable-dtrace was set. To use DTrace with a PECL install, + dnl extract the OCI8 archive, phpize it, and set PHP_DTRACE=yes before running + dnl configure. AC_MSG_CHECKING([OCI8 DTrace support]) oci8_do_dtrace="`echo $PHP_OCI8 | cut -d, -f3`" if test "$PHP_DTRACE" = "yes" -o "$oci8_do_dtrace" = "dtrace" ; then @@ -231,14 +235,15 @@ if test "$PHP_OCI8" != "no"; then ]) PHP_SUBST(OCI8_DTRACE_OBJS) AC_DEFINE(HAVE_OCI8_DTRACE,1,[Defined to 1 if PHP OCI8 DTrace support was enabled during configuration]) - dnl Developer warning: hard coded extension is OK for the known supported environments + dnl Developer warning: hard coded extension is OK for the known supported + dnl environments. shared_objects_oci8="$shared_objects_oci8 PHP_EXT_BUILDDIR(oci8)/oci8_dtrace.d.lo" fi else AC_MSG_RESULT([no]) fi - dnl Set some port specific directory components for use later + dnl Set some port specific directory components for use later. AC_CHECK_SIZEOF([long]) AC_MSG_CHECKING([if we're at 64-bit platform]) AS_IF([test "$ac_cv_sizeof_long" -eq 4],[ @@ -251,15 +256,15 @@ if test "$PHP_OCI8" != "no"; then PHP_OCI8_IC_LIBDIR_SUFFIX=64 ]) - dnl Determine if the user wants to use Oracle Instant Client libraries + dnl Determine if the user wants to use Oracle Instant Client libraries. PHP_OCI8_INSTANT_CLIENT="no" - dnl PECL Bug 14268 (Allow "pecl install oci8" command to "autodetect" - dnl an Instant Client RPM install). This also has a benefit for non - dnl "pecl install" builds: if the user does --with-oci8 or - dnl --with-oci8=shared but the ORACLE_HOME environment variable is not - dnl actually set, the install tries to locate the Instant Client RPM + dnl PECL Bug 14268 (Allow "pecl install oci8" command to "autodetect" an + dnl Instant Client RPM install). This also has a benefit for non + dnl "pecl install" builds: if the user does --with-oci8 or --with-oci8=shared + dnl but the ORACLE_HOME environment variable is not actually set, the install + dnl tries to locate the Instant Client RPM. if test "$PHP_OCI8" = "yes" && test -z "$ORACLE_HOME"; then AC_MSG_WARN([OCI8 extension: ORACLE_HOME is not set, looking for default Oracle Instant Client instead]) PHP_OCI8=instantclient @@ -355,11 +360,11 @@ if test "$PHP_OCI8" != "no"; then AC_MSG_CHECKING([Oracle Instant Client directory]) if test "$PHP_OCI8_INSTANT_CLIENT" = "yes"; then - dnl Find the directory if user specified "instantclient" but did not - dnl give a dir. Generally the Instant Client can be anywhere so the - dnl user must pass in the library directory. But on Linux we default - dnl to the most recent version in /usr/lib which is where the Oracle - dnl Instant Client RPM gets installed. + dnl Find the directory if user specified "instantclient" but did not give + dnl a dir. Generally the Instant Client can be anywhere so the user must + dnl pass in the library directory. But on Linux we default to the most + dnl recent version in /usr/lib which is where the Oracle Instant Client + dnl RPM gets installed. PHP_OCI8_INSTANT_CLIENT=`ls -d /usr/lib/oracle/*/client${PHP_OCI8_IC_LIBDIR_SUFFIX}/lib/libclntsh.* 2> /dev/null | $PHP_OCI8_TAIL1 | $PHP_OCI8_SED -e 's#/libclntsh[^/]*##'` if test -z "$PHP_OCI8_INSTANT_CLIENT"; then AC_MSG_ERROR([Oracle Instant Client directory /usr/lib/oracle/.../client${PHP_OCI8_IC_LIBDIR_SUFFIX}/lib libraries not found. Try --with-oci8=instantclient,DIR]) |