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

This commit is contained in:
Peter Kokot 2024-08-05 10:12:16 +02:00 committed by GitHub
parent 8bfcbdc5ee
commit 31f256492e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 41 additions and 28 deletions

View file

@ -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
@ -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])
@ -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])
@ -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)
@ -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])
@ -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
@ -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
@ -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])
@ -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
@ -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])
@ -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
@ -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)])
@ -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

View file

@ -11,9 +11,9 @@ if (PHP_ODBC == "yes") {
AC_DEFINE("HAVE_UODBC", 1, "Define to 1 if the PHP extension 'odbc' is available.");
AC_DEFINE("HAVE_SQLDATASOURCES", 1, "Define to 1 if ODBC library has 'SQLDataSources', as a function or macro.");
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)")