configure.ac

branch
use-gresolver
changeset 37466
ef015fb22744
parent 37462
1c036daee5b4
parent 37422
07dcc28b6039
child 37485
778662f494ee
child 37487
d1c752a86448
--- a/configure.ac	Mon Dec 21 21:29:48 2015 -0600
+++ b/configure.ac	Mon Dec 21 22:14:59 2015 -0600
@@ -517,15 +517,9 @@
 AC_ARG_ENABLE(gtkui, [AS_HELP_STRING([--disable-gtkui],
 		[compile without GTK+ user interface])],
 	enable_gtkui="$enableval", enable_gtkui="yes")
-AC_ARG_WITH(gtk, [AS_HELP_STRING([--with-gtk=<version>],
-		[compile with GTK+ 2 or 3 user interface (default: auto)])],
-	with_gtk="$withval", with_gtk="auto")
 AC_ARG_ENABLE(consoleui, [AS_HELP_STRING([--disable-consoleui],
 		[compile without console user interface])],
 	[enable_consoleui=$enableval force_finch=$enableval], [enable_consoleui=yes force_finch=no])
-AC_ARG_ENABLE(gstreamer,
-	[AS_HELP_STRING([--disable-gstreamer], [compile without GStreamer audio support])],
-	enable_gst="$enableval", enable_gst="yes")
 
 dnl #######################################################################
 dnl # Check for GTK+ 2.18 and other things used by the GTK UI
@@ -578,45 +572,22 @@
     x_incpath_add="-I$x_includes"
 fi
 
+dnl #######################################################################
+dnl Check Pidgin dependencies
+dnl #######################################################################
 if test "x$enable_gtkui" = "xyes" ; then
-	if test "x$with_gtk" = "x3"; then
-		PKG_CHECK_MODULES(GTK, [gtk+-3.0 >= 3.0.0], , [
-			AC_MSG_RESULT(no)
-			AC_MSG_ERROR([
+	PKG_CHECK_MODULES(GTK, [gtk+-3.0 >= 3.0.0], , [
+		AC_MSG_RESULT(no)
+		AC_MSG_ERROR([
 You must have GTK+ 3.0.0 or newer development headers installed to compile
 Pidgin.  If you want to build only Finch then specify --disable-gtkui when
 running configure.
 ])])
-	elif test "x$with_gtk" = "x2"; then
-		PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= 2.18.0], , [
-			AC_MSG_RESULT(no)
-			AC_MSG_ERROR([
-You must have GTK+ 2.18.0 or newer development headers installed to compile
-Pidgin.  If you want to build only Finch then specify --disable-gtkui when
-running configure.
-])])
-	elif test "x$with_gtk" = "xauto"; then
-		if test "x$enable_gst" != "xno"; then
-			gst10_pkg="gstreamer-1.0"
-			gst010_pkg="gstreamer-0.10"
-		fi
-		PKG_CHECK_MODULES(GTK, [gtk+-3.0 >= 3.0.0 $gst10_pkg], [with_gtk=3], [
-			AC_MSG_RESULT(no)
-			PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= 2.18.0 $gst010_pkg], [with_gtk=2], [
-				AC_MSG_RESULT(no)
-				AC_MSG_ERROR([
-You must have GTK+ 2.18.0 or newer and GStreamer development headers installed to compile
-Pidgin.  If you want to build only Finch then specify --disable-gtkui when
-running configure.  Use --disable-gstreamer if you do not need GStreamer (sound) support.
-])])])
-	else
-		AC_MSG_ERROR([--with-gtk must specify one of 2, 3 or auto.])
-	fi
 	AC_SUBST(GTK_CFLAGS)
 	AC_SUBST(GTK_LIBS)
 
-	GTK_PC_MODULE="gtk+-${with_gtk}.0"
-	GTK_VERSION=${with_gtk}
+	GTK_PC_MODULE="gtk+-3.0"
+	GTK_VERSION="3"
 	AC_SUBST(GTK_PC_MODULE)
 	AC_SUBST(GTK_VERSION)
 
@@ -625,25 +596,14 @@
 			AC_DEFINE(HAVE_PANGO14, 1, [Define if we have Pango 1.4 or newer.]),:)
 
 	WEBKIT_VERSION=1.3.7
