diff --git a/configure b/configure
index b13b488ecd..97453b30d4 100755
--- a/configure
+++ b/configure
@@ -24336,7 +24336,7 @@ fi
 
 
    if test "${ac_cv_lib_pq_PQexec}" = "yes"; then
-      PGSQL_LIB="-L${PGSQL_libdir} -lpq -lz -lcrypt"
+      PGSQL_LIB="-L${PGSQL_libdir} -lpq -lz"
       PGSQL_INCLUDE="-I${PGSQL_includedir}"
       PBX_PGSQL=1
    fi
diff --git a/configure.ac b/configure.ac
index 0cc4ac5624..17f0959ff6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -632,7 +632,7 @@ if test "${PG_CONFIG}" != No; then
    [Define to indicate the PostgreSQL library]), [], -L${PGSQL_libdir} -lz)
 
    if test "${ac_cv_lib_pq_PQexec}" = "yes"; then
-      PGSQL_LIB="-L${PGSQL_libdir} -lpq -lz -lcrypt"
+      PGSQL_LIB="-L${PGSQL_libdir} -lpq -lz"
       PGSQL_INCLUDE="-I${PGSQL_includedir}"
       PBX_PGSQL=1
    fi