comparison configure @ 2003:dee122916f3c

GTK: Switch GTK3 to be the default. GTK2 requires --with-gtk2 Remove obsolete libgtkhtml-2 and gtkmozembed support. #define USE_WEBKIT2 when including webkit2 on GTK3.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Tue, 05 Nov 2019 11:58:07 +0000
parents 5d32be499016
children a17cc1958369
comparison
equal deleted inserted replaced
2002:a2931caa3422 2003:dee122916f3c
728 SHELL' 728 SHELL'
729 ac_subst_files='' 729 ac_subst_files=''
730 ac_user_opts=' 730 ac_user_opts='
731 enable_option_checking 731 enable_option_checking
732 with_dwcompat 732 with_dwcompat
733 with_gtk3 733 with_gtk2
734 with_deprecated 734 with_deprecated
735 with_gtk
736 with_gtkframework
737 with_gtkhtml
738 with_gtkmozembed
739 with_arch 735 with_arch
740 with_glib_prefix 736 with_glib_prefix
741 with_glib_exec_prefix 737 with_glib_exec_prefix
742 enable_glibtest 738 enable_glibtest
743 with_gtk_prefix 739 with_gtk_prefix
1388 1384
1389 Optional Packages: 1385 Optional Packages:
1390 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] 1386 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1391 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) 1387 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1392 --with-dwcompat specify this to build the optional dwcompat library 1388 --with-dwcompat specify this to build the optional dwcompat library
1393 --with-gtk3 specify this to build with GTK+ 3.x if available 1389 --with-gtk2 specify this to build with GTK+ 2.x if available
1394 --with-deprecated specify this to build with deprecated functions 1390 --with-deprecated specify this to build with deprecated functions
1395 --with-gtk specify this to build dwindows with GTK+ (only relevant for OSX)
1396 --with-gtkframework specify this to build dwindows with GTK+ Framework (only relevant for OSX)
1397 --with-gtkhtml specify this to build dwindows with libgtkhtml-2
1398 --with-gtkmozembed specify this to build dwindows with Mozilla gtkmozembed
1399 --with-arch specify architecture: one of all, 32bit, 64bit, intel, ppc, ppc64, x86_64, i386 1391 --with-arch specify architecture: one of all, 32bit, 64bit, intel, ppc, ppc64, x86_64, i386
1400 --with-glib-prefix=PFX Prefix where GLIB is installed (optional) 1392 --with-glib-prefix=PFX Prefix where GLIB is installed (optional)
1401 --with-glib-exec-prefix=PFX Exec prefix where GLIB is installed (optional) 1393 --with-glib-exec-prefix=PFX Exec prefix where GLIB is installed (optional)
1402 --with-gtk-prefix=PFX Prefix where GTK is installed (optional) 1394 --with-gtk-prefix=PFX Prefix where GTK is installed (optional)
1403 --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional) 1395 --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)
2241 2233
2242 2234
2243 2235
2244 2236
2245 2237
2246 DW_DIR=gtk 2238 DW_DIR=gtk3
2247 DW_SRC=dw.c 2239 DW_SRC=dw.c
2248 DW_DEFINE=__UNIX__ 2240 DW_DEFINE=__UNIX__
2249 SHAREDFLAG=-shared 2241 SHAREDFLAG=-shared
2250 SOSUFFIX=so 2242 SOSUFFIX=so
2251 LIBSUFFIX=a 2243 LIBSUFFIX=a
3666 with_dwcompat=no 3658 with_dwcompat=no
3667 fi 3659 fi
3668 3660
3669 3661
3670 3662
3671 # Check whether --with-gtk3 was given. 3663 # Check whether --with-gtk2 was given.
3672 if test "${with_gtk3+set}" = set; then : 3664 if test "${with_gtk2+set}" = set; then :
3673 withval=$with_gtk3; with_gtk3=$withval 3665 withval=$with_gtk2; with_gtk2=$withval
3674 else 3666 else
3675 with_gtk3=no 3667 with_gtk2=no
3676 fi 3668 fi
3677 3669
3678 3670
3679 3671
3680 # Check whether --with-deprecated was given. 3672 # Check whether --with-deprecated was given.
3694 INSTALL_COMPAT="" 3686 INSTALL_COMPAT=""
3695 SYSCONF_LINK_TARGET_SHARED2="" 3687 SYSCONF_LINK_TARGET_SHARED2=""
3696 fi 3688 fi
3697 SYSCONF_LINK_TARGET_SHARED="lib$TARGET.$SOSUFFIX.\$(DW_MAJOR_VERSION).\$(DW_MINOR_VERSION)" 3689 SYSCONF_LINK_TARGET_SHARED="lib$TARGET.$SOSUFFIX.\$(DW_MAJOR_VERSION).\$(DW_MINOR_VERSION)"
3698 SYSCONF_LINK_TARGET_STATIC="lib$TARGET.a" 3690 SYSCONF_LINK_TARGET_STATIC="lib$TARGET.a"
3699
3700
3701 # Check whether --with-gtk was given.
3702 if test "${with_gtk+set}" = set; then :
3703 withval=$with_gtk; with_gtk=$withval
3704 else
3705 with_gtk=no
3706 fi
3707
3708
3709
3710 # Check whether --with-gtkframework was given.
3711 if test "${with_gtkframework+set}" = set; then :
3712 withval=$with_gtkframework; with_gtkframework=$withval
3713 else
3714 with_gtkframework=no
3715 fi
3716
3717
3718
3719 # Check whether --with-gtkhtml was given.
3720 if test "${with_gtkhtml+set}" = set; then :
3721 withval=$with_gtkhtml; with_gtkhtml=$withval
3722 else
3723 with_gtkhtml=no
3724 fi
3725
3726
3727
3728 # Check whether --with-gtkmozembed was given.
3729 if test "${with_gtkmozembed+set}" = set; then :
3730 withval=$with_gtkmozembed; with_gtkmozembed=$withval
3731 else
3732 with_gtkmozembed=no
3733 fi
3734
3735 3691
3736 3692
3737 # Check whether --with-arch was given. 3693 # Check whether --with-arch was given.
3738 if test "${with_arch+set}" = set; then : 3694 if test "${with_arch+set}" = set; then :
3739 withval=$with_arch; with_arch=$withval 3695 withval=$with_arch; with_arch=$withval
4664 ARCH="-arch ppc64 -arch x86_64" 4620 ARCH="-arch ppc64 -arch x86_64"
4665 ;; 4621 ;;
4666 intel) 4622 intel)
4667 ARCH="-arch i386 -arch x86_64" 4623 ARCH="-arch i386 -arch x86_64"
4668 ;; 4624 ;;
4625 powerpc)
4626 ARCH="-arch ppc -arch ppc64"
4627 ;;
4669 *) 4628 *)
4670 ARCH="-arch $with_arch" 4629 ARCH="-arch $with_arch"
4671 ;; 4630 ;;
4672 esac 4631 esac
4673 SHAREDFLAG="-dynamiclib -flat_namespace -undefined suppress -headerpad_max_install_names" 4632 SHAREDFLAG="-dynamiclib -flat_namespace -undefined suppress -headerpad_max_install_names"
4674 SOSUFFIX=dylib 4633 SOSUFFIX=dylib
4675 if test $with_gtkframework = yes; then 4634 DW_DIR=mac
4676 DW_DIR=gtk 4635 DW_SRC=dw.m
4677 LIBS="$LIBS -framework Gtk -framework Glib -framework Cairo" 4636 DW_DEFINE=__MAC__
4678 GTK_CFLAGS="-I/Library/Frameworks/Gtk.framework/Headers -I/Library/Frameworks/Glib.framework/Headers -I/Library/Frameworks/Cairo.framework/Headers" 4637 LIBS="$LIBS -framework Cocoa -framework WebKit"
4679 build_gtk="no" 4638 build_gtk="no"
4680 elif test $with_gtk = yes; then
4681 build_gtk="yes"
4682 else
4683 DW_DIR=mac
4684 DW_SRC=dw.m
4685 DW_DEFINE=__MAC__
4686 LIBS="$LIBS -framework Cocoa -framework WebKit"
4687 build_gtk="no"
4688 fi
4689 ;; 4639 ;;
4690 *) 4640 *)
4691 ;; 4641 ;;
4692 esac 4642 esac
4693 4643
4729 fi 4679 fi
4730 4680
4731 4681
4732 if test x"$PKG_CFG" != x; then 4682 if test x"$PKG_CFG" != x; then
4733 GTK_LIBS="" 4683 GTK_LIBS=""
4734 if test $with_gtk3 = "yes"; then 4684 if test $with_gtk2 = "yes"; then
4685 GTK_PACKAGES="gtk+-2.0 gthread-2.0"
4686 GTK_LIBS=`$PKG_CFG --silence-errors --libs $GTK_PACKAGES`
4687 fi
4688 WEBKIT_PKG="webkitgtk-3.0"
4689 if test x"$GTK_LIBS" = x; then
4735 GTK_PACKAGES="gtk+-3.0" 4690 GTK_PACKAGES="gtk+-3.0"
4736 GTK_LIBS=`$PKG_CFG --silence-errors --libs $GTK_PACKAGES` 4691 GTK_LIBS=`$PKG_CFG --silence-errors --libs $GTK_PACKAGES`
4692 else
4693 DW_DIR=gtk
4694 WEBKIT_PKG="webkit-1.1"
4737 fi 4695 fi
4738 WEBKIT_PKG="webkit-1.1" 4696 # test for webkit2gtk or webkitgtk packages
4739 if test x"$GTK_LIBS" = x; then 4697 WEBKIT_CFLAGS=`$PKG_CFG --silence-errors --cflags $WEBKIT_PKG`
4740 GTK_PACKAGES="gtk+-2.0 gthread-2.0" 4698 RPATH=`$PKG_CFG --silence-errors --libs-only-L $WEBKIT_PKG | cut -b 3-`
4741 GTK_LIBS=`$PKG_CFG --silence-errors --libs $GTK_PACKAGES` 4699 if test x"$WEBKIT_CFLAGS" = x; then
4700 # no webkit-1.1 or webkitgtk-3.0, look for webkit-1.0
4701 WEBKIT_PKG="webkit-1.0"
4702 WEBKIT_CFLAGS=`$PKG_CFG --silence-errors --cflags $WEBKIT_PKG`
4703 RPATH=`$PKG_CFG --silence-errors --libs-only-L $WEBKIT_PKG | cut -b 3-`
4704 if test x"$WEBKIT_CFLAGS" = x; then
4705 WEBKIT_PKG="WebKitGtk"
4706 WEBKIT_LIBS=`$PKG_CFG --silence-errors --libs $WEBKIT_PKG`
4707 WEBKIT_CFLAGS=`$PKG_CFG --silence-errors --cflags $WEBKIT_PKG`
4708 RPATH=`$PKG_CFG --silence-errors --libs-only-L $WEBKIT_PKG | cut -b 3-`
4709 else
4710 $as_echo "#define USE_WEBKIT10 1" >>confdefs.h
4711
4712 WEBKIT_LIB=$WEBKIT_PKG
4713 WEBKIT_LIBS=`$PKG_CFG --silence-errors --libs $WEBKIT_PKG`
4714 RESULT=`echo $WEBKIT_LIBS | grep lwebkitgtk-1.0`
4715 if test x"$RESULT" != x; then
4716 WEBKIT_LIB=webkitgtk-1.0
4717 fi
4718 fi
4742 else 4719 else
4743 DW_DIR=gtk3 4720 if test $with_gtk2 = "yes"; then
4744 WEBKIT_PKG="webkitgtk-3.0" 4721 $as_echo "#define USE_WEBKIT11 1" >>confdefs.h
4722
4723 else
4724 $as_echo "#define USE_WEBKIT2 1" >>confdefs.h
4725
4726 fi
4727 WEBKIT_LIB=$WEBKIT_PKG
4745 fi 4728 fi
4746 if test $with_gtkmozembed = yes; then 4729 cat >>confdefs.h <<_ACEOF
4747 MOZEMBED_LIBS=`$PKG_CFG --silence-errors --libs firefox-gtkmozembed`
4748 MOZEMBED_CFLAGS=`$PKG_CFG --silence-errors --cflags firefox-gtkmozembed`
4749 RPATH=`$PKG_CFG --silence-errors --libs-only-L firefox-gtkmozembed | cut -b 3-`
4750 if test x"$MOZEMBED_LIBS" = x; then
4751 MOZEMBED_LIBS=`$PKG_CFG --silence-errors --libs mozilla-gtkmozembed`
4752 MOZEMBED_CFLAGS=`$PKG_CFG --silence-errors --cflags mozilla-gtkmozembed`
4753 RPATH=`$PKG_CFG --silence-errors --libs-only-L mozilla-gtkmozembed | cut -b 3-`
4754 fi
4755 elif test $with_gtkhtml = yes; then
4756 MOZEMBED_LIBS=`$PKG_CFG --silence-errors --libs libgtkhtml-2.0`
4757 MOZEMBED_CFLAGS=`$PKG_CFG --silence-errors --cflags libgtkhtml-2.0`
4758 RPATH=`$PKG_CFG --silence-errors --libs-only-L libgtkhtml-2.0 | cut -b 3-`
4759 else
4760 # test for webkit-1.1 or webkitgtk-3.0 packages
4761 MOZEMBED_CFLAGS=`$PKG_CFG --silence-errors --cflags $WEBKIT_PKG`
4762 RPATH=`$PKG_CFG --silence-errors --libs-only-L $WEBKIT_PKG | cut -b 3-`
4763 if test x"$MOZEMBED_CFLAGS" = x; then
4764 # no webkit-1.1 or webkitgtk-3.0, look for webkit-1.0
4765 WEBKIT_PKG="webkit-1.0"
4766 MOZEMBED_CFLAGS=`$PKG_CFG --silence-errors --cflags $WEBKIT_PKG`
4767 RPATH=`$PKG_CFG --silence-errors --libs-only-L $WEBKIT_PKG | cut -b 3-`
4768 if test x"$MOZEMBED_CFLAGS" = x; then
4769 WEBKIT_PKG="WebKitGtk"
4770 MOZEMBED_LIBS=`$PKG_CFG --silence-errors --libs $WEBKIT_PKG`
4771 MOZEMBED_CFLAGS=`$PKG_CFG --silence-errors --cflags $WEBKIT_PKG`
4772 RPATH=`$PKG_CFG --silence-errors --libs-only-L $WEBKIT_PKG | cut -b 3-`
4773 else
4774 $as_echo "#define USE_WEBKIT10 1" >>confdefs.h
4775
4776 WEBKIT_LIB=$WEBKIT_PKG
4777 MOZEMBED_LIBS=`$PKG_CFG --silence-errors --libs $WEBKIT_PKG`
4778 RESULT=`echo $MOZEMBED_LIBS | grep lwebkitgtk-1.0`
4779 if test x"$RESULT" != x; then
4780 WEBKIT_LIB=webkitgtk-1.0
4781 fi
4782 fi
4783 else
4784 $as_echo "#define USE_WEBKIT11 1" >>confdefs.h
4785
4786 WEBKIT_LIB=$WEBKIT_PKG
4787 fi
4788 cat >>confdefs.h <<_ACEOF
4789 #define WEBKIT_LIB "$WEBKIT_LIB" 4730 #define WEBKIT_LIB "$WEBKIT_LIB"
4790 _ACEOF 4731 _ACEOF
4791 4732
4792 fi
4793 if test x"$RPATH" != x; then 4733 if test x"$RPATH" != x; then
4794 RPATH="-Wl,-R$RPATH" 4734 RPATH="-Wl,-R$RPATH"
4795 fi 4735 fi
4796 fi 4736 fi
4797 4737
5733 5673
5734 fi 5674 fi
5735 5675
5736 fi 5676 fi
5737 5677
5738 CFLAGS="$CFLAGS $GTK_CFLAGS $GDK_IMLIB_FLAGS $MOZEMBED_CFLAGS" 5678 CFLAGS="$CFLAGS $GTK_CFLAGS $GDK_IMLIB_FLAGS $WEBKIT_CFLAGS"
5739 5679
5740 if test $with_deprecated = yes; then 5680 if test $with_deprecated = yes; then
5741 CFLAGS="$CFLAGS -DDW_INCLUDE_DEPRECATED" 5681 CFLAGS="$CFLAGS -DDW_INCLUDE_DEPRECATED"
5742 fi 5682 fi
5743 BROWSER_OBJECT="" 5683 if test x"$WEBKIT_CFLAGS" != x; then
5744 if test x"$MOZEMBED_CFLAGS" != x; then
5745 SAVE_LIBS="$LIBS" 5684 SAVE_LIBS="$LIBS"
5746 LIBS="$RPATH $LIBS $GTK_LIBS $PTHREAD_LIBS $GDK_IMLIB_LIBS $MOZEMBED_LIBS" 5685 LIBS="$RPATH $LIBS $GTK_LIBS $PTHREAD_LIBS $GDK_IMLIB_LIBS $WEBKIT_LIBS"
5747 BROWSER_OBJECT="browser.o" 5686 as_ac_Lib=`$as_echo "ac_cv_lib_$WEBKIT_LIB''_webkit_web_view_new" | $as_tr_sh`
5748 if test $with_gtkmozembed = yes; then
5749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gtk_moz_embed_new in -lgtkembedmoz" >&5
5750 $as_echo_n "checking for gtk_moz_embed_new in -lgtkembedmoz... " >&6; }
5751 if ${ac_cv_lib_gtkembedmoz_gtk_moz_embed_new+:} false; then :
5752 $as_echo_n "(cached) " >&6
5753 else
5754 ac_check_lib_save_LIBS=$LIBS
5755 LIBS="-lgtkembedmoz $LIBS"
5756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5757 /* end confdefs.h. */
5758
5759 /* Override any GCC internal prototype to avoid an error.
5760 Use char because int might match the return type of a GCC
5761 builtin and then its argument prototype would still apply. */
5762 #ifdef __cplusplus
5763 extern "C"
5764 #endif
5765 char gtk_moz_embed_new ();
5766 int
5767 main ()
5768 {
5769 return gtk_moz_embed_new ();
5770 ;
5771 return 0;
5772 }
5773 _ACEOF
5774 if ac_fn_c_try_link "$LINENO"; then :
5775 ac_cv_lib_gtkembedmoz_gtk_moz_embed_new=yes
5776 else
5777 ac_cv_lib_gtkembedmoz_gtk_moz_embed_new=no
5778 fi
5779 rm -f core conftest.err conftest.$ac_objext \
5780 conftest$ac_exeext conftest.$ac_ext
5781 LIBS=$ac_check_lib_save_LIBS
5782 fi
5783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gtkembedmoz_gtk_moz_embed_new" >&5
5784 $as_echo "$ac_cv_lib_gtkembedmoz_gtk_moz_embed_new" >&6; }
5785 if test "x$ac_cv_lib_gtkembedmoz_gtk_moz_embed_new" = xyes; then :
5786 $as_echo "#define USE_GTKMOZEMBED 1" >>confdefs.h
5787
5788 else
5789 BROWSER_OBJECT=""
5790 fi
5791
5792 elif test $with_gtkhtml = yes; then
5793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for html_document_new in -lgtkhtml-2" >&5
5794 $as_echo_n "checking for html_document_new in -lgtkhtml-2... " >&6; }
5795 if ${ac_cv_lib_gtkhtml_2_html_document_new+:} false; then :
5796 $as_echo_n "(cached) " >&6
5797 else
5798 ac_check_lib_save_LIBS=$LIBS
5799 LIBS="-lgtkhtml-2 $LIBS"
5800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5801 /* end confdefs.h. */
5802
5803 /* Override any GCC internal prototype to avoid an error.
5804 Use char because int might match the return type of a GCC
5805 builtin and then its argument prototype would still apply. */
5806 #ifdef __cplusplus
5807 extern "C"
5808 #endif
5809 char html_document_new ();
5810 int
5811 main ()
5812 {
5813 return html_document_new ();
5814 ;
5815 return 0;
5816 }
5817 _ACEOF
5818 if ac_fn_c_try_link "$LINENO"; then :
5819 ac_cv_lib_gtkhtml_2_html_document_new=yes
5820 else
5821 ac_cv_lib_gtkhtml_2_html_document_new=no
5822 fi
5823 rm -f core conftest.err conftest.$ac_objext \
5824 conftest$ac_exeext conftest.$ac_ext
5825 LIBS=$ac_check_lib_save_LIBS
5826 fi
5827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gtkhtml_2_html_document_new" >&5
5828 $as_echo "$ac_cv_lib_gtkhtml_2_html_document_new" >&6; }
5829 if test "x$ac_cv_lib_gtkhtml_2_html_document_new" = xyes; then :
5830 $as_echo "#define USE_LIBGTKHTML2 1" >>confdefs.h
5831
5832 else
5833 BROWSER_OBJECT=""
5834 fi
5835
5836 else
5837 as_ac_Lib=`$as_echo "ac_cv_lib_$WEBKIT_LIB''_webkit_web_view_new" | $as_tr_sh`
5838 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for webkit_web_view_new in -l$WEBKIT_LIB" >&5 5687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for webkit_web_view_new in -l$WEBKIT_LIB" >&5
5839 $as_echo_n "checking for webkit_web_view_new in -l$WEBKIT_LIB... " >&6; } 5688 $as_echo_n "checking for webkit_web_view_new in -l$WEBKIT_LIB... " >&6; }
5840 if eval \${$as_ac_Lib+:} false; then : 5689 if eval \${$as_ac_Lib+:} false; then :
5841 $as_echo_n "(cached) " >&6 5690 $as_echo_n "(cached) " >&6
5842 else 5691 else
5873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 5722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5874 $as_echo "$ac_res" >&6; } 5723 $as_echo "$ac_res" >&6; }
5875 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : 5724 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
5876 $as_echo "#define USE_WEBKIT 1" >>confdefs.h 5725 $as_echo "#define USE_WEBKIT 1" >>confdefs.h
5877 5726
5878 else 5727 fi
5879 BROWSER_OBJECT="" 5728
5880 fi
5881
5882 BROWSER_OBJECT=""
5883 fi
5884 LIBS="$SAVE_LIBS" 5729 LIBS="$SAVE_LIBS"
5885 fi 5730 fi
5886 5731
5887 LIBS="$RPATH $LIBS $GTK_LIBS $PTHREAD_LIBS $GDK_IMLIB_LIBS $MOZEMBED_LIBS $PLATLIBS" 5732 LIBS="$RPATH $LIBS $GTK_LIBS $PTHREAD_LIBS $GDK_IMLIB_LIBS $WEBKIT_LIBS $PLATLIBS"
5888 5733
5889 for ac_func in ubuntu_overlay_scrollbar_set_enabled 5734 for ac_func in ubuntu_overlay_scrollbar_set_enabled
5890 do : 5735 do :
5891 ac_fn_c_check_func "$LINENO" "ubuntu_overlay_scrollbar_set_enabled" "ac_cv_func_ubuntu_overlay_scrollbar_set_enabled" 5736 ac_fn_c_check_func "$LINENO" "ubuntu_overlay_scrollbar_set_enabled" "ac_cv_func_ubuntu_overlay_scrollbar_set_enabled"
5892 if test "x$ac_cv_func_ubuntu_overlay_scrollbar_set_enabled" = xyes; then : 5737 if test "x$ac_cv_func_ubuntu_overlay_scrollbar_set_enabled" = xyes; then :