diff --git a/contrib/scripts/install_prereq b/contrib/scripts/install_prereq
index ca02b75dc5a77e1a622cecd60bafd4006433d368..58ef05ca2c7f317c7b5d148c4862ebeca283593a 100755
--- a/contrib/scripts/install_prereq
+++ b/contrib/scripts/install_prereq
@@ -163,7 +163,7 @@ install_unpackaged() {
 			cd pjproject
 			git pull
 		fi
-		./configure --enable-shared --with-external-speex --with-external-gsm --with-external-srtp --disable-sound --disable-resample && make && make install
+		./configure CFLAGS="-DNDEBUG -DPJ_HAS_IPV6=1" --enable-shared --with-external-speex --with-external-gsm --with-external-srtp --disable-sound --disable-resample && make && make install
 		cd ..
 		echo "/usr/local/lib" > /etc/ld.so.conf.d/usr_local.conf
 		/sbin/ldconfig