AC_LIB_PROG_LD_GNU
])
-# lib-link.m4 serial 6 (gettext-0.14.3)
-dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
+# lib-link.m4 serial 8 (gettext-0.15)
+dnl Copyright (C) 2001-2006 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
[
+ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
dnl By default, look in $includedir and $libdir.
])
else
additional_includedir="$withval/include"
- additional_libdir="$withval/lib"
+ additional_libdir="$withval/$acl_libdirstem"
fi
fi
])
dnl Linking with a shared library. We attempt to hardcode its
dnl directory into the executable's runpath, unless it's the
dnl standard /usr/lib.
- if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
+ if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then
dnl No hardcoding is needed.
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
else
dnl Assume the include files are nearby.
additional_includedir=
case "$found_dir" in
- */lib | */lib/)
- basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
+ */$acl_libdirstem | */$acl_libdirstem/)
+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
additional_includedir="$basedir/include"
;;
esac
dnl 3. if it's already present in $LDFLAGS or the already
dnl constructed $LIBNAME,
dnl 4. if it doesn't exist as a directory.
- if test "X$additional_libdir" != "X/usr/lib"; then
+ if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
haveit=
- if test "X$additional_libdir" = "X/usr/local/lib"; then
+ if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
if test -n "$GCC"; then
case $host_os in
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
done
])
-# lib-prefix.m4 serial 4 (gettext-0.14.2)
+dnl For those cases where a variable contains several -L and -l options
+dnl referring to unknown libraries and directories, this macro determines the
+dnl necessary additional linker options for the runtime path.
+dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
+dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
+dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
+dnl otherwise linking without libtool is assumed.
+AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
+[
+ AC_REQUIRE([AC_LIB_RPATH])
+ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
+ $1=
+ if test "$enable_rpath" != no; then
+ if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
+ dnl Use an explicit option to hardcode directories into the resulting
+ dnl binary.
+ rpathdirs=
+ next=
+ for opt in $2; do
+ if test -n "$next"; then
+ dir="$next"
+ dnl No need to hardcode the standard /usr/lib.
+ if test "X$dir" != "X/usr/$acl_libdirstem"; then
+ rpathdirs="$rpathdirs $dir"
+ fi
+ next=
+ else
+ case $opt in
+ -L) next=yes ;;
+ -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
+ dnl No need to hardcode the standard /usr/lib.
+ if test "X$dir" != "X/usr/$acl_libdirstem"; then
+ rpathdirs="$rpathdirs $dir"
+ fi
+ next= ;;
+ *) next= ;;
+ esac
+ fi
+ done
+ if test "X$rpathdirs" != "X"; then
+ if test -n ""$3""; then
+ dnl libtool is used for linking. Use -R options.
+ for dir in $rpathdirs; do
+ $1="${$1}${$1:+ }-R$dir"
+ done
+ else
+ dnl The linker is used for linking directly.
+ if test -n "$hardcode_libdir_separator"; then
+ dnl Weird platform: only the last -rpath option counts, the user
+ dnl must pass all path elements in one option.
+ alldirs=
+ for dir in $rpathdirs; do
+ alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$dir"
+ done
+ acl_save_libdir="$libdir"
+ libdir="$alldirs"
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ $1="$flag"
+ else
+ dnl The -rpath options are cumulative.
+ for dir in $rpathdirs; do
+ acl_save_libdir="$libdir"
+ libdir="$dir"
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ $1="${$1}${$1:+ }$flag"
+ done
+ fi
+ fi
+ fi
+ fi
+ fi
+ AC_SUBST([$1])
+])
+
+# lib-prefix.m4 serial 5 (gettext-0.15)
dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
AC_REQUIRE([AC_PROG_CC])
AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
dnl By default, look in $includedir and $libdir.
use_additional=yes
])
else
additional_includedir="$withval/include"
- additional_libdir="$withval/lib"
+ additional_libdir="$withval/$acl_libdirstem"
fi
fi
])
dnl 2. if it's already present in $LDFLAGS,
dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
dnl 4. if it doesn't exist as a directory.
- if test "X$additional_libdir" != "X/usr/lib"; then
+ if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
haveit=
for x in $LDFLAGS; do
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
fi
done
if test -z "$haveit"; then
- if test "X$additional_libdir" = "X/usr/local/lib"; then
+ if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
if test -n "$GCC"; then
case $host_os in
linux*) haveit=yes;;
prefix="$acl_save_prefix"
])
+dnl AC_LIB_PREPARE_MULTILIB creates a variable acl_libdirstem, containing
+dnl the basename of the libdir, either "lib" or "lib64".
+AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
+[
+ dnl There is no formal standard regarding lib and lib64. The current
+ dnl practice is that on a system supporting 32-bit and 64-bit instruction
+ dnl sets or ABIs, 64-bit libraries go under $prefix/lib64 and 32-bit
+ dnl libraries go under $prefix/lib. We determine the compiler's default
+ dnl mode by looking at the compiler's library search path. If at least
+ dnl of its elements ends in /lib64 or points to a directory whose absolute
+ dnl pathname ends in /lib64, we assume a 64-bit ABI. Otherwise we use the
+ dnl default, namely "lib".
+ acl_libdirstem=lib
+ searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
+ if test -n "$searchpath"; then
+ acl_save_IFS="${IFS= }"; IFS=":"
+ for searchdir in $searchpath; do
+ if test -d "$searchdir"; then
+ case "$searchdir" in
+ */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
+ *) searchdir=`cd "$searchdir" && pwd`
+ case "$searchdir" in
+ */lib64 ) acl_libdirstem=lib64 ;;
+ esac ;;
+ esac
+ fi
+ done
+ IFS="$acl_save_IFS"
+ fi
+])
+
# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.60 for LCD4Linux 0.10.1-CVS.
+# Generated by GNU Autoconf 2.60a for LCD4Linux 0.10.1-CVS.
#
# Report bugs to <lcd4linux-users@lists.sourceforge.net>.
#
# Factoring default headers for most tests.
ac_includes_default="\
#include <stdio.h>
-#if HAVE_SYS_TYPES_H
+#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
-#if HAVE_SYS_STAT_H
+#ifdef HAVE_SYS_STAT_H
# include <sys/stat.h>
#endif
-#if STDC_HEADERS
+#ifdef STDC_HEADERS
# include <stdlib.h>
# include <stddef.h>
#else
-# if HAVE_STDLIB_H
+# ifdef HAVE_STDLIB_H
# include <stdlib.h>
# endif
#endif
-#if HAVE_STRING_H
-# if !STDC_HEADERS && HAVE_MEMORY_H
+#ifdef HAVE_STRING_H
+# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
# include <memory.h>
# endif
# include <string.h>
#endif
-#if HAVE_STRINGS_H
+#ifdef HAVE_STRINGS_H
# include <strings.h>
#endif
-#if HAVE_INTTYPES_H
+#ifdef HAVE_INTTYPES_H
# include <inttypes.h>
#endif
-#if HAVE_STDINT_H
+#ifdef HAVE_STDINT_H
# include <stdint.h>
#endif
-#if HAVE_UNISTD_H
+#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif"
if $ac_init_version; then
cat <<\_ACEOF
LCD4Linux configure 0.10.1-CVS
-generated by GNU Autoconf 2.60
+generated by GNU Autoconf 2.60a
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
running configure, to aid debugging if configure makes a mistake.
It was created by LCD4Linux $as_me 0.10.1-CVS, which was
-generated by GNU Autoconf 2.60. Invocation command line was
+generated by GNU Autoconf 2.60a. Invocation command line was
$ $0 $@
# in a Makefile. We should not override ac_cv_exeext if it was cached,
# so that the user can short-circuit this test for compilers unknown to
# Autoconf.
-for ac_file in $ac_files
+for ac_file in $ac_files ''
do
test -f "$ac_file" || continue
case $ac_file in
test "$ac_cv_exeext" = no && ac_cv_exeext=
else
+ ac_file=''
+fi
+
+{ echo "$as_me:$LINENO: result: $ac_file" >&5
+echo "${ECHO_T}$ac_file" >&6; }
+if test -z "$ac_file"; then
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
fi
ac_exeext=$ac_cv_exeext
-{ echo "$as_me:$LINENO: result: $ac_file" >&5
-echo "${ECHO_T}$ac_file" >&6; }
# Check that the compiler produces executables we can run. If not, either
# the compiler is broken, or we cross compile.
ac_cv_lib_m_log=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6; }
ncurses_version=unknown
cat > conftest.$ac_ext <<EOF
-#line 4537 "configure"
+#line 4541 "configure"
#include "confdefs.h"
#ifdef RENAMED_NCURSES
#include <curses.h>
# See if we find them without any special options.
# Don't add to $LIBS permanently.
ac_save_LIBS=$LIBS
- LIBS="-lXt $LIBS"
+ LIBS="-lX11 $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
do
# Don't even attempt the hair of trying to link an X program!
for ac_extension in a so sl; do
- if test -r "$ac_dir/libXt.$ac_extension"; then
+ if test -r "$ac_dir/libX11.$ac_extension"; then
ac_x_libraries=$ac_dir
break 2
fi
done
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi # $ac_x_libraries = no
X_LIBS="$X_LIBS -L$x_libraries"
# For Solaris; some versions of Sun CC require a space after -R and
# others require no space. Words are not sufficient . . . .
- case `(uname -sr) 2>/dev/null` in
- "SunOS 5"*)
- { echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5
+ { echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5
echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6; }
- ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
- cat >conftest.$ac_ext <<_ACEOF
+ ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
+ ac_xsave_c_werror_flag=$ac_c_werror_flag
+ ac_c_werror_flag=yes
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_R_nospace=yes
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+ X_LIBS="$X_LIBS -R$x_libraries"
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_R_nospace=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- if test $ac_R_nospace = yes; then
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
- X_LIBS="$X_LIBS -R$x_libraries"
- else
LIBS="$ac_xsave_LIBS -R $x_libraries"
- cat >conftest.$ac_ext <<_ACEOF
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_R_space=yes
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+ X_LIBS="$X_LIBS -R $x_libraries"
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_R_space=no
+ { echo "$as_me:$LINENO: result: neither works" >&5
+echo "${ECHO_T}neither works" >&6; }
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
- if test $ac_R_space = yes; then
- { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
- X_LIBS="$X_LIBS -R $x_libraries"
- else
- { echo "$as_me:$LINENO: result: neither works" >&5
-echo "${ECHO_T}neither works" >&6; }
- fi
- fi
- LIBS=$ac_xsave_LIBS
- esac
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+ ac_c_werror_flag=$ac_xsave_c_werror_flag
+ LIBS=$ac_xsave_LIBS
fi
# Check for system-dependent libraries X programs must link with.
ac_cv_lib_dnet_dnet_ntoa=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
ac_cv_lib_dnet_stub_dnet_ntoa=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
fi
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS="$ac_xsave_LIBS"
ac_cv_func_gethostbyname=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5
ac_cv_lib_nsl_gethostbyname=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
ac_cv_lib_bsd_gethostbyname=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
ac_cv_func_connect=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
ac_cv_lib_socket_connect=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
ac_cv_func_remove=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5
ac_cv_lib_posix_remove=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
ac_cv_func_shmat=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5
ac_cv_lib_ipc_shmat=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
ac_cv_lib_ICE_IceConnectionNumber=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
+ acl_libdirstem=lib
+ searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
+ if test -n "$searchpath"; then
+ acl_save_IFS="${IFS= }"; IFS=":"
+ for searchdir in $searchpath; do
+ if test -d "$searchdir"; then
+ case "$searchdir" in
+ */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
+ *) searchdir=`cd "$searchdir" && pwd`
+ case "$searchdir" in
+ */lib64 ) acl_libdirstem=lib64 ;;
+ esac ;;
+ esac
+ fi
+ done
+ IFS="$acl_save_IFS"
+ fi
+
+
+
else
additional_includedir="$withval/include"
- additional_libdir="$withval/lib"
+ additional_libdir="$withval/$acl_libdirstem"
fi
fi
if test "X$found_dir" != "X"; then
LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
if test "X$found_so" != "X"; then
- if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
+ if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then
LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
else
haveit=
fi
additional_includedir=
case "$found_dir" in
- */lib | */lib/)
- basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
+ */$acl_libdirstem | */$acl_libdirstem/)
+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
additional_includedir="$basedir/include"
;;
esac
case "$dep" in
-L*)
additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
- if test "X$additional_libdir" != "X/usr/lib"; then
+ if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
haveit=
- if test "X$additional_libdir" = "X/usr/local/lib"; then
+ if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
if test -n "$GCC"; then
case $host_os in
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
if test "$am_cv_func_iconv" != yes; then
am_save_LIBS="$LIBS"
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS="$am_save_LIBS"
fi
ac_cv_lib_mpd_mpd_connect=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
ac_cv_lib_mysqlclient_mysql_init=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext
if test "${ac_cv_search_opendir+set}" = set; then
break
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext
if test "${ac_cv_search_opendir+set}" = set; then
break
#ifndef __cplusplus
/* Ultrix mips cc rejects this. */
typedef int charset[2];
- const charset x;
+ const charset cs;
/* SunOS 4.1.1 cc rejects this. */
- char const *const *ccp;
- char **p;
+ char const *const *pcpcc;
+ char **ppc;
/* NEC SVR4.0.2 mips cc rejects this. */
struct point {int x, y;};
static struct point const zero = {0,0};
an arm of an if-expression whose if-part is not a constant
expression */
const char *g = "string";
- ccp = &g + (g ? g-g : 0);
+ pcpcc = &g + (g ? g-g : 0);
/* HPUX 7.0 cc rejects these. */
- ++ccp;
- p = (char**) ccp;
- ccp = (char const *const *) p;
+ ++pcpcc;
+ ppc = (char**) pcpcc;
+ pcpcc = (char const *const *) ppc;
{ /* SCO 3.2v4 cc rejects this. */
char *t;
char const *s = 0 ? (char *) 0 : (char const *) 0;
const int foo = 10;
if (!foo) return 0;
}
- return !x[0] && !zero.x;
+ return !cs[0] && !zero.x;
#endif
;
ac_cv_lib_error_at_line=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: result: $ac_cv_lib_error_at_line" >&5
eval "$as_ac_var=no"
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
ac_res=`eval echo '${'$as_ac_var'}'`
/* Thanks to Paul Eggert for this test. */
$ac_includes_default
#include <sys/wait.h>
-#if HAVE_VFORK_H
+#ifdef HAVE_VFORK_H
# include <vfork.h>
#endif
/* On some sparc systems, changes by the child to local and incoming
eval "$as_ac_var=no"
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
ac_res=`eval echo '${'$as_ac_var'}'`
ac_cv_lib_intl_strftime=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
ac_cv_func_pow=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: result: $ac_cv_func_pow" >&5
ac_cv_lib_m_pow=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
eval "$as_ac_var=no"
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
ac_res=`eval echo '${'$as_ac_var'}'`
# values after options handling.
ac_log="
This file was extended by LCD4Linux $as_me 0.10.1-CVS, which was
-generated by GNU Autoconf 2.60. Invocation command line was
+generated by GNU Autoconf 2.60a. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
Usage: $0 [OPTIONS] [FILE]...
-h, --help print this help, then exit
- -V, --version print version number, then exit
+ -V, --version print version number and configuration settings, then exit
-q, --quiet do not print progress messages
-d, --debug don't remove temporary files
--recheck update $as_me by reconfiguring in the same conditions
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
LCD4Linux config.status 0.10.1-CVS
-configured by $0, generated by GNU Autoconf 2.60,
+configured by $0, generated by GNU Autoconf 2.60a,
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Copyright (C) 2006 Free Software Foundation, Inc.
-/* $Id: drv_generic_graphic.c,v 1.34 2006/08/14 19:24:22 harbaum Exp $
+/* $Id: drv_generic_graphic.c,v 1.35 2006/09/29 04:48:22 reinelt Exp $
*
* generic driver helper for graphic displays
*
*
*
* $Log: drv_generic_graphic.c,v $
+ * Revision 1.35 2006/09/29 04:48:22 reinelt
+ * image widget uses properties now; new property 'reload'
+ *
* Revision 1.34 2006/08/14 19:24:22 harbaum
* Umlaut support, added KVV HTTP-User-Agent
*
#include "plugin.h"
#include "layout.h"
#include "widget.h"
+#include "property.h"
#include "widget_text.h"
#include "widget_icon.h"
#include "widget_bar.h"
#include "drv.h"
#include "drv_generic.h"
#include "drv_generic_graphic.h"
-#include "property.h"
#include "font_6x8.h"
#include "font_6x8_bold.h"
WIDGET_IMAGE *Image = W->data;
int layer, row, col, width, height;
int x, y;
+ int visible;
layer = W->layer;
row = W->row;
drv_generic_graphic_resizeFB(row + height, col + width);
/* render image */
+ visible = P2N(&Image->visible);
for (y = 0; y < height; y++) {
for (x = 0; x < width; x++) {
int i = (row + y) * LCOLS + col + x;
- if (Image->visible) {
+ if (visible) {
drv_generic_graphic_FB[layer][i] = Image->bitmap[y * width + x];
} else {
drv_generic_graphic_FB[layer][i] = BG_COL;
-/* $Id: evaluator.c,v 1.32 2006/09/14 04:08:54 reinelt Exp $
+/* $Id: evaluator.c,v 1.33 2006/09/29 04:48:22 reinelt Exp $
*
* expression evaluation
*
*
*
* $Log: evaluator.c,v $
+ * Revision 1.33 2006/09/29 04:48:22 reinelt
+ * image widget uses properties now; new property 'reload'
+ *
* Revision 1.32 2006/09/14 04:08:54 reinelt
* variables use a static list, no realloc, linear search
*
unsigned int i;
for (i = 0; i < nVariable; i++) {
- if (strcmp (name, Variable[i].name) == 0) {
+ if (strcmp(name, Variable[i].name) == 0) {
return &Variable[i];
}
}
return 1;
}
- if (nVariable >= sizeof(Variable)/sizeof(Variable[0])) {
+ if (nVariable >= sizeof(Variable) / sizeof(Variable[0])) {
error("Evaluator: cannot set variable <%s>: out of slots", name);
return -1;
}
-
+
nVariable++;
Variable[nVariable - 1].name = strdup(name);
Variable[nVariable - 1].value = NULL;
-/* $Id: plugin_iconv.c,v 1.2 2006/09/15 19:06:47 entropy Exp $
+/* $Id: plugin_iconv.c,v 1.3 2006/09/29 04:48:22 reinelt Exp $
*
* iconv charset conversion plugin
*
*
*
* $Log: plugin_iconv.c,v $
+ * Revision 1.3 2006/09/29 04:48:22 reinelt
+ * image widget uses properties now; new property 'reload'
+ *
* Revision 1.2 2006/09/15 19:06:47 entropy
* debug spam reduced, comment typo fixed
*
/* iconv function, convert charsets */
/* valid "to" and "from" charsets can be listed by running "iconv --list" from a shell */
-/* utf16 & utf32 encodings won't work, as they contain null bytes, confusing strlen */
+/* utf16 & utf32 encodings won't work, as they contain null bytes, confusing strlen */
static void my_iconv(RESULT * result, RESULT * charset_from, RESULT * charset_to, RESULT * arg)
{
char *source;
if (cd != (iconv_t) (-1)) {
do {
-
+
/* quite spammy: debug("plugin_iconv: calling iconv with %ld,[%s]/%ld,%ld", cd, source, source_left, dest_left); */
if (iconv(cd, &source, &source_left, &dest_pos, &dest_left) == (size_t) (-1)) {
switch (errno) {
-/* $Id: widget_image.c,v 1.11 2006/09/28 04:08:33 reinelt Exp $
+/* $Id: widget_image.c,v 1.12 2006/09/29 04:48:22 reinelt Exp $
*
* image widget handling
*
*
*
* $Log: widget_image.c,v $
+ * Revision 1.12 2006/09/29 04:48:22 reinelt
+ * image widget uses properties now; new property 'reload'
+ *
* Revision 1.11 2006/09/28 04:08:33 reinelt
* image widget memory leaks fixed (thanks to Magne Tørresen)
*
#include <ctype.h>
#include <errno.h>
-#include "debug.h"
-#include "cfg.h"
-#include "qprintf.h"
-#include "evaluator.h"
-#include "timer.h"
-#include "widget.h"
-#include "widget_image.h"
-#include "rgb.h"
-
#ifdef HAVE_GD_GD_H
#include <gd/gd.h>
#else
#error "cannot compile image widget"
#endif
+#include "debug.h"
+#include "cfg.h"
+#include "qprintf.h"
+#include "evaluator.h"
+#include "property.h"
+#include "timer.h"
+#include "widget.h"
+#include "widget_image.h"
+#include "rgb.h"
+
#ifdef WITH_DMALLOC
#include <dmalloc.h>
#endif
static void widget_image_render(const char *Name, WIDGET_IMAGE * Image)
{
int x, y;
- FILE *fd;
- gdImagePtr gdImage = NULL;
+ int inverted;
+ gdImagePtr gdImage;
/* clear bitmap */
if (Image->bitmap) {
int i;
for (i = 0; i < Image->height * Image->width; i++) {
- RGBA empty = { R: 0x00, G: 0x00, B: 0x00, A:0x00 };
+ RGBA empty = { R: 0x00, G: 0x00, B: 0x00, A:0x00 };
Image->bitmap[i] = empty;
}
}
-
- if (Image->file == NULL || Image->file[0] == '\0') {
- error("Warning: Image %s has no file", Name);
- return;
- }
-
- fd = fopen(Image->file, "rb");
- if (fd == NULL) {
- error("Warning: Image %s: fopen(%s) failed: %s", Name, Image->file, strerror(errno));
- return;
- }
-
- gdImage = gdImageCreateFromPng(fd);
- fclose(fd);
-
- if (fd == NULL) {
- error("Warning: Image %s: CreateFromPng(%s) failed!", Name, Image->file);
- return;
+
+ /* reload image only on first call or on explicit reload request */
+ if (Image->gdImage == NULL || P2N(&Image->reload)) {
+
+ char *file;
+ FILE *fd;
+
+ /* free previous image */
+ if (Image->gdImage) {
+ gdImageDestroy(Image->gdImage);
+ Image->gdImage = NULL;
+ }
+
+ file = P2S(&Image->file);
+ if (file == NULL || file[0] == '\0') {
+ error("Warning: Image %s has no file", Name);
+ return;
+ }
+
+ fd = fopen(file, "rb");
+ if (fd == NULL) {
+ error("Warning: Image %s: fopen(%s) failed: %s", Name, file, strerror(errno));
+ return;
+ }
+
+ Image->gdImage = gdImageCreateFromPng(fd);
+ fclose(fd);
+
+ if (Image->gdImage == NULL) {
+ error("Warning: Image %s: CreateFromPng(%s) failed!", Name, file);
+ return;
+ }
+
}
/* maybe resize bitmap */
+ gdImage = Image->gdImage;
if (gdImage->sx > Image->width) {
Image->width = gdImage->sx;
free(Image->bitmap);
return;
}
for (i = 0; i < Image->height * Image->width; i++) {
- RGBA empty = { R: 0x00, G: 0x00, B: 0x00, A:0x00 };
+ RGBA empty = { R: 0x00, G: 0x00, B: 0x00, A:0x00 };
Image->bitmap[i] = empty;
}
}
-
+
+
/* finally really render it */
- if (Image->visible) {
+ inverted = P2N(&Image->inverted);
+ if (P2N(&Image->visible)) {
for (x = 0; x < gdImage->sx; x++) {
for (y = 0; y < gdImage->sy; y++) {
int p = gdImageGetTrueColorPixel(gdImage, x, y);
/* GD's alpha is 0 (opaque) to 127 (tranparanet) */
/* our alpha is 0 (transparent) to 255 (opaque) */
Image->bitmap[i].A = (a == 127) ? 0 : 255 - 2 * a;
- if (Image->inverted) {
+ if (inverted) {
Image->bitmap[i].R = 255 - Image->bitmap[i].R;
Image->bitmap[i].G = 255 - Image->bitmap[i].G;
Image->bitmap[i].B = 255 - Image->bitmap[i].B;
}
}
}
-
- /* free image */
- gdImageDestroy(gdImage);
-
}
{
WIDGET *W = (WIDGET *) Self;
WIDGET_IMAGE *Image = W->data;
- RESULT result = { 0, 0, 0, NULL };
/* process the parent only */
if (W->parent == NULL) {
- /* evaluate expressions */
- free(Image->file);
- Image->file = NULL;
-
- if (Image->file_tree != NULL) {
- Eval(Image->file_tree, &result);
- Image->file = strdup(R2S(&result));
- DelResult(&result);
- }
-
- Image->update = 0;
- if (Image->update_tree != NULL) {
- Eval(Image->update_tree, &result);
- Image->update = R2N(&result);
- if (Image->update < 0)
- Image->update = 0;
- DelResult(&result);
- }
-
- Image->visible = 1;
- if (Image->visible_tree != NULL) {
- Eval(Image->visible_tree, &result);
- Image->visible = R2N(&result);
- Image->visible = Image->visible > 0;
- DelResult(&result);
- }
-
- Image->inverted = 0;
- if (Image->inverted_tree != NULL) {
- Eval(Image->inverted_tree, &result);
- Image->inverted = R2N(&result);
- Image->inverted = Image->inverted > 0;
- DelResult(&result);
- }
+ /* evaluate properties */
+ property_eval(&Image->file);
+ property_eval(&Image->update);
+ property_eval(&Image->reload);
+ property_eval(&Image->visible);
+ property_eval(&Image->inverted);
/* render image into bitmap */
widget_image_render(W->name, Image);
W->class->draw(W);
/* add a new one-shot timer */
- if (Image->update > 0) {
- timer_add(widget_image_update, Self, Image->update, 1);
+ if (P2N(&Image->update) > 0) {
+ timer_add(widget_image_update, Self, P2N(&Image->update), 1);
}
}
Image->width = 0;
Image->height = 0;
Image->bitmap = NULL;
- Image->file = NULL;
-
- /* get raw expressions (we evaluate them ourselves) */
- Image->file_expr = cfg_get_raw(section, "file", NULL);
- Image->update_expr = cfg_get_raw(section, "update", NULL);
- Image->visible_expr = cfg_get_raw(section, "visible", NULL);
- Image->inverted_expr = cfg_get_raw(section, "inverted", NULL);
-
- /* sanity checks */
- if (Image->file_expr == NULL || *Image->file_expr == '\0') {
- error("Warning: Image %s has no file", Self->name);
- }
- if (Image->update_expr == NULL || *Image->update_expr == '\0') {
- error("Image %s has no update, using '100'", Self->name);
- Image->update_expr = "100";
- }
- /* compile'em */
- Compile(Image->file_expr, &Image->file_tree);
- Compile(Image->update_expr, &Image->update_tree);
- Compile(Image->visible_expr, &Image->visible_tree);
- Compile(Image->inverted_expr, &Image->inverted_tree);
+ /* load properties */
+ property_load(section, "file", NULL, &Image->file);
+ property_load(section, "update", "100", &Image->update);
+ property_load(section, "reload", "0", &Image->reload);
+ property_load(section, "visible", "1", &Image->visible);
+ property_load(section, "inverted", "0", &Image->inverted);
free(section);
Self->data = Image;
if (Self->parent == NULL) {
if (Self->data) {
WIDGET_IMAGE *Image = Self->data;
+ if (Image->gdImage) {
+ gdImageDestroy(Image->gdImage);
+ Image->gdImage = NULL;
+ }
free(Image->bitmap);
- free(Image->file);
- DelTree(Image->file_tree);
- DelTree(Image->update_tree);
- DelTree(Image->visible_tree);
- DelTree(Image->inverted_tree);
+ property_free(&Image->file);
+ property_free(&Image->update);
+ property_free(&Image->reload);
+ property_free(&Image->visible);
+ property_free(&Image->inverted);
free(Self->data);
Self->data = NULL;
}
-/* $Id: widget_image.h,v 1.4 2006/04/09 14:17:50 reinelt Exp $
+/* $Id: widget_image.h,v 1.5 2006/09/29 04:48:22 reinelt Exp $
*
* image widget handling
*
*
*
* $Log: widget_image.h,v $
+ * Revision 1.5 2006/09/29 04:48:22 reinelt
+ * image widget uses properties now; new property 'reload'
+ *
* Revision 1.4 2006/04/09 14:17:50 reinelt
* autoconf/library fixes, image and graphic display inversion
*
#ifndef _WIDGET_IMAGE_H_
#define _WIDGET_IMAGE_H_
+#include "property.h"
#include "rgb.h"
typedef struct WIDGET_IMAGE {
+ void *gdImage; /* raw gd image */
RGBA *bitmap; /* image bitmap */
int width, height; /* size of the image */
- char *file_expr; /* expression for image filename */
- void *file_tree; /* pre-compiled expression for image filename */
- char *file; /* evaluated filename */
- char *update_expr; /* expression for update interval */
- void *update_tree; /* pre-compiled expression for update interval */
- int update; /* update interval (msec) */
- char *visible_expr; /* expression for visibility */
- void *visible_tree; /* pre-compiled expression for visibility */
- int visible; /* image visible? */
- char *inverted_expr; /* expression for inversion */
- void *inverted_tree; /* pre-compiled expression for inversion */
- int inverted; /* image inverted? */
+ PROPERTY file; /* image filename */
+ PROPERTY update; /* update interval */
+ PROPERTY reload; /* reload image on update? */
+ PROPERTY visible; /* image visible? */
+ PROPERTY inverted; /* image inverted? */
} WIDGET_IMAGE;
extern WIDGET_CLASS Widget_Image;
-/* $Id: widget_text.c,v 1.28 2006/09/13 05:33:39 reinelt Exp $
+/* $Id: widget_text.c,v 1.29 2006/09/29 04:48:22 reinelt Exp $
*
* simple text widget handling
*
*
*
* $Log: widget_text.c,v $
+ * Revision 1.29 2006/09/29 04:48:22 reinelt
+ * image widget uses properties now; new property 'reload'
+ *
* Revision 1.28 2006/09/13 05:33:39 reinelt
* plugin_file: return empty string if file cannot be read; widget_text: load property as 'string', not as variable (triggered an ugly bug with variable list reallocated)
*
/* did the formatted string change? */
if (T->string == NULL || strcmp(T->string, string) != 0) {
update++;
- if (T->string)
- free(T->string);
+ free(T->string);
T->string = string;
} else {
free(string);
property_free(&Text->value);
property_free(&Text->postfix);
property_free(&Text->style);
- if (Text->string)
- free(Text->string);
- if (Text->buffer)
- free(Text->buffer);
+ free(Text->string);
+ free(Text->buffer);
free(Self->data);
Self->data = NULL;
}