]> granicus.if.org Git - php/commitdiff
@ Put an end to BUG#4615 (kalowsky & Eric Veldhuyzen)
authorDan Kalowsky <kalowsky@php.net>
Wed, 22 Nov 2000 15:31:04 +0000 (15:31 +0000)
committerDan Kalowsky <kalowsky@php.net>
Wed, 22 Nov 2000 15:31:04 +0000 (15:31 +0000)
This should remove the BUG#4615, thanks to Eric Veldhuyzen
(eric@terra.telemediair.nl) for the assistance on this (aka elegence vs
my hack).

This does not fix BUG#7922 though, which is currently being looked into

ext/odbc/config.m4

index 44a48abe2437bd0085e3b2ea92214fff1e83a156..1da33de10b6e65a6ec3bc4ecdc85ea366bdb4743 100644 (file)
@@ -6,9 +6,9 @@ AC_DEFUN(AC_FIND_SOLID_LIBS,[
   ac_solid_uname_r=`uname -r 2>/dev/null`
   ac_solid_uname_s=`uname -s 2>/dev/null`
   case $ac_solid_uname_s in
-    AIX) ac_solid_os=a3x;;   # a4x for AIX4
+    AIX) ac_solid_os=a3x;;   # a4x for AIX4/ Solid 2.3/3.0 only
     HP-UX) ac_solid_os=h9x;; # h1x for hpux11, h0x for hpux10
-    IRIX) ac_solid_os=irx;;
+    IRIX) ac_solid_os=irx;;     # Solid 2.3(?)/ 3.0 only
     Linux) if ldd -v /bin/sh | grep GLIBC > /dev/null; then
                AC_DEFINE(SS_LINUX,1,[Needed in sqlunix.h ])
                ac_solid_os=l2x
@@ -18,36 +18,45 @@ AC_DEFUN(AC_FIND_SOLID_LIBS,[
        fi;; 
     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      
-    # "uname -s" on SCO makes no sense.
+               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  
   esac
 
-  if test -f $1/scl${ac_solid_os}30.a; then
+  if test -f $1/soc${ac_solid_os}35.a; then
+    ac_solid_version=35
+    ac_solid_prefix=soc
+  elif test -f $1/scl${ac_solid_os}30.a; then
     ac_solid_version=30
     ac_solid_prefix=scl
   elif test -f $1/scl${ac_solid_os}23.a; then
     ac_solid_version=23
     ac_solid_prefix=scl
-  elif test -f $1/soc${ac_solid_os}35.a; then
-    ac_solid_version=35
-    ac_solid_prefix=soc
   fi
 
-  ODBC_LIBS=`echo $1/${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.so | cut -d' ' -f1`
- if test ! -f $ODBC_LIBS; then
-   ODBC_LIBS=`echo $1/${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.a | cut -d' ' -f1`
- fi
-if test ! -f $ODBC_LIBS; then
-     ODBC_LIBS=`echo $1/bcl${ac_solid_os}*.so | cut -d' ' -f1`
- fi
- if test ! -f $ODBC_LIBS; then
-     ODBC_LIBS=`echo $1/bcl${ac_solid_os}*.a | cut -d' ' -f1`
- fi
+#
+# Check for the library files, and setup the ODBC_LIBS path...
+#
+if test ! -f $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.so -a \
+       ! -f $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.a; then
+       #
+       # we have an error and should bail out, as we can't find the libs!
+       #
+       echo ""
+       echo "*********************************************************************"
+       echo "* Unable to locate $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.so or $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.a"
+       echo "* Please correct this by creating the following links and reconfiguring:"
+       echo "* $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.a -> $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.a"
+       echo "* $1/${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.so -> $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.so"
+       echo "*********************************************************************"else
+       ODBC_LFLAGS=-L$1
+       ODBC_LIBS=-l${ac_solid_prefix}${ac_solid_os}${ac_solid_version}
+fi
+
+
   AC_MSG_RESULT(`echo $ODBC_LIBS | sed -e 's!.*/!!'`)
 ])
 
@@ -139,11 +148,9 @@ AC_ARG_WITH(solid,
     ODBC_TYPE=solid
     if test -f $ODBC_LIBDIR/soc*35.a; then
       AC_DEFINE(HAVE_SOLID_35,1,[ ])
-       fi
-       if test -f $ODBC_LIBDIR/scl*30.a; then
+       elif test -f $ODBC_LIBDIR/scl*30.a; then
          AC_DEFINE(HAVE_SOLID_30,1,[ ])
-       fi
-       if test -f $ODBC_LIBDIR/scl*23.a; then
+       elif test -f $ODBC_LIBDIR/scl*23.a; then
       AC_DEFINE(HAVE_SOLID,1,[ ])
     fi
     AC_MSG_RESULT(yes)