Skip to content

Add and update ext/odbc preprocessor macros help texts #15223

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 39 additions & 26 deletions ext/odbc/config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,26 @@ AC_DEFUN([PHP_ODBC_FIND_SOLID_LIBS],[
HP-UX) ac_solid_os=h9x;; # h1x for hpux11, h0x for hpux10
Linux)
if ldd -v /bin/sh | grep GLIBC > /dev/null; then
AC_DEFINE(SS_LINUX,1,[Needed in sqlunix.h ])
ac_solid_os=l2x
else
AC_DEFINE(SS_LINUX,1,[Needed in sqlunix.h ])
ac_solid_os=lux
fi;;
fi
AC_DEFINE([SS_LINUX], [1],
[Define to 1 to be able to use the obsolete <sqlunix.h> header file on
some Linux systems.])
;;
SunOS)
ac_solid_os=ssx;; # should we deal with SunOS 4?
FreeBSD)
if test `expr $ac_solid_uname_r : '\(.\)'` -gt "2"; then
AC_DEFINE(SS_FBX,1,[Needed in sqlunix.h for wchar defs ])
ac_solid_os=fex
else
AC_DEFINE(SS_FBX,1,[Needed in sqlunix.h for wchar defs ])
ac_solid_os=fbx
fi;;
fi
AC_DEFINE([SS_FBX], [1],
[Define to 1 to be able to use the wchar defs in the obsolete
<sqlunix.h> header file on some FreeBSD systems.])
;;
esac

