X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=configure;h=38da6107e0ed226981282f4398a29317f2cabd28;hb=78add6e627ee5f10e1fa6f3852602ea5066eee5a;hp=b0a24cb0181dfd9683bb3ad1de2b246baea3bc39;hpb=d6b0217f2417bd19187f0ebc389d6c5c2233b11c;p=xscreensaver diff --git a/configure b/configure index b0a24cb0..38da6107 100755 --- a/configure +++ b/configure @@ -684,9 +684,9 @@ XDPMS_LIBS GLE_LIBS GL_LIBS PTY_LIBS -XPM_LIBS HACK_LIBS JPEG_LIBS +PNG_LIBS XML_LIBS GTK_LIBS MOTIF_LIBS @@ -710,6 +710,7 @@ DATADIRNAME CATOBJEXT CATALOGS MSGFMT_OPTS +INTL_MACOSX_LIBS GETTEXT_PACKAGE ALL_LINGUAS GMSGFMT @@ -848,8 +849,8 @@ with_motif with_gl with_gle with_gles +with_png with_pixbuf -with_xpm with_jpeg with_xft with_xshm_ext @@ -1543,11 +1544,10 @@ Graphics options: --with-gle Build those demos which depend on GLE (the OpenGL "extrusion" library.) --with-gles Target OpenGL ES 1.x API instead of OpenGL 1.3. + --with-png Include support for the PNG library. --with-pixbuf Include support for the GDK-Pixbuf library in some demos, which will make it possible for them to read GIF, JPEG, and PNG files as well. - --with-xpm Include support for XPM files in some demos. - (Not needed if Pixbuf is used.) --with-jpeg Include support for the JPEG library. --with-xft Include support for the X Freetype library. --with-xshm-ext Include support for the Shared Memory extension. @@ -5864,12 +5864,13 @@ _ACEOF fi done -for ac_func in setlocale +for ac_func in setlocale sqrtf do : - ac_fn_c_check_func "$LINENO" "setlocale" "ac_cv_func_setlocale" -if test "x$ac_cv_func_setlocale" = xyes; then : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF -#define HAVE_SETLOCALE 1 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi @@ -7011,7 +7012,7 @@ case "$host" in X_LIBS="$X_LIBS -L/usr/lib/Motif1.1" fi - # Now let's check for the pseudo-standard locations for OpenGL and XPM. + # Now let's check for the pseudo-standard locations for OpenGL. # if test -d /opt/graphics/OpenGL/include ; then # HP-UX 10.20 puts it here @@ -7023,11 +7024,6 @@ case "$host" in fi - if test -d /opt/xpm/lib/X11 ; then - X_CFLAGS="-I/opt/xpm/include $X_CFLAGS" - X_LIBS="-L/opt/xpm/lib/X11 $X_LIBS" - fi - # On HPUX, default to installing in /opt/xscreensaver/ instead of # in /usr/local/, unless there is already an xscreensaver in # /usr/local/bin/. This can be overridden with the --prefix arg @@ -7651,7 +7647,7 @@ _ACEOF -ALL_LINGUAS="ca da de es et fi fr hu it ja ko nb nl pl pt pt_BR ru sk sv vi wa zh_CN zh_TW" +ALL_LINGUAS="da de es et fi fr hu it ja ko nb nl pl pt pt_BR ru sk sv vi wa zh_CN zh_TW" for ac_header in locale.h do : @@ -7707,6 +7703,82 @@ $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h XGETTEXT=: INTLLIBS= + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5 +$as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; } +if ${gt_cv_func_CFPreferencesCopyAppValue+:} false; then : + $as_echo_n "(cached) " >&6 +else + gt_save_LIBS="$LIBS" + LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +CFPreferencesCopyAppValue(NULL, NULL) + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gt_cv_func_CFPreferencesCopyAppValue=yes +else + gt_cv_func_CFPreferencesCopyAppValue=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$gt_save_LIBS" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5 +$as_echo "$gt_cv_func_CFPreferencesCopyAppValue" >&6; } + if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then + +$as_echo "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5 +$as_echo_n "checking for CFLocaleCopyCurrent... " >&6; } +if ${gt_cv_func_CFLocaleCopyCurrent+:} false; then : + $as_echo_n "(cached) " >&6 +else + gt_save_LIBS="$LIBS" + LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +CFLocaleCopyCurrent(); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gt_cv_func_CFLocaleCopyCurrent=yes +else + gt_cv_func_CFLocaleCopyCurrent=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$gt_save_LIBS" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5 +$as_echo "$gt_cv_func_CFLocaleCopyCurrent" >&6; } + if test $gt_cv_func_CFLocaleCopyCurrent = yes; then + +$as_echo "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h + + fi + INTL_MACOSX_LIBS= + if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then + INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" + fi + + + ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default" if test "x$ac_cv_header_libintl_h" = xyes; then : gt_cv_func_dgettext_libintl="no" @@ -8047,7 +8119,7 @@ done fi if test "$gt_cv_func_dgettext_libintl" = "yes"; then - INTLLIBS="-lintl $libintl_extra_libs" + INTLLIBS="-lintl $libintl_extra_libs $INTL_MACOSX_LIBS" fi if test "$gt_cv_have_gettext" = "yes"; then @@ -12712,37 +12784,6 @@ $as_echo "$ac_cv_motif_version_string" >&6; } fi -############################################################################### -# -# Checking whether Motif requires -lXpm. -# -# If this is Motif 2.x, and we have XPM, then link against XPM as well. -# The deal is, Motif 2.x requires XPM -- but it's a compilation option -# of the library whether to build the XPM code into libXm, or whether -# to rely on an external libXm. So the only way to tell whether XPM is -# a link-time requirement is to examine libXm.a, which is very -# difficult to do in an autoconf script. So... if it's Motif 2.x, we -# always link against XPM if the XPM lib exists (and this will be a -# no-op if libXm happens to already have the XPM code in it.) -# -############################################################################### - -motif_requires_xpm=no -if test "$have_motif" = yes ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Motif requires XPM" >&5 -$as_echo_n "checking whether Motif requires XPM... " >&6; } - if test "$motif_version" = "unknown" || test "$motif_version" -ge 2000 - then - motif_requires_xpm=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: result: maybe" >&5 -$as_echo "maybe" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - fi -fi - - ############################################################################### # # Checking whether Motif requires -lXp. @@ -13082,6 +13123,9 @@ $as_echo "adding \"$osx_crud\" to GL_LIBS" >&6; } $as_echo "omitting \"$libdir\" from LDFLAGS" >&6; } libdir='' + # Looks like as of OSX 10.12, gcc can't do ObjC. + OBJCC="clang -Wall" + fi @@ -13307,7 +13351,7 @@ if ${ac_cv_mesagl_version_string+:} false; then : $as_echo_n "(cached) " >&6 else cat > conftest.$ac_ext < #ifndef MESA_MAJOR_VERSION @@ -13891,10 +13935,171 @@ if test "$with_gles" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: using OpenGL ES compatiblity shim" >&5 $as_echo "using OpenGL ES compatiblity shim" >&6; } elif test "$with_gles" != no; then - echo "error: must be yes or no: --with-gles=$with_xpm" + echo "error: must be yes or no: --with-gles=$with_gles" exit 1 fi +############################################################################### +# +# Check for -lpng +# +############################################################################### + +have_png=no +with_png_req=unspecified +png_halfassed=no + +# Check whether --with-png was given. +if test "${with_png+set}" = set; then : + withval=$with_png; with_png="$withval"; with_png_req="$withval" +else + with_png=yes +fi + + + + case "$with_png" in + yes) ;; + no) ;; + + /*) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG headers" >&5 +$as_echo_n "checking for PNG headers... " >&6; } + d=$with_png/include + if test -d $d; then + X_CFLAGS="-I$d $X_CFLAGS" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5 +$as_echo "$d" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5 +$as_echo "not found ($d: no such directory)" >&6; } + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG libs" >&5 +$as_echo_n "checking for PNG libs... " >&6; } + d=$with_png/lib + if test -d $d; then + X_LIBS="-L$d $X_LIBS" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5 +$as_echo "$d" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5 +$as_echo "not found ($d: no such directory)" >&6; } + fi + + # replace the directory string with "yes". + with_png_req="yes" + with_png=$with_png_req + ;; + + *) + echo "" + echo "error: argument to --with-png must be \"yes\", \"no\", or a directory." + echo " If it is a directory, then \`DIR/include' will be added to" + echo " the -I list, and \`DIR/lib' will be added to the -L list." + exit 1 + ;; + esac + + +if test "$with_png" != yes -a "$with_png" != no ; then + echo "error: must be yes or no: --with-png=$with_png" + exit 1 +fi + +if test "$with_png" = yes; then + + have_png=no + + ac_save_CPPFLAGS="$CPPFLAGS" + if test \! -z "$includedir" ; then + CPPFLAGS="$CPPFLAGS -I$includedir" + fi + CPPFLAGS="$CPPFLAGS $X_CFLAGS" + CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS` + ac_fn_c_check_header_mongrel "$LINENO" "png.h" "ac_cv_header_png_h" "$ac_includes_default" +if test "x$ac_cv_header_png_h" = xyes; then : + have_png=yes +fi + + + CPPFLAGS="$ac_save_CPPFLAGS" + + if test "$have_png" = yes; then + # we have the header, now check for the library + have_png=no + png_halfassed=yes + + ac_save_CPPFLAGS="$CPPFLAGS" + ac_save_LDFLAGS="$LDFLAGS" +# ac_save_LIBS="$LIBS" + + if test \! -z "$includedir" ; then + CPPFLAGS="$CPPFLAGS -I$includedir" + fi + # note: $X_CFLAGS includes $x_includes + CPPFLAGS="$CPPFLAGS $X_CFLAGS" + + if test \! -z "$libdir" ; then + LDFLAGS="$LDFLAGS -L$libdir" + fi + # note: $X_LIBS includes $x_libraries + LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS" + + CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS` + LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_create_read_struct in -lpng" >&5 +$as_echo_n "checking for png_create_read_struct in -lpng... " >&6; } +if ${ac_cv_lib_png_png_create_read_struct+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lpng $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char png_create_read_struct (); +int +main () +{ +return png_create_read_struct (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_png_png_create_read_struct=yes +else + ac_cv_lib_png_png_create_read_struct=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png_png_create_read_struct" >&5 +$as_echo "$ac_cv_lib_png_png_create_read_struct" >&6; } +if test "x$ac_cv_lib_png_png_create_read_struct" = xyes; then : + have_png=yes + png_halfassed=no + PNG_LIBS="-lpng" + $as_echo "#define HAVE_LIBPNG 1" >>confdefs.h + +fi + + CPPFLAGS="$ac_save_CPPFLAGS" + LDFLAGS="$ac_save_LDFLAGS" +# LIBS="$ac_save_LIBS" + + fi +fi + + ############################################################################### # # Check for -lgdk_pixbuf. @@ -13985,6 +14190,7 @@ if test "$with_gdk_pixbuf" = yes; then pkg_check_version gdk-pixbuf-2.0 2.0.0 pkg_check_version gdk-pixbuf-xlib-2.0 2.0.0 + pkg_check_version gio-2.0 2.0.0 have_gdk_pixbuf="$ok" if test "$have_gdk_pixbuf" = yes; then @@ -14225,7 +14431,7 @@ fi if test "$have_gdk_pixbuf" = yes; then INCLUDES="$INCLUDES $ac_gdk_pixbuf_config_cflags" - XPM_LIBS="$ac_gdk_pixbuf_config_libs" + PNG_LIBS="$ac_gdk_pixbuf_config_libs" $as_echo "#define HAVE_GDK_PIXBUF 1" >>confdefs.h else @@ -14302,106 +14508,6 @@ fi fi -############################################################################### -# -# Check for -lXpm. -# -############################################################################### - -have_xpm=no -with_xpm_req=unspecified - -# Check whether --with-xpm was given. -if test "${with_xpm+set}" = set; then : - withval=$with_xpm; with_xpm="$withval"; with_xpm_req="$withval" -else - with_xpm=yes -fi - - - - case "$with_xpm" in - yes) ;; - no) ;; - - /*) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XPM headers" >&5 -$as_echo_n "checking for XPM headers... " >&6; } - d=$with_xpm/include - if test -d $d; then - X_CFLAGS="-I$d $X_CFLAGS" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5 -$as_echo "$d" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5 -$as_echo "not found ($d: no such directory)" >&6; } - fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XPM libs" >&5 -$as_echo_n "checking for XPM libs... " >&6; } - d=$with_xpm/lib - if test -d $d; then - X_LIBS="-L$d $X_LIBS" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5 -$as_echo "$d" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5 -$as_echo "not found ($d: no such directory)" >&6; } - fi - - # replace the directory string with "yes". - with_xpm_req="yes" - with_xpm=$with_xpm_req - ;; - - *) - echo "" - echo "error: argument to --with-xpm must be \"yes\", \"no\", or a directory." - echo " If it is a directory, then \`DIR/include' will be added to" - echo " the -I list, and \`DIR/lib' will be added to the -L list." - exit 1 - ;; - esac - - -if test "$with_xpm" = yes; then - - ac_save_CPPFLAGS="$CPPFLAGS" - if test \! -z "$includedir" ; then - CPPFLAGS="$CPPFLAGS -I$includedir" - fi - CPPFLAGS="$CPPFLAGS $X_CFLAGS" - CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS` - ac_fn_c_check_header_compile "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "#include -" -if test "x$ac_cv_header_X11_xpm_h" = xyes; then : - have_xpm=yes - $as_echo "#define HAVE_XPM 1" >>confdefs.h - - XPM_LIBS="-lXpm $XPM_LIBS" -fi - - - CPPFLAGS="$ac_save_CPPFLAGS" -elif test "$with_xpm" != no; then - echo "error: must be yes or no: --with-xpm=$with_xpm" - exit 1 -fi - -# See comment near $motif_requires_xpm, above. -# Need to do this here, after both Motif and XPM have been checked for. -# -if test "$have_motif" = yes -a "$have_xpm" = yes ; then - if test "$motif_requires_xpm" = yes ; then - MOTIF_LIBS="$MOTIF_LIBS $XPM_LIBS" - fi -fi - -if test "$XPM_LIBS" = "" ; then - XPM_LIBS=$(MINIXPM) -fi - - ############################################################################### # # Check for -ljpeg @@ -17558,16 +17664,12 @@ if test "$have_motif" = yes -a "$have_gtk" = no ; then fi -if test "$with_xpm_req" = yes -a "$have_xpm" = no; then - warnL 'Use of XPM was requested, but it was not found.' -fi - if test "$with_gdk_pixbuf_req" = yes -a "$have_gdk_pixbuf" = no; then warnL 'Use of GDK-Pixbuf was requested, but it was not found.' fi if test "$have_gdk_pixbuf" = no -o "$gdk_pixbuf_halfassed" = yes || \ - test "$have_gdk_pixbuf" = no -a "$have_xpm" = no ; then + test "$have_gdk_pixbuf" = no ; then if test "$with_gdk_pixbuf_req" = yes ; then true @@ -17577,18 +17679,6 @@ if test "$have_gdk_pixbuf" = no -o "$gdk_pixbuf_halfassed" = yes || \ warnL 'The GDK-Pixbuf library was not found.' fi - if test "$with_xpm_req" = yes -o "$have_xpm" = yes ; then - true - elif test "$with_xpm_req" = no ; then - warnL 'The XPM library is not being used.' - else - warnL 'The XPM library was not found.' - fi - - if test "$have_gdk_pixbuf" = no -a "$have_xpm" = yes ; then - warn2 'The XPM library is being used instead.' - fi - if test "$gdk_pixbuf_halfassed" = yes ; then echo '' warn2 'More specifically, we found the headers, but not the' @@ -17597,11 +17687,15 @@ if test "$have_gdk_pixbuf" = no -o "$gdk_pixbuf_halfassed" = yes || \ warn2 'file might contain some clues.' fi + if test "$have_png" = yes ; then + echo '' + warn2 'The PNG library is being used instead.' + fi + echo '' warn2 'Some of the demos will not use images as much as they could.' warn2 'You should consider installing GDK-Pixbuf and re-running' - warn2 'configure. (GDK-Pixbuf is recommended over XPM, as it' - warn2 'provides support for more image formats.)' + warn2 'configure.' fi @@ -17633,6 +17727,28 @@ if test "$have_jpeg" = no ; then fi +if test "$have_png" = no ; then + if test "$with_png_req" = yes ; then + warnL 'Use of libpng was requested, but it was not found.' + elif test "$with_png_req" = no ; then + noteL 'The PNG library is not being used.' + else + noteL 'The PNG library was not found.' + fi + + if test "$png_halfassed" = yes ; then + echo '' + warn2 'More specifically, we found the headers, but not the' + warn2 'library; so either PNG is half-installed on this' + warn2 "system, or something else went wrong. The \`config.log'" + warn2 'file might contain some clues.' + echo '' + fi + + warn2 "Many things aren't going to work right." +fi + + if test "$have_xft" = no ; then if test "$with_xft_req" = yes ; then warnL "Use of libXft was requested, but it was not found."