diff --git a/configure b/configure
index 7febc9ef69c545d6b94129ce5a765072d0dacb8f..af280667030c4b480385b3a07bed4348f90276e9 100755
--- a/configure
+++ b/configure
@@ -24702,7 +24702,11 @@ fi
 
         fi
         PWLIB_INCDIR="/usr/local/include"
-        PWLIB_LIBDIR="/usr/local/lib"
+        if test "x$LIB64" != "x"; then
+          PWLIB_LIBDIR="/usr/local/lib64"
+        else
+          PWLIB_LIBDIR="/usr/local/lib"
+        fi
       else
         { echo "$as_me:$LINENO: checking for /usr/include/ptlib.h" >&5
 echo $ECHO_N "checking for /usr/include/ptlib.h... $ECHO_C" >&6; }
@@ -24767,7 +24771,11 @@ fi
 
 
           PWLIB_INCDIR="/usr/include"
-          PWLIB_LIBDIR="/usr/lib"
+          if test "x$LIB64" != "x"; then
+          	PWLIB_LIBDIR="/usr/lib64"
+          else
+	        PWLIB_LIBDIR="/usr/lib"
+	      fi
         fi
       fi
     fi
@@ -24792,12 +24800,20 @@ if test "${HAS_PWLIB:-unset}" != "unset" ; then
   if test "x$PWLIBDIR" = "x/usr" -o "x$PWLIBDIR" = "x/usr/"; then
     PWLIBDIR="/usr/share/pwlib"
     PWLIB_INCDIR="/usr/include"
-    PWLIB_LIBDIR="/usr/lib"
+    if test "x$LIB64" != "x"; then
+      PWLIB_LIBDIR="/usr/lib64"
+    else
+      PWLIB_LIBDIR="/usr/lib"
+    fi
   fi
   if test "x$PWLIBDIR" = "x/usr/local" -o "x$PWLIBDIR" = "x/usr/"; then
     PWLIBDIR="/usr/local/share/pwlib"
     PWLIB_INCDIR="/usr/local/include"
-    PWLIB_LIBDIR="/usr/local/lib"
+    if test "x$LIB64" != "x"; then
+      PWLIB_LIBDIR="/usr/local/lib64"
+    else
+      PWLIB_LIBDIR="/usr/local/lib"
+    fi
   fi
 
   if test "${PWLIB_INCDIR:-unset}" = "unset"; then
@@ -25185,7 +25201,11 @@ fi
       if test "${HAS_OPENH323:-unset}" != "unset" ; then
         OPENH323DIR="/usr/local/share/openh323"
         OPENH323_INCDIR="/usr/local/include/openh323"
-        OPENH323_LIBDIR="/usr/local/lib"
+        if test "x$LIB64" != "x"; then
+          OPENH323_LIBDIR="/usr/local/lib64"
+        else
+          OPENH323_LIBDIR="/usr/local/lib"
+        fi
       else
         { echo "$as_me:$LINENO: checking for /usr/include/openh323/h323.h" >&5
 echo $ECHO_N "checking for /usr/include/openh323/h323.h... $ECHO_C" >&6; }
@@ -25211,7 +25231,11 @@ fi
         if test "${HAS_OPENH323:-unset}" != "unset" ; then
           OPENH323DIR="/usr/share/openh323"
           OPENH323_INCDIR="/usr/include/openh323"
-          OPENH323_LIBDIR="/usr/lib"
+          if test "x$LIB64" != "x"; then
+            OPENH323_LIBDIR="/usr/lib64"
+          else
+            OPENH323_LIBDIR="/usr/lib"
+          fi
         fi
       fi
     fi