if test -f $1/soc${ac_solid_os}35.a; then
Expand Down Expand Up @@ -119,7 +123,8 @@ PHP_ARG_WITH([adabas],,
ODBC_TYPE=adabas
ODBC_INCDIR=$PHP_ADABAS/incl
PHP_ODBC_CHECK_HEADER(sqlext.h)
AC_DEFINE(HAVE_ADABAS,1,[ ])
AC_DEFINE([HAVE_ADABAS], [1],
[Define to 1 if the odbc extension uses the Adabas D.])
AC_MSG_RESULT([$ext_output])
else
AC_MSG_RESULT([no])
Expand All @@ -140,7 +145,8 @@ PHP_ARG_WITH([sapdb],,
PHP_ADD_LIBPATH([$PHP_SAPDB/$PHP_LIBDIR])
PHP_ADD_LIBRARY([sqlod])
ODBC_TYPE=sapdb
AC_DEFINE(HAVE_SAPDB,1,[ ])
AC_DEFINE([HAVE_SAPDB], [1],
[Define to 1 if the odbc extension uses the SAP DB.])
AC_MSG_RESULT([$ext_output])
else
AC_MSG_RESULT([no])
Expand All @@ -162,11 +168,12 @@ PHP_ARG_WITH([solid],,
ODBC_CFLAGS=-I$ODBC_INCDIR
ODBC_TYPE=solid
if test -f $ODBC_LIBDIR/soc*35.a; then
AC_DEFINE(HAVE_SOLID_35,1,[ ])
AC_DEFINE([HAVE_SOLID_35], [1], [Define to 1 if Solid DB 3.5 is used.])
elif test -f $ODBC_LIBDIR/scl*30.a; then
AC_DEFINE(HAVE_SOLID_30,1,[ ])
AC_DEFINE([HAVE_SOLID_30], [1], [Define to 1 if Solid DB 3.0 is used.])
elif test -f $ODBC_LIBDIR/scl*23.a; then
AC_DEFINE(HAVE_SOLID,1,[ ])
AC_DEFINE([HAVE_SOLID], [1],
[Define to 1 if the odbc extension uses the Solid DB.])
fi
AC_MSG_RESULT([$ext_output])
PHP_ODBC_FIND_SOLID_LIBS($ODBC_LIBDIR)
Expand Down Expand Up @@ -198,7 +205,8 @@ PHP_ARG_WITH([ibm-db2],,
ODBC_LIBS=-ldb2

PHP_TEST_BUILD([SQLExecute], [
AC_DEFINE(HAVE_IBMDB2,1,[ ])
AC_DEFINE([HAVE_IBMDB2], [1],
[Define to 1 if the odbc extension uses the IBM DB2.])
AC_MSG_RESULT([$ext_output])
], [
AC_MSG_RESULT([no])
Expand Down Expand Up @@ -232,7 +240,8 @@ PHP_ARG_WITH([empress],,
ODBC_CFLAGS=-I$ODBC_INCDIR
ODBC_LFLAGS=-L$ODBC_LIBDIR
ODBC_TYPE=empress
AC_DEFINE(HAVE_EMPRESS,1,[ ])
AC_DEFINE([HAVE_EMPRESS], [1],
[Define to 1 if the odbc extension uses the Empress.])
AC_MSG_RESULT([$ext_output])
PHP_ODBC_FIND_EMPRESS_LIBS($ODBC_LIBDIR)
else
Expand Down Expand Up @@ -274,7 +283,8 @@ PHP_ARG_WITH([empress-bcs],,
done
ODBC_LIBS="-lempphpbcs -lms -lmscfg -lbasic -lbasic_os -lnlscstab -lnlsmsgtab -lm -ldl -lcrypt"
ODBC_TYPE=empress-bcs
AC_DEFINE(HAVE_EMPRESS,1,[ ])
AC_DEFINE([HAVE_EMPRESS], [1],
[Define to 1 if the odbc extension uses the Empress.])
AC_MSG_RESULT([$ext_output])
PHP_ODBC_FIND_EMPRESS_BCS_LIBS($ODBC_LIBDIR)
else
Expand Down Expand Up @@ -303,7 +313,8 @@ PHP_ARG_WITH([custom-odbc],,
ODBC_CFLAGS=-I$ODBC_INCDIR
ODBC_LIBS=$CUSTOM_ODBC_LIBS
ODBC_TYPE=custom-odbc
AC_DEFINE(HAVE_CODBC,1,[ ])
AC_DEFINE([HAVE_CODBC], [1],
[Define to 1 if the odbc extension uses custom ODBC installation.])
AC_MSG_RESULT([$ext_output])
else
AC_MSG_RESULT([no])
Expand All @@ -321,7 +332,8 @@ PHP_ARG_WITH([iodbc],,
PKG_CHECK_MODULES([ODBC], [libiodbc])
PHP_EVAL_INCLINE([$ODBC_CFLAGS])
ODBC_TYPE=iodbc
AC_DEFINE(HAVE_IODBC,1,[ ])
AC_DEFINE([HAVE_IODBC], [1],
[Define to 1 if the odbc extension uses the iODBC.])
else
AC_MSG_RESULT([no])
fi
Expand All @@ -343,7 +355,8 @@ PHP_ARG_WITH([esoob],,
ODBC_CFLAGS=-I$ODBC_INCDIR
ODBC_LIBS=-lesoobclient
ODBC_TYPE=esoob
AC_DEFINE(HAVE_ESOOB,1,[ ])
AC_DEFINE([HAVE_ESOOB], [1],
[Define to 1 if the odbc extension uses the Easysoft OOB.])
AC_MSG_RESULT([$ext_output])
else
AC_MSG_RESULT([no])
Expand Down Expand Up @@ -372,7 +385,8 @@ PHP_ARG_WITH([unixODBC],,
AC_MSG_RESULT([yes in $PHP_UNIXODBC])
fi
ODBC_TYPE=unixODBC
AC_DEFINE(HAVE_UNIXODBC,1,[ ])
AC_DEFINE([HAVE_UNIXODBC], [1],
[Define to 1 if the odbc extension uses the unixODBC.])
else
AC_MSG_RESULT([no])
fi
Expand Down Expand Up @@ -413,7 +427,8 @@ PHP_ARG_WITH([dbmaker],,
ODBC_LIBS="-ldmapic -lc"
ODBC_TYPE=dbmaker

AC_DEFINE(HAVE_DBMAKER,1,[Whether you want DBMaker])
AC_DEFINE([HAVE_DBMAKER], [1],
[Define to 1 if the odbc extension uses the DBMaker.])

if test "$ext_shared" = "yes"; then
AC_MSG_RESULT([yes (shared)])
Expand All @@ -430,13 +445,11 @@ PHP_ARG_WITH([dbmaker],,
fi
fi

if test "no" != "$PHP_ODBCVER"; then
if test "$PHP_ODBCVER" != "0"; then
AC_DEFINE_UNQUOTED(ODBCVER, $PHP_ODBCVER, [ The highest supported ODBC version ])
fi
else
AC_DEFINE(ODBCVER, 0x0350, [ The highest supported ODBC version ])
fi
AH_TEMPLATE([ODBCVER], [The highest supported ODBC version.])
AS_VAR_IF([PHP_ODBCVER], [no],
[AC_DEFINE([ODBCVER], [0x0350])],
[AS_VAR_IF([PHP_ODBCVER], [0],,
[AC_DEFINE_UNQUOTED([ODBCVER], [$PHP_ODBCVER])])])

dnl Extension setup
if test -n "$ODBC_TYPE"; then
Expand Down
4 changes: 2 additions & 2 deletions ext/odbc/config.w32
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ if (PHP_ODBC == "yes") {
EXTENSION("odbc", "php_odbc.c odbc_utils.c", PHP_ODBC_SHARED, "/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1");
AC_DEFINE("HAVE_UODBC", 1, "Define to 1 if the PHP extension 'odbc' is available.");
if ("no" == PHP_ODBCVER) {
AC_DEFINE("ODBCVER", "0x0350", "The highest supported ODBC version", false);
AC_DEFINE("ODBCVER", "0x0350", "The highest supported ODBC version.", false);
} else if ("0" != PHP_ODBCVER) {
AC_DEFINE("ODBCVER", PHP_ODBCVER, "The highest supported ODBC version", false);
AC_DEFINE("ODBCVER", PHP_ODBCVER, "The highest supported ODBC version.", false);
}
} else {
WARNING("odbc support can't be enabled, libraries or header are missing (SDK)")
Expand Down
Loading