-	if test "x$with_gtk" = "x3"; then
-		WEBKIT_PC_MODULE="webkitgtk-3.0"
-		PKG_CHECK_MODULES(WEBKIT, [$WEBKIT_PC_MODULE >= $WEBKIT_VERSION], , [
-			AC_MSG_RESULT(no)
-			AC_MSG_ERROR([
+	WEBKIT_PC_MODULE="webkitgtk-3.0"
+	PKG_CHECK_MODULES(WEBKIT, [$WEBKIT_PC_MODULE >= $WEBKIT_VERSION], , [
+		AC_MSG_RESULT(no)
+		AC_MSG_ERROR([
 You must have WebKit for GTK+3 $WEBKIT_VERSION or newer development headers
 installed to compile Pidgin.  If you want to build only Finch then specify
 --disable-gtkui when running configure.
 ])])
-	else
-		WEBKIT_PC_MODULE="webkit-1.0"
-		PKG_CHECK_MODULES(WEBKIT, [$WEBKIT_PC_MODULE >= $WEBKIT_VERSION], , [
-			AC_MSG_RESULT(no)
-			AC_MSG_ERROR([
-You must have WebKit for GTK+2 $WEBKIT_VERSION or newer development headers
-installed to compile Pidgin.  If you want to build only Finch then specify
---disable-gtkui when running configure.
-])])
-	fi
 	AC_SUBST(WEBKIT_CFLAGS)
 	AC_SUBST(WEBKIT_LIBS)
 	AC_SUBST(WEBKIT_PC_MODULE)
@@ -822,29 +782,16 @@
 	dnl # Check for GCR for its certificate widgets
 	dnl #######################################################################
 	if test "x$enable_gcr" = "xyes"; then
-		if test "x$with_gtk" = "x3"; then
-			PKG_CHECK_MODULES(GCR, gcr-3, [
-				AC_DEFINE(ENABLE_GCR, 1, [Define to 1 if GCR is found.])], [
-				AC_MSG_RESULT(no)
-				enable_gcr="no"
-				if test "x$force_deps" = "xyes" ; then
-					AC_MSG_ERROR([
+		PKG_CHECK_MODULES(GCR, gcr-3, [
+			AC_DEFINE(ENABLE_GCR, 1, [Define to 1 if GCR is found.])], [
+			AC_MSG_RESULT(no)
+			enable_gcr="no"
+			if test "x$force_deps" = "xyes" ; then
+				AC_MSG_ERROR([
 GCR for GTK+3 development headers not found.
 Use --disable-gcr if you do not need GCR certificate widgets.
 ])
-				fi])
-		else
-			PKG_CHECK_MODULES(GCR, gcr-0, [
-				AC_DEFINE(ENABLE_GCR, 1, [Define to 1 if GCR is found.])], [
-				AC_MSG_RESULT(no)
-				enable_gcr="no"
-				if test "x$force_deps" = "xyes" ; then
-					AC_MSG_ERROR([
-GCR for GTK+2 development headers not found.
-Use --disable-gcr if you do not need GCR certificate widgets.
-])
-				fi])
-		fi
+			fi])
 	fi
 
 
@@ -1011,93 +958,32 @@
 dnl #######################################################################
 dnl # Check for GStreamer
 dnl #######################################################################
+AC_ARG_ENABLE(gstreamer,
+	[AS_HELP_STRING([--disable-gstreamer], [compile without GStreamer audio support])],
+	enable_gst="$enableval", enable_gst="yes")
 
-dnl AC_ARG_ENABLE is declared near GTK2/3 configuration
-AC_ARG_WITH(gstreamer, [AS_HELP_STRING([--with-gstreamer=<version>],
-		[compile with GStreamer 0.10 or 1.0 interface (default: auto)])],
-	with_gstreamer="$withval", with_gstreamer="auto")
-if test "x$enable_gst" != "xno"; then
-	if test "x$with_gstreamer" == "xauto" -a "x$with_gtk" = "x3"; then
-		with_gstreamer="1.0"
-	elif test "x$with_gstreamer" == "xauto" -a "x$with_gtk" = "x2"; then
-		with_gstreamer="0.10"
-	fi
-	if test "x$with_gstreamer" == "xauto"; then
-		PKG_CHECK_MODULES(GSTREAMER, [gstreamer-1.0], [
-			AC_DEFINE(USE_GSTREAMER, 1, [Use GStreamer for playing sounds])
-			with_gstreamer="1.0"
-			AC_SUBST(GSTREAMER_CFLAGS)
-			AC_SUBST(GSTREAMER_LIBS)
-			dnl Check whether forking stuff is required for this version.
-		], [
-			PKG_CHECK_MODULES(GSTREAMER, [gstreamer-0.10], [
-				AC_DEFINE(USE_GSTREAMER, 1, [Use GStreamer for playing sounds])
-				with_gstreamer="0.10"
-				AC_SUBST(GSTREAMER_CFLAGS)
-				AC_SUBST(GSTREAMER_LIBS)
-			], [
-				AC_MSG_RESULT(no)
-				enable_gst="no"
-				if test "x$force_deps" = "xyes" ; then
-					AC_MSG_ERROR([
-GStreamer development headers not found.
-Use --disable-gstreamer if you do not need GStreamer (sound) support.
-])
-				fi
-			])
-		])
-	elif test "x$with_gstreamer" == "x1.0"; then
-		PKG_CHECK_MODULES(GSTREAMER, [gstreamer-1.0], [
-			AC_DEFINE(USE_GSTREAMER, 1, [Use GStreamer 1.0 for playing sounds])
-			AC_SUBST(GSTREAMER_CFLAGS)
-			AC_SUBST(GSTREAMER_LIBS)
-		], [
-			AC_MSG_RESULT(no)
-			enable_gst="no"
-			if test "x$force_deps" = "xyes" ; then
-				AC_MSG_ERROR([
-GStreamer development headers not found.
-Use --disable-gstreamer if you do not need GStreamer (sound) support.
-])
-			fi
-		])
-	elif test "x$with_gstreamer" == "x0.10"; then
-		PKG_CHECK_MODULES(GSTREAMER, [gstreamer-0.10], [
-			AC_DEFINE(USE_GSTREAMER, 1, [Use GStreamer 0.10 for playing sounds])
-			AC_SUBST(GSTREAMER_CFLAGS)
-			AC_SUBST(GSTREAMER_LIBS)
-		], [
-			AC_MSG_RESULT(no)
-			enable_gst="no"
-			if test "x$force_deps" = "xyes" ; then
-				AC_MSG_ERROR([
-GStreamer development headers not found.
-Use --disable-gstreamer if you do not need GStreamer (sound) support.
-])
-			fi
-		])
-	else
-		AC_MSG_ERROR([--with-gstreamer must specify one of 0.10, 1.0 or auto.])
-	fi
-fi
-
-if test "x$with_gtk" == "x3" -a "x$with_gstreamer" == "x0.10"; then
-	AC_MSG_ERROR([WebKitGTK+ 3.0 cannot be mixed with GStreamer 0.10.
-Please switch to WebKitGTK+ 2.0 or GStreamer 1.0.])
-elif test "x$with_gtk" == "x2" -a "x$with_gstreamer" == "x1.0"; then
-	AC_MSG_ERROR([WebKitGTK+ 2.0 cannot be mixed with GStreamer 1.0.
-Please switch to WebKitGTK+ 3.0 or GStreamer 0.10.])
-fi
-if test "x$with_gstreamer" == "x0.10" -o "x$with_gstreamer" == "x1.0"; then
-	AC_SUBST(GSTREAMER_VER, [$with_gstreamer])
-else
-	AC_SUBST(GSTREAMER_VER, "")
+if test x"$enable_gst" != "xno"; then
+	PKG_CHECK_MODULES(GSTREAMER, [gstreamer-1.0], [
+	   AC_DEFINE(USE_GSTREAMER, 1, [Use GStreamer for playing sounds])
+	   with_gstreamer="1.0"
+	   AC_SUBST(GSTREAMER_CFLAGS)
+	   AC_SUBST(GSTREAMER_LIBS)
+   ], [
+	   AC_MSG_RESULT(no)
+	   enable_gst="no"
+	   if test "x$force_deps" = "xyes" ; then
+		   AC_MSG_ERROR([
+ GStreamer development headers not found.
+ Use --disable-gstreamer if you do not need GStreamer (sound) support.
+					 ])
+	   fi
+   ])
 fi
 
 dnl #######################################################################
 dnl # Check for GStreamer Video
 dnl #######################################################################
-if test "x$enable_gst" != "xno" -a "x$with_gstreamer" == "x1.0"; then
+if test "x$enable_gst" != "xno"; then
 	AC_ARG_ENABLE(gstreamer-video,
 		[AS_HELP_STRING([--disable-gstreamer-video], [compile without GStreamer 1.0 Video Overlay support])],
 			enable_gstvideo="$enableval", enable_gstvideo="yes")
@@ -1115,47 +1001,18 @@
 fi
 
 dnl #######################################################################
-dnl # Check for GStreamer Interfaces
-dnl #######################################################################
-if test "x$enable_gst" != "xno" -a "x$with_gstreamer" == "x0.10"; then
-	AC_ARG_ENABLE(gstreamer-interfaces,
-		[AS_HELP_STRING([--disable-gstreamer-interfaces], [compile without GStreamer 0.10 interface support])],
-			enable_gstinterfaces="$enableval", enable_gstinterfaces="yes")
-	if test "x$enable_gstinterfaces" != "xno"; then
-		PKG_CHECK_MODULES(GSTINTERFACES, [gstreamer-interfaces-0.10], [
-			AC_DEFINE(USE_GSTINTERFACES, 1, [Use GStreamer 0.10 interfaces for X overlay support])
-			AC_SUBST(GSTINTERFACES_CFLAGS)
-			AC_SUBST(GSTINTERFACES_LIBS)
-		], [
-			enable_gstinterfaces="no"
-		])
-	fi
-else
-	enable_gstinterfaces="no"
-fi
-
-dnl #######################################################################
 dnl # Check for Farstream
 dnl #######################################################################
 AC_ARG_ENABLE(farstream,
 	[AS_HELP_STRING([--disable-farstream], [compile without farstream support])],
 	enable_farstream="$enableval", enable_farstream="yes")
 if test "x$enable_farstream" != "xno"; then
-	if test "x$with_gstreamer" == "x1.0"; then
-		PKG_CHECK_MODULES(FARSTREAM, [farstream-0.2 >= 0.2.7], [
-			AC_SUBST(FARSTREAM_CFLAGS)
-			AC_SUBST(FARSTREAM_LIBS)
-		], [
-		        enable_farstream="no"
-		])
-	else
-		PKG_CHECK_MODULES(FARSTREAM, [farstream-0.1], [
-			AC_SUBST(FARSTREAM_CFLAGS)
-			AC_SUBST(FARSTREAM_LIBS)
-		], [
-				enable_farstream="no"
-		])
-	fi
+	PKG_CHECK_MODULES(FARSTREAM, [farstream-0.2 >= 0.2.7], [
+		AC_SUBST(FARSTREAM_CFLAGS)
+		AC_SUBST(FARSTREAM_LIBS)
+	], [
+			enable_farstream="no"
+	])
 fi
 
 dnl #######################################################################
@@ -1165,9 +1022,7 @@
 	[AS_HELP_STRING([--disable-vv], [compile without voice and video support])],
 	enable_vv="$enableval", enable_vv="yes")
 if test "x$enable_vv" != "xno"; then
-	if test "x$enable_gst" != "xno" -a "x$with_gstreamer" == "x1.0" -a "x$enable_gstvideo" != "xno" -a "x$enable_farstream" != "xno"; then
-		AC_DEFINE(USE_VV, 1, [Use voice and video])
-	elif test "x$enable_gst" != "xno" -a "x$with_gstreamer" == "x0.10" -a "x$enable_gstinterfaces" != "xno" -a "x$enable_farstream" != "xno"; then
+	if test "x$enable_gst" != "xno" -a "x$enable_gstvideo" != "xno" -a "x$enable_farstream" != "xno"; then
 		AC_DEFINE(USE_VV, 1, [Use voice and video])
 	else
 		enable_vv="no"
@@ -1185,7 +1040,7 @@
 dnl #######################################################################
 dnl # Check for Raw data streams support in Farstream 
 dnl #######################################################################
-if test "x$enable_vv" != "xno" -a "x$with_gstreamer" == "x1.0"; then
+if test "x$enable_vv" != "xno"; then
 	PKG_CHECK_MODULES(GSTAPP, [gstreamer-app-1.0], [
 		AC_DEFINE(USE_GSTAPP, 1, [Use GStreamer Video Overlay support])
 		AC_SUBST(GSTAPP_CFLAGS)
@@ -1891,7 +1746,7 @@
 if test "x$enable_plugins" = "xyes" ; then
 	PKG_CHECK_MODULES(GPLUGIN, [gplugin >= 0.0.17 gmodule-2.0], [
 		dnl # GPLUGIN_REQ sets pkg-config requirements in the .pc file
-		if test "x$with_gtk" != "xno" ; then
+		if test "x$enable_gtkui" != "xno" ; then
 			GPLUGIN_REQ=[", gplugin, gplugin-gtk"]
 		else
 			GPLUGIN_REQ=[", gplugin"]
@@ -2102,10 +1957,7 @@
 	fi
 
 	if test "x$have_gnutls" = "xyes"; then
-
 		AC_DEFINE(HAVE_GNUTLS, 1, [Define if you have GnuTLS])
-		AC_DEFINE(HAVE_SSL, 1, [Define if you have SSL])
-
 		msg_gnutls="GnuTLS"
 	fi
 fi
@@ -2139,11 +1991,10 @@
 	fi
 
 	if test "x$have_nss" = "xyes"; then
-
 		AC_DEFINE(HAVE_NSS, 1, [Define if you have Mozilla NSS])
-		AC_DEFINE(HAVE_SSL, 1, [Define if you have SSL])
-
 		msg_nss="Mozilla NSS"
+	else
+		AC_MSG_ERROR([No SSL/TLS library available])
 	fi
 fi
 
@@ -2470,9 +2321,6 @@
 
 echo
 echo Build GTK+ UI................. : $enable_gtkui
-if test "x$enable_gtkui" = "xyes"; then
-	echo Build for GTK+ version........ : $with_gtk
-fi
 echo Build console UI.............. : $enable_consoleui
 echo Build for X11................. : $with_x
 echo

mercurial