xcfa-4.3.6/ 0000755 0001750 0001750 00000000000 12224542443 007450 5 0000000 0000000 xcfa-4.3.6/glade/ 0000755 0001750 0001750 00000000000 12224542445 010526 5 0000000 0000000 xcfa-4.3.6/glade/Makefile.am 0000644 0001750 0001750 00000000262 11525453100 012472 0000000 0000000 #
# glade/Makefile.am
#
AUTOMAKE_OPTIONS= gnu
EXTRA_DIST = xcfa.glade
gladedir = $(datadir)/xcfa/glade
glade_DATA = xcfa.glade
uninstall:
rm -rf "$(DESTDIR)$(datadir)/xcfa/";
xcfa-4.3.6/glade/xcfa.glade 0000644 0001750 0001750 00003447741 12102742320 012376 0000000 0000000
411
5
Scan en cours ...
False
True
center-on-parent
dialog
False
True
vertical
2
True
5
vertical
True
True
gtk-execute
6
False
False
0
True
<b>Scan du support en cours ...</b>
True
center
5
1
0
True
False
5
1
True
True
150
True
True
automatic
automatic
True
Detail extraction mode expert
False
False
2
1
True
end
gtk-cancel
True
True
True
True
False
False
0
False
end
0
button_cancel_windscan
Modification des champs
False
True
center-on-parent
True
2
vertical
True
5
True
gtk-dialog-info
5
0
True
<b>Modification des champs</b>
True
1
False
False
0
True
vertical
True
True
5
left
True
5
120
True
0
in
True
True
5
vertical
Titre
True
True
False
True
True
False
False
0
Play
True
True
False
True
True
False
False
1
Temps
True
True
False
True
True
False
False
2
Format
True
True
False
True
True
False
False
3
Choix
True
True
False
True
True
False
False
4
Normalise
True
True
False
True
True
False
False
5
Nom
True
True
False
True
True
False
False
6
True
<b> Visibilite </b>
True
0
143
True
0
in
True
True
5
vertical
Nom a gauche
True
True
False
True
True
False
False
0
Nom au centre
True
True
False
True
True
True
radiobutton_nameleft_dvd
False
False
1
Nom a droite
True
True
False
True
True
radiobutton_nameleft_dvd
False
False
2
True
True
1
True
DVD
False
True
5
140
True
0
in
True
True
5
vertical
Play
True
True
False
True
True
False
False
0
Wav
True
True
False
True
True
False
False
1
Flac
True
True
False
True
True
False
False
2
Ape
True
True
False
True
True
False
False
3
Wavpack
True
True
False
True
True
False
False
4
Ogg
True
True
False
True
True
False
False
5
M4a
True
True
False
True
True
False
False
6
Aac
True
True
False
True
True
False
False
7
Musepack
True
True
False
True
True
False
False
8
Mp3
True
True
False
True
True
False
False
9
Num
True
True
False
True
True
False
False
10
Time
True
True
False
True
True
False
False
11
Normalise
True
True
False
True
True
False
False
12
Nom
True
True
False
True
True
False
False
13
True
<b> Visibilite </b>
True
0
140
True
0
in
True
True
5
vertical
Nom a gauche
True
True
False
True
True
False
False
0
Nom au centre
True
True
False
True
True
True
radiobutton_nameleft_cd
False
False
1
Nom a droite
True
True
False
True
True
radiobutton_nameleft_cd
False
False
2
True
True
1
1
True
CD
1
False
True
5
120
True
0
in
True
True
5
vertical
Play
True
True
False
True
True
False
False
0
Trash
True
True
False
True
True
False
False
1
Type
True
True
False
True
True
False
False
2
Wav
True
True
False
True
True
False
False
3
Flac
True
True
False
True
True
False
False
4
Ape
True
True
False
True
True
False
False
5
Wavpack
True
True
False
True
True
False
False
6
Ogg
True
True
False
True
True
False
False
7
M4a
True
True
False
True
True
False
False
8
Aac
True
True
False
True
True
False
False
9
Musepack
True
True
False
True
True
False
False
10
Mp3
True
True
False
True
True
False
False
11
Time
True
True
False
True
True
False
False
12
Normalise
True
True
False
True
True
False
False
13
Replaygain
True
True
False
True
True
False
False
14
Nom
True
True
False
True
True
False
False
15
True
<b> Visibilite </b>
True
0
130
True
0
in
True
True
5
vertical
Nom a gauche
True
True
False
True
True
False
False
0
Nom au centre
True
True
False
True
True
True
radiobutton_nameleft_allfile
False
False
1
Nom a droite
True
True
False
True
True
radiobutton_nameleft_allfile
False
False
2
True
True
1
2
True
CONVERSIONS
2
False
True
5
120
True
0
in
True
True
5
vertical
Hertz
True
True
False
True
True
False
False
0
New Hertz
True
True
False
True
True
False
False
1
Voie
True
True
False
True
True
False
False
2
New Voie
True
True
False
True
True
False
False
3
Bits
True
True
False
True
True
False
False
4
New Bits
True
True
False
True
True
False
False
5
Nom
True
True
False
True
True
False
False
6
True
<b> Visibilite </b>
True
0
130
True
0
in
True
True
5
vertical
Nom a gauche
True
True
False
True
True
False
False
0
Nom au centre
True
True
False
True
True
True
radiobutton_nameleft_wav
False
False
1
Nom a droite
True
True
False
True
True
radiobutton_nameleft_wav
False
False
2
True
True
1
3
True
WAV
3
False
True
5
120
True
0
in
True
True
5
vertical
Type
True
True
False
True
True
False
False
0
Bitrate
True
True
False
True
True
False
False
1
New Bitrate
True
True
False
True
True
False
False
2
Size
True
True
False
True
True
False
False
3
Time
True
True
False
True
True
False
False
4
Nom
True
True
False
True
True
False
False
5
True
<b> Visibilite </b>
True
0
130
True
0
in
True
1
True
5
vertical
Nom a gauche
True
True
False
True
True
False
False
0
Nom au centre
True
True
False
True
True
True
radiobutton_nameleft_mp3ogg
False
False
1
Nom a droite
True
True
False
True
True
radiobutton_nameleft_mp3ogg
False
False
2
True
True
1
4
True
MP3-OGG
4
False
True
5
120
True
0
in
True
True
5
vertical
Type
True
True
False
True
True
False
False
0
Time
True
True
False
True
True
False
False
1
Nom
True
True
False
True
True
False
False
2
True
<b> Visibilite </b>
True
0
130
True
0
in
True
1
True
5
vertical
Nom a gauche
True
True
False
True
True
False
False
0
Nom au centre
True
True
False
True
True
True
radiobutton_nameleft_tags
False
False
1
Nom a droite
True
True
False
True
True
radiobutton_nameleft_tags
False
False
2
True
True
1
5
True
TAGS
5
False
0
True
True
True
False
5
True
0
0
True
2
True
gtk-redo
False
False
0
True
Selection globale
True
False
False
1
0
True
True
False
5
True
0
0
True
2
True
gtk-clear
False
False
0
True
Deselection globale
True
False
False
1
1
False
False
1
True
True
False
5
True
0
0
True
2
True
gtk-quit
False
False
0
True
Retour
True
False
False
1
False
False
2
1
464
False
center-on-parent
True
vertical
True
5
gtk-quit
True
True
True
True
False
False
0
gtk-media-play
110
True
True
True
True
False
False
1
gtk-media-pause
110
True
True
True
True
False
False
2
True
3
False
False
0
About X Convert File Audio
False
True
center-on-parent
True
vertical
True
True
5
True
vertical
True
gtk-missing-image
0
True
0
in
True
True
True
True
True
1
True
True
0
in
True
True
True
True
<b>Author</b>
True
0
True
0
in
True
True
10
gtk-missing-image
True
<b>Licence</b>
True
False
1
2
True
Informations
False
True
True
automatic
automatic
True
queue
True
True
True
1
True
Machine
3
False
True
True
automatic
automatic
True
True
vertical
True
True
True
False
False
0
True
9
4
True
0
@Shankarius
@Dzef
True
2
3
GTK_FILL
True
0
Stephane de la Linuxerie
@xens
True
2
3
1
2
GTK_FILL
True
0
@Bapoumba
@Shankarius
@Dzef
Guillaume
Gerry Butler
True
2
3
2
3
GTK_FILL
True
0
Karsten Mehrhoff
True
2
3
3
4
GTK_FILL
True
0
<b>Ingenieurs du son</b>
True
True
1
2
GTK_FILL
True
0
<b>Graphisme</b>
True
True
1
2
1
2
GTK_FILL
True
0
<b>Traduction Anglaise</b>
True
True
1
2
2
3
GTK_FILL
True
0
<b>Traduction Allemande</b>
True
True
1
2
3
4
GTK_FILL
True
0
1
2
GTK_FILL
True
0
2
3
GTK_FILL
True
0
3
4
GTK_FILL
True
0
4
5
GTK_FILL
True
0
5
6
GTK_FILL
True
0
6
7
GTK_FILL
True
0
True
0
3
4
True
0
3
4
1
2
GTK_FILL
True
0
3
4
2
3
GTK_FILL
True
0
3
4
3
4
GTK_FILL
True
0
3
4
4
5
GTK_FILL
True
0
3
4
5
6
GTK_FILL
True
0
3
4
6
7
GTK_FILL
True
0
7
8
GTK_FILL
True
0
3
4
7
8
GTK_FILL
True
0
<b>Codeur Xcfa</b>
True
True
1
2
7
8
GTK_FILL
True
0
@b52 alias @xcfaudio
True
2
3
7
8
GTK_FILL
True
0
<b>ElementSpeak pour Xcfa</b>
True
True
1
2
6
7
GTK_FILL
True
0
@Shankarius
True
2
3
6
7
GTK_FILL
True
0
<b>Codeur pages Web</b>
True
True
1
2
5
6
GTK_FILL
True
0
@zarer
True
2
3
5
6
GTK_FILL
True
0
<b>Traduction Italienne</b>
True
True
1
2
4
5
GTK_FILL
True
0
Guillaume
Vincenzo Romano
True
2
3
4
5
GTK_FILL
2
True
True
0
0
True
0
<b>Pages a visiter</b>
True
False
False
1
True
0
2
3
True
12
3
True
0
1
2
GTK_FILL
True
0
2
3
GTK_FILL
True
0
3
4
GTK_FILL
True
0
4
5
GTK_FILL
True
0
5
6
GTK_FILL
True
0
6
7
GTK_FILL
True
0
7
8
GTK_FILL
True
0
8
9
GTK_FILL
True
0
9
10
GTK_FILL
True
0
10
11
GTK_FILL
True
0
2
3
1
2
GTK_FILL
True
0
2
3
2
3
GTK_FILL
True
0
2
3
3
4
GTK_FILL
True
0
2
3
4
5
GTK_FILL
True
0
2
3
5
6
GTK_FILL
True
0
2
3
6
7
GTK_FILL
True
0
2
3
7
8
GTK_FILL
True
0
2
3
8
9
GTK_FILL
True
0
2
3
9
10
GTK_FILL
True
0
2
3
10
11
GTK_FILL
True
True
False
3
True
0
0
True
2
True
gtk-connect
False
False
0
True
Linux On The Root
True
False
False
1
1
2
1
2
GTK_FILL
True
True
False
3
True
0
0
True
2
True
gtk-connect
False
False
0
True
Frugalware
True
False
False
1
1
2
2
3
GTK_FILL
True
True
False
3
True
0
0
True
2
True
gtk-connect
False
False
0
True
Road2Mayotte
True
False
False
1
1
2
3
4
GTK_FILL
True
True
False
3
True
0
0
True
2
True
gtk-connect
False
False
0
True
La Linuxerie
True
False
False
1
1
2
4
5
GTK_FILL
True
True
False
3
True
0
0
True
2
True
gtk-connect
False
False
0
True
Audioptimisation by Dzef
True
False
False
1
1
2
5
6
GTK_FILL
True
True
False
3
True
0
0
True
2
True
gtk-connect
False
False
0
True
Tuxfamily
True
False
False
1
1
2
6
7
GTK_FILL
True
True
False
3
True
0
0
True
2
True
gtk-connect
False
False
0
True
Framasoft
True
False
False
1
1
2
7
8
GTK_FILL
True
True
False
3
True
0
0
True
2
True
gtk-connect
False
False
0
True
Ekd (EnKoDeur-Mixeur)
True
False
False
1
1
2
8
9
GTK_FILL
True
True
False
3
True
0
0
True
2
True
gtk-connect
False
False
0
True
Bishop's page
True
False
False
1
1
2
9
10
GTK_FILL
True
True
False
3
True
0
0
True
2
True
gtk-connect
False
False
0
True
Je suis libre
True
False
False
1
1
2
10
11
GTK_FILL
True
0
True
0
2
3
True
True
False
3
True
0
0
True
2
True
gtk-connect
False
False
0
True
Debian Multimedia
True
False
False
1
1
2
True
0
11
12
GTK_FILL
True
0
2
3
11
12
GTK_FILL
True
True
True
3
True
0
0
True
2
True
gtk-connect
False
False
0
True
Alessio Treglia
True
False
False
1
1
2
11
12
GTK_FILL
False
False
4
True
True
0
0
True
<b>Forum</b>
True
False
False
1
True
0
2
5
True
3
3
True
True
False
3
True
0
0
True
2
True
gtk-connect
False
False
0
True
XCFA Vorstellung
True
False
False
1
1
2
1
2
GTK_FILL
True
True
False
3
True
0
0
True
2
True
gtk-connect
False
False
0
True
XCFA LinuxForen.de
True
False
False
1
1
2
2
3
GTK_FILL
True
0
2
3
True
0
1
2
True
0
GTK_FILL
True
0
2
3
1
2
GTK_FILL
True
0
2
3
2
3
GTK_FILL
True
0
2
3
True
True
False
3
True
0
0
True
2
True
gtk-connect
False
False
0
True
Forum Xcfa
True
False
False
1
1
2
6
True
True
0
0
True
<b>Documentation</b>
True
False
False
1
True
0
2
7
True
6
3
True
0
1
2
GTK_FILL
True
0
2
3
GTK_FILL
True
0
3
4
GTK_FILL
True
0
4
5
GTK_FILL
True
0
5
6
GTK_FILL
True
0
2
3
1
2
GTK_FILL
True
0
2
3
2
3
GTK_FILL
True
0
2
3
3
4
GTK_FILL
True
0
2
3
4
5
GTK_FILL
True
0
2
3
5
6
GTK_FILL
True
0
True
0
2
3
True
True
False
3
True
0
0
True
2
True
gtk-connect
False
False
0
True
Wiki Xcfa par Shankarius
True
False
False
1
1
2
GTK_FILL
True
True
False
3
True
0
0
True
2
True
gtk-connect
False
False
0
True
Doc Xcfa par Patachon
True
False
False
1
1
2
1
2
GTK_FILL
True
True
False
2
True
0
0
True
2
True
gtk-connect
False
False
0
True
Ogg Vorbis explique par Shankarius
True
False
False
1
1
2
2
3
GTK_FILL
True
True
False
3
True
0
0
True
2
True
gtk-connect
False
False
0
True
La normalisation expliquee par Dzef
True
False
False
1
1
2
3
4
GTK_FILL
True
True
False
3
True
0
0
True
2
True
gtk-connect
False
False
0
True
Xcfa sur Linux On The Root
True
False
False
1
1
2
4
5
GTK_FILL
8
2
True
Contributions
2
False
True
True
automatic
automatic
in
True
True
3
True
License
3
False
0
True
5
OK
True
True
True
True
False
half
True
0
True
True
False
none
False
True
0
0
True
2
True
gtk-connect
False
False
0
True
Xcfa sur le web
True
False
False
1
False
False
1
False
False
1
False
True
center-always
True
5
vertical
True
True
vertical
True
11
10
gtk-dialog-warning
6
False
False
0
False
0
True
vertical
True
True
center
0
True
True
1
1
0
True
True
gtk-quit
True
True
True
True
False
False
0
False
False
1
100
100
1
1
100
100
1
1
1
9999
1
1
2
999
1
1
1
1
99999
1
1
-10
-24
-6
1
1
1
999
1
1
1962
9999
1
1
xcfa-4.3.6/glade/Makefile.in 0000644 0001750 0001750 00000027321 12224542373 012520 0000000 0000000 # Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
# Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = glade
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_GEN = $(am__v_GEN_$(V))
am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
am__v_GEN_0 = @echo " GEN " $@;
AM_V_at = $(am__v_at_$(V))
am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
am__v_at_0 = @
SOURCES =
DIST_SOURCES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
am__install_max = 40
am__nobase_strip_setup = \
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
am__nobase_strip = \
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
am__nobase_list = $(am__nobase_strip_setup); \
for p in $$list; do echo "$$p $$p"; done | \
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
if (++n[$$2] == $(am__install_max)) \
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
END { for (dir in files) print dir, files[dir] }'
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__installdirs = "$(DESTDIR)$(gladedir)"
DATA = $(glade_DATA)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
GMSGFMT = @GMSGFMT@
GMSGFMT_015 = @GMSGFMT_015@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PREFIX = @INSTALL_PREFIX@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INTLLIBS = @INTLLIBS@
INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
LDFLAGS = @LDFLAGS@
LIBICONV = @LIBICONV@
LIBINTL = @LIBINTL@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LTLIBICONV = @LTLIBICONV@
LTLIBINTL = @LTLIBINTL@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_CFLAGS = @PACKAGE_CFLAGS@
PACKAGE_LIBS = @PACKAGE_LIBS@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
POSUB = @POSUB@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
XGETTEXT = @XGETTEXT@
XGETTEXT_015 = @XGETTEXT_015@
XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
XMKMF = @XMKMF@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
#
# glade/Makefile.am
#
AUTOMAKE_OPTIONS = gnu
EXTRA_DIST = xcfa.glade
gladedir = $(datadir)/xcfa/glade
glade_DATA = xcfa.glade
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
&& { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu glade/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu glade/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
install-gladeDATA: $(glade_DATA)
@$(NORMAL_INSTALL)
test -z "$(gladedir)" || $(MKDIR_P) "$(DESTDIR)$(gladedir)"
@list='$(glade_DATA)'; test -n "$(gladedir)" || list=; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
done | $(am__base_list) | \
while read files; do \
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(gladedir)'"; \
$(INSTALL_DATA) $$files "$(DESTDIR)$(gladedir)" || exit $$?; \
done
uninstall-gladeDATA:
@$(NORMAL_UNINSTALL)
@list='$(glade_DATA)'; test -n "$(gladedir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
test -n "$$files" || exit 0; \
echo " ( cd '$(DESTDIR)$(gladedir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(gladedir)" && rm -f $$files
tags: TAGS
TAGS:
ctags: CTAGS
CTAGS:
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(DATA)
installdirs:
for dir in "$(DESTDIR)$(gladedir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-generic
dvi: dvi-am
dvi-am:
html: html-am
html-am:
info: info-am
info-am:
install-data-am: install-gladeDATA
install-dvi: install-dvi-am
install-dvi-am:
install-exec-am:
install-html: install-html-am
install-html-am:
install-info: install-info-am
install-info-am:
install-man:
install-pdf: install-pdf-am
install-pdf-am:
install-ps: install-ps-am
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-gladeDATA
.MAKE: install-am install-strip
.PHONY: all all-am check check-am clean clean-generic distclean \
distclean-generic distdir dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am install-dvi \
install-dvi-am install-exec install-exec-am install-gladeDATA \
install-html install-html-am install-info install-info-am \
install-man install-pdf install-pdf-am install-ps \
install-ps-am install-strip installcheck installcheck-am \
installdirs maintainer-clean maintainer-clean-generic \
mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \
uninstall-am uninstall-gladeDATA
uninstall:
rm -rf "$(DESTDIR)$(datadir)/xcfa/";
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
xcfa-4.3.6/README 0000644 0001750 0001750 00000010054 11610134714 010244 0000000 0000000
___ _ __ __
| _ \___ __ _ __| | \/ |___
| / -_) _` / _` | |\/| / -_)
|_|_\___\__,_\__,_|_| |_\___|
----------------------------------------
| BONJOUR |
----------------------------------------
J'ai construis (programmé) XCFA (X Convert File Audio) qui me permet
d'effectuer des extractions de pistes de CD Audios vers les formats
flac, wav, mp3 et ogg. X Convert File Audio permet aussi des conversions
de formats: flac <-> wav <-> mp3 <-> ogg
Un de plus penserez-vous (direz-vous) ? Oui et non.
OUI parce que l'on trouve déjà de très bons programmes tel Grip,
(le plus connu sans doute !) plus d'autres.
NON parce que tous ces différents logiciels que j'ai utilisés n'ont
jamais le choix d'options au bon endroit.
Et puis quel plaisir d'aligner des lignes de codes et de les voirs
fonctionner...
Bref, depuis que j'ai fait l'acquisition d'un balladeur MP3, X Convert
File Audio trouve toute son utilité dans les conversions audio vers mp3.
Il peut aussi aller récupérer sur le Web les informations concernant le
cd-audio en cours de traitement.
XCFA est écrit en langage C et utilise les librairies Gtk2, Glib2.
J'utilise Glade pour developper l'interface.
----------------------------------------
| INSTALLATION |
| DEPUIS LES |
| SOURCES |
----------------------------------------
Compilation:
$ ./configure --prefix=/usr
$ make
Installation:
# make install
Utilisation:
$ xcfa
Désinstallation propre:
# make uninstall
----------------------------------------
| LITTERATURE |
| IDEES DE LOGICIELS |
| TESTS |
----------------------------------------
Des idees de code etudie, reprit et retravailles viennent de:
graveman
wavinfo
grip
mp3info
xmms
Gtktalog
CdCover
Kover
Graveman
Asunder
et bien d'autres ... ;-)
Les principaux livres utilises sont:
Programmation Linux avec GTK+ de David Odin
La reference du C norme ANSI/ISO de Claude Delannoy
Programmation systeme en C sous Linux de Christophe Blaess
Linux magazine
Les tests sont effectues sous:
- debian
- frugalware
- archlinux
- Ubuntu
- Fedora
- Knoppix
- Mandrake
- Mepis
- Slackware
- ...
----------------------------------------
| LICENSE |
----------------------------------------
Copyright (C) 2003 - 2011
XCFA is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
XCFA is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, see
http://www.gnu.org/licenses
or write to
the Free Software Foundation,Inc.
51 Franklin Street
Fifth Floor
Boston, MA 02110-1301 USA
------------
XCFA est un logiciel libre, vous pouvez le redistribuer
et / ou le modifier selon les termes de la Licence Publique Générale GNU
telle que publiée par la Free Software Foundation; soit la version 3 de
la Licence, ou (à votre choix) toute version ultérieure.
XCFA est distribué dans l'espoir qu'il sera utile, mais SANS AUCUNE GARANTIE,
sans même la garantie implicite de COMMERCIALISATION ou D'ADAPTATION A UN
USAGE PARTICULIER. Voir la Licence Publique Générale GNU pour plus de détails.
Vous devriez avoir reçu une copie de la Licence Publique Générale GNU avec
ce programme, sinon, voir
http://www.gnu.org/licenses
ou écrivez à la
Free Software Foundation, Inc,
51 Franklin Street
Fifth Floor
Boston, Massachusetts, USA 02110-1301
xcfa-4.3.6/autogen.sh 0000755 0001750 0001750 00000001532 12043302460 011362 0000000 0000000 #!/bin/sh
(aclocal --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "** Error **: You must have aclocal installed."
echo
exit 1
}
(autoheader --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "** Error **: You must have autoheader installed."
echo
exit 1
}
(autoconf --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "** Error **: You must have autoconf installed."
echo
exit 1
}
(automake --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "** Error **: You must have aclocal installed."
echo
exit 1
}
echo aclocal
aclocal
# autoreconf --install
# AM_GNU_GETTEXT_VERSION
echo autoheader
autoheader
echo autoconf
autoconf
echo automake -a -c
automake -a -c
echo automake --add-missing
automake --add-missing
echo automake
automake
echo ./configure --prefix=/usr
./configure --prefix=/usr
echo
exit 0
xcfa-4.3.6/TODO 0000644 0001750 0001750 00000055512 12224542257 010073 0000000 0000000
__ __ ___ _ ___ _ _ _ _ _
\ \/ / / __|___ _ ___ _____ _ _| |_ | __(_) |___ /_\ _ _ __| (_)___
> < | (__/ _ \ ' \ V / -_) '_| _| | _|| | / -_) / _ \ || / _` | / _ \
/_/\_\ \___\___/_||_\_/\___|_| \__| |_| |_|_\___| /_/ \_\_,_\__,_|_\___/
__ __
/ /____ ___/ /__
/ __/ _ \/ _ / _ \
\__/\___/\_,_/\___/
========================================
| 4.3.6 |
| 4.3.6~beta0 |
========================================
- Corrections signalees par Christian Marillat:
o configure.ac
- LDFLAGS="-lm$LDFLAGS"
+ LDFLAGS="-lm $LDFLAGS"
o mime/Makefile.am
- mimedir = $(libdir)/mime/packages
+ mimedir = $(prefix)/lib/mime/packages
- Deposit of XCFA: 4.3.6~beta0
- Deposit of XCFA: 4.3.6
========================================
| 4.3.5 |
| 4.3.5~beta0 .. 4.3.5~beta3 |
========================================
- Recodage de file_conv.c
- Finalisation de l'import des fichiers BWF
- Debug import drag-and-drop
- Deposit of XCFA: 4.3.5~beta2
- Deposit of XCFA: 4.3.5~beta3
- Deposit of XCFA: 4.3.5
========================================
| 4.3.4 |
| 4.3.4~beta0 .. 4.3.4~beta4 |
========================================
- Demande de Christian Marillat
o Gestion de Broadcast Wave Format
http://fr.wikipedia.org/wiki/Broadcast_Wave_Format
Les fichiers BWF sont des fichiers wave. Il n'est pas necessaire de les convertir.
Ce qui rend un BWF special est tout simplement l'ajout de meta-informations dans le fichier.
Recherche des tags [ 'bext' | 'qlty' | 'levl' | 'link' | 'axml' ]
Les tags [ 'fmt ' ] et [ 'data' ] devront etre presents pour valider l'importation du fichier wav
- Deposit of XCFA: 4.3.4~beta0
- Deposit of XCFA: 4.3.4~beta1
- Deposit of XCFA: 4.3.4~beta2
- Deposit of XCFA: 4.3.4
========================================
| 4.3.3 |
| 4.3.3~beta0 .. 4.3.3~beta4 |
========================================
- [ External Applications -> Browsers ]
o Prise en compte du parametre pour le navigateur
o Taking into account the parameter for the browser
- SOLVED Bug in function: SplitCue_read_cue_file( ... )
- RENAME: configure.in -> configure.ac
- RENAME: in configure.ac
AM_CONFIG_HEADER([config.h]) -> AC_CONFIG_HEADERS([config.h])
- RENAME: in src/makefile.am and lib/makefile.am
INCLUDES -> AM_CPPFLAGS
- Deposit of XCFA: 4.3.3~beta1
- REPLACE: gtk_set_locale() has been deprecated : use setlocale( LC_ALL, "" )
- SOLVED Replacement correct de la ligne en selection lors d'une suppression dans le GtkTree
- Deposit of XCFA: 4.3.3~beta2
- Deposit of XCFA: 4.3.3~beta3
- Deposit of XCFA: 4.3.3~beta4
- Deposit of XCFA: 4.3.3
========================================
| 4.3.2 |
| 4.3.2~beta0 .. 4.3.2~beta3 |
========================================
- TODO: CAIRO library integration for the tab Split
o See: http://www.xcfa.tuxfamily.org/index.php?article8/coder-avec-cairo
- Systray management was removed
- Italian translation by Vincenzo Romano
- SOLVED Bug de maximisation sous Unity signalé par @Gounlaf
- [ Fichiers -> Mp3-Ogg ]: Application complete depuis une action popup sur une selection multiple
- Deposit of XCFA: 4.3.2~beta1
- Colorized field names GtkTree
- [ Fichiers -> Wav ]: Application complete depuis une action popup sur une selection multiple
- Deposit of XCFA: 4.3.2~beta2
- Correction URL
- Modification fichier glade + code associe
- Deposit of XCFA: 4.3.2~beta3
- Deposit of XCFA: 4.3.2
========================================
| 4.3.1 |
| 4.3.1~beta0 .. 4.3.1~beta2 |
========================================
- SOLVED Bug#673641: xcfa: Wrong file directory
o http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=673641
o Complement coding
- SOLVED Bug#673640: xcfa: XCFA crashes when the CD is ejected
o http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=673640
o The eject buttons CD / DVD are not accessible if no drives are found
o New option command line: -systray
o The tests are ok under sawfish window manager
- Deposit of XCFA: 4.3.1~beta0
- SOLVED Bug in ArchLinux with the operation of link with error:
o https://aur.archlinux.org/packages.php?ID=15386
o 'roundf@@GLIBC_2.2.5' is defined in DSO /lib/libm.so.6 so try adding it to the linker command line
o File modification [ src/Makefile.am ] in xcfa-4.3.1~beta1
o Confirmed by 'Skunnyk', the build of XCFA under ArchLinux is ok
- Deposit of XCFA: 4.3.1~beta2
- Deposit of XCFA: 4.3.1
========================================
| 4.3.0 |
| 4.3.0~beta0 .. 4.3.0~beta1 |
========================================
- Deposit of XCFA: 4.3.0~beta0
- Deposit of XCFA: 4.3.0
========================================
| 4.2.9 |
| 4.2.9~beta0 .. 4.2.9~beta9 |
========================================
- Cleaning code with unused variables
- Use: IO Channels
- Validation of the variable 'StartupNotify' File 'xcfa.desktop' with value FALSE
- Deposit of XCFA: 4.2.9~beta1
- Gestion d'erreurs produites par mplayer et/ou sox:
o mplayer: Symbol `ff_codec_bmp_tags' has different size in shared object, consider re-linking
o Cette erreur signifie que les versions de librairies de mplayer et/ou sox sont inadéquates :/
- Correction d'un bug de réaffichage depuis: file_mp3ogg.c
- Modification onglet Fichiers->Mp3-Ogg :
o L'accès aux différentes sélections fonctionne via un menu popup.
- Possibilité de generation d'un rapport pour une extraction en mode expert avec cdparanoia
- Deposit of XCFA: 4.2.9~beta3
- Deposit of XCFA: 4.2.9~beta4
- Deposit of XCFA: 4.2.9~beta5
- Deposit of XCFA: 4.2.9~beta6
- Merci a @TICROB pour:
o Recuperation complete d"une ligne TTITLE partagee sur plusieures lignes
o Suppression du caractere '/' pour le fichier CUE
- Deposit of XCFA: 4.2.9~beta7
- Un CD qui possede des piste DATA/BONUS pose un probleme a cdparanoia !
o Extraction avec cdparanoia mode expert et une seule passe prend du temps mais est fiable
- Deposit of XCFA: 4.2.9~beta8
- Nouveaux modes pour l'extraction des cd-audio:
o cdparanoia: mode normal
o cdparanoia: mode expert
o cdparanoia: mode expert multi passes
o cdda2wav / icedax
- Deposit of XCFA: 4.2.9~beta9
========================================
| 4.2.8 |
| 4.2.8~beta0 .. 4.2.8~beta4 |
========================================
- xcfa: Please Recommend ghostscript instead of gs-common
o Supression de gs-common de la ligne Recommends : de mes paquets tandis que Alessio Treglia a déjà
contourné le problème différemment chez Debian:
o http://anonscm.debian.org/gitweb/?p=pkg-multimedia/xcfa.git;a=commitdiff;h=9d980a02
o http://anonscm.debian.org/gitweb/?p=pkg-multimedia/xcfa.git;a=commitdiff;h=679cc525
Vraiment très fort chez Debian : Thank you to the Team ;-)
- At the request of Giannis Servetas, Removal of WAVSPLIT who is not any more maintained.
o http://packages.qa.debian.org/w/wavsplit.html
o http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=489456
The WavSplit operation is now encoded from XCFA.
- Deposit of XCFA: 4.2.8~beta1
- Deposit of XCFA: 4.2.8~beta2
- Removing the slash character from a title on a CD.
- Deposit of XCFA: 4.2.8~beta3
- Deposit of XCFA: 4.2.8~beta4
- Deposit of XCFA: 4.2.8
========================================
| 4.2.7 |
| 4.2.7~beta0 .. 4.2.7~beta3 |
========================================
- Intégration des spécifications Freedesktop.
o http://doc.ubuntu-fr.org/variables_d_environnement
o http://packages.debian.org/fr/lenny/xdg-user-dirs
o http://fr.wikipedia.org/wiki/Freedesktop.org
o http://www.planet-libre.org/index.php?post_id=3340
o http://www.ziki.com/en/linuxerie+128366/post/xdg-base-directory-specification-french-traduction-francaise+11044640
o http://linuxerie.midiblogs.com/tag/freedesktop
- Update for bitrate parameter from APE to MP3
- Deposit of XCFA: 4.2.7~beta1
- Après une discussion avec Jérôme, re-codage du parsing pour prise
en compte des différentes fonctions disponibles depuis
o CD->Arrangement des titres du CD
o Préférences->CD->Dossier de stockage
- Deposit of XCFA: 4.2.7~beta2
- Deposit of XCFA: 4.2.7~beta3
- Deposit of XCFA: 4.2.7
========================================
| 4.2.6 |
| 4.2.6~beta0 |
========================================
- Update algorithm for recovering image files on the Net
- Deposit of XCFA: 4.2.6~beta0
- Deposit of XCFA: 4.2.6
========================================
| 4.2.5 |
| 4.2.5~beta0 .. 4.2.5~beta3 |
========================================
- Update cue file with PERFORMER
- @Jerome:
o Test libcurl + cd-discid: ok
o "Preferences" -> onglet "CD" -> "Dossier de stockage"
Les caracteres espace ne sont plus remplaces par un underline
Les caracteres accentues sont acceptes
o Onglet "CD" -> "Album"
le champ "Album" ne concatene plus "Artist + Album" mais uniquement "Album"
o Onglet "CD" -> "Modification des tags Freedb" -> "Commentaires"
Conserver le champ "Commentaire" d'une fois sur l'autre (meme vide)
o Onglet "CD" -> "Modification des tags Freedb" -> "Genre"
Saisie possible d'une categorie
Completion de la saisie clavier
o Onglet "CD" -> "DiscId"
Disponible uniquement si plusieurs choix
o Ajouts d'options en ligne de commande:
o -Version : active le mode 'bavard' pour ne pas surcharger $HOME/.xsession-errors
o -Verbose : affiche le numero de version et quitte xcfa
- Deposit of XCFA: 4.2.5~beta0
- Deposit of XCFA: 4.2.5~beta1
- Deposit of XCFA: 4.2.5~beta2
- Deposit of XCFA: 4.2.5
- Deposit of XCFA: 4.2.5~beta3
========================================
| 4.2.4 |
| 4.2.4~beta0 .. 4.2.4~beta1 |
========================================
- Probleme resolu sous frugalware avec le lieu de stockage de vte.h
o Success of compilate by @Devil505: xcfa-4.2.4~beta0
- Deposit of XCFA: 4.2.4~beta1
- Deposit of XCFA: 4.2.4
========================================
| 4.2.3 |
| 4.2.3~beta0 .. 4.2.3~beta2 |
========================================
- Correctif Gestion Proxy:
o Suppression des librairies LibCDIO et LibCDDB
o Utilisation de LibCURL et de cd-discid
o Tests by @Gounlaf
- Deposit of XCFA: 4.2.3~beta0
- Correctif module cd_curl.c
- Deposit of XCFA: 4.2.3~beta1
- Update es.po
- Add VTE terminal for expert extraction
- Deposit of XCFA: 4.2.3~beta2
- Deposit of XCFA: 4.2.3
========================================
| 4.2.2 |
| 4.2.2~beta0 .. 4.2.2~beta11 |
========================================
- Alexandre Fromion: Intégration de l'extraction de la partie musicale de fichiers VIDEO M4A
- Correction avancement barre de progression
- Deposit of XCFA: 4.2.2~beta1
- @Gounlaf: Plantage suite à connexion à travers un proxy
o Codage pour une connexion via un proxy
- Deposit of XCFA: 4.2.2~beta2
- Codage reaffichage du spectre en mode play : gain de temps pour le CPU
- Modification codage Gestion Proxy. Tests by @Gounlaf
- Deposit of XCFA: 4.2.2~beta3
- Deposit of XCFA: 4.2.2~beta4
- Modification codage affichage du spectre en mode play : gain de temps pour le CPU
- Deposit of XCFA: 4.2.2~beta5
- Modification codage Gestion Proxy. Tests by @Gounlaf
- Deposit of XCFA: 4.2.2~beta6
- Correctif Gestion Proxy
- Deposit of XCFA: 4.2.2~beta7
- Correctif Gestion Proxy. Tests by @Gounlaf
- Correctif rafraichissement curseur lecture du spectre
- Deposit of XCFA: 4.2.2~beta8
- Ajout dans onglet CD du choix parmis les differentes bases de donnees pour le CD.
- Deposit of XCFA: 4.2.2~beta9
- Correctif module cddb.c
- Deposit of XCFA: 4.2.2~beta11
========================================
| 4.2.1 |
| 4.2.1~beta0 .. 4.2.1~beta1 |
========================================
- Nettoyage structures fichiers H et C
- @LeDub: Depuis "CD->Gestion des tags...": Resolution d'une insertion d'une eperluette ( & )
- Correction eperluette ( & ) File->modification_nom_fichier
- Deposit of XCFA: 4.2.1~beta0
- recodage de configuser.c
- Deposit of XCFA: 4.2.1~beta1
- Deposit of XCFA: 4.2.1
========================================
| 4.2.0 |
| 4.2.0~beta0 .. 4.2.0~beta5 |
========================================
- CAIRO library integration for the tab Pocket
o See: http://www.xcfa.tuxfamily.org/index.php?article8/coder-avec-cairo
- Deposit of XCFA: 4.2.0~beta1
- Roland: Intégration d'une possibilité de jouer une musique en fin de tâche
- Deposit of XCFA: 4.2.0~beta2
- correctif pour l'internationalisation
- Deposit of XCFA: 4.2.0~beta3
- la reconnaissance des entetes de fichiers ne fait (presque) plus appel a la commande 'file'
qui est capricieuse suivant les distributions Gnu/Linux :/
- Deposit of XCFA: 4.2.0~beta4
- correctif ReplayGain et extraction-cd
- Deposit of XCFA: 4.2.0~beta5
- Deposit of XCFA: 4.2.0
========================================
| 4.1.0 |
| 4.1.0~beta0 |
========================================
- rewrite of the module popup_systray.c
- @gounlaf: Restitution correcte du parametre de debit des preferences pour le format mp3
- Fixed Drag & Drop from the File tab to export files
- @soupaloignon: modification de 'License' en 'Licence' dans fr.po
- Deposit of XCFA: 4.1.0~beta0
- Deposit of XCFA: 4.1.0
========================================
| 4.0.9 |
| 4.0.9~beta0 |
========================================
- Modification sur le test de presence de [ icedax et/ou cdda2wav ] pour les distribution n'incluant pas icedax
- Deposit of XCFA: 4.0.9 et 4.0.9~beta0
========================================
| 4.0.8 |
| 4.0.8~beta0 .. 4.0.8~beta1 |
========================================
- In split: Added refresh after a zoom with [ Crtl + Scroll ]
- Deposit of XCFA: 4.0.8~beta0
- Deposit of XCFA: 4.0.8 et 4.0.8~beta1
========================================
| 4.0.7 |
| 4.0.7~beta0 .. 4.0.7~beta4 |
========================================
- Complete rewrite of the module split: synchronization scroll and display
- Codage messages de la StatusBar
- Debug combobox choix dvd
- Deposit of XCFA: 4.0.7~beta2
- Correction utf8 module file.c
- Deposit of XCFA: 4.0.7~beta3
- Ajout importation du format WMA dans l'onglet Split
- Deposit of XCFA: 4.0.7 et 4.0.7~beta4
========================================
| 4.0.6 |
| 4.0.6~beta0 .. 4.0.6~beta1 |
========================================
- Fabrice: Récupération correcte des information du CD lors d'une non connexion ou si aucune base n'existe.
- Brett Cornwall
o Reecriture du manpage
- [ Hurd ] Problème avec ESTRPIPE qui n'existe pas sous hurd !
o solved with code [ #ifdef ESTRPIPE ]
- Deposit of XCFA
========================================
| 4.0.5 |
| 4.0.5~beta0 .. 4.0.5~beta3 |
========================================
- Creation des fichiers de traduction en_GB.po et nl.po
- Acces correct à la lecture d'un fichier contenant une structure de type dvd
- BUG: Debian Bug report logs - #618972 [ http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=618972 ]
o kfreebsd: module [ cd_cddb.c ]
o Abandon de ioctl.h et cdrom.h qui sont remplaces par LIBCDIO
o hurd: module [ alsa_audio.c ]
o Ajout de errno.h qui définit la variable ESTRPIPE
- Deposit of XCFA
========================================
| 4.0.4 |
| 4.0.4~beta1 .. 4.0.4~beta9 |
========================================
- Ajout d'une icône dans la barre de tâche:
o popup_systray.c -> PopupSystray_init ()
- Adaptation de xcfa.glade sous Debian Squeeze avec glade 3.6.7 : l'utilisation de gtk-builder-convert n'est plus necessaire
- @Tetsumaki : Ajout fonction depuis [ CD->Arrangement des titres du CD ]
o %Tl ( Tetsumaki lower ): Toutes les lettres du titres CD en minuscule sauf la premiere.
o Le ou les caracteres devant être conserves doivent être precedes par %
- @marnux : Correction suite a plantage lecture cd-audio
- @marnux : Correction de l'analyse de l'entree AUTEUR / TITRE_ALBUM avec suppression du slash.
- Depuis [ CD->Arrangement des titres du CD ], possibilite de redefinition des tags %a et %b
%a ou %a="Artiste"
%b ou %a="Album"
- @Gounlaf : extraction wav -> mp3 -> fail (fichiers trop petits en faits)
o Il s'agissait simplement d'un temps d'attente obligatoire juste apres une operation de [ NORMALISE_EXEC Wav -> PEAK/GROUP ]
qui etait sense etre prit en compte par la fonction g_usleep() que j'ai tres simplement remplace par sleep() qui fait
nettement mieux son boulot.
- Suppression de l'alerte indiquant l'absence du paquet LIBNOTIFY-BIN
- @manuker: Correction suite à lecture de mauvais entête de fichier wav. C'est ici ...
- Correction de l'appel de mpcenc pour une conversion de format
- Amelioration de la reconnaissance de l'entête de fichier au format mpc
- @zzero79 : Possibilte d'insertion de caracteres accentues dans un nom de dossiers pour une extraction.
- Remplacement partiel de Icedax par LIBCURL
o Correspondance correcte des genres de l'onglet CD
o Ajout d'un menu de selection par genre (folk, rock, ...)
o Depuis la version 4.0.4~beta6, le fichier modifie de icedax n'est plus necessaire.
- Remplacement de LIBCURL par LIBCDDB
- Correction de la lecture du DataTrack depuis icedax
- A la demande de @mdos, creation d'une nouvelle fonction permettant de supprimer tous les accents dans les
titres de fichiers depuis l'onglet CD. Je me suis inspire le l'algo.: Ignorer les diacritiques de FreetuxTV.
- Deposit of XCFA
========================================
| 4.0.3 |
| 4.0.3~beta1 .. 4.0.3~beta2 |
========================================
- Reconnaissance de yaourt et pacman sous ArchLinux pour affichage type de paquet depuis l'onglet > Applications Externes
- @Didier : Choix des parametres:
o cddbp-server=servername : definit le serveur a contacter pour les recherches titre
o cddbp-port=portnumber : definit le nombre de port a utiliser pour les recherches titre
- @Leonux: l'utilitaire txt2html n'est pas present sous FrugalWare :/
o Suppression de l'utilisation de l'utilitaire txt2html qui est remplace par quelques lignes de codes en C.
- Avertissement si xcfa est utilise sous root
- Deposit of XCFA
========================================
| 4.0.2 |
| 4.0.2~beta1 |
========================================
- @Tetsumaki : demande de modification de: [ $HOME/.config/xcfa_new/ ] en [ $HOME/.config/xcfa/ ]
- Debug correct du freeze sous ArchLinux
- Debug d'un mauvais type depuis file_analyse.c
- Deposit of XCFA
========================================
| 4.0.1 |
| 4.0.1~beta3 |
========================================
- @Marillat_Christian: Probleme de compil sous KFreeBSD
#ifdef __FreeBSD_kernel__
#include
if( err == -BSM_ERRNO_ESTRPIPE) {
#else
if( err == -ESTRPIPE) {
#endif
- Suppression de l'utilisation des wXXcodecs pour mplayer
- Debug (temporaire/passif) d'un freeze sous ARCHLINUX avec @Tetsumaki
- Deposit of XCFA
========================================
| 4.0.0 |
| 4.0.0~beta1 .. 4.0.0~beta22 |
========================================
- creation d'un nouveau squelette avec 'basebuild'
- redefinition integrale du fichier glade
- .
- ..
- ...
- les conversions sont ok avec le trash
- popup ajoutes
- traduction FR ok
- TST: @zarer: tests paquet deb
- mise a jour de configure.in via autoscan
- @zarer: ajout d'une selection automatique de lignes apres un chargement de fichiers
- affichage des images dans le selecteur d'images depuis onglet pochette
- remplacement de TIME SIZE par Temps Taille
- Les modifications de noms dvd et fichiers sont indiques en couleur rouge
- integration d'une lecture de plusieurs fichiers depuis le bureau
- correction reconnaissance mp3 avec: MP3 file OU MPEG ADTS, layer III OU MP3 encoding OU XWD X Window Dump image dat
- correction code DragAndDop avec une liberation correcte de chaine precedemment allouee
- TST: @leonux: tests paquet rpm apres conversion avec alien
- Indication du nombre maximal de normalisations possibles depuis Fichiers->Conversions
o La taille du buffer statique de pointeurs est actuellement egal a 200
- Bascule dans l'onglet Fichiers->Conversions si un download de fichiers est fait depuis le bureau
- @zarer: completer le manpage qui est vide
- Laurent : gestion utf8 a completer fichier 'file_tags.c"
- Modification url pour le site de Christophe:
o http://www.road2mayotte.org/blook/
- @zarer: bug conversion ogg vers mp3 resolu
- @patachonf : reconnaissance fichier APE
- amelioration reconnaissance fichiers MP3
- Modification de l'url pour Frugalware a la demande de @Devil505
- @Hizoka: Inclusion du format AC3 en decompression depuis l'onglet 'Fichiers' : Ok dans la b21
- Gestion des accents dans l'onglet Pochette pour le PostScript: Ok dans la b22
- @leonux : codage de bulles d'aide
- Guillaume : s'occupe de la traduction en Italien
o it.po - OK - Merci Guillaume :D
- completer les traductions: en.po et de.po puis passer le relais
o en.po - OK - Thank you very much Gerry Butlter :D
o de.po - OK
- TODO: completer parametres pour le navigateur
- TODO: codage onglet Split
o Alsa est utilise pour la lecture
o Conversion vers WAV suite a importation de WAV FLAC OGG MP3 APE
o Adaptation du code de lecture de fichier wav trouve depuis high-geek.com
Mon ajout de modification du code est en rapport avec la partie “data subchunk” qui n’est pas forcement tout de suite derriere le “fmt subchunk” :/
Ref: tags.h et tags_wav.c
o Rectification erreur de chevauchement de plage: Ok dans la b21
o Probleme de conversion sous Squeeze avec SOX: Ok dans la b20
o Reconnaissance des fichiers AC3 pour ne plus interferer avec les MP3: Ok dans la b21
o TODO: Undo
o TODO: Importation de formats supplementaires (en cours ...)
- Deposit of XCFA
xcfa-4.3.6/missing 0000755 0001750 0001750 00000025577 11400750713 011003 0000000 0000000 #! /bin/sh
# Common stub for a few missing GNU programs while installing.
scriptversion=2006-05-10.23
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006
# Free Software Foundation, Inc.
# Originally by Fran,cois Pinard , 1996.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
if test $# -eq 0; then
echo 1>&2 "Try \`$0 --help' for more information"
exit 1
fi
run=:
sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
# In the cases where this matters, `missing' is being run in the
# srcdir already.
if test -f configure.ac; then
configure_ac=configure.ac
else
configure_ac=configure.in
fi
msg="missing on your system"
case $1 in
--run)
# Try to run requested program, and just exit if it succeeds.
run=
shift
"$@" && exit 0
# Exit code 63 means version mismatch. This often happens
# when the user try to use an ancient version of a tool on
# a file that requires a minimum version. In this case we
# we should proceed has if the program had been absent, or
# if --run hadn't been passed.
if test $? = 63; then
run=:
msg="probably too old"
fi
;;
-h|--h|--he|--hel|--help)
echo "\
$0 [OPTION]... PROGRAM [ARGUMENT]...
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
error status if there is no known handling for PROGRAM.
Options:
-h, --help display this help and exit
-v, --version output version information and exit
--run try to run the given command, and emulate it if it fails
Supported PROGRAM values:
aclocal touch file \`aclocal.m4'
autoconf touch file \`configure'
autoheader touch file \`config.h.in'
autom4te touch the output file, or create a stub one
automake touch all \`Makefile.in' files
bison create \`y.tab.[ch]', if possible, from existing .[ch]
flex create \`lex.yy.c', if possible, from existing .c
help2man touch the output file
lex create \`lex.yy.c', if possible, from existing .c
makeinfo touch the output file
tar try tar, gnutar, gtar, then tar without non-portable flags
yacc create \`y.tab.[ch]', if possible, from existing .[ch]
Send bug reports to ."
exit $?
;;
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
echo "missing $scriptversion (GNU Automake)"
exit $?
;;
-*)
echo 1>&2 "$0: Unknown \`$1' option"
echo 1>&2 "Try \`$0 --help' for more information"
exit 1
;;
esac
# Now exit if we have it, but it failed. Also exit now if we
# don't have it and --version was passed (most likely to detect
# the program).
case $1 in
lex|yacc)
# Not GNU programs, they don't have --version.
;;
tar)
if test -n "$run"; then
echo 1>&2 "ERROR: \`tar' requires --run"
exit 1
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
exit 1
fi
;;
*)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
# Could not run --version or --help. This is probably someone
# running `$TOOL --version' or `$TOOL --help' to check whether
# $TOOL exists and not knowing $TOOL uses missing.
exit 1
fi
;;
esac
# If it does not exist, or fails to run (possibly an outdated version),
# try to emulate it.
case $1 in
aclocal*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
to install the \`Automake' and \`Perl' packages. Grab them from
any GNU archive site."
touch aclocal.m4
;;
autoconf)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`${configure_ac}'. You might want to install the
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
archive site."
touch configure
;;
autoheader)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`acconfig.h' or \`${configure_ac}'. You might want
to install the \`Autoconf' and \`GNU m4' packages. Grab them
from any GNU archive site."
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
test -z "$files" && files="config.h"
touch_files=
for f in $files; do
case $f in
*:*) touch_files="$touch_files "`echo "$f" |
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
*) touch_files="$touch_files $f.in";;
esac
done
touch $touch_files
;;
automake*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
You might want to install the \`Automake' and \`Perl' packages.
Grab them from any GNU archive site."
find . -type f -name Makefile.am -print |
sed 's/\.am$/.in/' |
while read f; do touch "$f"; done
;;
autom4te)
echo 1>&2 "\
WARNING: \`$1' is needed, but is $msg.
You might have modified some files without having the
proper tools for further handling them.
You can get \`$1' as part of \`Autoconf' from any GNU
archive site."
file=`echo "$*" | sed -n "$sed_output"`
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
if test -f "$file"; then
touch $file
else
test -z "$file" || exec >$file
echo "#! /bin/sh"
echo "# Created by GNU Automake missing as a replacement of"
echo "# $ $@"
echo "exit 0"
chmod +x $file
exit 1
fi
;;
bison|yacc)
echo 1>&2 "\
WARNING: \`$1' $msg. You should only need it if
you modified a \`.y' file. You may need the \`Bison' package
in order for those modifications to take effect. You can get
\`Bison' from any GNU archive site."
rm -f y.tab.c y.tab.h
if test $# -ne 1; then
eval LASTARG="\${$#}"
case $LASTARG in
*.y)
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
if test -f "$SRCFILE"; then
cp "$SRCFILE" y.tab.c
fi
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
if test -f "$SRCFILE"; then
cp "$SRCFILE" y.tab.h
fi
;;
esac
fi
if test ! -f y.tab.h; then
echo >y.tab.h
fi
if test ! -f y.tab.c; then
echo 'main() { return 0; }' >y.tab.c
fi
;;
lex|flex)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified a \`.l' file. You may need the \`Flex' package
in order for those modifications to take effect. You can get
\`Flex' from any GNU archive site."
rm -f lex.yy.c
if test $# -ne 1; then
eval LASTARG="\${$#}"
case $LASTARG in
*.l)
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
if test -f "$SRCFILE"; then
cp "$SRCFILE" lex.yy.c
fi
;;
esac
fi
if test ! -f lex.yy.c; then
echo 'main() { return 0; }' >lex.yy.c
fi
;;
help2man)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified a dependency of a manual page. You may need the
\`Help2man' package in order for those modifications to take
effect. You can get \`Help2man' from any GNU archive site."
file=`echo "$*" | sed -n "$sed_output"`
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
if test -f "$file"; then
touch $file
else
test -z "$file" || exec >$file
echo ".ab help2man is required to generate this page"
exit 1
fi
;;
makeinfo)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified a \`.texi' or \`.texinfo' file, or any other file
indirectly affecting the aspect of the manual. The spurious
call might also be the consequence of using a buggy \`make' (AIX,
DU, IRIX). You might want to install the \`Texinfo' package or
the \`GNU make' package. Grab either from any GNU archive site."
# The file to touch is that specified with -o ...
file=`echo "$*" | sed -n "$sed_output"`
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
if test -z "$file"; then
# ... or it is the one specified with @setfilename ...
infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
file=`sed -n '
/^@setfilename/{
s/.* \([^ ]*\) *$/\1/
p
q
}' $infile`
# ... or it is derived from the source name (dir/f.texi becomes f.info)
test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
fi
# If the file does not exist, the user really needs makeinfo;
# let's fail without touching anything.
test -f $file || exit 1
touch $file
;;
tar)
shift
# We have already tried tar in the generic part.
# Look for gnutar/gtar before invocation to avoid ugly error
# messages.
if (gnutar --version > /dev/null 2>&1); then
gnutar "$@" && exit 0
fi
if (gtar --version > /dev/null 2>&1); then
gtar "$@" && exit 0
fi
firstarg="$1"
if shift; then
case $firstarg in
*o*)
firstarg=`echo "$firstarg" | sed s/o//`
tar "$firstarg" "$@" && exit 0
;;
esac
case $firstarg in
*h*)
firstarg=`echo "$firstarg" | sed s/h//`
tar "$firstarg" "$@" && exit 0
;;
esac
fi
echo 1>&2 "\
WARNING: I can't seem to be able to run \`tar' with the given arguments.
You may want to install GNU tar or Free paxutils, or check the
command line arguments."
exit 1
;;
*)
echo 1>&2 "\
WARNING: \`$1' is needed, and is $msg.
You might have modified some files without having the
proper tools for further handling them. Check the \`README' file,
it often tells you about the needed prerequisites for installing
this package. You may also peek at any GNU archive site, in case
some other package would contain this missing \`$1' program."
exit 1
;;
esac
exit 0
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:
xcfa-4.3.6/AUTHORS 0000644 0001750 0001750 00000000031 11427113023 010422 0000000 0000000 B U L I N Claude - fr
xcfa-4.3.6/configure 0000755 0001750 0001750 00001267263 12224542370 011317 0000000 0000000 #! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.67 for xcfa 4.3.6.
#
# Report bugs to .
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
# Foundation, Inc.
#
#
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
## -------------------- ##
## M4sh Initialization. ##
## -------------------- ##
# Be more Bourne compatible
DUALCASE=1; export DUALCASE # for MKS sh
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
emulate sh
NULLCMD=:
# Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
setopt NO_GLOB_SUBST
else
case `(set -o) 2>/dev/null` in #(
*posix*) :
set -o posix ;; #(
*) :
;;
esac
fi
as_nl='
'
export as_nl
# Printing a long string crashes Solaris 7 /usr/bin/printf.
as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
# Prefer a ksh shell builtin over an external printf program on Solaris,
# but without wasting forks for bash or zsh.
if test -z "$BASH_VERSION$ZSH_VERSION" \
&& (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
as_echo='print -r --'
as_echo_n='print -rn --'
elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
as_echo='printf %s\n'
as_echo_n='printf %s'
else
if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
as_echo_n='/usr/ucb/echo -n'
else
as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
as_echo_n_body='eval
arg=$1;
case $arg in #(
*"$as_nl"*)
expr "X$arg" : "X\\(.*\\)$as_nl";
arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
esac;
expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
'
export as_echo_n_body
as_echo_n='sh -c $as_echo_n_body as_echo'
fi
export as_echo_body
as_echo='sh -c $as_echo_body as_echo'
fi
# The user is always right.
if test "${PATH_SEPARATOR+set}" != set; then
PATH_SEPARATOR=:
(PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
(PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
PATH_SEPARATOR=';'
}
fi
# IFS
# We need space, tab and new line, in precisely that order. Quoting is
# there to prevent editors from complaining about space-tab.
# (If _AS_PATH_WALK were called with IFS unset, it would disable word
# splitting by setting IFS to empty value.)
IFS=" "" $as_nl"
# Find who we are. Look in the path if we contain no directory separator.
case $0 in #((
*[\\/]* ) as_myself=$0 ;;
*) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
done
IFS=$as_save_IFS
;;
esac
# We did not find ourselves, most probably we were run as `sh COMMAND'
# in which case we are not to be found in the path.
if test "x$as_myself" = x; then
as_myself=$0
fi
if test ! -f "$as_myself"; then
$as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
exit 1
fi
# Unset variables that we do not need and which cause bugs (e.g. in
# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
# suppresses any "Segmentation fault" message there. '((' could
# trigger a bug in pdksh 5.2.14.
for as_var in BASH_ENV ENV MAIL MAILPATH
do eval test x\${$as_var+set} = xset \
&& ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
done
PS1='$ '
PS2='> '
PS4='+ '
# NLS nuisances.
LC_ALL=C
export LC_ALL
LANGUAGE=C
export LANGUAGE
# CDPATH.
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
if test "x$CONFIG_SHELL" = x; then
as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
emulate sh
NULLCMD=:
# Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
# is contrary to our usage. Disable this feature.
alias -g '\${1+\"\$@\"}'='\"\$@\"'
setopt NO_GLOB_SUBST
else
case \`(set -o) 2>/dev/null\` in #(
*posix*) :
set -o posix ;; #(
*) :
;;
esac
fi
"
as_required="as_fn_return () { (exit \$1); }
as_fn_success () { as_fn_return 0; }
as_fn_failure () { as_fn_return 1; }
as_fn_ret_success () { return 0; }
as_fn_ret_failure () { return 1; }
exitcode=0
as_fn_success || { exitcode=1; echo as_fn_success failed.; }
as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
else
exitcode=1; echo positional parameters were not saved.
fi
test x\$exitcode = x0 || exit 1"
as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
test \$(( 1 + 1 )) = 2 || exit 1"
if (eval "$as_required") 2>/dev/null; then :
as_have_required=yes
else
as_have_required=no
fi
if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
as_found=false
for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
as_found=:
case $as_dir in #(
/*)
for as_base in sh bash ksh sh5; do
# Try only shells that exist, to save several forks.
as_shell=$as_dir/$as_base
if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
{ $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
CONFIG_SHELL=$as_shell as_have_required=yes
if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
break 2
fi
fi
done;;
esac
as_found=false
done
$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
{ $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
CONFIG_SHELL=$SHELL as_have_required=yes
fi; }
IFS=$as_save_IFS
if test "x$CONFIG_SHELL" != x; then :
# We cannot yet assume a decent shell, so we have to provide a
# neutralization value for shells without unset; and this also
# works around shells that cannot unset nonexistent variables.
BASH_ENV=/dev/null
ENV=/dev/null
(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
export CONFIG_SHELL
exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
fi
if test x$as_have_required = xno; then :
$as_echo "$0: This script requires a shell more modern than all"
$as_echo "$0: the shells that I found on your system."
if test x${ZSH_VERSION+set} = xset ; then
$as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
$as_echo "$0: be upgraded to zsh 4.3.4 or later."
else
$as_echo "$0: Please tell bug-autoconf@gnu.org and
$0: http://www.xcfa.tuxfamily.org/ about your system,
$0: including any error possibly output before this
$0: message. Then install a modern shell, or manually run
$0: the script under such a shell if you do have one."
fi
exit 1
fi
fi
fi
SHELL=${CONFIG_SHELL-/bin/sh}
export SHELL
# Unset more variables known to interfere with behavior of common tools.
CLICOLOR_FORCE= GREP_OPTIONS=
unset CLICOLOR_FORCE GREP_OPTIONS
## --------------------- ##
## M4sh Shell Functions. ##
## --------------------- ##
# as_fn_unset VAR
# ---------------
# Portably unset VAR.
as_fn_unset ()
{
{ eval $1=; unset $1;}
}
as_unset=as_fn_unset
# as_fn_set_status STATUS
# -----------------------
# Set $? to STATUS, without forking.
as_fn_set_status ()
{
return $1
} # as_fn_set_status
# as_fn_exit STATUS
# -----------------
# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
as_fn_exit ()
{
set +e
as_fn_set_status $1
exit $1
} # as_fn_exit
# as_fn_mkdir_p
# -------------
# Create "$as_dir" as a directory, including parents if necessary.
as_fn_mkdir_p ()
{
case $as_dir in #(
-*) as_dir=./$as_dir;;
esac
test -d "$as_dir" || eval $as_mkdir_p || {
as_dirs=
while :; do
case $as_dir in #(
*\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
*) as_qdir=$as_dir;;
esac
as_dirs="'$as_qdir' $as_dirs"
as_dir=`$as_dirname -- "$as_dir" ||
$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$as_dir" : 'X\(//\)[^/]' \| \
X"$as_dir" : 'X\(//\)$' \| \
X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
$as_echo X"$as_dir" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
}
/^X\(\/\/\)[^/].*/{
s//\1/
q
}
/^X\(\/\/\)$/{
s//\1/
q
}
/^X\(\/\).*/{
s//\1/
q
}
s/.*/./; q'`
test -d "$as_dir" && break
done
test -z "$as_dirs" || eval "mkdir $as_dirs"
} || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
} # as_fn_mkdir_p
# as_fn_append VAR VALUE
# ----------------------
# Append the text in VALUE to the end of the definition contained in VAR. Take
# advantage of any shell optimizations that allow amortized linear growth over
# repeated appends, instead of the typical quadratic growth present in naive
# implementations.
if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
eval 'as_fn_append ()
{
eval $1+=\$2
}'
else
as_fn_append ()
{
eval $1=\$$1\$2
}
fi # as_fn_append
# as_fn_arith ARG...
# ------------------
# Perform arithmetic evaluation on the ARGs, and store the result in the
# global $as_val. Take advantage of shells that can avoid forks. The arguments
# must be portable across $(()) and expr.
if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
eval 'as_fn_arith ()
{
as_val=$(( $* ))
}'
else
as_fn_arith ()
{
as_val=`expr "$@" || test $? -eq 1`
}
fi # as_fn_arith
# as_fn_error STATUS ERROR [LINENO LOG_FD]
# ----------------------------------------
# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
# script with STATUS, using 1 if that was 0.
as_fn_error ()
{
as_status=$1; test $as_status -eq 0 && as_status=1
if test "$4"; then
as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
$as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
fi
$as_echo "$as_me: error: $2" >&2
as_fn_exit $as_status
} # as_fn_error
if expr a : '\(a\)' >/dev/null 2>&1 &&
test "X`expr 00001 : '.*\(...\)'`" = X001; then
as_expr=expr
else
as_expr=false
fi
if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
as_basename=basename
else
as_basename=false
fi
if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
as_dirname=dirname
else
as_dirname=false
fi
as_me=`$as_basename -- "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
X"$0" : 'X\(//\)$' \| \
X"$0" : 'X\(/\)' \| . 2>/dev/null ||
$as_echo X/"$0" |
sed '/^.*\/\([^/][^/]*\)\/*$/{
s//\1/
q
}
/^X\/\(\/\/\)$/{
s//\1/
q
}
/^X\/\(\/\).*/{
s//\1/
q
}
s/.*/./; q'`
# Avoid depending upon Character Ranges.
as_cr_letters='abcdefghijklmnopqrstuvwxyz'
as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
as_cr_Letters=$as_cr_letters$as_cr_LETTERS
as_cr_digits='0123456789'
as_cr_alnum=$as_cr_Letters$as_cr_digits
as_lineno_1=$LINENO as_lineno_1a=$LINENO
as_lineno_2=$LINENO as_lineno_2a=$LINENO
eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
# Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
sed -n '
p
/[$]LINENO/=
' <$as_myself |
sed '
s/[$]LINENO.*/&-/
t lineno
b
:lineno
N
:loop
s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
t loop
s/-\n.*//
' >$as_me.lineno &&
chmod +x "$as_me.lineno" ||
{ $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
# Don't try to exec as it changes $[0], causing all sort of problems
# (the dirname of $[0] is not the place where we might find the
# original and so on. Autoconf is especially sensitive to this).
. "./$as_me.lineno"
# Exit status is that of the last command.
exit
}
ECHO_C= ECHO_N= ECHO_T=
case `echo -n x` in #(((((
-n*)
case `echo 'xy\c'` in
*c*) ECHO_T=' ';; # ECHO_T is single tab character.
xy) ECHO_C='\c';;
*) echo `echo ksh88 bug on AIX 6.1` > /dev/null
ECHO_T=' ';;
esac;;
*)
ECHO_N='-n';;
esac
rm -f conf$$ conf$$.exe conf$$.file
if test -d conf$$.dir; then
rm -f conf$$.dir/conf$$.file
else
rm -f conf$$.dir
mkdir conf$$.dir 2>/dev/null
fi
if (echo >conf$$.file) 2>/dev/null; then
if ln -s conf$$.file conf$$ 2>/dev/null; then
as_ln_s='ln -s'
# ... but there are two gotchas:
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
# In both cases, we have to default to `cp -p'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
as_ln_s='cp -p'
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
as_ln_s='cp -p'
fi
else
as_ln_s='cp -p'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null
if mkdir -p . 2>/dev/null; then
as_mkdir_p='mkdir -p "$as_dir"'
else
test -d ./-p && rmdir ./-p
as_mkdir_p=false
fi
if test -x / >/dev/null 2>&1; then
as_test_x='test -x'
else
if ls -dL / >/dev/null 2>&1; then
as_ls_L_option=L
else
as_ls_L_option=
fi
as_test_x='
eval sh -c '\''
if test -d "$1"; then
test -d "$1/.";
else
case $1 in #(
-*)set "./$1";;
esac;
case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
???[sx]*):;;*)false;;esac;fi
'\'' sh
'
fi
as_executable_p=$as_test_x
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
# Sed expression to map a string onto a valid variable name.
as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
test -n "$DJDIR" || exec 7<&0 &1
# Name of the host.
# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
# so uname gets run too.
ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
#
# Initializations.
#
ac_default_prefix=/usr/local
ac_clean_files=
ac_config_libobj_dir=.
LIBOBJS=
cross_compiling=no
subdirs=
MFLAGS=
MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='xcfa'
PACKAGE_TARNAME='xcfa'
PACKAGE_VERSION='4.3.6'
PACKAGE_STRING='xcfa 4.3.6'
PACKAGE_BUGREPORT='http://www.xcfa.tuxfamily.org/'
PACKAGE_URL='http://www.xcfa.tuxfamily.org/'
ac_unique_file="src/main.c"
ac_default_prefix=/usr/local
gt_needs=
# Factoring default headers for most tests.
ac_includes_default="\
#include
#ifdef HAVE_SYS_TYPES_H
# include
#endif
#ifdef HAVE_SYS_STAT_H
# include
#endif
#ifdef STDC_HEADERS
# include
# include
#else
# ifdef HAVE_STDLIB_H
# include
# endif
#endif
#ifdef HAVE_STRING_H
# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
# include
# endif
# include
#endif
#ifdef HAVE_STRINGS_H
# include
#endif
#ifdef HAVE_INTTYPES_H
# include
#endif
#ifdef HAVE_STDINT_H
# include
#endif
#ifdef HAVE_UNISTD_H
# include
#endif"
ac_subst_vars='am__EXEEXT_FALSE
am__EXEEXT_TRUE
LTLIBOBJS
PACKAGE_LIBS
PACKAGE_CFLAGS
PKG_CONFIG_LIBDIR
PKG_CONFIG_PATH
PKG_CONFIG
LIBOBJS
GETTEXT_PACKAGE
POSUB
LTLIBINTL
LIBINTL
INTLLIBS
LTLIBICONV
LIBICONV
INTL_MACOSX_LIBS
EGREP
GREP
host_os
host_vendor
host_cpu
host
build_os
build_vendor
build_cpu
build
XGETTEXT_EXTRA_OPTIONS
MSGMERGE
XGETTEXT_015
XGETTEXT
GMSGFMT_015
MSGFMT_015
GMSGFMT
MSGFMT
GETTEXT_MACRO_VERSION
USE_NLS
INSTALL_PREFIX
RANLIB
XMKMF
CPP
am__fastdepCC_FALSE
am__fastdepCC_TRUE
CCDEPMODE
ac_ct_CC
CFLAGS
CC
am__fastdepCXX_FALSE
am__fastdepCXX_TRUE
CXXDEPMODE
AMDEPBACKSLASH
AMDEP_FALSE
AMDEP_TRUE
am__quote
am__include
DEPDIR
OBJEXT
EXEEXT
ac_ct_CXX
CPPFLAGS
LDFLAGS
CXXFLAGS
CXX
AM_BACKSLASH
AM_DEFAULT_VERBOSITY
am__untar
am__tar
AMTAR
am__leading_dot
SET_MAKE
AWK
mkdir_p
MKDIR_P
INSTALL_STRIP_PROGRAM
STRIP
install_sh
MAKEINFO
AUTOHEADER
AUTOMAKE
AUTOCONF
ACLOCAL
VERSION
PACKAGE
CYGPATH_W
am__isrc
INSTALL_DATA
INSTALL_SCRIPT
INSTALL_PROGRAM
target_alias
host_alias
build_alias
LIBS
ECHO_T
ECHO_N
ECHO_C
DEFS
mandir
localedir
libdir
psdir
pdfdir
dvidir
htmldir
infodir
docdir
oldincludedir
includedir
localstatedir
sharedstatedir
sysconfdir
datadir
datarootdir
libexecdir
sbindir
bindir
program_transform_name
prefix
exec_prefix
PACKAGE_URL
PACKAGE_BUGREPORT
PACKAGE_STRING
PACKAGE_VERSION
PACKAGE_TARNAME
PACKAGE_NAME
PATH_SEPARATOR
SHELL'
ac_subst_files=''
ac_user_opts='
enable_option_checking
enable_silent_rules
enable_dependency_tracking
with_x
enable_nls
with_gnu_ld
enable_rpath
with_libiconv_prefix
with_libintl_prefix
enable_debug_pg
enable_debug
enable_ansi
'
ac_precious_vars='build_alias
host_alias
target_alias
CXX
CXXFLAGS
LDFLAGS
LIBS
CPPFLAGS
CCC
CC
CFLAGS
CPP
XMKMF
PKG_CONFIG
PKG_CONFIG_PATH
PKG_CONFIG_LIBDIR
PACKAGE_CFLAGS
PACKAGE_LIBS'
# Initialize some variables set by options.
ac_init_help=
ac_init_version=false
ac_unrecognized_opts=
ac_unrecognized_sep=
# The variables have the same names as the options, with
# dashes changed to underlines.
cache_file=/dev/null
exec_prefix=NONE
no_create=
no_recursion=
prefix=NONE
program_prefix=NONE
program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
srcdir=
verbose=
x_includes=NONE
x_libraries=NONE
# Installation directory options.
# These are left unexpanded so users can "make install exec_prefix=/foo"
# and all the variables that are supposed to be based on exec_prefix
# by default will actually change.
# Use braces instead of parens because sh, perl, etc. also accept them.
# (The list follows the same order as the GNU Coding Standards.)
bindir='${exec_prefix}/bin'
sbindir='${exec_prefix}/sbin'
libexecdir='${exec_prefix}/libexec'
datarootdir='${prefix}/share'
datadir='${datarootdir}'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
includedir='${prefix}/include'
oldincludedir='/usr/include'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
infodir='${datarootdir}/info'
htmldir='${docdir}'
dvidir='${docdir}'
pdfdir='${docdir}'
psdir='${docdir}'
libdir='${exec_prefix}/lib'
localedir='${datarootdir}/locale'
mandir='${datarootdir}/man'
ac_prev=
ac_dashdash=
for ac_option
do
# If the previous option needs an argument, assign it.
if test -n "$ac_prev"; then
eval $ac_prev=\$ac_option
ac_prev=
continue
fi
case $ac_option in
*=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
*=) ac_optarg= ;;
*) ac_optarg=yes ;;
esac
# Accept the important Cygnus configure options, so we can diagnose typos.
case $ac_dashdash$ac_option in
--)
ac_dashdash=yes ;;
-bindir | --bindir | --bindi | --bind | --bin | --bi)
ac_prev=bindir ;;
-bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bindir=$ac_optarg ;;
-build | --build | --buil | --bui | --bu)
ac_prev=build_alias ;;
-build=* | --build=* | --buil=* | --bui=* | --bu=*)
build_alias=$ac_optarg ;;
-cache-file | --cache-file | --cache-fil | --cache-fi \
| --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
ac_prev=cache_file ;;
-cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
| --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
cache_file=$ac_optarg ;;
--config-cache | -C)
cache_file=config.cache ;;
-datadir | --datadir | --datadi | --datad)
ac_prev=datadir ;;
-datadir=* | --datadir=* | --datadi=* | --datad=*)
datadir=$ac_optarg ;;
-datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
| --dataroo | --dataro | --datar)
ac_prev=datarootdir ;;
-datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
| --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
datarootdir=$ac_optarg ;;
-disable-* | --disable-*)
ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
as_fn_error $? "invalid feature name: $ac_useropt"
ac_useropt_orig=$ac_useropt
ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
*"
"enable_$ac_useropt"
"*) ;;
*) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
ac_unrecognized_sep=', ';;
esac
eval enable_$ac_useropt=no ;;
-docdir | --docdir | --docdi | --doc | --do)
ac_prev=docdir ;;
-docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
docdir=$ac_optarg ;;
-dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
ac_prev=dvidir ;;
-dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
dvidir=$ac_optarg ;;
-enable-* | --enable-*)
ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
as_fn_error $? "invalid feature name: $ac_useropt"
ac_useropt_orig=$ac_useropt
ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
*"
"enable_$ac_useropt"
"*) ;;
*) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
ac_unrecognized_sep=', ';;
esac
eval enable_$ac_useropt=\$ac_optarg ;;
-exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
| --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
| --exec | --exe | --ex)
ac_prev=exec_prefix ;;
-exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
| --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
| --exec=* | --exe=* | --ex=*)
exec_prefix=$ac_optarg ;;
-gas | --gas | --ga | --g)
# Obsolete; use --with-gas.
with_gas=yes ;;
-help | --help | --hel | --he | -h)
ac_init_help=long ;;
-help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
ac_init_help=recursive ;;
-help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
ac_init_help=short ;;
-host | --host | --hos | --ho)
ac_prev=host_alias ;;
-host=* | --host=* | --hos=* | --ho=*)
host_alias=$ac_optarg ;;
-htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
ac_prev=htmldir ;;
-htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
| --ht=*)
htmldir=$ac_optarg ;;
-includedir | --includedir | --includedi | --included | --include \
| --includ | --inclu | --incl | --inc)
ac_prev=includedir ;;
-includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
| --includ=* | --inclu=* | --incl=* | --inc=*)
includedir=$ac_optarg ;;
-infodir | --infodir | --infodi | --infod | --info | --inf)
ac_prev=infodir ;;
-infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
infodir=$ac_optarg ;;
-libdir | --libdir | --libdi | --libd)
ac_prev=libdir ;;
-libdir=* | --libdir=* | --libdi=* | --libd=*)
libdir=$ac_optarg ;;
-libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
| --libexe | --libex | --libe)
ac_prev=libexecdir ;;
-libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
| --libexe=* | --libex=* | --libe=*)
libexecdir=$ac_optarg ;;
-localedir | --localedir | --localedi | --localed | --locale)
ac_prev=localedir ;;
-localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
localedir=$ac_optarg ;;
-localstatedir | --localstatedir | --localstatedi | --localstated \
| --localstate | --localstat | --localsta | --localst | --locals)
ac_prev=localstatedir ;;
-localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
| --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
localstatedir=$ac_optarg ;;
-mandir | --mandir | --mandi | --mand | --man | --ma | --m)
ac_prev=mandir ;;
-mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
mandir=$ac_optarg ;;
-nfp | --nfp | --nf)
# Obsolete; use --without-fp.
with_fp=no ;;
-no-create | --no-create | --no-creat | --no-crea | --no-cre \
| --no-cr | --no-c | -n)
no_create=yes ;;
-no-recursion | --no-recursion | --no-recursio | --no-recursi \
| --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
no_recursion=yes ;;
-oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
| --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
| --oldin | --oldi | --old | --ol | --o)
ac_prev=oldincludedir ;;
-oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
| --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
| --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
oldincludedir=$ac_optarg ;;
-prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
ac_prev=prefix ;;
-prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
prefix=$ac_optarg ;;
-program-prefix | --program-prefix | --program-prefi | --program-pref \
| --program-pre | --program-pr | --program-p)
ac_prev=program_prefix ;;
-program-prefix=* | --program-prefix=* | --program-prefi=* \
| --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
program_prefix=$ac_optarg ;;
-program-suffix | --program-suffix | --program-suffi | --program-suff \
| --program-suf | --program-su | --program-s)
ac_prev=program_suffix ;;
-program-suffix=* | --program-suffix=* | --program-suffi=* \
| --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
program_suffix=$ac_optarg ;;
-program-transform-name | --program-transform-name \
| --program-transform-nam | --program-transform-na \
| --program-transform-n | --program-transform- \
| --program-transform | --program-transfor \
| --program-transfo | --program-transf \
| --program-trans | --program-tran \
| --progr-tra | --program-tr | --program-t)
ac_prev=program_transform_name ;;
-program-transform-name=* | --program-transform-name=* \
| --program-transform-nam=* | --program-transform-na=* \
| --program-transform-n=* | --program-transform-=* \
| --program-transform=* | --program-transfor=* \
| --program-transfo=* | --program-transf=* \
| --program-trans=* | --program-tran=* \
| --progr-tra=* | --program-tr=* | --program-t=*)
program_transform_name=$ac_optarg ;;
-pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
ac_prev=pdfdir ;;
-pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
pdfdir=$ac_optarg ;;
-psdir | --psdir | --psdi | --psd | --ps)
ac_prev=psdir ;;
-psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
psdir=$ac_optarg ;;
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil)
silent=yes ;;
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
| --sbi=* | --sb=*)
sbindir=$ac_optarg ;;
-sharedstatedir | --sharedstatedir | --sharedstatedi \
| --sharedstated | --sharedstate | --sharedstat | --sharedsta \
| --sharedst | --shareds | --shared | --share | --shar \
| --sha | --sh)
ac_prev=sharedstatedir ;;
-sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
| --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
| --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
| --sha=* | --sh=*)
sharedstatedir=$ac_optarg ;;
-site | --site | --sit)
ac_prev=site ;;
-site=* | --site=* | --sit=*)
site=$ac_optarg ;;
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
ac_prev=srcdir ;;
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
srcdir=$ac_optarg ;;
-sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
| --syscon | --sysco | --sysc | --sys | --sy)
ac_prev=sysconfdir ;;
-sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
| --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
sysconfdir=$ac_optarg ;;
-target | --target | --targe | --targ | --tar | --ta | --t)
ac_prev=target_alias ;;
-target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
target_alias=$ac_optarg ;;
-v | -verbose | --verbose | --verbos | --verbo | --verb)
verbose=yes ;;
-version | --version | --versio | --versi | --vers | -V)
ac_init_version=: ;;
-with-* | --with-*)
ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
as_fn_error $? "invalid package name: $ac_useropt"
ac_useropt_orig=$ac_useropt
ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
*"
"with_$ac_useropt"
"*) ;;
*) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
ac_unrecognized_sep=', ';;
esac
eval with_$ac_useropt=\$ac_optarg ;;
-without-* | --without-*)
ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
as_fn_error $? "invalid package name: $ac_useropt"
ac_useropt_orig=$ac_useropt
ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
*"
"with_$ac_useropt"
"*) ;;
*) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
ac_unrecognized_sep=', ';;
esac
eval with_$ac_useropt=no ;;
--x)
# Obsolete; use --with-x.
with_x=yes ;;
-x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
| --x-incl | --x-inc | --x-in | --x-i)
ac_prev=x_includes ;;
-x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
| --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
x_includes=$ac_optarg ;;
-x-libraries | --x-libraries | --x-librarie | --x-librari \
| --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
ac_prev=x_libraries ;;
-x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
| --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
x_libraries=$ac_optarg ;;
-*) as_fn_error $? "unrecognized option: \`$ac_option'
Try \`$0 --help' for more information"
;;
*=*)
ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
# Reject names that are not valid shell variable names.
case $ac_envvar in #(
'' | [0-9]* | *[!_$as_cr_alnum]* )
as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
esac
eval $ac_envvar=\$ac_optarg
export $ac_envvar ;;
*)
# FIXME: should be removed in autoconf 3.0.
$as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
$as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
: ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
;;
esac
done
if test -n "$ac_prev"; then
ac_option=--`echo $ac_prev | sed 's/_/-/g'`
as_fn_error $? "missing argument to $ac_option"
fi
if test -n "$ac_unrecognized_opts"; then
case $enable_option_checking in
no) ;;
fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
*) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
esac
fi
# Check all directory arguments for consistency.
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
datadir sysconfdir sharedstatedir localstatedir includedir \
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
libdir localedir mandir
do
eval ac_val=\$$ac_var
# Remove trailing slashes.
case $ac_val in
*/ )
ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
eval $ac_var=\$ac_val;;
esac
# Be sure to have absolute directory names.
case $ac_val in
[\\/$]* | ?:[\\/]* ) continue;;
NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
esac
as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
done
# There might be people who depend on the old broken behavior: `$host'
# used to hold the argument of --host etc.
# FIXME: To remove some day.
build=$build_alias
host=$host_alias
target=$target_alias
# FIXME: To remove some day.
if test "x$host_alias" != x; then
if test "x$build_alias" = x; then
cross_compiling=maybe
$as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
If a cross compiler is detected then cross compile mode will be used" >&2
elif test "x$build_alias" != "x$host_alias"; then
cross_compiling=yes
fi
fi
ac_tool_prefix=
test -n "$host_alias" && ac_tool_prefix=$host_alias-
test "$silent" = yes && exec 6>/dev/null
ac_pwd=`pwd` && test -n "$ac_pwd" &&
ac_ls_di=`ls -di .` &&
ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
as_fn_error $? "working directory cannot be determined"
test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
as_fn_error $? "pwd does not report name of working directory"
# Find the source files, if location was not specified.
if test -z "$srcdir"; then
ac_srcdir_defaulted=yes
# Try the directory containing this script, then the parent directory.
ac_confdir=`$as_dirname -- "$as_myself" ||
$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$as_myself" : 'X\(//\)[^/]' \| \
X"$as_myself" : 'X\(//\)$' \| \
X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
$as_echo X"$as_myself" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
}
/^X\(\/\/\)[^/].*/{
s//\1/
q
}
/^X\(\/\/\)$/{
s//\1/
q
}
/^X\(\/\).*/{
s//\1/
q
}
s/.*/./; q'`
srcdir=$ac_confdir
if test ! -r "$srcdir/$ac_unique_file"; then
srcdir=..
fi
else
ac_srcdir_defaulted=no
fi
if test ! -r "$srcdir/$ac_unique_file"; then
test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
fi
ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
ac_abs_confdir=`(
cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
pwd)`
# When building in place, set srcdir=.
if test "$ac_abs_confdir" = "$ac_pwd"; then
srcdir=.
fi
# Remove unnecessary trailing slashes from srcdir.
# Double slashes in file names in object file debugging info
# mess up M-x gdb in Emacs.
case $srcdir in
*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
esac
for ac_var in $ac_precious_vars; do
eval ac_env_${ac_var}_set=\${${ac_var}+set}
eval ac_env_${ac_var}_value=\$${ac_var}
eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
eval ac_cv_env_${ac_var}_value=\$${ac_var}
done
#
# Report the --help message.
#
if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures xcfa 4.3.6 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE. See below for descriptions of some of the useful variables.
Defaults for the options are specified in brackets.
Configuration:
-h, --help display this help and exit
--help=short display options specific to this package
--help=recursive display the short help of all the included packages
-V, --version display version information and exit
-q, --quiet, --silent do not print \`checking ...' messages
--cache-file=FILE cache test results in FILE [disabled]
-C, --config-cache alias for \`--cache-file=config.cache'
-n, --no-create do not create output files
--srcdir=DIR find the sources in DIR [configure dir or \`..']
Installation directories:
--prefix=PREFIX install architecture-independent files in PREFIX
[$ac_default_prefix]
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
[PREFIX]
By default, \`make install' will install all the files in
\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
an installation prefix other than \`$ac_default_prefix' using \`--prefix',
for instance \`--prefix=\$HOME'.
For better control, use the options below.
Fine tuning of the installation directories:
--bindir=DIR user executables [EPREFIX/bin]
--sbindir=DIR system admin executables [EPREFIX/sbin]
--libexecdir=DIR program executables [EPREFIX/libexec]
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
--datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
--datadir=DIR read-only architecture-independent data [DATAROOTDIR]
--infodir=DIR info documentation [DATAROOTDIR/info]
--localedir=DIR locale-dependent data [DATAROOTDIR/locale]
--mandir=DIR man documentation [DATAROOTDIR/man]
--docdir=DIR documentation root [DATAROOTDIR/doc/xcfa]
--htmldir=DIR html documentation [DOCDIR]
--dvidir=DIR dvi documentation [DOCDIR]
--pdfdir=DIR pdf documentation [DOCDIR]
--psdir=DIR ps documentation [DOCDIR]
_ACEOF
cat <<\_ACEOF
Program names:
--program-prefix=PREFIX prepend PREFIX to installed program names
--program-suffix=SUFFIX append SUFFIX to installed program names
--program-transform-name=PROGRAM run sed PROGRAM on installed program names
X features:
--x-includes=DIR X include files are in DIR
--x-libraries=DIR X library files are in DIR
System types:
--build=BUILD configure for building on BUILD [guessed]
--host=HOST cross-compile to build programs to run on HOST [BUILD]
_ACEOF
fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of xcfa 4.3.6:";;
esac
cat <<\_ACEOF
Optional Features:
--disable-option-checking ignore unrecognized --enable/--with options
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--enable-silent-rules less verbose build output (undo: `make V=1')
--disable-silent-rules verbose build output (undo: `make V=0')
--disable-dependency-tracking speeds up one-time build
--enable-dependency-tracking do not reject slow dependency extractors
--disable-nls do not use Native Language Support
--disable-rpath do not hardcode runtime library paths
--disable-debug-pg Enable debug mode (default=disable)
--disable-debug Disable debug mode (default=disable)
--disable-ansi Enable ansi (default=enabled)
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-x use the X Window System
--with-gnu-ld assume the C compiler uses GNU ld default=no
--with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
--without-libiconv-prefix don't search for libiconv in includedir and libdir
--with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib
--without-libintl-prefix don't search for libintl in includedir and libdir
Some influential environment variables:
CXX C++ compiler command
CXXFLAGS C++ compiler flags
LDFLAGS linker flags, e.g. -L if you have libraries in a
nonstandard directory
LIBS libraries to pass to the linker, e.g. -l
CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if
you have headers in a nonstandard directory
CC C compiler command
CFLAGS C compiler flags
CPP C preprocessor
XMKMF Path to xmkmf, Makefile generator for X Window System
PKG_CONFIG path to pkg-config utility
PKG_CONFIG_PATH
directories to add to pkg-config's search path
PKG_CONFIG_LIBDIR
path overriding pkg-config's built-in search path
PACKAGE_CFLAGS
C compiler flags for PACKAGE, overriding pkg-config
PACKAGE_LIBS
linker flags for PACKAGE, overriding pkg-config
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
Report bugs to .
xcfa home page: .
_ACEOF
ac_status=$?
fi
if test "$ac_init_help" = "recursive"; then
# If there are subdirs, report their specific --help.
for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
test -d "$ac_dir" ||
{ cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
continue
ac_builddir=.
case "$ac_dir" in
.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
*)
ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
# A ".." for each directory in $ac_dir_suffix.
ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
case $ac_top_builddir_sub in
"") ac_top_builddir_sub=. ac_top_build_prefix= ;;
*) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
esac ;;
esac
ac_abs_top_builddir=$ac_pwd
ac_abs_builddir=$ac_pwd$ac_dir_suffix
# for backward compatibility:
ac_top_builddir=$ac_top_build_prefix
case $srcdir in
.) # We are building in place.
ac_srcdir=.
ac_top_srcdir=$ac_top_builddir_sub
ac_abs_top_srcdir=$ac_pwd ;;
[\\/]* | ?:[\\/]* ) # Absolute name.
ac_srcdir=$srcdir$ac_dir_suffix;
ac_top_srcdir=$srcdir
ac_abs_top_srcdir=$srcdir ;;
*) # Relative name.
ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
ac_top_srcdir=$ac_top_build_prefix$srcdir
ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
esac
ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
cd "$ac_dir" || { ac_status=$?; continue; }
# Check for guested configure.
if test -f "$ac_srcdir/configure.gnu"; then
echo &&
$SHELL "$ac_srcdir/configure.gnu" --help=recursive
elif test -f "$ac_srcdir/configure"; then
echo &&
$SHELL "$ac_srcdir/configure" --help=recursive
else
$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
fi || ac_status=$?
cd "$ac_pwd" || { ac_status=$?; break; }
done
fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
xcfa configure 4.3.6
generated by GNU Autoconf 2.67
Copyright (C) 2010 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
exit
fi
## ------------------------ ##
## Autoconf initialization. ##
## ------------------------ ##
# ac_fn_cxx_try_compile LINENO
# ----------------------------
# Try to compile conftest.$ac_ext, and return whether this succeeded.
ac_fn_cxx_try_compile ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
rm -f conftest.$ac_objext
if { { ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
(eval "$ac_compile") 2>conftest.err
ac_status=$?
if test -s conftest.err; then
grep -v '^ *+' conftest.err >conftest.er1
cat conftest.er1 >&5
mv -f conftest.er1 conftest.err
fi
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } && {
test -z "$ac_cxx_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then :
ac_retval=0
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_retval=1
fi
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
as_fn_set_status $ac_retval
} # ac_fn_cxx_try_compile
# ac_fn_c_try_compile LINENO
# --------------------------
# Try to compile conftest.$ac_ext, and return whether this succeeded.
ac_fn_c_try_compile ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
rm -f conftest.$ac_objext
if { { ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
(eval "$ac_compile") 2>conftest.err
ac_status=$?
if test -s conftest.err; then
grep -v '^ *+' conftest.err >conftest.er1
cat conftest.er1 >&5
mv -f conftest.er1 conftest.err
fi
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then :
ac_retval=0
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_retval=1
fi
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
as_fn_set_status $ac_retval
} # ac_fn_c_try_compile
# ac_fn_c_try_cpp LINENO
# ----------------------
# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
ac_fn_c_try_cpp ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
if { { ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
(eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
ac_status=$?
if test -s conftest.err; then
grep -v '^ *+' conftest.err >conftest.er1
cat conftest.er1 >&5
mv -f conftest.er1 conftest.err
fi
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } > conftest.i && {
test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
test ! -s conftest.err
}; then :
ac_retval=0
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_retval=1
fi
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
as_fn_set_status $ac_retval
} # ac_fn_c_try_cpp
# ac_fn_c_try_link LINENO
# -----------------------
# Try to link conftest.$ac_ext, and return whether this succeeded.
ac_fn_c_try_link ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
rm -f conftest.$ac_objext conftest$ac_exeext
if { { ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
(eval "$ac_link") 2>conftest.err
ac_status=$?
if test -s conftest.err; then
grep -v '^ *+' conftest.err >conftest.er1
cat conftest.er1 >&5
mv -f conftest.er1 conftest.err
fi
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest$ac_exeext && {
test "$cross_compiling" = yes ||
$as_test_x conftest$ac_exeext
}; then :
ac_retval=0
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_retval=1
fi
# Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
# created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
# interfere with the next link command; also delete a directory that is
# left behind by Apple's compiler. We do this before executing the actions.
rm -rf conftest.dSYM conftest_ipa8_conftest.oo
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
as_fn_set_status $ac_retval
} # ac_fn_c_try_link
# ac_fn_c_try_run LINENO
# ----------------------
# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
# that executables *can* be run.
ac_fn_c_try_run ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
if { { ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
(eval "$ac_link") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
{ { case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
(eval "$ac_try") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; }; then :
ac_retval=0
else
$as_echo "$as_me: program exited with status $ac_status" >&5
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_retval=$ac_status
fi
rm -rf conftest.dSYM conftest_ipa8_conftest.oo
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
as_fn_set_status $ac_retval
} # ac_fn_c_try_run
# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
# -------------------------------------------------------
# Tests whether HEADER exists, giving a warning if it cannot be compiled using
# the include files in INCLUDES and setting the cache variable VAR
# accordingly.
ac_fn_c_check_header_mongrel ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
if eval "test \"\${$3+set}\"" = set; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
if eval "test \"\${$3+set}\"" = set; then :
$as_echo_n "(cached) " >&6
fi
eval ac_res=\$$3
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
else
# Is the header compilable?
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
$as_echo_n "checking $2 usability... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
#include <$2>
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
ac_header_compiler=yes
else
ac_header_compiler=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
$as_echo "$ac_header_compiler" >&6; }
# Is the header present?
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
$as_echo_n "checking $2 presence... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <$2>
_ACEOF
if ac_fn_c_try_cpp "$LINENO"; then :
ac_header_preproc=yes
else
ac_header_preproc=no
fi
rm -f conftest.err conftest.i conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
$as_echo "$ac_header_preproc" >&6; }
# So? What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
yes:no: )
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
;;
no:yes:* )
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
( $as_echo "## --------------------------------------------- ##
## Report this to http://www.xcfa.tuxfamily.org/ ##
## --------------------------------------------- ##"
) | sed "s/^/$as_me: WARNING: /" >&2
;;
esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
if eval "test \"\${$3+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
eval "$3=\$ac_header_compiler"
fi
eval ac_res=\$$3
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
fi
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
} # ac_fn_c_check_header_mongrel
# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
# -------------------------------------------------------
# Tests whether HEADER exists and can be compiled using the include files in
# INCLUDES, setting the cache variable VAR accordingly.
ac_fn_c_check_header_compile ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
if eval "test \"\${$3+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
#include <$2>
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
eval "$3=yes"
else
eval "$3=no"
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
eval ac_res=\$$3
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
} # ac_fn_c_check_header_compile
# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
# -------------------------------------------
# Tests whether TYPE exists after having included INCLUDES, setting cache
# variable VAR accordingly.
ac_fn_c_check_type ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
if eval "test \"\${$3+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
eval "$3=no"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
int
main ()
{
if (sizeof ($2))
return 0;
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
int
main ()
{
if (sizeof (($2)))
return 0;
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
else
eval "$3=yes"
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
eval ac_res=\$$3
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
} # ac_fn_c_check_type
# ac_fn_c_find_intX_t LINENO BITS VAR
# -----------------------------------
# Finds a signed integer type with width BITS, setting cache variable VAR
# accordingly.
ac_fn_c_find_intX_t ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
$as_echo_n "checking for int$2_t... " >&6; }
if eval "test \"\${$3+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
eval "$3=no"
# Order is important - never check a type that is potentially smaller
# than half of the expected target width.
for ac_type in int$2_t 'int' 'long int' \
'long long int' 'short int' 'signed char'; do
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$ac_includes_default
enum { N = $2 / 2 - 1 };
int
main ()
{
static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
test_array [0] = 0
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$ac_includes_default
enum { N = $2 / 2 - 1 };
int
main ()
{
static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
< ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
test_array [0] = 0
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
else
case $ac_type in #(
int$2_t) :
eval "$3=yes" ;; #(
*) :
eval "$3=\$ac_type" ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
if eval test \"x\$"$3"\" = x"no"; then :
else
break
fi
done
fi
eval ac_res=\$$3
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
} # ac_fn_c_find_intX_t
# ac_fn_c_check_func LINENO FUNC VAR
# ----------------------------------
# Tests whether FUNC exists, setting the cache variable VAR accordingly
ac_fn_c_check_func ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
if eval "test \"\${$3+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Define $2 to an innocuous variant, in case declares $2.
For example, HP-UX 11i declares gettimeofday. */
#define $2 innocuous_$2
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $2 (); below.
Prefer to if __STDC__ is defined, since
exists even on freestanding compilers. */
#ifdef __STDC__
# include
#else
# include
#endif
#undef $2
/* 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 $2 ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined __stub_$2 || defined __stub___$2
choke me
#endif
int
main ()
{
return $2 ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
eval "$3=yes"
else
eval "$3=no"
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
eval ac_res=\$$3
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
} # ac_fn_c_check_func
cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by xcfa $as_me 4.3.6, which was
generated by GNU Autoconf 2.67. Invocation command line was
$ $0 $@
_ACEOF
exec 5>>config.log
{
cat <<_ASUNAME
## --------- ##
## Platform. ##
## --------- ##
hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
uname -m = `(uname -m) 2>/dev/null || echo unknown`
uname -r = `(uname -r) 2>/dev/null || echo unknown`
uname -s = `(uname -s) 2>/dev/null || echo unknown`
uname -v = `(uname -v) 2>/dev/null || echo unknown`
/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
_ASUNAME
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
$as_echo "PATH: $as_dir"
done
IFS=$as_save_IFS
} >&5
cat >&5 <<_ACEOF
## ----------- ##
## Core tests. ##
## ----------- ##
_ACEOF
# Keep a trace of the command line.
# Strip out --no-create and --no-recursion so they do not pile up.
# Strip out --silent because we don't want to record it for future runs.
# Also quote any args containing shell meta-characters.
# Make two passes to allow for proper duplicate-argument suppression.
ac_configure_args=
ac_configure_args0=
ac_configure_args1=
ac_must_keep_next=false
for ac_pass in 1 2
do
for ac_arg
do
case $ac_arg in
-no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil)
continue ;;
*\'*)
ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
esac
case $ac_pass in
1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2)
as_fn_append ac_configure_args1 " '$ac_arg'"
if test $ac_must_keep_next = true; then
ac_must_keep_next=false # Got value, back to normal.
else
case $ac_arg in
*=* | --config-cache | -C | -disable-* | --disable-* \
| -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
| -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
| -with-* | --with-* | -without-* | --without-* | --x)
case "$ac_configure_args0 " in
"$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
esac
;;
-* ) ac_must_keep_next=true ;;
esac
fi
as_fn_append ac_configure_args " '$ac_arg'"
;;
esac
done
done
{ ac_configure_args0=; unset ac_configure_args0;}
{ ac_configure_args1=; unset ac_configure_args1;}
# When interrupted or exit'd, cleanup temporary files, and complete
# config.log. We remove comments because anyway the quotes in there
# would cause problems or look ugly.
# WARNING: Use '\'' to represent an apostrophe within the trap.
# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
trap 'exit_status=$?
# Save into config.log some information that might help in debugging.
{
echo
$as_echo "## ---------------- ##
## Cache variables. ##
## ---------------- ##"
echo
# The following way of writing the cache mishandles newlines in values,
(
for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
eval ac_val=\$$ac_var
case $ac_val in #(
*${as_nl}*)
case $ac_var in #(
*_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
esac
case $ac_var in #(
_ | IFS | as_nl) ;; #(
BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
*) { eval $ac_var=; unset $ac_var;} ;;
esac ;;
esac
done
(set) 2>&1 |
case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
*${as_nl}ac_space=\ *)
sed -n \
"s/'\''/'\''\\\\'\'''\''/g;
s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
;; #(
*)
sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
;;
esac |
sort
)
echo
$as_echo "## ----------------- ##
## Output variables. ##
## ----------------- ##"
echo
for ac_var in $ac_subst_vars
do
eval ac_val=\$$ac_var
case $ac_val in
*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
esac
$as_echo "$ac_var='\''$ac_val'\''"
done | sort
echo
if test -n "$ac_subst_files"; then
$as_echo "## ------------------- ##
## File substitutions. ##
## ------------------- ##"
echo
for ac_var in $ac_subst_files
do
eval ac_val=\$$ac_var
case $ac_val in
*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
esac
$as_echo "$ac_var='\''$ac_val'\''"
done | sort
echo
fi
if test -s confdefs.h; then
$as_echo "## ----------- ##
## confdefs.h. ##
## ----------- ##"
echo
cat confdefs.h
echo
fi
test "$ac_signal" != 0 &&
$as_echo "$as_me: caught signal $ac_signal"
$as_echo "$as_me: exit $exit_status"
} >&5
rm -f core *.core core.conftest.* &&
rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
exit $exit_status
' 0
for ac_signal in 1 2 13 15; do
trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
done
ac_signal=0
# confdefs.h avoids OS command line length limits that DEFS can exceed.
rm -f -r conftest* confdefs.h
$as_echo "/* confdefs.h */" > confdefs.h
# Predefined preprocessor variables.
cat >>confdefs.h <<_ACEOF
#define PACKAGE_NAME "$PACKAGE_NAME"
_ACEOF
cat >>confdefs.h <<_ACEOF
#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
_ACEOF
cat >>confdefs.h <<_ACEOF
#define PACKAGE_VERSION "$PACKAGE_VERSION"
_ACEOF
cat >>confdefs.h <<_ACEOF
#define PACKAGE_STRING "$PACKAGE_STRING"
_ACEOF
cat >>confdefs.h <<_ACEOF
#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
_ACEOF
cat >>confdefs.h <<_ACEOF
#define PACKAGE_URL "$PACKAGE_URL"
_ACEOF
# Let the site file select an alternate cache file if it wants to.
# Prefer an explicitly selected file to automatically selected ones.
ac_site_file1=NONE
ac_site_file2=NONE
if test -n "$CONFIG_SITE"; then
# We do not want a PATH search for config.site.
case $CONFIG_SITE in #((
-*) ac_site_file1=./$CONFIG_SITE;;
*/*) ac_site_file1=$CONFIG_SITE;;
*) ac_site_file1=./$CONFIG_SITE;;
esac
elif test "x$prefix" != xNONE; then
ac_site_file1=$prefix/share/config.site
ac_site_file2=$prefix/etc/config.site
else
ac_site_file1=$ac_default_prefix/share/config.site
ac_site_file2=$ac_default_prefix/etc/config.site
fi
for ac_site_file in "$ac_site_file1" "$ac_site_file2"
do
test "x$ac_site_file" = xNONE && continue
if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
$as_echo "$as_me: loading site script $ac_site_file" >&6;}
sed 's/^/| /' "$ac_site_file" >&5
. "$ac_site_file" \
|| { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "failed to load site script $ac_site_file
See \`config.log' for more details" "$LINENO" 5 ; }
fi
done
if test -r "$cache_file"; then
# Some versions of bash will fail to source /dev/null (special files
# actually), so we avoid doing that. DJGPP emulates it as a regular file.
if test /dev/null != "$cache_file" && test -f "$cache_file"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
$as_echo "$as_me: loading cache $cache_file" >&6;}
case $cache_file in
[\\/]* | ?:[\\/]* ) . "$cache_file";;
*) . "./$cache_file";;
esac
fi
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
$as_echo "$as_me: creating cache $cache_file" >&6;}
>$cache_file
fi
gt_needs="$gt_needs "
gt_needs="$gt_needs "
# Check that the precious variables saved in the cache have kept the same
# value.
ac_cache_corrupted=false
for ac_var in $ac_precious_vars; do
eval ac_old_set=\$ac_cv_env_${ac_var}_set
eval ac_new_set=\$ac_env_${ac_var}_set
eval ac_old_val=\$ac_cv_env_${ac_var}_value
eval ac_new_val=\$ac_env_${ac_var}_value
case $ac_old_set,$ac_new_set in
set,)
{ $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
ac_cache_corrupted=: ;;
,set)
{ $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
ac_cache_corrupted=: ;;
,);;
*)
if test "x$ac_old_val" != "x$ac_new_val"; then
# differences in whitespace do not lead to failure.
ac_old_val_w=`echo x $ac_old_val`
ac_new_val_w=`echo x $ac_new_val`
if test "$ac_old_val_w" != "$ac_new_val_w"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
ac_cache_corrupted=:
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
eval $ac_var=\$ac_old_val
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
fi;;
esac
# Pass precious variables to config.status.
if test "$ac_new_set" = set; then
case $ac_new_val in
*\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
*) ac_arg=$ac_var=$ac_new_val ;;
esac
case " $ac_configure_args " in
*" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
*) as_fn_append ac_configure_args " '$ac_arg'" ;;
esac
fi
done
if $ac_cache_corrupted; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
fi
## -------------------- ##
## Main body of script. ##
## -------------------- ##
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
am__api_version='1.11'
ac_aux_dir=
for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
if test -f "$ac_dir/install-sh"; then
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/install-sh -c"
break
elif test -f "$ac_dir/install.sh"; then
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/install.sh -c"
break
elif test -f "$ac_dir/shtool"; then
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/shtool install -c"
break
fi
done
if test -z "$ac_aux_dir"; then
as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
fi
# These three variables are undocumented and unsupported,
# and are intended to be withdrawn in a future Autoconf release.
# They can cause serious problems if a builder's source tree is in a directory
# whose full name contains unusual characters.
ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
# Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
# incompatible versions:
# SysV /etc/install, /usr/sbin/install
# SunOS /usr/etc/install
# IRIX /sbin/install
# AIX /bin/install
# AmigaOS /C/install, which installs bootblocks on floppy discs
# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
# AFS /usr/afsws/bin/install, which mishandles nonexistent args
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# OS/2's system install, which has a completely different semantic
# ./install, which can be erroneously created by make from ./install.sh.
# Reject install programs that cannot install multiple files.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
$as_echo_n "checking for a BSD-compatible install... " >&6; }
if test -z "$INSTALL"; then
if test "${ac_cv_path_install+set}" = set; then :
$as_echo_n "(cached) " >&6
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
# Account for people who put trailing slashes in PATH elements.
case $as_dir/ in #((
./ | .// | /[cC]/* | \
/etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
/usr/ucb/* ) ;;
*)
# OSF1 and SCO ODT 3.0 have their own names for install.
# Don't use installbsd from OSF since it installs stuff as root
# by default.
for ac_prog in ginstall scoinst install; do
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
if test $ac_prog = install &&
grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
# AIX install. It has an incompatible calling convention.
:
elif test $ac_prog = install &&
grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
# program-specific install script used by HP pwplus--don't use.
:
else
rm -rf conftest.one conftest.two conftest.dir
echo one > conftest.one
echo two > conftest.two
mkdir conftest.dir
if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
test -s conftest.one && test -s conftest.two &&
test -s conftest.dir/conftest.one &&
test -s conftest.dir/conftest.two
then
ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
break 3
fi
fi
fi
done
done
;;
esac
done
IFS=$as_save_IFS
rm -rf conftest.one conftest.two conftest.dir
fi
if test "${ac_cv_path_install+set}" = set; then
INSTALL=$ac_cv_path_install
else
# As a last resort, use the slow shell script. Don't cache a
# value for INSTALL within a source directory, because that will
# break other packages using the cache if that directory is
# removed, or if the value is a relative name.
INSTALL=$ac_install_sh
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
$as_echo "$INSTALL" >&6; }
# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
# It thinks the first close brace ends the variable substitution.
test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
$as_echo_n "checking whether build environment is sane... " >&6; }
# Just in case
sleep 1
echo timestamp > conftest.file
# Reject unsafe characters in $srcdir or the absolute working directory
# name. Accept space and tab only in the latter.
am_lf='
'
case `pwd` in
*[\\\"\#\$\&\'\`$am_lf]*)
as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5 ;;
esac
case $srcdir in
*[\\\"\#\$\&\'\`$am_lf\ \ ]*)
as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5 ;;
esac
# Do `set' in a subshell so we don't clobber the current shell's
# arguments. Must try -L first in case configure is actually a
# symlink; some systems play weird games with the mod time of symlinks
# (eg FreeBSD returns the mod time of the symlink's containing
# directory).
if (
set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
if test "$*" = "X"; then
# -L didn't work.
set X `ls -t "$srcdir/configure" conftest.file`
fi
rm -f conftest.file
if test "$*" != "X $srcdir/configure conftest.file" \
&& test "$*" != "X conftest.file $srcdir/configure"; then
# If neither matched, then we have a broken ls. This can happen
# if, for instance, CONFIG_SHELL is bash and it inherits a
# broken ls alias from the environment. This has actually
# happened. Such a system could not be considered "sane".
as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
alias in your environment" "$LINENO" 5
fi
test "$2" = conftest.file
)
then
# Ok.
:
else
as_fn_error $? "newly created file is older than distributed files!
Check your system clock" "$LINENO" 5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
test "$program_prefix" != NONE &&
program_transform_name="s&^&$program_prefix&;$program_transform_name"
# Use a double $ so make ignores it.
test "$program_suffix" != NONE &&
program_transform_name="s&\$&$program_suffix&;$program_transform_name"
# Double any \ or $.
# By default was `s,x,x', remove it if useless.
ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
# expand $ac_aux_dir to an absolute path
am_aux_dir=`cd $ac_aux_dir && pwd`
if test x"${MISSING+set}" != xset; then
case $am_aux_dir in
*\ * | *\ *)
MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
*)
MISSING="\${SHELL} $am_aux_dir/missing" ;;
esac
fi
# Use eval to expand $SHELL
if eval "$MISSING --run true"; then
am_missing_run="$MISSING --run "
else
am_missing_run=
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
fi
if test x"${install_sh}" != xset; then
case $am_aux_dir in
*\ * | *\ *)
install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
*)
install_sh="\${SHELL} $am_aux_dir/install-sh"
esac
fi
# Installed binaries are usually stripped using `strip' when the user
# run `make install-strip'. However `strip' might not be the right
# tool to use in cross-compilation environments, therefore Automake
# will honor the `STRIP' environment variable to overrule this program.
if test "$cross_compiling" != no; then
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
set dummy ${ac_tool_prefix}strip; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_STRIP+set}" = set; then :
$as_echo_n "(cached) " >&6
else
if test -n "$STRIP"; then
ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_STRIP="${ac_tool_prefix}strip"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
fi
fi
STRIP=$ac_cv_prog_STRIP
if test -n "$STRIP"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
$as_echo "$STRIP" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
fi
if test -z "$ac_cv_prog_STRIP"; then
ac_ct_STRIP=$STRIP
# Extract the first word of "strip", so it can be a program name with args.
set dummy strip; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_STRIP"; then
ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_ac_ct_STRIP="strip"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
fi
fi
ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
if test -n "$ac_ct_STRIP"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
$as_echo "$ac_ct_STRIP" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
if test "x$ac_ct_STRIP" = x; then
STRIP=":"
else
case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
STRIP=$ac_ct_STRIP
fi
else
STRIP="$ac_cv_prog_STRIP"
fi
fi
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
if test -z "$MKDIR_P"; then
if test "${ac_cv_path_mkdir+set}" = set; then :
$as_echo_n "(cached) " >&6
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_prog in mkdir gmkdir; do
for ac_exec_ext in '' $ac_executable_extensions; do
{ test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
'mkdir (GNU coreutils) '* | \
'mkdir (coreutils) '* | \
'mkdir (fileutils) '4.1*)
ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
break 3;;
esac
done
done
done
IFS=$as_save_IFS
fi
test -d ./--version && rmdir ./--version
if test "${ac_cv_path_mkdir+set}" = set; then
MKDIR_P="$ac_cv_path_mkdir -p"
else
# As a last resort, use the slow shell script. Don't cache a
# value for MKDIR_P within a source directory, because that will
# break other packages using the cache if that directory is
# removed, or if the value is a relative name.
MKDIR_P="$ac_install_sh -d"
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
$as_echo "$MKDIR_P" >&6; }
mkdir_p="$MKDIR_P"
case $mkdir_p in
[\\/$]* | ?:[\\/]*) ;;
*/*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
esac
for ac_prog in gawk mawk nawk awk
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_AWK+set}" = set; then :
$as_echo_n "(cached) " >&6
else
if test -n "$AWK"; then
ac_cv_prog_AWK="$AWK" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_AWK="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
fi
fi
AWK=$ac_cv_prog_AWK
if test -n "$AWK"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
$as_echo "$AWK" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
test -n "$AWK" && break
done
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
set x ${MAKE-make}
ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
cat >conftest.make <<\_ACEOF
SHELL = /bin/sh
all:
@echo '@@@%%%=$(MAKE)=@@@%%%'
_ACEOF
# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
case `${MAKE-make} -f conftest.make 2>/dev/null` in
*@@@%%%=?*=@@@%%%*)
eval ac_cv_prog_make_${ac_make}_set=yes;;
*)
eval ac_cv_prog_make_${ac_make}_set=no;;
esac
rm -f conftest.make
fi
if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
SET_MAKE=
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
SET_MAKE="MAKE=${MAKE-make}"
fi
rm -rf .tst 2>/dev/null
mkdir .tst 2>/dev/null
if test -d .tst; then
am__leading_dot=.
else
am__leading_dot=_
fi
rmdir .tst 2>/dev/null
if test "`cd $srcdir && pwd`" != "`pwd`"; then
# Use -I$(srcdir) only when $(srcdir) != ., so that make's output
# is not polluted with repeated "-I."
am__isrc=' -I$(srcdir)'
# test to see if srcdir already configured
if test -f $srcdir/config.status; then
as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
fi
fi
# test whether we have cygpath
if test -z "$CYGPATH_W"; then
if (cygpath --version) >/dev/null 2>/dev/null; then
CYGPATH_W='cygpath -w'
else
CYGPATH_W=echo
fi
fi
# Define the identity of the package.
PACKAGE='xcfa'
VERSION='4.3.6'
cat >>confdefs.h <<_ACEOF
#define PACKAGE "$PACKAGE"
_ACEOF
cat >>confdefs.h <<_ACEOF
#define VERSION "$VERSION"
_ACEOF
# Some tools Automake needs.
ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
# We need awk for the "check" target. The system "awk" is bad on
# some platforms.
# Always define AMTAR for backward compatibility.
AMTAR=${AMTAR-"${am_missing_run}tar"}
am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
ac_config_headers="$ac_config_headers config.h"
# Enable silent rules if supported
# Check whether --enable-silent-rules was given.
if test "${enable_silent_rules+set}" = set; then :
enableval=$enable_silent_rules;
fi
case $enable_silent_rules in
yes) AM_DEFAULT_VERBOSITY=0;;
no) AM_DEFAULT_VERBOSITY=1;;
*) AM_DEFAULT_VERBOSITY=0;;
esac
AM_BACKSLASH='\'
# Checks for programs.
ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
if test -z "$CXX"; then
if test -n "$CCC"; then
CXX=$CCC
else
if test -n "$ac_tool_prefix"; then
for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
do
# Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_CXX+set}" = set; then :
$as_echo_n "(cached) " >&6
else
if test -n "$CXX"; then
ac_cv_prog_CXX="$CXX" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
fi
fi
CXX=$ac_cv_prog_CXX
if test -n "$CXX"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
$as_echo "$CXX" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
test -n "$CXX" && break
done
fi
if test -z "$CXX"; then
ac_ct_CXX=$CXX
for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_CXX"; then
ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_ac_ct_CXX="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
fi
fi
ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
if test -n "$ac_ct_CXX"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
$as_echo "$ac_ct_CXX" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
test -n "$ac_ct_CXX" && break
done
if test "x$ac_ct_CXX" = x; then
CXX="g++"
else
case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
CXX=$ac_ct_CXX
fi
fi
fi
fi
# Provide some information about the compiler.
$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
set X $ac_compile
ac_compiler=$2
for ac_option in --version -v -V -qversion; do
{ { ac_try="$ac_compiler $ac_option >&5"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
(eval "$ac_compiler $ac_option >&5") 2>conftest.err
ac_status=$?
if test -s conftest.err; then
sed '10a\
... rest of stderr output deleted ...
10q' conftest.err >conftest.er1
cat conftest.er1 >&5
fi
rm -f conftest.er1 conftest.err
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }
done
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
main ()
{
;
return 0;
}
_ACEOF
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
# Try to create an executable without -o first, disregard a.out.
# It will help us diagnose broken compilers, and finding out an intuition
# of exeext.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C++ compiler works" >&5
$as_echo_n "checking whether the C++ compiler works... " >&6; }
ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
# The possible output files:
ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
ac_rmfiles=
for ac_file in $ac_files
do
case $ac_file in
*.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
* ) ac_rmfiles="$ac_rmfiles $ac_file";;
esac
done
rm -f $ac_rmfiles
if { { ac_try="$ac_link_default"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
(eval "$ac_link_default") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then :
# Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
# 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 ''
do
test -f "$ac_file" || continue
case $ac_file in
*.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
;;
[ab].out )
# We found the default executable, but exeext='' is most
# certainly right.
break;;
*.* )
if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
then :; else
ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
fi
# We set ac_cv_exeext here because the later test for it is not
# safe: cross compilers may not add the suffix if given an `-o'
# argument, so we may need to know it at that point already.
# Even if this section looks crufty: it has the advantage of
# actually working.
break;;
* )
break;;
esac
done
test "$ac_cv_exeext" = no && ac_cv_exeext=
else
ac_file=''
fi
if test -z "$ac_file"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "C++ compiler cannot create executables
See \`config.log' for more details" "$LINENO" 5 ; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler default output file name" >&5
$as_echo_n "checking for C++ compiler default output file name... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
$as_echo "$ac_file" >&6; }
ac_exeext=$ac_cv_exeext
rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
ac_clean_files=$ac_clean_files_save
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
$as_echo_n "checking for suffix of executables... " >&6; }
if { { ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
(eval "$ac_link") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then :
# If both `conftest.exe' and `conftest' are `present' (well, observable)
# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
# work properly (i.e., refer to `conftest.exe'), while it won't with
# `rm'.
for ac_file in conftest.exe conftest conftest.*; do
test -f "$ac_file" || continue
case $ac_file in
*.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
*.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
break;;
* ) break;;
esac
done
else
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot compute suffix of executables: cannot compile and link
See \`config.log' for more details" "$LINENO" 5 ; }
fi
rm -f conftest conftest$ac_cv_exeext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
$as_echo "$ac_cv_exeext" >&6; }
rm -f conftest.$ac_ext
EXEEXT=$ac_cv_exeext
ac_exeext=$EXEEXT
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include
int
main ()
{
FILE *f = fopen ("conftest.out", "w");
return ferror (f) || fclose (f) != 0;
;
return 0;
}
_ACEOF
ac_clean_files="$ac_clean_files conftest.out"
# Check that the compiler produces executables we can run. If not, either
# the compiler is broken, or we cross compile.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
$as_echo_n "checking whether we are cross compiling... " >&6; }
if test "$cross_compiling" != yes; then
{ { ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
(eval "$ac_link") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }
if { ac_try='./conftest$ac_cv_exeext'
{ { case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
(eval "$ac_try") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; }; then
cross_compiling=no
else
if test "$cross_compiling" = maybe; then
cross_compiling=yes
else
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot run C++ compiled programs.
If you meant to cross compile, use \`--host'.
See \`config.log' for more details" "$LINENO" 5 ; }
fi
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
$as_echo "$cross_compiling" >&6; }
rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
ac_clean_files=$ac_clean_files_save
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
$as_echo_n "checking for suffix of object files... " >&6; }
if test "${ac_cv_objext+set}" = set; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
main ()
{
;
return 0;
}
_ACEOF
rm -f conftest.o conftest.obj
if { { ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
(eval "$ac_compile") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then :
for ac_file in conftest.o conftest.obj conftest.*; do
test -f "$ac_file" || continue;
case $ac_file in
*.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
*) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
break;;
esac
done
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot compute suffix of object files: cannot compile
See \`config.log' for more details" "$LINENO" 5 ; }
fi
rm -f conftest.$ac_cv_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
$as_echo "$ac_cv_objext" >&6; }
OBJEXT=$ac_cv_objext
ac_objext=$OBJEXT
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
main ()
{
#ifndef __GNUC__
choke me
#endif
;
return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
ac_compiler_gnu=yes
else
ac_compiler_gnu=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
if test $ac_compiler_gnu = yes; then
GXX=yes
else
GXX=
fi
ac_test_CXXFLAGS=${CXXFLAGS+set}
ac_save_CXXFLAGS=$CXXFLAGS
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
$as_echo_n "checking whether $CXX accepts -g... " >&6; }
if test "${ac_cv_prog_cxx_g+set}" = set; then :
$as_echo_n "(cached) " >&6
else
ac_save_cxx_werror_flag=$ac_cxx_werror_flag
ac_cxx_werror_flag=yes
ac_cv_prog_cxx_g=no
CXXFLAGS="-g"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
main ()
{
;
return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
ac_cv_prog_cxx_g=yes
else
CXXFLAGS=""
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
main ()
{
;
return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
else
ac_cxx_werror_flag=$ac_save_cxx_werror_flag
CXXFLAGS="-g"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
main ()
{
;
return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
ac_cv_prog_cxx_g=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_cxx_werror_flag=$ac_save_cxx_werror_flag
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
$as_echo "$ac_cv_prog_cxx_g" >&6; }
if test "$ac_test_CXXFLAGS" = set; then
CXXFLAGS=$ac_save_CXXFLAGS
elif test $ac_cv_prog_cxx_g = yes; then
if test "$GXX" = yes; then
CXXFLAGS="-g -O2"
else
CXXFLAGS="-g"
fi
else
if test "$GXX" = yes; then
CXXFLAGS="-O2"
else
CXXFLAGS=
fi
fi
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
DEPDIR="${am__leading_dot}deps"
ac_config_commands="$ac_config_commands depfiles"
am_make=${MAKE-make}
cat > confinc << 'END'
am__doit:
@echo this is the am__doit target
.PHONY: am__doit
END
# If we don't find an include directive, just comment out the code.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
$as_echo_n "checking for style of include used by $am_make... " >&6; }
am__include="#"
am__quote=
_am_result=none
# First try GNU make style include.
echo "include confinc" > confmf
# Ignore all kinds of additional output from `make'.
case `$am_make -s -f confmf 2> /dev/null` in #(
*the\ am__doit\ target*)
am__include=include
am__quote=
_am_result=GNU
;;
esac
# Now try BSD make style include.
if test "$am__include" = "#"; then
echo '.include "confinc"' > confmf
case `$am_make -s -f confmf 2> /dev/null` in #(
*the\ am__doit\ target*)
am__include=.include
am__quote="\""
_am_result=BSD
;;
esac
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
$as_echo "$_am_result" >&6; }
rm -f confinc confmf
# Check whether --enable-dependency-tracking was given.
if test "${enable_dependency_tracking+set}" = set; then :
enableval=$enable_dependency_tracking;
fi
if test "x$enable_dependency_tracking" != xno; then
am_depcomp="$ac_aux_dir/depcomp"
AMDEPBACKSLASH='\'
fi
if test "x$enable_dependency_tracking" != xno; then
AMDEP_TRUE=
AMDEP_FALSE='#'
else
AMDEP_TRUE='#'
AMDEP_FALSE=
fi
depcc="$CXX" am_compiler_list=
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
$as_echo_n "checking dependency style of $depcc... " >&6; }
if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then :
$as_echo_n "(cached) " >&6
else
if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
# We make a subdir and do the tests there. Otherwise we can end up
# making bogus files that we don't know about and never remove. For
# instance it was reported that on HP-UX the gcc test will end up
# making a dummy file named `D' -- because `-MD' means `put the output
# in D'.
mkdir conftest.dir
# Copy depcomp to subdir because otherwise we won't find it if we're
# using a relative directory.
cp "$am_depcomp" conftest.dir
cd conftest.dir
# We will build objects and dependencies in a subdirectory because
# it helps to detect inapplicable dependency modes. For instance
# both Tru64's cc and ICC support -MD to output dependencies as a
# side effect of compilation, but ICC will put the dependencies in
# the current directory while Tru64 will put them in the object
# directory.
mkdir sub
am_cv_CXX_dependencies_compiler_type=none
if test "$am_compiler_list" = ""; then
am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
fi
am__universal=false
case " $depcc " in #(
*\ -arch\ *\ -arch\ *) am__universal=true ;;
esac
for depmode in $am_compiler_list; do
# Setup a source with many dependencies, because some compilers
# like to wrap large dependency lists on column 80 (with \), and
# we should not choose a depcomp mode which is confused by this.
#
# We need to recreate these files for each test, as the compiler may
# overwrite some of them when testing with obscure command lines.
# This happens at least with the AIX C compiler.
: > sub/conftest.c
for i in 1 2 3 4 5 6; do
echo '#include "conftst'$i'.h"' >> sub/conftest.c
# Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
# Solaris 8's {/usr,}/bin/sh.
touch sub/conftst$i.h
done
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
# We check with `-c' and `-o' for the sake of the "dashmstdout"
# mode. It turns out that the SunPro C++ compiler does not properly
# handle `-M -o', and we need to detect this. Also, some Intel
# versions had trouble with output in subdirs
am__obj=sub/conftest.${OBJEXT-o}
am__minus_obj="-o $am__obj"
case $depmode in
gcc)
# This depmode causes a compiler race in universal mode.
test "$am__universal" = false || continue
;;
nosideeffect)
# after this tag, mechanisms are not by side-effect, so they'll
# only be used when explicitly requested
if test "x$enable_dependency_tracking" = xyes; then
continue
else
break
fi
;;
msvisualcpp | msvcmsys)
# This compiler won't grok `-c -o', but also, the minuso test has
# not run yet. These depmodes are late enough in the game, and
# so weak that their functioning should not be impacted.
am__obj=conftest.${OBJEXT-o}
am__minus_obj=
;;
none) break ;;
esac
if depmode=$depmode \
source=sub/conftest.c object=$am__obj \
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
$SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
>/dev/null 2>conftest.err &&
grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
# icc doesn't choke on unknown options, it will just issue warnings
# or remarks (even with -Werror). So we grep stderr for any message
# that says an option was ignored or not supported.
# When given -MP, icc 7.0 and 7.1 complain thusly:
# icc: Command line warning: ignoring option '-M'; no argument required
# The diagnosis changed in icc 8.0:
# icc: Command line remark: option '-MP' not supported
if (grep 'ignoring option' conftest.err ||
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
am_cv_CXX_dependencies_compiler_type=$depmode
break
fi
fi
done
cd ..
rm -rf conftest.dir
else
am_cv_CXX_dependencies_compiler_type=none
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5
$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; }
CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
if
test "x$enable_dependency_tracking" != xno \
&& test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
am__fastdepCXX_TRUE=
am__fastdepCXX_FALSE='#'
else
am__fastdepCXX_TRUE='#'
am__fastdepCXX_FALSE=
fi
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
set dummy ${ac_tool_prefix}gcc; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_CC+set}" = set; then :
$as_echo_n "(cached) " >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_CC="${ac_tool_prefix}gcc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
$as_echo "$CC" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
fi
if test -z "$ac_cv_prog_CC"; then
ac_ct_CC=$CC
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_CC"; then
ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_ac_ct_CC="gcc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
$as_echo "$ac_ct_CC" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
if test "x$ac_ct_CC" = x; then
CC=""
else
case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
CC=$ac_ct_CC
fi
else
CC="$ac_cv_prog_CC"
fi
if test -z "$CC"; then
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
set dummy ${ac_tool_prefix}cc; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_CC+set}" = set; then :
$as_echo_n "(cached) " >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_CC="${ac_tool_prefix}cc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
$as_echo "$CC" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
fi
fi
if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_CC+set}" = set; then :
$as_echo_n "(cached) " >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
ac_prog_rejected=no
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
ac_prog_rejected=yes
continue
fi
ac_cv_prog_CC="cc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
if test $ac_prog_rejected = yes; then
# We found a bogon in the path, so make sure we never use it.
set dummy $ac_cv_prog_CC
shift
if test $# != 0; then
# We chose a different compiler from the bogus one.
# However, it has the same basename, so the bogon will be chosen
# first if we set CC to just the basename; use the full file name.
shift
ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
fi
fi
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
$as_echo "$CC" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
fi
if test -z "$CC"; then
if test -n "$ac_tool_prefix"; then
for ac_prog in cl.exe
do
# Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_CC+set}" = set; then :
$as_echo_n "(cached) " >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
$as_echo "$CC" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
test -n "$CC" && break
done
fi
if test -z "$CC"; then
ac_ct_CC=$CC
for ac_prog in cl.exe
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_CC"; then
ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_ac_ct_CC="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
$as_echo "$ac_ct_CC" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
test -n "$ac_ct_CC" && break
done
if test "x$ac_ct_CC" = x; then
CC=""
else
case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
CC=$ac_ct_CC
fi
fi
fi
test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "no acceptable C compiler found in \$PATH
See \`config.log' for more details" "$LINENO" 5 ; }
# Provide some information about the compiler.
$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
set X $ac_compile
ac_compiler=$2
for ac_option in --version -v -V -qversion; do
{ { ac_try="$ac_compiler $ac_option >&5"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
(eval "$ac_compiler $ac_option >&5") 2>conftest.err
ac_status=$?
if test -s conftest.err; then
sed '10a\
... rest of stderr output deleted ...
10q' conftest.err >conftest.er1
cat conftest.er1 >&5
fi
rm -f conftest.er1 conftest.err
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }
done
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
if test "${ac_cv_c_compiler_gnu+set}" = set; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
main ()
{
#ifndef __GNUC__
choke me
#endif
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
ac_compiler_gnu=yes
else
ac_compiler_gnu=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_cv_c_compiler_gnu=$ac_compiler_gnu
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
$as_echo "$ac_cv_c_compiler_gnu" >&6; }
if test $ac_compiler_gnu = yes; then
GCC=yes
else
GCC=
fi
ac_test_CFLAGS=${CFLAGS+set}
ac_save_CFLAGS=$CFLAGS
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
$as_echo_n "checking whether $CC accepts -g... " >&6; }
if test "${ac_cv_prog_cc_g+set}" = set; then :
$as_echo_n "(cached) " >&6
else
ac_save_c_werror_flag=$ac_c_werror_flag
ac_c_werror_flag=yes
ac_cv_prog_cc_g=no
CFLAGS="-g"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
main ()
{
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
ac_cv_prog_cc_g=yes
else
CFLAGS=""
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
main ()
{
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
else
ac_c_werror_flag=$ac_save_c_werror_flag
CFLAGS="-g"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
main ()
{
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
ac_cv_prog_cc_g=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_c_werror_flag=$ac_save_c_werror_flag
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
$as_echo "$ac_cv_prog_cc_g" >&6; }
if test "$ac_test_CFLAGS" = set; then
CFLAGS=$ac_save_CFLAGS
elif test $ac_cv_prog_cc_g = yes; then
if test "$GCC" = yes; then
CFLAGS="-g -O2"
else
CFLAGS="-g"
fi
else
if test "$GCC" = yes; then
CFLAGS="-O2"
else
CFLAGS=
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
if test "${ac_cv_prog_cc_c89+set}" = set; then :
$as_echo_n "(cached) " >&6
else
ac_cv_prog_cc_c89=no
ac_save_CC=$CC
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include
#include
#include
#include
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
struct buf { int x; };
FILE * (*rcsopen) (struct buf *, struct stat *, int);
static char *e (p, i)
char **p;
int i;
{
return p[i];
}
static char *f (char * (*g) (char **, int), char **p, ...)
{
char *s;
va_list v;
va_start (v,p);
s = g (p, va_arg (v,int));
va_end (v);
return s;
}
/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
function prototypes and stuff, but not '\xHH' hex character constants.
These don't provoke an error unfortunately, instead are silently treated
as 'x'. The following induces an error, until -std is added to get
proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
array size at least. It's necessary to write '\x00'==0 to get something
that's true only with -std. */
int osf4_cc_array ['\x00' == 0 ? 1 : -1];
/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
inside strings and character constants. */
#define FOO(x) 'x'
int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
int test (int i, double x);
struct s1 {int (*f) (int a);};
struct s2 {int (*f) (double a);};
int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
int argc;
char **argv;
int
main ()
{
return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
;
return 0;
}
_ACEOF
for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
do
CC="$ac_save_CC $ac_arg"
if ac_fn_c_try_compile "$LINENO"; then :
ac_cv_prog_cc_c89=$ac_arg
fi
rm -f core conftest.err conftest.$ac_objext
test "x$ac_cv_prog_cc_c89" != "xno" && break
done
rm -f conftest.$ac_ext
CC=$ac_save_CC
fi
# AC_CACHE_VAL
case "x$ac_cv_prog_cc_c89" in
x)
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
$as_echo "none needed" >&6; } ;;
xno)
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
$as_echo "unsupported" >&6; } ;;
*)
CC="$CC $ac_cv_prog_cc_c89"
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
esac
if test "x$ac_cv_prog_cc_c89" != xno; then :
fi
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
depcc="$CC" am_compiler_list=
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
$as_echo_n "checking dependency style of $depcc... " >&6; }
if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
$as_echo_n "(cached) " >&6
else
if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
# We make a subdir and do the tests there. Otherwise we can end up
# making bogus files that we don't know about and never remove. For
# instance it was reported that on HP-UX the gcc test will end up
# making a dummy file named `D' -- because `-MD' means `put the output
# in D'.
mkdir conftest.dir
# Copy depcomp to subdir because otherwise we won't find it if we're
# using a relative directory.
cp "$am_depcomp" conftest.dir
cd conftest.dir
# We will build objects and dependencies in a subdirectory because
# it helps to detect inapplicable dependency modes. For instance
# both Tru64's cc and ICC support -MD to output dependencies as a
# side effect of compilation, but ICC will put the dependencies in
# the current directory while Tru64 will put them in the object
# directory.
mkdir sub
am_cv_CC_dependencies_compiler_type=none
if test "$am_compiler_list" = ""; then
am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
fi
am__universal=false
case " $depcc " in #(
*\ -arch\ *\ -arch\ *) am__universal=true ;;
esac
for depmode in $am_compiler_list; do
# Setup a source with many dependencies, because some compilers
# like to wrap large dependency lists on column 80 (with \), and
# we should not choose a depcomp mode which is confused by this.
#
# We need to recreate these files for each test, as the compiler may
# overwrite some of them when testing with obscure command lines.
# This happens at least with the AIX C compiler.
: > sub/conftest.c
for i in 1 2 3 4 5 6; do
echo '#include "conftst'$i'.h"' >> sub/conftest.c
# Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
# Solaris 8's {/usr,}/bin/sh.
touch sub/conftst$i.h
done
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
# We check with `-c' and `-o' for the sake of the "dashmstdout"
# mode. It turns out that the SunPro C++ compiler does not properly
# handle `-M -o', and we need to detect this. Also, some Intel
# versions had trouble with output in subdirs
am__obj=sub/conftest.${OBJEXT-o}
am__minus_obj="-o $am__obj"
case $depmode in
gcc)
# This depmode causes a compiler race in universal mode.
test "$am__universal" = false || continue
;;
nosideeffect)
# after this tag, mechanisms are not by side-effect, so they'll
# only be used when explicitly requested
if test "x$enable_dependency_tracking" = xyes; then
continue
else
break
fi
;;
msvisualcpp | msvcmsys)
# This compiler won't grok `-c -o', but also, the minuso test has
# not run yet. These depmodes are late enough in the game, and
# so weak that their functioning should not be impacted.
am__obj=conftest.${OBJEXT-o}
am__minus_obj=
;;
none) break ;;
esac
if depmode=$depmode \
source=sub/conftest.c object=$am__obj \
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
$SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
>/dev/null 2>conftest.err &&
grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
# icc doesn't choke on unknown options, it will just issue warnings
# or remarks (even with -Werror). So we grep stderr for any message
# that says an option was ignored or not supported.
# When given -MP, icc 7.0 and 7.1 complain thusly:
# icc: Command line warning: ignoring option '-M'; no argument required
# The diagnosis changed in icc 8.0:
# icc: Command line remark: option '-MP' not supported
if (grep 'ignoring option' conftest.err ||
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
am_cv_CC_dependencies_compiler_type=$depmode
break
fi
fi
done
cd ..
rm -rf conftest.dir
else
am_cv_CC_dependencies_compiler_type=none
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
if
test "x$enable_dependency_tracking" != xno \
&& test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
am__fastdepCC_TRUE=
am__fastdepCC_FALSE='#'
else
am__fastdepCC_TRUE='#'
am__fastdepCC_FALSE=
fi
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
$as_echo_n "checking how to run the C preprocessor... " >&6; }
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
fi
if test -z "$CPP"; then
if test "${ac_cv_prog_CPP+set}" = set; then :
$as_echo_n "(cached) " >&6
else
# Double quotes because CPP needs to be expanded
for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
do
ac_preproc_ok=false
for ac_c_preproc_warn_flag in '' yes
do
# Use a header file that comes with gcc, so configuring glibc
# with a fresh cross-compiler works.
# Prefer to if __STDC__ is defined, since
# exists even on freestanding compilers.
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp. "Syntax error" is here to catch this case.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#ifdef __STDC__
# include
#else
# include
#endif
Syntax error
_ACEOF
if ac_fn_c_try_cpp "$LINENO"; then :
else
# Broken: fails on valid input.
continue
fi
rm -f conftest.err conftest.i conftest.$ac_ext
# OK, works on sane cases. Now check whether nonexistent headers
# can be detected and how.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include
_ACEOF
if ac_fn_c_try_cpp "$LINENO"; then :
# Broken: success on invalid input.
continue
else
# Passes both tests.
ac_preproc_ok=:
break
fi
rm -f conftest.err conftest.i conftest.$ac_ext
done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
rm -f conftest.i conftest.err conftest.$ac_ext
if $ac_preproc_ok; then :
break
fi
done
ac_cv_prog_CPP=$CPP
fi
CPP=$ac_cv_prog_CPP
else
ac_cv_prog_CPP=$CPP
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
$as_echo "$CPP" >&6; }
ac_preproc_ok=false
for ac_c_preproc_warn_flag in '' yes
do
# Use a header file that comes with gcc, so configuring glibc
# with a fresh cross-compiler works.
# Prefer to if __STDC__ is defined, since
# exists even on freestanding compilers.
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp. "Syntax error" is here to catch this case.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#ifdef __STDC__
# include
#else
# include
#endif
Syntax error
_ACEOF
if ac_fn_c_try_cpp "$LINENO"; then :
else
# Broken: fails on valid input.
continue
fi
rm -f conftest.err conftest.i conftest.$ac_ext
# OK, works on sane cases. Now check whether nonexistent headers
# can be detected and how.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include
_ACEOF
if ac_fn_c_try_cpp "$LINENO"; then :
# Broken: success on invalid input.
continue
else
# Passes both tests.
ac_preproc_ok=:
break
fi
rm -f conftest.err conftest.i conftest.$ac_ext
done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
rm -f conftest.i conftest.err conftest.$ac_ext
if $ac_preproc_ok; then :
else
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
See \`config.log' for more details" "$LINENO" 5 ; }
fi
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
set x ${MAKE-make}
ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
cat >conftest.make <<\_ACEOF
SHELL = /bin/sh
all:
@echo '@@@%%%=$(MAKE)=@@@%%%'
_ACEOF
# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
case `${MAKE-make} -f conftest.make 2>/dev/null` in
*@@@%%%=?*=@@@%%%*)
eval ac_cv_prog_make_${ac_make}_set=yes;;
*)
eval ac_cv_prog_make_${ac_make}_set=no;;
esac
rm -f conftest.make
fi
if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
SET_MAKE=
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
SET_MAKE="MAKE=${MAKE-make}"
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
$as_echo_n "checking for X... " >&6; }
# Check whether --with-x was given.
if test "${with_x+set}" = set; then :
withval=$with_x;
fi
# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
if test "x$with_x" = xno; then
# The user explicitly disabled X.
have_x=disabled
else
case $x_includes,$x_libraries in #(
*\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5 ;; #(
*,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
$as_echo_n "(cached) " >&6
else
# One or both of the vars are not set, and there is no cached value.
ac_x_includes=no ac_x_libraries=no
rm -f -r conftest.dir
if mkdir conftest.dir; then
cd conftest.dir
cat >Imakefile <<'_ACEOF'
incroot:
@echo incroot='${INCROOT}'
usrlibdir:
@echo usrlibdir='${USRLIBDIR}'
libdir:
@echo libdir='${LIBDIR}'
_ACEOF
if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
for ac_var in incroot usrlibdir libdir; do
eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
done
# Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
for ac_extension in a so sl dylib la dll; do
if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
test -f "$ac_im_libdir/libX11.$ac_extension"; then
ac_im_usrlibdir=$ac_im_libdir; break
fi
done
# Screen out bogus values from the imake configuration. They are
# bogus both because they are the default anyway, and because
# using them would break gcc on systems where it needs fixed includes.
case $ac_im_incroot in
/usr/include) ac_x_includes= ;;
*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
esac
case $ac_im_usrlibdir in
/usr/lib | /usr/lib64 | /lib | /lib64) ;;
*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
esac
fi
cd ..
rm -f -r conftest.dir
fi
# Standard set of common directories for X headers.
# Check X11 before X11Rn because it is often a symlink to the current release.
ac_x_header_dirs='
/usr/X11/include
/usr/X11R7/include
/usr/X11R6/include
/usr/X11R5/include
/usr/X11R4/include
/usr/include/X11
/usr/include/X11R7
/usr/include/X11R6
/usr/include/X11R5
/usr/include/X11R4
/usr/local/X11/include
/usr/local/X11R7/include
/usr/local/X11R6/include
/usr/local/X11R5/include
/usr/local/X11R4/include
/usr/local/include/X11
/usr/local/include/X11R7
/usr/local/include/X11R6
/usr/local/include/X11R5
/usr/local/include/X11R4
/usr/X386/include
/usr/x386/include
/usr/XFree86/include/X11
/usr/include
/usr/local/include
/usr/unsupported/include
/usr/athena/include
/usr/local/x11r5/include
/usr/lpp/Xamples/include
/usr/openwin/include
/usr/openwin/share/include'
if test "$ac_x_includes" = no; then
# Guess where to find include files, by looking for Xlib.h.
# First, try using that file with no special directory specified.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include
_ACEOF
if ac_fn_c_try_cpp "$LINENO"; then :
# We can compile using X headers with no special include directory.
ac_x_includes=
else
for ac_dir in $ac_x_header_dirs; do
if test -r "$ac_dir/X11/Xlib.h"; then
ac_x_includes=$ac_dir
break
fi
done
fi
rm -f conftest.err conftest.i conftest.$ac_ext
fi # $ac_x_includes = no
if test "$ac_x_libraries" = no; then
# Check for the libraries.
# See if we find them without any special options.
# Don't add to $LIBS permanently.
ac_save_LIBS=$LIBS
LIBS="-lX11 $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include
int
main ()
{
XrmInitialize ()
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
LIBS=$ac_save_LIBS
# We can link X programs with no special library path.
ac_x_libraries=
else
LIBS=$ac_save_LIBS
for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
do
# Don't even attempt the hair of trying to link an X program!
for ac_extension in a so sl dylib la dll; do
if test -r "$ac_dir/libX11.$ac_extension"; then
ac_x_libraries=$ac_dir
break 2
fi
done
done
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi # $ac_x_libraries = no
case $ac_x_includes,$ac_x_libraries in #(
no,* | *,no | *\'*)
# Didn't find X, or a directory has "'" in its name.
ac_cv_have_x="have_x=no";; #(
*)
# Record where we found X for the cache.
ac_cv_have_x="have_x=yes\
ac_x_includes='$ac_x_includes'\
ac_x_libraries='$ac_x_libraries'"
esac
fi
;; #(
*) have_x=yes;;
esac
eval "$ac_cv_have_x"
fi # $with_x != no
if test "$have_x" != yes; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
$as_echo "$have_x" >&6; }
no_x=yes
else
# If each of the values was on the command line, it overrides each guess.
test "x$x_includes" = xNONE && x_includes=$ac_x_includes
test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
# Update the cache value to reflect the command line values.
ac_cv_have_x="have_x=yes\
ac_x_includes='$x_includes'\
ac_x_libraries='$x_libraries'"
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
fi
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_RANLIB+set}" = set; then :
$as_echo_n "(cached) " >&6
else
if test -n "$RANLIB"; then
ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
fi
fi
RANLIB=$ac_cv_prog_RANLIB
if test -n "$RANLIB"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
$as_echo "$RANLIB" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
fi
if test -z "$ac_cv_prog_RANLIB"; then
ac_ct_RANLIB=$RANLIB
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_RANLIB"; then
ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_ac_ct_RANLIB="ranlib"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
fi
fi
ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
if test -n "$ac_ct_RANLIB"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
$as_echo "$ac_ct_RANLIB" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
if test "x$ac_ct_RANLIB" = x; then
RANLIB=":"
else
case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
RANLIB=$ac_ct_RANLIB
fi
else
RANLIB="$ac_cv_prog_RANLIB"
fi
if test "x$CC" != xcc; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5
$as_echo_n "checking whether cc understands -c and -o together... " >&6; }
fi
set dummy $CC; ac_cc=`$as_echo "$2" |
sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
main ()
{
;
return 0;
}
_ACEOF
# Make sure it works both with $CC and with simple cc.
# We do the test twice because some compilers refuse to overwrite an
# existing .o file with -o, though they will create one.
ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
rm -f conftest2.*
if { { case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
(eval "$ac_try") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } &&
test -f conftest2.$ac_objext && { { case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
(eval "$ac_try") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; };
then
eval ac_cv_prog_cc_${ac_cc}_c_o=yes
if test "x$CC" != xcc; then
# Test first that cc exists at all.
if { ac_try='cc -c conftest.$ac_ext >&5'
{ { case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
(eval "$ac_try") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; }; then
ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
rm -f conftest2.*
if { { case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
(eval "$ac_try") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } &&
test -f conftest2.$ac_objext && { { case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
(eval "$ac_try") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; };
then
# cc works too.
:
else
# cc exists but doesn't like -o.
eval ac_cv_prog_cc_${ac_cc}_c_o=no
fi
fi
fi
else
eval ac_cv_prog_cc_${ac_cc}_c_o=no
fi
rm -f core conftest*
fi
if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
fi
# FIXME: we rely on the cache variable name because
# there is no other way.
set dummy $CC
am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
if test "$am_t" != yes; then
# Losing compiler, so override with the script.
# FIXME: It is wrong to rewrite CC.
# But if we don't then we get into trouble of one sort or another.
# A longer-term fix would be to have automake use am__CC in this case,
# and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
CC="$am_aux_dir/compile $CC"
fi
$as_echo "#define ENABLE_STATIC_LIBRARY 1" >>confdefs.h
# Set PREFIX: ./configure OR ./configure --prefix=/usr
if [ $prefix = "NONE" ] ; then
$as_echo "#define INSTALL_PREFIX \"/usr/local\"" >>confdefs.h
else
cat >>confdefs.h <<_ACEOF
#define INSTALL_PREFIX "$prefix"
_ACEOF
fi
# Set used name package glade: *.glade or *.ui
$as_echo "#define PACKAGE_NAME_GLADE \"xcfa.glade\"" >>confdefs.h
$as_echo "#define PACKAGE_NAME_GLADE_UI \"xcfa.ui\"" >>confdefs.h
# nls support
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for nls mode support" >&5
$as_echo_n "checking for nls mode support... " >&6; }
XCFA_LANG="en en_GB es fr de it nl"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
$as_echo_n "checking whether NLS is requested... " >&6; }
# Check whether --enable-nls was given.
if test "${enable_nls+set}" = set; then :
enableval=$enable_nls; USE_NLS=$enableval
else
USE_NLS=yes
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
$as_echo "$USE_NLS" >&6; }
GETTEXT_MACRO_VERSION=0.18
# Prepare PATH_SEPARATOR.
# The user is always right.
if test "${PATH_SEPARATOR+set}" != set; then
echo "#! /bin/sh" >conf$$.sh
echo "exit 0" >>conf$$.sh
chmod +x conf$$.sh
if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
PATH_SEPARATOR=';'
else
PATH_SEPARATOR=:
fi
rm -f conf$$.sh
fi
# Find out how to test for executable files. Don't use a zero-byte file,
# as systems may use methods other than mode bits to determine executability.
cat >conf$$.file <<_ASEOF
#! /bin/sh
exit 0
_ASEOF
chmod +x conf$$.file
if test -x conf$$.file >/dev/null 2>&1; then
ac_executable_p="test -x"
else
ac_executable_p="test -f"
fi
rm -f conf$$.file
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_MSGFMT+set}" = set; then :
$as_echo_n "(cached) " >&6
else
case "$MSGFMT" in
[\\/]* | ?:[\\/]*)
ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
;;
*)
ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
for ac_dir in $PATH; do
IFS="$ac_save_IFS"
test -z "$ac_dir" && ac_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
echo "$as_me: trying $ac_dir/$ac_word..." >&5
if $ac_dir/$ac_word --statistics /dev/null >&5 2>&1 &&
(if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext"
break 2
fi
fi
done
done
IFS="$ac_save_IFS"
test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
;;
esac
fi
MSGFMT="$ac_cv_path_MSGFMT"
if test "$MSGFMT" != ":"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
$as_echo "$MSGFMT" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_GMSGFMT+set}" = set; then :
$as_echo_n "(cached) " >&6
else
case $GMSGFMT in
[\\/]* | ?:[\\/]*)
ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
;;
esac
fi
GMSGFMT=$ac_cv_path_GMSGFMT
if test -n "$GMSGFMT"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
$as_echo "$GMSGFMT" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
'' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
*) MSGFMT_015=$MSGFMT ;;
esac
case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
'' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
*) GMSGFMT_015=$GMSGFMT ;;
esac
# Prepare PATH_SEPARATOR.
# The user is always right.
if test "${PATH_SEPARATOR+set}" != set; then
echo "#! /bin/sh" >conf$$.sh
echo "exit 0" >>conf$$.sh
chmod +x conf$$.sh
if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
PATH_SEPARATOR=';'
else
PATH_SEPARATOR=:
fi
rm -f conf$$.sh
fi
# Find out how to test for executable files. Don't use a zero-byte file,
# as systems may use methods other than mode bits to determine executability.
cat >conf$$.file <<_ASEOF
#! /bin/sh
exit 0
_ASEOF
chmod +x conf$$.file
if test -x conf$$.file >/dev/null 2>&1; then
ac_executable_p="test -x"
else
ac_executable_p="test -f"
fi
rm -f conf$$.file
# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_XGETTEXT+set}" = set; then :
$as_echo_n "(cached) " >&6
else
case "$XGETTEXT" in
[\\/]* | ?:[\\/]*)
ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
;;
*)
ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
for ac_dir in $PATH; do
IFS="$ac_save_IFS"
test -z "$ac_dir" && ac_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
echo "$as_me: trying $ac_dir/$ac_word..." >&5
if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 2>&1 &&
(if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext"
break 2
fi
fi
done
done
IFS="$ac_save_IFS"
test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
;;
esac
fi
XGETTEXT="$ac_cv_path_XGETTEXT"
if test "$XGETTEXT" != ":"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
$as_echo "$XGETTEXT" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
rm -f messages.po
case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
'' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
*) XGETTEXT_015=$XGETTEXT ;;
esac
# Prepare PATH_SEPARATOR.
# The user is always right.
if test "${PATH_SEPARATOR+set}" != set; then
echo "#! /bin/sh" >conf$$.sh
echo "exit 0" >>conf$$.sh
chmod +x conf$$.sh
if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
PATH_SEPARATOR=';'
else
PATH_SEPARATOR=:
fi
rm -f conf$$.sh
fi
# Find out how to test for executable files. Don't use a zero-byte file,
# as systems may use methods other than mode bits to determine executability.
cat >conf$$.file <<_ASEOF
#! /bin/sh
exit 0
_ASEOF
chmod +x conf$$.file
if test -x conf$$.file >/dev/null 2>&1; then
ac_executable_p="test -x"
else
ac_executable_p="test -f"
fi
rm -f conf$$.file
# Extract the first word of "msgmerge", so it can be a program name with args.
set dummy msgmerge; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_MSGMERGE+set}" = set; then :
$as_echo_n "(cached) " >&6
else
case "$MSGMERGE" in
[\\/]* | ?:[\\/]*)
ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
;;
*)
ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
for ac_dir in $PATH; do
IFS="$ac_save_IFS"
test -z "$ac_dir" && ac_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
echo "$as_me: trying $ac_dir/$ac_word..." >&5
if $ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1; then
ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext"
break 2
fi
fi
done
done
IFS="$ac_save_IFS"
test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":"
;;
esac
fi
MSGMERGE="$ac_cv_path_MSGMERGE"
if test "$MSGMERGE" != ":"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
$as_echo "$MSGMERGE" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
test -n "$localedir" || localedir='${datadir}/locale'
test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
ac_config_commands="$ac_config_commands po-directories"
if test "X$prefix" = "XNONE"; then
acl_final_prefix="$ac_default_prefix"
else
acl_final_prefix="$prefix"
fi
if test "X$exec_prefix" = "XNONE"; then
acl_final_exec_prefix='${prefix}'
else
acl_final_exec_prefix="$exec_prefix"
fi
acl_save_prefix="$prefix"
prefix="$acl_final_prefix"
eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
prefix="$acl_save_prefix"
# Make sure we can run config.sub.
$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
$as_echo_n "checking build system type... " >&6; }
if test "${ac_cv_build+set}" = set; then :
$as_echo_n "(cached) " >&6
else
ac_build_alias=$build_alias
test "x$ac_build_alias" = x &&
ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
test "x$ac_build_alias" = x &&
as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
$as_echo "$ac_cv_build" >&6; }
case $ac_cv_build in
*-*-*) ;;
*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
esac
build=$ac_cv_build
ac_save_IFS=$IFS; IFS='-'
set x $ac_cv_build
shift
build_cpu=$1
build_vendor=$2
shift; shift
# Remember, the first character of IFS is used to create $*,
# except with old shells:
build_os=$*
IFS=$ac_save_IFS
case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
$as_echo_n "checking host system type... " >&6; }
if test "${ac_cv_host+set}" = set; then :
$as_echo_n "(cached) " >&6
else
if test "x$host_alias" = x; then
ac_cv_host=$ac_cv_build
else
ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
$as_echo "$ac_cv_host" >&6; }
case $ac_cv_host in
*-*-*) ;;
*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
esac
host=$ac_cv_host
ac_save_IFS=$IFS; IFS='-'
set x $ac_cv_host
shift
host_cpu=$1
host_vendor=$2
shift; shift
# Remember, the first character of IFS is used to create $*,
# except with old shells:
host_os=$*
IFS=$ac_save_IFS
case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
# Check whether --with-gnu-ld was given.
if test "${with_gnu_ld+set}" = set; then :
withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
else
with_gnu_ld=no
fi
# Prepare PATH_SEPARATOR.
# The user is always right.
if test "${PATH_SEPARATOR+set}" != set; then
echo "#! /bin/sh" >conf$$.sh
echo "exit 0" >>conf$$.sh
chmod +x conf$$.sh
if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
PATH_SEPARATOR=';'
else
PATH_SEPARATOR=:
fi
rm -f conf$$.sh
fi
ac_prog=ld
if test "$GCC" = yes; then
# Check if gcc -print-prog-name=ld gives a path.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
$as_echo_n "checking for ld used by GCC... " >&6; }
case $host in
*-*-mingw*)
# gcc leaves a trailing carriage return which upsets mingw
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
*)
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
esac
case $ac_prog in
# Accept absolute paths.
[\\/]* | [A-Za-z]:[\\/]*)
re_direlt='/[^/][^/]*/\.\./'
# Canonicalize the path of ld
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
done
test -z "$LD" && LD="$ac_prog"
;;
"")
# If it fails, then pretend we aren't using GCC.
ac_prog=ld
;;
*)
# If it is relative, then search for the first ld in PATH.
with_gnu_ld=unknown
;;
esac
elif test "$with_gnu_ld" = yes; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
$as_echo_n "checking for GNU ld... " >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
$as_echo_n "checking for non-GNU ld... " >&6; }
fi
if test "${acl_cv_path_LD+set}" = set; then :
$as_echo_n "(cached) " >&6
else
if test -z "$LD"; then
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
for ac_dir in $PATH; do
test -z "$ac_dir" && ac_dir=.
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
acl_cv_path_LD="$ac_dir/$ac_prog"
# Check to see if the program is GNU ld. I'd rather use --version,
# but apparently some GNU ld's only accept -v.
# Break only if it was the GNU/non-GNU ld that we prefer.
case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
*GNU* | *'with BFD'*)
test "$with_gnu_ld" != no && break ;;
*)
test "$with_gnu_ld" != yes && break ;;
esac
fi
done
IFS="$ac_save_ifs"
else
acl_cv_path_LD="$LD" # Let the user override the test with a path.
fi
fi
LD="$acl_cv_path_LD"
if test -n "$LD"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
$as_echo "$LD" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
if test "${acl_cv_prog_gnu_ld+set}" = set; then :
$as_echo_n "(cached) " >&6
else
# I'd rather use --version here, but apparently some GNU ld's only accept -v.
case `$LD -v 2>&1 &5
$as_echo "$acl_cv_prog_gnu_ld" >&6; }
with_gnu_ld=$acl_cv_prog_gnu_ld
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
$as_echo_n "checking for shared library run path origin... " >&6; }
if test "${acl_cv_rpath+set}" = set; then :
$as_echo_n "(cached) " >&6
else
CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
. ./conftest.sh
rm -f ./conftest.sh
acl_cv_rpath=done
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
$as_echo "$acl_cv_rpath" >&6; }
wl="$acl_cv_wl"
acl_libext="$acl_cv_libext"
acl_shlibext="$acl_cv_shlibext"
acl_libname_spec="$acl_cv_libname_spec"
acl_library_names_spec="$acl_cv_library_names_spec"
acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
acl_hardcode_direct="$acl_cv_hardcode_direct"
acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
# Check whether --enable-rpath was given.
if test "${enable_rpath+set}" = set; then :
enableval=$enable_rpath; :
else
enable_rpath=yes
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
if test "${ac_cv_path_GREP+set}" = set; then :
$as_echo_n "(cached) " >&6
else
if test -z "$GREP"; then
ac_path_GREP_found=false
# Loop through the user's path and test for each of PROGNAME-LIST
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_prog in grep ggrep; do
for ac_exec_ext in '' $ac_executable_extensions; do
ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
{ test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
# Check for GNU ac_path_GREP and select it if it is found.
# Check for GNU $ac_path_GREP
case `"$ac_path_GREP" --version 2>&1` in
*GNU*)
ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
*)
ac_count=0
$as_echo_n 0123456789 >"conftest.in"
while :
do
cat "conftest.in" "conftest.in" >"conftest.tmp"
mv "conftest.tmp" "conftest.in"
cp "conftest.in" "conftest.nl"
$as_echo 'GREP' >> "conftest.nl"
"$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
as_fn_arith $ac_count + 1 && ac_count=$as_val
if test $ac_count -gt ${ac_path_GREP_max-0}; then
# Best one so far, save it but keep looking for a better one
ac_cv_path_GREP="$ac_path_GREP"
ac_path_GREP_max=$ac_count
fi
# 10*(2^10) chars as input seems more than enough
test $ac_count -gt 10 && break
done
rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
esac
$ac_path_GREP_found && break 3
done
done
done
IFS=$as_save_IFS
if test -z "$ac_cv_path_GREP"; then
as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
fi
else
ac_cv_path_GREP=$GREP
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
$as_echo "$ac_cv_path_GREP" >&6; }
GREP="$ac_cv_path_GREP"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
$as_echo_n "checking for egrep... " >&6; }
if test "${ac_cv_path_EGREP+set}" = set; then :
$as_echo_n "(cached) " >&6
else
if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
then ac_cv_path_EGREP="$GREP -E"
else
if test -z "$EGREP"; then
ac_path_EGREP_found=false
# Loop through the user's path and test for each of PROGNAME-LIST
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_prog in egrep; do
for ac_exec_ext in '' $ac_executable_extensions; do
ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
{ test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
# Check for GNU ac_path_EGREP and select it if it is found.
# Check for GNU $ac_path_EGREP
case `"$ac_path_EGREP" --version 2>&1` in
*GNU*)
ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
*)
ac_count=0
$as_echo_n 0123456789 >"conftest.in"
while :
do
cat "conftest.in" "conftest.in" >"conftest.tmp"
mv "conftest.tmp" "conftest.in"
cp "conftest.in" "conftest.nl"
$as_echo 'EGREP' >> "conftest.nl"
"$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
as_fn_arith $ac_count + 1 && ac_count=$as_val
if test $ac_count -gt ${ac_path_EGREP_max-0}; then
# Best one so far, save it but keep looking for a better one
ac_cv_path_EGREP="$ac_path_EGREP"
ac_path_EGREP_max=$ac_count
fi
# 10*(2^10) chars as input seems more than enough
test $ac_count -gt 10 && break
done
rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
esac
$ac_path_EGREP_found && break 3
done
done
done
IFS=$as_save_IFS
if test -z "$ac_cv_path_EGREP"; then
as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
fi
else
ac_cv_path_EGREP=$EGREP
fi
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
$as_echo "$ac_cv_path_EGREP" >&6; }
EGREP="$ac_cv_path_EGREP"
acl_libdirstem=lib
acl_libdirstem2=
case "$host_os" in
solaris*)
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5
$as_echo_n "checking for 64-bit host... " >&6; }
if test "${gl_cv_solaris_64bit+set}" = set; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#ifdef _LP64
sixtyfour bits
#endif
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
$EGREP "sixtyfour bits" >/dev/null 2>&1; then :
gl_cv_solaris_64bit=yes
else
gl_cv_solaris_64bit=no
fi
rm -f conftest*
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5
$as_echo "$gl_cv_solaris_64bit" >&6; }
if test $gl_cv_solaris_64bit = yes; then
acl_libdirstem=lib/64
case "$host_cpu" in
sparc*) acl_libdirstem2=lib/sparcv9 ;;
i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
esac
fi
;;
*)
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 ;;
*/../ | */.. )
# Better ignore directories of this form. They are misleading.
;;
*) searchdir=`cd "$searchdir" && pwd`
case "$searchdir" in
*/lib64 ) acl_libdirstem=lib64 ;;
esac ;;
esac
fi
done
IFS="$acl_save_IFS"
fi
;;
esac
test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
use_additional=yes
acl_save_prefix="$prefix"
prefix="$acl_final_prefix"
acl_save_exec_prefix="$exec_prefix"
exec_prefix="$acl_final_exec_prefix"
eval additional_includedir=\"$includedir\"
eval additional_libdir=\"$libdir\"
exec_prefix="$acl_save_exec_prefix"
prefix="$acl_save_prefix"
# Check whether --with-libiconv-prefix was given.
if test "${with_libiconv_prefix+set}" = set; then :
withval=$with_libiconv_prefix;
if test "X$withval" = "Xno"; then
use_additional=no
else
if test "X$withval" = "X"; then
acl_save_prefix="$prefix"
prefix="$acl_final_prefix"
acl_save_exec_prefix="$exec_prefix"
exec_prefix="$acl_final_exec_prefix"
eval additional_includedir=\"$includedir\"
eval additional_libdir=\"$libdir\"
exec_prefix="$acl_save_exec_prefix"
prefix="$acl_save_prefix"
else
additional_includedir="$withval/include"
additional_libdir="$withval/$acl_libdirstem"
if test "$acl_libdirstem2" != "$acl_libdirstem" \
&& ! test -d "$withval/$acl_libdirstem"; then
additional_libdir="$withval/$acl_libdirstem2"
fi
fi
fi
fi
LIBICONV=
LTLIBICONV=
INCICONV=
LIBICONV_PREFIX=
HAVE_LIBICONV=
rpathdirs=
ltrpathdirs=
names_already_handled=
names_next_round='iconv '
while test -n "$names_next_round"; do
names_this_round="$names_next_round"
names_next_round=
for name in $names_this_round; do
already_handled=
for n in $names_already_handled; do
if test "$n" = "$name"; then
already_handled=yes
break
fi
done
if test -z "$already_handled"; then
names_already_handled="$names_already_handled $name"
uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
eval value=\"\$HAVE_LIB$uppername\"
if test -n "$value"; then
if test "$value" = yes; then
eval value=\"\$LIB$uppername\"
test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
eval value=\"\$LTLIB$uppername\"
test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
else
:
fi
else
found_dir=
found_la=
found_so=
found_a=
eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
if test -n "$acl_shlibext"; then
shrext=".$acl_shlibext" # typically: shrext=.so
else
shrext=
fi
if test $use_additional = yes; then
dir="$additional_libdir"
if test -n "$acl_shlibext"; then
if test -f "$dir/$libname$shrext"; then
found_dir="$dir"
found_so="$dir/$libname$shrext"
else
if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
ver=`(cd "$dir" && \
for f in "$libname$shrext".*; do echo "$f"; done \
| sed -e "s,^$libname$shrext\\\\.,," \
| sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
| sed 1q ) 2>/dev/null`
if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
found_dir="$dir"
found_so="$dir/$libname$shrext.$ver"
fi
else
eval library_names=\"$acl_library_names_spec\"
for f in $library_names; do
if test -f "$dir/$f"; then
found_dir="$dir"
found_so="$dir/$f"
break
fi
done
fi
fi
fi
if test "X$found_dir" = "X"; then
if test -f "$dir/$libname.$acl_libext"; then
found_dir="$dir"
found_a="$dir/$libname.$acl_libext"
fi
fi
if test "X$found_dir" != "X"; then
if test -f "$dir/$libname.la"; then
found_la="$dir/$libname.la"
fi
fi
fi
if test "X$found_dir" = "X"; then
for x in $LDFLAGS $LTLIBICONV; do
acl_save_prefix="$prefix"
prefix="$acl_final_prefix"
acl_save_exec_prefix="$exec_prefix"
exec_prefix="$acl_final_exec_prefix"
eval x=\"$x\"
exec_prefix="$acl_save_exec_prefix"
prefix="$acl_save_prefix"
case "$x" in
-L*)
dir=`echo "X$x" | sed -e 's/^X-L//'`
if test -n "$acl_shlibext"; then
if test -f "$dir/$libname$shrext"; then
found_dir="$dir"
found_so="$dir/$libname$shrext"
else
if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
ver=`(cd "$dir" && \
for f in "$libname$shrext".*; do echo "$f"; done \
| sed -e "s,^$libname$shrext\\\\.,," \
| sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
| sed 1q ) 2>/dev/null`
if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
found_dir="$dir"
found_so="$dir/$libname$shrext.$ver"
fi
else
eval library_names=\"$acl_library_names_spec\"
for f in $library_names; do
if test -f "$dir/$f"; then
found_dir="$dir"
found_so="$dir/$f"
break
fi
done
fi
fi
fi
if test "X$found_dir" = "X"; then
if test -f "$dir/$libname.$acl_libext"; then
found_dir="$dir"
found_a="$dir/$libname.$acl_libext"
fi
fi
if test "X$found_dir" != "X"; then
if test -f "$dir/$libname.la"; then
found_la="$dir/$libname.la"
fi
fi
;;
esac
if test "X$found_dir" != "X"; then
break
fi
done
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/$acl_libdirstem" \
|| test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
else
haveit=
for x in $ltrpathdirs; do
if test "X$x" = "X$found_dir"; then
haveit=yes
break
fi
done
if test -z "$haveit"; then
ltrpathdirs="$ltrpathdirs $found_dir"
fi
if test "$acl_hardcode_direct" = yes; then
LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
else
if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
haveit=
for x in $rpathdirs; do
if test "X$x" = "X$found_dir"; then
haveit=yes
break
fi
done
if test -z "$haveit"; then
rpathdirs="$rpathdirs $found_dir"
fi
else
haveit=
for x in $LDFLAGS $LIBICONV; do
acl_save_prefix="$prefix"
prefix="$acl_final_prefix"
acl_save_exec_prefix="$exec_prefix"
exec_prefix="$acl_final_exec_prefix"
eval x=\"$x\"
exec_prefix="$acl_save_exec_prefix"
prefix="$acl_save_prefix"
if test "X$x" = "X-L$found_dir"; then
haveit=yes
break
fi
done
if test -z "$haveit"; then
LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
fi
if test "$acl_hardcode_minus_L" != no; then
LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
else
LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
fi
fi
fi
fi
else
if test "X$found_a" != "X"; then
LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
else
LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
fi
fi
additional_includedir=
case "$found_dir" in
*/$acl_libdirstem | */$acl_libdirstem/)
basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
if test "$name" = 'iconv'; then
LIBICONV_PREFIX="$basedir"
fi
additional_includedir="$basedir/include"
;;
*/$acl_libdirstem2 | */$acl_libdirstem2/)
basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
if test "$name" = 'iconv'; then
LIBICONV_PREFIX="$basedir"
fi
additional_includedir="$basedir/include"
;;
esac
if test "X$additional_includedir" != "X"; then
if test "X$additional_includedir" != "X/usr/include"; then
haveit=
if test "X$additional_includedir" = "X/usr/local/include"; then
if test -n "$GCC"; then
case $host_os in
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
esac
fi
fi
if test -z "$haveit"; then
for x in $CPPFLAGS $INCICONV; do
acl_save_prefix="$prefix"
prefix="$acl_final_prefix"
acl_save_exec_prefix="$exec_prefix"
exec_prefix="$acl_final_exec_prefix"
eval x=\"$x\"
exec_prefix="$acl_save_exec_prefix"
prefix="$acl_save_prefix"
if test "X$x" = "X-I$additional_includedir"; then
haveit=yes
break
fi
done
if test -z "$haveit"; then
if test -d "$additional_includedir"; then
INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
fi
fi
fi
fi
fi
if test -n "$found_la"; then
save_libdir="$libdir"
case "$found_la" in
*/* | *\\*) . "$found_la" ;;
*) . "./$found_la" ;;
esac
libdir="$save_libdir"
for dep in $dependency_libs; do
case "$dep" in
-L*)
additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
&& test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
haveit=
if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
|| test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
if test -n "$GCC"; then
case $host_os in
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
esac
fi
fi
if test -z "$haveit"; then
haveit=
for x in $LDFLAGS $LIBICONV; do
acl_save_prefix="$prefix"
prefix="$acl_final_prefix"
acl_save_exec_prefix="$exec_prefix"
exec_prefix="$acl_final_exec_prefix"
eval x=\"$x\"
exec_prefix="$acl_save_exec_prefix"
prefix="$acl_save_prefix"
if test "X$x" = "X-L$additional_libdir"; then
haveit=yes
break
fi
done
if test -z "$haveit"; then
if test -d "$additional_libdir"; then
LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
fi
fi
haveit=
for x in $LDFLAGS $LTLIBICONV; do
acl_save_prefix="$prefix"
prefix="$acl_final_prefix"
acl_save_exec_prefix="$exec_prefix"
exec_prefix="$acl_final_exec_prefix"
eval x=\"$x\"
exec_prefix="$acl_save_exec_prefix"
prefix="$acl_save_prefix"
if test "X$x" = "X-L$additional_libdir"; then
haveit=yes
break
fi
done
if test -z "$haveit"; then
if test -d "$additional_libdir"; then
LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
fi
fi
fi
fi
;;
-R*)
dir=`echo "X$dep" | sed -e 's/^X-R//'`
if test "$enable_rpath" != no; then
haveit=
for x in $rpathdirs; do
if test "X$x" = "X$dir"; then
haveit=yes
break
fi
done
if test -z "$haveit"; then
rpathdirs="$rpathdirs $dir"
fi
haveit=
for x in $ltrpathdirs; do
if test "X$x" = "X$dir"; then
haveit=yes
break
fi
done
if test -z "$haveit"; then
ltrpathdirs="$ltrpathdirs $dir"
fi
fi
;;
-l*)
names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
;;
*.la)
names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
;;
*)
LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
;;
esac
done
fi
else
LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
fi
fi
fi
done
done
if test "X$rpathdirs" != "X"; then
if test -n "$acl_hardcode_libdir_separator"; then
alldirs=
for found_dir in $rpathdirs; do
alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
done
acl_save_libdir="$libdir"
libdir="$alldirs"
eval flag=\"$acl_hardcode_libdir_flag_spec\"
libdir="$acl_save_libdir"
LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
else
for found_dir in $rpathdirs; do
acl_save_libdir="$libdir"
libdir="$found_dir"
eval flag=\"$acl_hardcode_libdir_flag_spec\"
libdir="$acl_save_libdir"
LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
done
fi
fi
if test "X$ltrpathdirs" != "X"; then
for found_dir in $ltrpathdirs; do
LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
done
fi
# Check whether --enable-nls was given.
if test "${enable_nls+set}" = set; then :
enableval=$enable_nls;
if test "$enableval" = "yes"; then
ALL_LINGUAS=$XCFA_LANG
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5
$as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; }
if test "${gt_cv_func_CFPreferencesCopyAppValue+set}" = set; 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 test "${gt_cv_func_CFLocaleCopyCurrent+set}" = set; 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
LIBINTL=
LTLIBINTL=
POSUB=
case " $gt_needs " in
*" need-formatstring-macros "*) gt_api_version=3 ;;
*" need-ngettext "*) gt_api_version=2 ;;
*) gt_api_version=1 ;;
esac
gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
if test "$USE_NLS" = "yes"; then
gt_use_preinstalled_gnugettext=no
if test $gt_api_version -ge 3; then
gt_revision_test_code='
#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
#endif
typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
'
else
gt_revision_test_code=
fi
if test $gt_api_version -ge 2; then
gt_expression_test_code=' + * ngettext ("", "", 0)'
else
gt_expression_test_code=
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5
$as_echo_n "checking for GNU gettext in libc... " >&6; }
if eval "test \"\${$gt_func_gnugettext_libc+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include
$gt_revision_test_code
extern int _nl_msg_cat_cntr;
extern int *_nl_domain_bindings;
int
main ()
{
bindtextdomain ("", "");
return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
eval "$gt_func_gnugettext_libc=yes"
else
eval "$gt_func_gnugettext_libc=no"
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
eval ac_res=\$$gt_func_gnugettext_libc
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
am_save_CPPFLAGS="$CPPFLAGS"
for element in $INCICONV; do
haveit=
for x in $CPPFLAGS; do
acl_save_prefix="$prefix"
prefix="$acl_final_prefix"
acl_save_exec_prefix="$exec_prefix"
exec_prefix="$acl_final_exec_prefix"
eval x=\"$x\"
exec_prefix="$acl_save_exec_prefix"
prefix="$acl_save_prefix"
if test "X$x" = "X$element"; then
haveit=yes
break
fi
done
if test -z "$haveit"; then
CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
fi
done
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
$as_echo_n "checking for iconv... " >&6; }
if test "${am_cv_func_iconv+set}" = set; then :
$as_echo_n "(cached) " >&6
else
am_cv_func_iconv="no, consider installing GNU libiconv"
am_cv_lib_iconv=no
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include
#include
int
main ()
{
iconv_t cd = iconv_open("","");
iconv(cd,NULL,NULL,NULL,NULL);
iconv_close(cd);
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
am_cv_func_iconv=yes
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
if test "$am_cv_func_iconv" != yes; then
am_save_LIBS="$LIBS"
LIBS="$LIBS $LIBICONV"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include
#include
int
main ()
{
iconv_t cd = iconv_open("","");
iconv(cd,NULL,NULL,NULL,NULL);
iconv_close(cd);
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
am_cv_lib_iconv=yes
am_cv_func_iconv=yes
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS="$am_save_LIBS"
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
$as_echo "$am_cv_func_iconv" >&6; }
if test "$am_cv_func_iconv" = yes; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
$as_echo_n "checking for working iconv... " >&6; }
if test "${am_cv_func_iconv_works+set}" = set; then :
$as_echo_n "(cached) " >&6
else
am_save_LIBS="$LIBS"
if test $am_cv_lib_iconv = yes; then
LIBS="$LIBS $LIBICONV"
fi
if test "$cross_compiling" = yes; then :
case "$host_os" in
aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
*) am_cv_func_iconv_works="guessing yes" ;;
esac
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include
#include
int main ()
{
/* Test against AIX 5.1 bug: Failures are not distinguishable from successful
returns. */
{
iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
if (cd_utf8_to_88591 != (iconv_t)(-1))
{
static const char input[] = "\342\202\254"; /* EURO SIGN */
char buf[10];
const char *inptr = input;
size_t inbytesleft = strlen (input);
char *outptr = buf;
size_t outbytesleft = sizeof (buf);
size_t res = iconv (cd_utf8_to_88591,
(char **) &inptr, &inbytesleft,
&outptr, &outbytesleft);
if (res == 0)
return 1;
}
}
/* Test against Solaris 10 bug: Failures are not distinguishable from
successful returns. */
{
iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
if (cd_ascii_to_88591 != (iconv_t)(-1))
{
static const char input[] = "\263";
char buf[10];
const char *inptr = input;
size_t inbytesleft = strlen (input);
char *outptr = buf;
size_t outbytesleft = sizeof (buf);
size_t res = iconv (cd_ascii_to_88591,
(char **) &inptr, &inbytesleft,
&outptr, &outbytesleft);
if (res == 0)
return 1;
}
}
#if 0 /* This bug could be worked around by the caller. */
/* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
{
iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
if (cd_88591_to_utf8 != (iconv_t)(-1))
{
static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
char buf[50];
const char *inptr = input;
size_t inbytesleft = strlen (input);
char *outptr = buf;
size_t outbytesleft = sizeof (buf);
size_t res = iconv (cd_88591_to_utf8,
(char **) &inptr, &inbytesleft,
&outptr, &outbytesleft);
if ((int)res > 0)
return 1;
}
}
#endif
/* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
provided. */
if (/* Try standardized names. */
iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
/* Try IRIX, OSF/1 names. */
&& iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
/* Try AIX names. */
&& iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
/* Try HP-UX names. */
&& iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
return 1;
return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
am_cv_func_iconv_works=yes
else
am_cv_func_iconv_works=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
LIBS="$am_save_LIBS"
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
$as_echo "$am_cv_func_iconv_works" >&6; }
case "$am_cv_func_iconv_works" in
*no) am_func_iconv=no am_cv_lib_iconv=no ;;
*) am_func_iconv=yes ;;
esac
else
am_func_iconv=no am_cv_lib_iconv=no
fi
if test "$am_func_iconv" = yes; then
$as_echo "#define HAVE_ICONV 1" >>confdefs.h
fi
if test "$am_cv_lib_iconv" = yes; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
$as_echo_n "checking how to link with libiconv... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
$as_echo "$LIBICONV" >&6; }
else
CPPFLAGS="$am_save_CPPFLAGS"
LIBICONV=
LTLIBICONV=
fi
use_additional=yes
acl_save_prefix="$prefix"
prefix="$acl_final_prefix"
acl_save_exec_prefix="$exec_prefix"
exec_prefix="$acl_final_exec_prefix"
eval additional_includedir=\"$includedir\"
eval additional_libdir=\"$libdir\"
exec_prefix="$acl_save_exec_prefix"
prefix="$acl_save_prefix"
# Check whether --with-libintl-prefix was given.
if test "${with_libintl_prefix+set}" = set; then :
withval=$with_libintl_prefix;
if test "X$withval" = "Xno"; then
use_additional=no
else
if test "X$withval" = "X"; then
acl_save_prefix="$prefix"
prefix="$acl_final_prefix"
acl_save_exec_prefix="$exec_prefix"
exec_prefix="$acl_final_exec_prefix"
eval additional_includedir=\"$includedir\"
eval additional_libdir=\"$libdir\"
exec_prefix="$acl_save_exec_prefix"
prefix="$acl_save_prefix"
else
additional_includedir="$withval/include"
additional_libdir="$withval/$acl_libdirstem"
if test "$acl_libdirstem2" != "$acl_libdirstem" \
&& ! test -d "$withval/$acl_libdirstem"; then
additional_libdir="$withval/$acl_libdirstem2"
fi
fi
fi
fi
LIBINTL=
LTLIBINTL=
INCINTL=
LIBINTL_PREFIX=
HAVE_LIBINTL=
rpathdirs=
ltrpathdirs=
names_already_handled=
names_next_round='intl '
while test -n "$names_next_round"; do
names_this_round="$names_next_round"
names_next_round=
for name in $names_this_round; do
already_handled=
for n in $names_already_handled; do
if test "$n" = "$name"; then
already_handled=yes
break
fi
done
if test -z "$already_handled"; then
names_already_handled="$names_already_handled $name"
uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
eval value=\"\$HAVE_LIB$uppername\"
if test -n "$value"; then
if test "$value" = yes; then
eval value=\"\$LIB$uppername\"
test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value"
eval value=\"\$LTLIB$uppername\"
test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value"
else
:
fi
else
found_dir=
found_la=
found_so=
found_a=
eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
if test -n "$acl_shlibext"; then
shrext=".$acl_shlibext" # typically: shrext=.so
else
shrext=
fi
if test $use_additional = yes; then
dir="$additional_libdir"
if test -n "$acl_shlibext"; then
if test -f "$dir/$libname$shrext"; then
found_dir="$dir"
found_so="$dir/$libname$shrext"
else
if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
ver=`(cd "$dir" && \
for f in "$libname$shrext".*; do echo "$f"; done \
| sed -e "s,^$libname$shrext\\\\.,," \
| sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
| sed 1q ) 2>/dev/null`
if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
found_dir="$dir"
found_so="$dir/$libname$shrext.$ver"
fi
else
eval library_names=\"$acl_library_names_spec\"
for f in $library_names; do
if test -f "$dir/$f"; then
found_dir="$dir"
found_so="$dir/$f"
break
fi
done
fi
fi
fi
if test "X$found_dir" = "X"; then
if test -f "$dir/$libname.$acl_libext"; then
found_dir="$dir"
found_a="$dir/$libname.$acl_libext"
fi
fi
if test "X$found_dir" != "X"; then
if test -f "$dir/$libname.la"; then
found_la="$dir/$libname.la"
fi
fi
fi
if test "X$found_dir" = "X"; then
for x in $LDFLAGS $LTLIBINTL; do
acl_save_prefix="$prefix"
prefix="$acl_final_prefix"
acl_save_exec_prefix="$exec_prefix"
exec_prefix="$acl_final_exec_prefix"
eval x=\"$x\"
exec_prefix="$acl_save_exec_prefix"
prefix="$acl_save_prefix"
case "$x" in
-L*)
dir=`echo "X$x" | sed -e 's/^X-L//'`
if test -n "$acl_shlibext"; then
if test -f "$dir/$libname$shrext"; then
found_dir="$dir"
found_so="$dir/$libname$shrext"
else
if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
ver=`(cd "$dir" && \
for f in "$libname$shrext".*; do echo "$f"; done \
| sed -e "s,^$libname$shrext\\\\.,," \
| sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
| sed 1q ) 2>/dev/null`
if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
found_dir="$dir"
found_so="$dir/$libname$shrext.$ver"
fi
else
eval library_names=\"$acl_library_names_spec\"
for f in $library_names; do
if test -f "$dir/$f"; then
found_dir="$dir"
found_so="$dir/$f"
break
fi
done
fi
fi
fi
if test "X$found_dir" = "X"; then
if test -f "$dir/$libname.$acl_libext"; then
found_dir="$dir"
found_a="$dir/$libname.$acl_libext"
fi
fi
if test "X$found_dir" != "X"; then
if test -f "$dir/$libname.la"; then
found_la="$dir/$libname.la"
fi
fi
;;
esac
if test "X$found_dir" != "X"; then
break
fi
done
fi
if test "X$found_dir" != "X"; then
LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name"
if test "X$found_so" != "X"; then
if test "$enable_rpath" = no \
|| test "X$found_dir" = "X/usr/$acl_libdirstem" \
|| test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
else
haveit=
for x in $ltrpathdirs; do
if test "X$x" = "X$found_dir"; then
haveit=yes
break
fi
done
if test -z "$haveit"; then
ltrpathdirs="$ltrpathdirs $found_dir"
fi
if test "$acl_hardcode_direct" = yes; then
LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
else
if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
haveit=
for x in $rpathdirs; do
if test "X$x" = "X$found_dir"; then
haveit=yes
break
fi
done
if test -z "$haveit"; then
rpathdirs="$rpathdirs $found_dir"
fi
else
haveit=
for x in $LDFLAGS $LIBINTL; do
acl_save_prefix="$prefix"
prefix="$acl_final_prefix"
acl_save_exec_prefix="$exec_prefix"
exec_prefix="$acl_final_exec_prefix"
eval x=\"$x\"
exec_prefix="$acl_save_exec_prefix"
prefix="$acl_save_prefix"
if test "X$x" = "X-L$found_dir"; then
haveit=yes
break
fi
done
if test -z "$haveit"; then
LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir"
fi
if test "$acl_hardcode_minus_L" != no; then
LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
else
LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
fi
fi
fi
fi
else
if test "X$found_a" != "X"; then
LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a"
else
LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name"
fi
fi
additional_includedir=
case "$found_dir" in
*/$acl_libdirstem | */$acl_libdirstem/)
basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
if test "$name" = 'intl'; then
LIBINTL_PREFIX="$basedir"
fi
additional_includedir="$basedir/include"
;;
*/$acl_libdirstem2 | */$acl_libdirstem2/)
basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
if test "$name" = 'intl'; then
LIBINTL_PREFIX="$basedir"
fi
additional_includedir="$basedir/include"
;;
esac
if test "X$additional_includedir" != "X"; then
if test "X$additional_includedir" != "X/usr/include"; then
haveit=
if test "X$additional_includedir" = "X/usr/local/include"; then
if test -n "$GCC"; then
case $host_os in
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
esac
fi
fi
if test -z "$haveit"; then
for x in $CPPFLAGS $INCINTL; do
acl_save_prefix="$prefix"
prefix="$acl_final_prefix"
acl_save_exec_prefix="$exec_prefix"
exec_prefix="$acl_final_exec_prefix"
eval x=\"$x\"
exec_prefix="$acl_save_exec_prefix"
prefix="$acl_save_prefix"
if test "X$x" = "X-I$additional_includedir"; then
haveit=yes
break
fi
done
if test -z "$haveit"; then
if test -d "$additional_includedir"; then
INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir"
fi
fi
fi
fi
fi
if test -n "$found_la"; then
save_libdir="$libdir"
case "$found_la" in
*/* | *\\*) . "$found_la" ;;
*) . "./$found_la" ;;
esac
libdir="$save_libdir"
for dep in $dependency_libs; do
case "$dep" in
-L*)
additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
&& test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
haveit=
if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
|| test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
if test -n "$GCC"; then
case $host_os in
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
esac
fi
fi
if test -z "$haveit"; then
haveit=
for x in $LDFLAGS $LIBINTL; do
acl_save_prefix="$prefix"
prefix="$acl_final_prefix"
acl_save_exec_prefix="$exec_prefix"
exec_prefix="$acl_final_exec_prefix"
eval x=\"$x\"
exec_prefix="$acl_save_exec_prefix"
prefix="$acl_save_prefix"
if test "X$x" = "X-L$additional_libdir"; then
haveit=yes
break
fi
done
if test -z "$haveit"; then
if test -d "$additional_libdir"; then
LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir"
fi
fi
haveit=
for x in $LDFLAGS $LTLIBINTL; do
acl_save_prefix="$prefix"
prefix="$acl_final_prefix"
acl_save_exec_prefix="$exec_prefix"
exec_prefix="$acl_final_exec_prefix"
eval x=\"$x\"
exec_prefix="$acl_save_exec_prefix"
prefix="$acl_save_prefix"
if test "X$x" = "X-L$additional_libdir"; then
haveit=yes
break
fi
done
if test -z "$haveit"; then
if test -d "$additional_libdir"; then
LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir"
fi
fi
fi
fi
;;
-R*)
dir=`echo "X$dep" | sed -e 's/^X-R//'`
if test "$enable_rpath" != no; then
haveit=
for x in $rpathdirs; do
if test "X$x" = "X$dir"; then
haveit=yes
break
fi
done
if test -z "$haveit"; then
rpathdirs="$rpathdirs $dir"
fi
haveit=
for x in $ltrpathdirs; do
if test "X$x" = "X$dir"; then
haveit=yes
break
fi
done
if test -z "$haveit"; then
ltrpathdirs="$ltrpathdirs $dir"
fi
fi
;;
-l*)
names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
;;
*.la)
names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
;;
*)
LIBINTL="${LIBINTL}${LIBINTL:+ }$dep"
LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep"
;;
esac
done
fi
else
LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name"
fi
fi
fi
done
done
if test "X$rpathdirs" != "X"; then
if test -n "$acl_hardcode_libdir_separator"; then
alldirs=
for found_dir in $rpathdirs; do
alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
done
acl_save_libdir="$libdir"
libdir="$alldirs"
eval flag=\"$acl_hardcode_libdir_flag_spec\"
libdir="$acl_save_libdir"
LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
else
for found_dir in $rpathdirs; do
acl_save_libdir="$libdir"
libdir="$found_dir"
eval flag=\"$acl_hardcode_libdir_flag_spec\"
libdir="$acl_save_libdir"
LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
done
fi
fi
if test "X$ltrpathdirs" != "X"; then
for found_dir in $ltrpathdirs; do
LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir"
done
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5
$as_echo_n "checking for GNU gettext in libintl... " >&6; }
if eval "test \"\${$gt_func_gnugettext_libintl+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
gt_save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $INCINTL"
gt_save_LIBS="$LIBS"
LIBS="$LIBS $LIBINTL"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include
$gt_revision_test_code
extern int _nl_msg_cat_cntr;
extern
#ifdef __cplusplus
"C"
#endif
const char *_nl_expand_alias (const char *);
int
main ()
{
bindtextdomain ("", "");
return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
eval "$gt_func_gnugettext_libintl=yes"
else
eval "$gt_func_gnugettext_libintl=no"
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
LIBS="$LIBS $LIBICONV"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include
$gt_revision_test_code
extern int _nl_msg_cat_cntr;
extern
#ifdef __cplusplus
"C"
#endif
const char *_nl_expand_alias (const char *);
int
main ()
{
bindtextdomain ("", "");
return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
LIBINTL="$LIBINTL $LIBICONV"
LTLIBINTL="$LTLIBINTL $LTLIBICONV"
eval "$gt_func_gnugettext_libintl=yes"
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
CPPFLAGS="$gt_save_CPPFLAGS"
LIBS="$gt_save_LIBS"
fi
eval ac_res=\$$gt_func_gnugettext_libintl
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
fi
if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
|| { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
&& test "$PACKAGE" != gettext-runtime \
&& test "$PACKAGE" != gettext-tools; }; then
gt_use_preinstalled_gnugettext=yes
else
LIBINTL=
LTLIBINTL=
INCINTL=
fi
if test -n "$INTL_MACOSX_LIBS"; then
if test "$gt_use_preinstalled_gnugettext" = "yes" \
|| test "$nls_cv_use_gnu_gettext" = "yes"; then
LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
fi
fi
if test "$gt_use_preinstalled_gnugettext" = "yes" \
|| test "$nls_cv_use_gnu_gettext" = "yes"; then
$as_echo "#define ENABLE_NLS 1" >>confdefs.h
else
USE_NLS=no
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5
$as_echo_n "checking whether to use NLS... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
$as_echo "$USE_NLS" >&6; }
if test "$USE_NLS" = "yes"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5
$as_echo_n "checking where the gettext function comes from... " >&6; }
if test "$gt_use_preinstalled_gnugettext" = "yes"; then
if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
gt_source="external libintl"
else
gt_source="libc"
fi
else
gt_source="included intl directory"
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5
$as_echo "$gt_source" >&6; }
fi
if test "$USE_NLS" = "yes"; then
if test "$gt_use_preinstalled_gnugettext" = "yes"; then
if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5
$as_echo_n "checking how to link with libintl... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5
$as_echo "$LIBINTL" >&6; }
for element in $INCINTL; do
haveit=
for x in $CPPFLAGS; do
acl_save_prefix="$prefix"
prefix="$acl_final_prefix"
acl_save_exec_prefix="$exec_prefix"
exec_prefix="$acl_final_exec_prefix"
eval x=\"$x\"
exec_prefix="$acl_save_exec_prefix"
prefix="$acl_save_prefix"
if test "X$x" = "X$element"; then
haveit=yes
break
fi
done
if test -z "$haveit"; then
CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
fi
done
fi
$as_echo "#define HAVE_GETTEXT 1" >>confdefs.h
$as_echo "#define HAVE_DCGETTEXT 1" >>confdefs.h
fi
POSUB=po
fi
INTLLIBS="$LIBINTL"
$as_echo "#define ENABLE_NLS 1" >>confdefs.h
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
ALL_LINGUAS=
USE_NLS="no"
fi
else
ALL_LINGUAS=$XCFA_LANG
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5
$as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; }
if test "${gt_cv_func_CFPreferencesCopyAppValue+set}" = set; 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 test "${gt_cv_func_CFLocaleCopyCurrent+set}" = set; 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
LIBINTL=
LTLIBINTL=
POSUB=
case " $gt_needs " in
*" need-formatstring-macros "*) gt_api_version=3 ;;
*" need-ngettext "*) gt_api_version=2 ;;
*) gt_api_version=1 ;;
esac
gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
if test "$USE_NLS" = "yes"; then
gt_use_preinstalled_gnugettext=no
if test $gt_api_version -ge 3; then
gt_revision_test_code='
#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
#endif
typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
'
else
gt_revision_test_code=
fi
if test $gt_api_version -ge 2; then
gt_expression_test_code=' + * ngettext ("", "", 0)'
else
gt_expression_test_code=
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5
$as_echo_n "checking for GNU gettext in libc... " >&6; }
if eval "test \"\${$gt_func_gnugettext_libc+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include
$gt_revision_test_code
extern int _nl_msg_cat_cntr;
extern int *_nl_domain_bindings;
int
main ()
{
bindtextdomain ("", "");
return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
eval "$gt_func_gnugettext_libc=yes"
else
eval "$gt_func_gnugettext_libc=no"
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
eval ac_res=\$$gt_func_gnugettext_libc
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
am_save_CPPFLAGS="$CPPFLAGS"
for element in $INCICONV; do
haveit=
for x in $CPPFLAGS; do
acl_save_prefix="$prefix"
prefix="$acl_final_prefix"
acl_save_exec_prefix="$exec_prefix"
exec_prefix="$acl_final_exec_prefix"
eval x=\"$x\"
exec_prefix="$acl_save_exec_prefix"
prefix="$acl_save_prefix"
if test "X$x" = "X$element"; then
haveit=yes
break
fi
done
if test -z "$haveit"; then
CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
fi
done
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
$as_echo_n "checking for iconv... " >&6; }
if test "${am_cv_func_iconv+set}" = set; then :
$as_echo_n "(cached) " >&6
else
am_cv_func_iconv="no, consider installing GNU libiconv"
am_cv_lib_iconv=no
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include
#include
int
main ()
{
iconv_t cd = iconv_open("","");
iconv(cd,NULL,NULL,NULL,NULL);
iconv_close(cd);
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
am_cv_func_iconv=yes
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
if test "$am_cv_func_iconv" != yes; then
am_save_LIBS="$LIBS"
LIBS="$LIBS $LIBICONV"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include
#include
int
main ()
{
iconv_t cd = iconv_open("","");
iconv(cd,NULL,NULL,NULL,NULL);
iconv_close(cd);
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
am_cv_lib_iconv=yes
am_cv_func_iconv=yes
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS="$am_save_LIBS"
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
$as_echo "$am_cv_func_iconv" >&6; }
if test "$am_cv_func_iconv" = yes; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
$as_echo_n "checking for working iconv... " >&6; }
if test "${am_cv_func_iconv_works+set}" = set; then :
$as_echo_n "(cached) " >&6
else
am_save_LIBS="$LIBS"
if test $am_cv_lib_iconv = yes; then
LIBS="$LIBS $LIBICONV"
fi
if test "$cross_compiling" = yes; then :
case "$host_os" in
aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
*) am_cv_func_iconv_works="guessing yes" ;;
esac
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include
#include
int main ()
{
/* Test against AIX 5.1 bug: Failures are not distinguishable from successful
returns. */
{
iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
if (cd_utf8_to_88591 != (iconv_t)(-1))
{
static const char input[] = "\342\202\254"; /* EURO SIGN */
char buf[10];
const char *inptr = input;
size_t inbytesleft = strlen (input);
char *outptr = buf;
size_t outbytesleft = sizeof (buf);
size_t res = iconv (cd_utf8_to_88591,
(char **) &inptr, &inbytesleft,
&outptr, &outbytesleft);
if (res == 0)
return 1;
}
}
/* Test against Solaris 10 bug: Failures are not distinguishable from
successful returns. */
{
iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
if (cd_ascii_to_88591 != (iconv_t)(-1))
{
static const char input[] = "\263";
char buf[10];
const char *inptr = input;
size_t inbytesleft = strlen (input);
char *outptr = buf;
size_t outbytesleft = sizeof (buf);
size_t res = iconv (cd_ascii_to_88591,
(char **) &inptr, &inbytesleft,
&outptr, &outbytesleft);
if (res == 0)
return 1;
}
}
#if 0 /* This bug could be worked around by the caller. */
/* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
{
iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
if (cd_88591_to_utf8 != (iconv_t)(-1))
{
static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
char buf[50];
const char *inptr = input;
size_t inbytesleft = strlen (input);
char *outptr = buf;
size_t outbytesleft = sizeof (buf);
size_t res = iconv (cd_88591_to_utf8,
(char **) &inptr, &inbytesleft,
&outptr, &outbytesleft);
if ((int)res > 0)
return 1;
}
}
#endif
/* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
provided. */
if (/* Try standardized names. */
iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
/* Try IRIX, OSF/1 names. */
&& iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
/* Try AIX names. */
&& iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
/* Try HP-UX names. */
&& iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
return 1;
return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
am_cv_func_iconv_works=yes
else
am_cv_func_iconv_works=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
LIBS="$am_save_LIBS"
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
$as_echo "$am_cv_func_iconv_works" >&6; }
case "$am_cv_func_iconv_works" in
*no) am_func_iconv=no am_cv_lib_iconv=no ;;
*) am_func_iconv=yes ;;
esac
else
am_func_iconv=no am_cv_lib_iconv=no
fi
if test "$am_func_iconv" = yes; then
$as_echo "#define HAVE_ICONV 1" >>confdefs.h
fi
if test "$am_cv_lib_iconv" = yes; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
$as_echo_n "checking how to link with libiconv... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
$as_echo "$LIBICONV" >&6; }
else
CPPFLAGS="$am_save_CPPFLAGS"
LIBICONV=
LTLIBICONV=
fi
use_additional=yes
acl_save_prefix="$prefix"
prefix="$acl_final_prefix"
acl_save_exec_prefix="$exec_prefix"
exec_prefix="$acl_final_exec_prefix"
eval additional_includedir=\"$includedir\"
eval additional_libdir=\"$libdir\"
exec_prefix="$acl_save_exec_prefix"
prefix="$acl_save_prefix"
# Check whether --with-libintl-prefix was given.
if test "${with_libintl_prefix+set}" = set; then :
withval=$with_libintl_prefix;
if test "X$withval" = "Xno"; then
use_additional=no
else
if test "X$withval" = "X"; then
acl_save_prefix="$prefix"
prefix="$acl_final_prefix"
acl_save_exec_prefix="$exec_prefix"
exec_prefix="$acl_final_exec_prefix"
eval additional_includedir=\"$includedir\"
eval additional_libdir=\"$libdir\"
exec_prefix="$acl_save_exec_prefix"
prefix="$acl_save_prefix"
else
additional_includedir="$withval/include"
additional_libdir="$withval/$acl_libdirstem"
if test "$acl_libdirstem2" != "$acl_libdirstem" \
&& ! test -d "$withval/$acl_libdirstem"; then
additional_libdir="$withval/$acl_libdirstem2"
fi
fi
fi
fi
LIBINTL=
LTLIBINTL=
INCINTL=
LIBINTL_PREFIX=
HAVE_LIBINTL=
rpathdirs=
ltrpathdirs=
names_already_handled=
names_next_round='intl '
while test -n "$names_next_round"; do
names_this_round="$names_next_round"
names_next_round=
for name in $names_this_round; do
already_handled=
for n in $names_already_handled; do
if test "$n" = "$name"; then
already_handled=yes
break
fi
done
if test -z "$already_handled"; then
names_already_handled="$names_already_handled $name"
uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
eval value=\"\$HAVE_LIB$uppername\"
if test -n "$value"; then
if test "$value" = yes; then
eval value=\"\$LIB$uppername\"
test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value"
eval value=\"\$LTLIB$uppername\"
test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value"
else
:
fi
else
found_dir=
found_la=
found_so=
found_a=
eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
if test -n "$acl_shlibext"; then
shrext=".$acl_shlibext" # typically: shrext=.so
else
shrext=
fi
if test $use_additional = yes; then
dir="$additional_libdir"
if test -n "$acl_shlibext"; then
if test -f "$dir/$libname$shrext"; then
found_dir="$dir"
found_so="$dir/$libname$shrext"
else
if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
ver=`(cd "$dir" && \
for f in "$libname$shrext".*; do echo "$f"; done \
| sed -e "s,^$libname$shrext\\\\.,," \
| sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
| sed 1q ) 2>/dev/null`
if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
found_dir="$dir"
found_so="$dir/$libname$shrext.$ver"
fi
else
eval library_names=\"$acl_library_names_spec\"
for f in $library_names; do
if test -f "$dir/$f"; then
found_dir="$dir"
found_so="$dir/$f"
break
fi
done
fi
fi
fi
if test "X$found_dir" = "X"; then
if test -f "$dir/$libname.$acl_libext"; then
found_dir="$dir"
found_a="$dir/$libname.$acl_libext"
fi
fi
if test "X$found_dir" != "X"; then
if test -f "$dir/$libname.la"; then
found_la="$dir/$libname.la"
fi
fi
fi
if test "X$found_dir" = "X"; then
for x in $LDFLAGS $LTLIBINTL; do
acl_save_prefix="$prefix"
prefix="$acl_final_prefix"
acl_save_exec_prefix="$exec_prefix"
exec_prefix="$acl_final_exec_prefix"
eval x=\"$x\"
exec_prefix="$acl_save_exec_prefix"
prefix="$acl_save_prefix"
case "$x" in
-L*)
dir=`echo "X$x" | sed -e 's/^X-L//'`
if test -n "$acl_shlibext"; then
if test -f "$dir/$libname$shrext"; then
found_dir="$dir"
found_so="$dir/$libname$shrext"
else
if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
ver=`(cd "$dir" && \
for f in "$libname$shrext".*; do echo "$f"; done \
| sed -e "s,^$libname$shrext\\\\.,," \
| sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
| sed 1q ) 2>/dev/null`
if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
found_dir="$dir"
found_so="$dir/$libname$shrext.$ver"
fi
else
eval library_names=\"$acl_library_names_spec\"
for f in $library_names; do
if test -f "$dir/$f"; then
found_dir="$dir"
found_so="$dir/$f"
break
fi
done
fi
fi
fi
if test "X$found_dir" = "X"; then
if test -f "$dir/$libname.$acl_libext"; then
found_dir="$dir"
found_a="$dir/$libname.$acl_libext"
fi
fi
if test "X$found_dir" != "X"; then
if test -f "$dir/$libname.la"; then
found_la="$dir/$libname.la"
fi
fi
;;
esac
if test "X$found_dir" != "X"; then
break
fi
done
fi
if test "X$found_dir" != "X"; then
LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name"
if test "X$found_so" != "X"; then
if test "$enable_rpath" = no \
|| test "X$found_dir" = "X/usr/$acl_libdirstem" \
|| test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
else
haveit=
for x in $ltrpathdirs; do
if test "X$x" = "X$found_dir"; then
haveit=yes
break
fi
done
if test -z "$haveit"; then
ltrpathdirs="$ltrpathdirs $found_dir"
fi
if test "$acl_hardcode_direct" = yes; then
LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
else
if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
haveit=
for x in $rpathdirs; do
if test "X$x" = "X$found_dir"; then
haveit=yes
break
fi
done
if test -z "$haveit"; then
rpathdirs="$rpathdirs $found_dir"
fi
else
haveit=
for x in $LDFLAGS $LIBINTL; do
acl_save_prefix="$prefix"
prefix="$acl_final_prefix"
acl_save_exec_prefix="$exec_prefix"
exec_prefix="$acl_final_exec_prefix"
eval x=\"$x\"
exec_prefix="$acl_save_exec_prefix"
prefix="$acl_save_prefix"
if test "X$x" = "X-L$found_dir"; then
haveit=yes
break
fi
done
if test -z "$haveit"; then
LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir"
fi
if test "$acl_hardcode_minus_L" != no; then
LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
else
LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
fi
fi
fi
fi
else
if test "X$found_a" != "X"; then
LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a"
else
LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name"
fi
fi
additional_includedir=
case "$found_dir" in
*/$acl_libdirstem | */$acl_libdirstem/)
basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
if test "$name" = 'intl'; then
LIBINTL_PREFIX="$basedir"
fi
additional_includedir="$basedir/include"
;;
*/$acl_libdirstem2 | */$acl_libdirstem2/)
basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
if test "$name" = 'intl'; then
LIBINTL_PREFIX="$basedir"
fi
additional_includedir="$basedir/include"
;;
esac
if test "X$additional_includedir" != "X"; then
if test "X$additional_includedir" != "X/usr/include"; then
haveit=
if test "X$additional_includedir" = "X/usr/local/include"; then
if test -n "$GCC"; then
case $host_os in
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
esac
fi
fi
if test -z "$haveit"; then
for x in $CPPFLAGS $INCINTL; do
acl_save_prefix="$prefix"
prefix="$acl_final_prefix"
acl_save_exec_prefix="$exec_prefix"
exec_prefix="$acl_final_exec_prefix"
eval x=\"$x\"
exec_prefix="$acl_save_exec_prefix"
prefix="$acl_save_prefix"
if test "X$x" = "X-I$additional_includedir"; then
haveit=yes
break
fi
done
if test -z "$haveit"; then
if test -d "$additional_includedir"; then
INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir"
fi
fi
fi
fi
fi
if test -n "$found_la"; then
save_libdir="$libdir"
case "$found_la" in
*/* | *\\*) . "$found_la" ;;
*) . "./$found_la" ;;
esac
libdir="$save_libdir"
for dep in $dependency_libs; do
case "$dep" in
-L*)
additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
&& test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
haveit=
if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
|| test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
if test -n "$GCC"; then
case $host_os in
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
esac
fi
fi
if test -z "$haveit"; then
haveit=
for x in $LDFLAGS $LIBINTL; do
acl_save_prefix="$prefix"
prefix="$acl_final_prefix"
acl_save_exec_prefix="$exec_prefix"
exec_prefix="$acl_final_exec_prefix"
eval x=\"$x\"
exec_prefix="$acl_save_exec_prefix"
prefix="$acl_save_prefix"
if test "X$x" = "X-L$additional_libdir"; then
haveit=yes
break
fi
done
if test -z "$haveit"; then
if test -d "$additional_libdir"; then
LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir"
fi
fi
haveit=
for x in $LDFLAGS $LTLIBINTL; do
acl_save_prefix="$prefix"
prefix="$acl_final_prefix"
acl_save_exec_prefix="$exec_prefix"
exec_prefix="$acl_final_exec_prefix"
eval x=\"$x\"
exec_prefix="$acl_save_exec_prefix"
prefix="$acl_save_prefix"
if test "X$x" = "X-L$additional_libdir"; then
haveit=yes
break
fi
done
if test -z "$haveit"; then
if test -d "$additional_libdir"; then
LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir"
fi
fi
fi
fi
;;
-R*)
dir=`echo "X$dep" | sed -e 's/^X-R//'`
if test "$enable_rpath" != no; then
haveit=
for x in $rpathdirs; do
if test "X$x" = "X$dir"; then
haveit=yes
break
fi
done
if test -z "$haveit"; then
rpathdirs="$rpathdirs $dir"
fi
haveit=
for x in $ltrpathdirs; do
if test "X$x" = "X$dir"; then
haveit=yes
break
fi
done
if test -z "$haveit"; then
ltrpathdirs="$ltrpathdirs $dir"
fi
fi
;;
-l*)
names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
;;
*.la)
names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
;;
*)
LIBINTL="${LIBINTL}${LIBINTL:+ }$dep"
LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep"
;;
esac
done
fi
else
LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name"
fi
fi
fi
done
done
if test "X$rpathdirs" != "X"; then
if test -n "$acl_hardcode_libdir_separator"; then
alldirs=
for found_dir in $rpathdirs; do
alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
done
acl_save_libdir="$libdir"
libdir="$alldirs"
eval flag=\"$acl_hardcode_libdir_flag_spec\"
libdir="$acl_save_libdir"
LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
else
for found_dir in $rpathdirs; do
acl_save_libdir="$libdir"
libdir="$found_dir"
eval flag=\"$acl_hardcode_libdir_flag_spec\"
libdir="$acl_save_libdir"
LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
done
fi
fi
if test "X$ltrpathdirs" != "X"; then
for found_dir in $ltrpathdirs; do
LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir"
done
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5
$as_echo_n "checking for GNU gettext in libintl... " >&6; }
if eval "test \"\${$gt_func_gnugettext_libintl+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
gt_save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $INCINTL"
gt_save_LIBS="$LIBS"
LIBS="$LIBS $LIBINTL"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include
$gt_revision_test_code
extern int _nl_msg_cat_cntr;
extern
#ifdef __cplusplus
"C"
#endif
const char *_nl_expand_alias (const char *);
int
main ()
{
bindtextdomain ("", "");
return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
eval "$gt_func_gnugettext_libintl=yes"
else
eval "$gt_func_gnugettext_libintl=no"
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
LIBS="$LIBS $LIBICONV"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include
$gt_revision_test_code
extern int _nl_msg_cat_cntr;
extern
#ifdef __cplusplus
"C"
#endif
const char *_nl_expand_alias (const char *);
int
main ()
{
bindtextdomain ("", "");
return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
LIBINTL="$LIBINTL $LIBICONV"
LTLIBINTL="$LTLIBINTL $LTLIBICONV"
eval "$gt_func_gnugettext_libintl=yes"
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
CPPFLAGS="$gt_save_CPPFLAGS"
LIBS="$gt_save_LIBS"
fi
eval ac_res=\$$gt_func_gnugettext_libintl
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
fi
if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
|| { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
&& test "$PACKAGE" != gettext-runtime \
&& test "$PACKAGE" != gettext-tools; }; then
gt_use_preinstalled_gnugettext=yes
else
LIBINTL=
LTLIBINTL=
INCINTL=
fi
if test -n "$INTL_MACOSX_LIBS"; then
if test "$gt_use_preinstalled_gnugettext" = "yes" \
|| test "$nls_cv_use_gnu_gettext" = "yes"; then
LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
fi
fi
if test "$gt_use_preinstalled_gnugettext" = "yes" \
|| test "$nls_cv_use_gnu_gettext" = "yes"; then
$as_echo "#define ENABLE_NLS 1" >>confdefs.h
else
USE_NLS=no
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5
$as_echo_n "checking whether to use NLS... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
$as_echo "$USE_NLS" >&6; }
if test "$USE_NLS" = "yes"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5
$as_echo_n "checking where the gettext function comes from... " >&6; }
if test "$gt_use_preinstalled_gnugettext" = "yes"; then
if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
gt_source="external libintl"
else
gt_source="libc"
fi
else
gt_source="included intl directory"
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5
$as_echo "$gt_source" >&6; }
fi
if test "$USE_NLS" = "yes"; then
if test "$gt_use_preinstalled_gnugettext" = "yes"; then
if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5
$as_echo_n "checking how to link with libintl... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5
$as_echo "$LIBINTL" >&6; }
for element in $INCINTL; do
haveit=
for x in $CPPFLAGS; do
acl_save_prefix="$prefix"
prefix="$acl_final_prefix"
acl_save_exec_prefix="$exec_prefix"
exec_prefix="$acl_final_exec_prefix"
eval x=\"$x\"
exec_prefix="$acl_save_exec_prefix"
prefix="$acl_save_prefix"
if test "X$x" = "X$element"; then
haveit=yes
break
fi
done
if test -z "$haveit"; then
CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
fi
done
fi
$as_echo "#define HAVE_GETTEXT 1" >>confdefs.h
$as_echo "#define HAVE_DCGETTEXT 1" >>confdefs.h
fi
POSUB=po
fi
INTLLIBS="$LIBINTL"
$as_echo "#define ENABLE_NLS 1" >>confdefs.h
fi
GETTEXT_PACKAGE=$PACKAGE
cat >>confdefs.h <<_ACEOF
#define GETTEXT_PACKAGE "$GETTEXT_PACKAGE"
_ACEOF
# Checks for libraries.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libutils_test_file_exist in -llib" >&5
$as_echo_n "checking for libutils_test_file_exist in -llib... " >&6; }
if test "${ac_cv_lib_lib_libutils_test_file_exist+set}" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-llib $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 libutils_test_file_exist ();
int
main ()
{
return libutils_test_file_exist ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_lib_libutils_test_file_exist=yes
else
ac_cv_lib_lib_libutils_test_file_exist=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_lib_libutils_test_file_exist" >&5
$as_echo "$ac_cv_lib_lib_libutils_test_file_exist" >&6; }
if test "x$ac_cv_lib_lib_libutils_test_file_exist" = x""yes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBLIB 1
_ACEOF
LIBS="-llib $LIBS"
fi
# Checks for header files.
ac_header_dirent=no
for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
if eval "test \"\${$as_ac_Header+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include
#include <$ac_hdr>
int
main ()
{
if ((DIR *) 0)
return 0;
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
eval "$as_ac_Header=yes"
else
eval "$as_ac_Header=no"
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
eval ac_res=\$$as_ac_Header
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
_ACEOF
ac_header_dirent=$ac_hdr; break
fi
done
# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
if test $ac_header_dirent = dirent.h; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
$as_echo_n "checking for library containing opendir... " >&6; }
if test "${ac_cv_search_opendir+set}" = set; then :
$as_echo_n "(cached) " >&6
else
ac_func_search_save_LIBS=$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 opendir ();
int
main ()
{
return opendir ();
;
return 0;
}
_ACEOF
for ac_lib in '' dir; do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_search_opendir=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext
if test "${ac_cv_search_opendir+set}" = set; then :
break
fi
done
if test "${ac_cv_search_opendir+set}" = set; then :
else
ac_cv_search_opendir=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
$as_echo "$ac_cv_search_opendir" >&6; }
ac_res=$ac_cv_search_opendir
if test "$ac_res" != no; then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
fi
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
$as_echo_n "checking for library containing opendir... " >&6; }
if test "${ac_cv_search_opendir+set}" = set; then :
$as_echo_n "(cached) " >&6
else
ac_func_search_save_LIBS=$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 opendir ();
int
main ()
{
return opendir ();
;
return 0;
}
_ACEOF
for ac_lib in '' x; do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_search_opendir=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext
if test "${ac_cv_search_opendir+set}" = set; then :
break
fi
done
if test "${ac_cv_search_opendir+set}" = set; then :
else
ac_cv_search_opendir=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
$as_echo "$ac_cv_search_opendir" >&6; }
ac_res=$ac_cv_search_opendir
if test "$ac_res" != no; then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
$as_echo_n "checking for ANSI C header files... " >&6; }
if test "${ac_cv_header_stdc+set}" = set; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include
#include
#include
#include
int
main ()
{
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
ac_cv_header_stdc=yes
else
ac_cv_header_stdc=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
$EGREP "memchr" >/dev/null 2>&1; then :
else
ac_cv_header_stdc=no
fi
rm -f conftest*
fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
$EGREP "free" >/dev/null 2>&1; then :
else
ac_cv_header_stdc=no
fi
rm -f conftest*
fi
if test $ac_cv_header_stdc = yes; then
# /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
if test "$cross_compiling" = yes; then :
:
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include
#include
#if ((' ' & 0x0FF) == 0x020)
# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
#else
# define ISLOWER(c) \
(('a' <= (c) && (c) <= 'i') \
|| ('j' <= (c) && (c) <= 'r') \
|| ('s' <= (c) && (c) <= 'z'))
# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
#endif
#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
int
main ()
{
int i;
for (i = 0; i < 256; i++)
if (XOR (islower (i), ISLOWER (i))
|| toupper (i) != TOUPPER (i))
return 2;
return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
else
ac_cv_header_stdc=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
$as_echo "$ac_cv_header_stdc" >&6; }
if test $ac_cv_header_stdc = yes; then
$as_echo "#define STDC_HEADERS 1" >>confdefs.h
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
$as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
if test "${ac_cv_header_sys_wait_h+set}" = set; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include
#include
#ifndef WEXITSTATUS
# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
#endif
#ifndef WIFEXITED
# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
#endif
int
main ()
{
int s;
wait (&s);
s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
ac_cv_header_sys_wait_h=yes
else
ac_cv_header_sys_wait_h=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
$as_echo "$ac_cv_header_sys_wait_h" >&6; }
if test $ac_cv_header_sys_wait_h = yes; then
$as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
fi
# On IRIX 5.3, sys/types and inttypes.h are conflicting.
for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
inttypes.h stdint.h unistd.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
"
if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
fi
done
for ac_header in fcntl.h libintl.h stdlib.h string.h unistd.h sys/time.h math.h locale.h sys/socket.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
fi
done
# Checks for typedefs, structures, and compiler characteristics.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
if test "${ac_cv_header_stdbool_h+set}" = set; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include
#ifndef bool
"error: bool is not defined"
#endif
#ifndef false
"error: false is not defined"
#endif
#if false
"error: false is not 0"
#endif
#ifndef true
"error: true is not defined"
#endif
#if true != 1
"error: true is not 1"
#endif
#ifndef __bool_true_false_are_defined
"error: __bool_true_false_are_defined is not defined"
#endif
struct s { _Bool s: 1; _Bool t; } s;
char a[true == 1 ? 1 : -1];
char b[false == 0 ? 1 : -1];
char c[__bool_true_false_are_defined == 1 ? 1 : -1];
char d[(bool) 0.5 == true ? 1 : -1];
bool e = &s;
char f[(_Bool) 0.0 == false ? 1 : -1];
char g[true];
char h[sizeof (_Bool)];
char i[sizeof s.t];
enum { j = false, k = true, l = false * true, m = true * 256 };
/* The following fails for
HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
_Bool n[m];
char o[sizeof n == m * sizeof n[0] ? 1 : -1];
char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
# if defined __xlc__ || defined __GNUC__
/* Catch a bug in IBM AIX xlc compiler version 6.0.0.0
reported by James Lemley on 2005-10-05; see
http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html
This test is not quite right, since xlc is allowed to
reject this program, as the initializer for xlcbug is
not one of the forms that C requires support for.
However, doing the test right would require a runtime
test, and that would make cross-compilation harder.
Let us hope that IBM fixes the xlc bug, and also adds
support for this kind of constant expression. In the
meantime, this test will reject xlc, which is OK, since
our stdbool.h substitute should suffice. We also test
this with GCC, where it should work, to detect more
quickly whether someone messes up the test in the
future. */
char digs[] = "0123456789";
int xlcbug = 1 / (&(digs + 5)[-2 + (bool) 1] == &digs[4] ? 1 : -1);
# endif
/* Catch a bug in an HP-UX C compiler. See
http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
*/
_Bool q = true;
_Bool *pq = &q;
int
main ()
{
*pq |= q;
*pq |= ! q;
/* Refer to every declared value, to avoid compiler optimizations. */
return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
+ !m + !n + !o + !p + !q + !pq);
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
ac_cv_header_stdbool_h=yes
else
ac_cv_header_stdbool_h=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
$as_echo "$ac_cv_header_stdbool_h" >&6; }
ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
if test "x$ac_cv_type__Bool" = x""yes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE__BOOL 1
_ACEOF
fi
if test $ac_cv_header_stdbool_h = yes; then
$as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
if test "${ac_cv_c_const+set}" = set; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
main ()
{
/* FIXME: Include the comments suggested by Paul. */
#ifndef __cplusplus
/* Ultrix mips cc rejects this. */
typedef int charset[2];
const charset cs;
/* SunOS 4.1.1 cc rejects this. */
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};
/* AIX XL C 1.02.0.0 rejects this.
It does not let you subtract one const X* pointer from another in
an arm of an if-expression whose if-part is not a constant
expression */
const char *g = "string";
pcpcc = &g + (g ? g-g : 0);
/* HPUX 7.0 cc rejects these. */
++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;
*t++ = 0;
if (s) return 0;
}
{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
int x[] = {25, 17};
const int *foo = &x[0];
++foo;
}
{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
typedef const int *iptr;
iptr p = 0;
++p;
}
{ /* AIX XL C 1.02.0.0 rejects this saying
"k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
struct s { int j; const int *ap[3]; };
struct s *b; b->j = 5;
}
{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
const int foo = 10;
if (!foo) return 0;
}
return !cs[0] && !zero.x;
#endif
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
ac_cv_c_const=yes
else
ac_cv_c_const=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
$as_echo "$ac_cv_c_const" >&6; }
if test $ac_cv_c_const = no; then
$as_echo "#define const /**/" >>confdefs.h
fi
ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
if test "x$ac_cv_type_pid_t" = x""yes; then :
else
cat >>confdefs.h <<_ACEOF
#define pid_t int
_ACEOF
fi
ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
if test "x$ac_cv_type_size_t" = x""yes; then :
else
cat >>confdefs.h <<_ACEOF
#define size_t unsigned int
_ACEOF
fi
ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
if test "x$ac_cv_type_ssize_t" = x""yes; then :
else
cat >>confdefs.h <<_ACEOF
#define ssize_t int
_ACEOF
fi
ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
case $ac_cv_c_int64_t in #(
no|yes) ;; #(
*)
cat >>confdefs.h <<_ACEOF
#define int64_t $ac_cv_c_int64_t
_ACEOF
;;
esac
# Checks for library functions.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether closedir returns void" >&5
$as_echo_n "checking whether closedir returns void... " >&6; }
if test "${ac_cv_func_closedir_void+set}" = set; then :
$as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then :
ac_cv_func_closedir_void=yes
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$ac_includes_default
#include <$ac_header_dirent>
#ifndef __cplusplus
int closedir ();
#endif
int
main ()
{
return closedir (opendir (".")) != 0;
;
return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
ac_cv_func_closedir_void=no
else
ac_cv_func_closedir_void=yes
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_closedir_void" >&5
$as_echo "$ac_cv_func_closedir_void" >&6; }
if test $ac_cv_func_closedir_void = yes; then
$as_echo "#define CLOSEDIR_VOID 1" >>confdefs.h
fi
for ac_header in vfork.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
if test "x$ac_cv_header_vfork_h" = x""yes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_VFORK_H 1
_ACEOF
fi
done
for ac_func in fork vfork
do :
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 `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
fi
done
if test "x$ac_cv_func_fork" = xyes; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
$as_echo_n "checking for working fork... " >&6; }
if test "${ac_cv_func_fork_works+set}" = set; then :
$as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then :
ac_cv_func_fork_works=cross
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$ac_includes_default
int
main ()
{
/* By Ruediger Kuhlmann. */
return fork () < 0;
;
return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
ac_cv_func_fork_works=yes
else
ac_cv_func_fork_works=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
$as_echo "$ac_cv_func_fork_works" >&6; }
else
ac_cv_func_fork_works=$ac_cv_func_fork
fi
if test "x$ac_cv_func_fork_works" = xcross; then
case $host in
*-*-amigaos* | *-*-msdosdjgpp*)
# Override, as these systems have only a dummy fork() stub
ac_cv_func_fork_works=no
;;
*)
ac_cv_func_fork_works=yes
;;
esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
fi
ac_cv_func_vfork_works=$ac_cv_func_vfork
if test "x$ac_cv_func_vfork" = xyes; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
$as_echo_n "checking for working vfork... " >&6; }
if test "${ac_cv_func_vfork_works+set}" = set; then :
$as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then :
ac_cv_func_vfork_works=cross
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Thanks to Paul Eggert for this test. */
$ac_includes_default
#include
#ifdef HAVE_VFORK_H
# include
#endif
/* On some sparc systems, changes by the child to local and incoming
argument registers are propagated back to the parent. The compiler
is told about this with #include , but some compilers
(e.g. gcc -O) don't grok . Test for this by using a
static variable whose address is put into a register that is
clobbered by the vfork. */
static void
#ifdef __cplusplus
sparc_address_test (int arg)
# else
sparc_address_test (arg) int arg;
#endif
{
static pid_t child;
if (!child) {
child = vfork ();
if (child < 0) {
perror ("vfork");
_exit(2);
}
if (!child) {
arg = getpid();
write(-1, "", 0);
_exit (arg);
}
}
}
int
main ()
{
pid_t parent = getpid ();
pid_t child;
sparc_address_test (0);
child = vfork ();
if (child == 0) {
/* Here is another test for sparc vfork register problems. This
test uses lots of local variables, at least as many local
variables as main has allocated so far including compiler
temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
reuse the register of parent for one of the local variables,
since it will think that parent can't possibly be used any more
in this routine. Assigning to the local variable will thus
munge parent in the parent process. */
pid_t
p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
/* Convince the compiler that p..p7 are live; otherwise, it might
use the same hardware register for all 8 local variables. */
if (p != p1 || p != p2 || p != p3 || p != p4
|| p != p5 || p != p6 || p != p7)
_exit(1);
/* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
from child file descriptors. If the child closes a descriptor
before it execs or exits, this munges the parent's descriptor
as well. Test for this by closing stdout in the child. */
_exit(close(fileno(stdout)) != 0);
} else {
int status;
struct stat st;
while (wait(&status) != child)
;
return (
/* Was there some problem with vforking? */
child < 0
/* Did the child fail? (This shouldn't happen.) */
|| status
/* Did the vfork/compiler bug occur? */
|| parent != getpid()
/* Did the file descriptor bug occur? */
|| fstat(fileno(stdout), &st) != 0
);
}
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
ac_cv_func_vfork_works=yes
else
ac_cv_func_vfork_works=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
$as_echo "$ac_cv_func_vfork_works" >&6; }
fi;
if test "x$ac_cv_func_fork_works" = xcross; then
ac_cv_func_vfork_works=$ac_cv_func_vfork
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
fi
if test "x$ac_cv_func_vfork_works" = xyes; then
$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
else
$as_echo "#define vfork fork" >>confdefs.h
fi
if test "x$ac_cv_func_fork_works" = xyes; then
$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
fi
if test $ac_cv_c_compiler_gnu = yes; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5
$as_echo_n "checking whether $CC needs -traditional... " >&6; }
if test "${ac_cv_prog_gcc_traditional+set}" = set; then :
$as_echo_n "(cached) " >&6
else
ac_pattern="Autoconf.*'x'"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include
Autoconf TIOCGETP
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
$EGREP "$ac_pattern" >/dev/null 2>&1; then :
ac_cv_prog_gcc_traditional=yes
else
ac_cv_prog_gcc_traditional=no
fi
rm -f conftest*
if test $ac_cv_prog_gcc_traditional = no; then
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include
Autoconf TCGETA
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
$EGREP "$ac_pattern" >/dev/null 2>&1; then :
ac_cv_prog_gcc_traditional=yes
fi
rm -f conftest*
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5
$as_echo "$ac_cv_prog_gcc_traditional" >&6; }
if test $ac_cv_prog_gcc_traditional = yes; then
CC="$CC -traditional"
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
$as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
if test "${ac_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then :
$as_echo_n "(cached) " >&6
else
rm -f conftest.sym conftest.file
echo >conftest.file
if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then
if test "$cross_compiling" = yes; then :
ac_cv_func_lstat_dereferences_slashed_symlink=no
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$ac_includes_default
int
main ()
{
struct stat sbuf;
/* Linux will dereference the symlink and fail, as required by POSIX.
That is better in the sense that it means we will not
have to compile and use the lstat wrapper. */
return lstat ("conftest.sym/", &sbuf) == 0;
;
return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
ac_cv_func_lstat_dereferences_slashed_symlink=yes
else
ac_cv_func_lstat_dereferences_slashed_symlink=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
else
# If the `ln -s' command failed, then we probably don't even
# have an lstat function.
ac_cv_func_lstat_dereferences_slashed_symlink=no
fi
rm -f conftest.sym conftest.file
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5
$as_echo "$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; }
test $ac_cv_func_lstat_dereferences_slashed_symlink = yes &&
cat >>confdefs.h <<_ACEOF
#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
_ACEOF
if test "x$ac_cv_func_lstat_dereferences_slashed_symlink" = xno; then
case " $LIBOBJS " in
*" lstat.$ac_objext "* ) ;;
*) LIBOBJS="$LIBOBJS lstat.$ac_objext"
;;
esac
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat accepts an empty string" >&5
$as_echo_n "checking whether lstat accepts an empty string... " >&6; }
if test "${ac_cv_func_lstat_empty_string_bug+set}" = set; then :
$as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then :
ac_cv_func_lstat_empty_string_bug=yes
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$ac_includes_default
int
main ()
{
struct stat sbuf;
return lstat ("", &sbuf) == 0;
;
return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
ac_cv_func_lstat_empty_string_bug=no
else
ac_cv_func_lstat_empty_string_bug=yes
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat_empty_string_bug" >&5
$as_echo "$ac_cv_func_lstat_empty_string_bug" >&6; }
if test $ac_cv_func_lstat_empty_string_bug = yes; then
case " $LIBOBJS " in
*" lstat.$ac_objext "* ) ;;
*) LIBOBJS="$LIBOBJS lstat.$ac_objext"
;;
esac
cat >>confdefs.h <<_ACEOF
#define HAVE_LSTAT_EMPTY_STRING_BUG 1
_ACEOF
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
$as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
if test "${ac_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then :
$as_echo_n "(cached) " >&6
else
rm -f conftest.sym conftest.file
echo >conftest.file
if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then
if test "$cross_compiling" = yes; then :
ac_cv_func_lstat_dereferences_slashed_symlink=no
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$ac_includes_default
int
main ()
{
struct stat sbuf;
/* Linux will dereference the symlink and fail, as required by POSIX.
That is better in the sense that it means we will not
have to compile and use the lstat wrapper. */
return lstat ("conftest.sym/", &sbuf) == 0;
;
return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
ac_cv_func_lstat_dereferences_slashed_symlink=yes
else
ac_cv_func_lstat_dereferences_slashed_symlink=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
else
# If the `ln -s' command failed, then we probably don't even
# have an lstat function.
ac_cv_func_lstat_dereferences_slashed_symlink=no
fi
rm -f conftest.sym conftest.file
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5
$as_echo "$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; }
test $ac_cv_func_lstat_dereferences_slashed_symlink = yes &&
cat >>confdefs.h <<_ACEOF
#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
_ACEOF
if test "x$ac_cv_func_lstat_dereferences_slashed_symlink" = xno; then
case " $LIBOBJS " in
*" lstat.$ac_objext "* ) ;;
*) LIBOBJS="$LIBOBJS lstat.$ac_objext"
;;
esac
fi
for ac_header in stdlib.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
if test "x$ac_cv_header_stdlib_h" = x""yes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_STDLIB_H 1
_ACEOF
fi
done
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
$as_echo_n "checking for GNU libc compatible malloc... " >&6; }
if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then :
$as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then :
ac_cv_func_malloc_0_nonnull=no
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#if defined STDC_HEADERS || defined HAVE_STDLIB_H
# include
#else
char *malloc ();
#endif
int
main ()
{
return ! malloc (0);
;
return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
ac_cv_func_malloc_0_nonnull=yes
else
ac_cv_func_malloc_0_nonnull=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
if test $ac_cv_func_malloc_0_nonnull = yes; then :
$as_echo "#define HAVE_MALLOC 1" >>confdefs.h
else
$as_echo "#define HAVE_MALLOC 0" >>confdefs.h
case " $LIBOBJS " in
*" malloc.$ac_objext "* ) ;;
*) LIBOBJS="$LIBOBJS malloc.$ac_objext"
;;
esac
$as_echo "#define malloc rpl_malloc" >>confdefs.h
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
$as_echo_n "checking return type of signal handlers... " >&6; }
if test "${ac_cv_type_signal+set}" = set; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include
#include
int
main ()
{
return *(signal (0, 0)) (0) == 1;
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
ac_cv_type_signal=int
else
ac_cv_type_signal=void
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
$as_echo "$ac_cv_type_signal" >&6; }
cat >>confdefs.h <<_ACEOF
#define RETSIGTYPE $ac_cv_type_signal
_ACEOF
for ac_func in dup2 getcwd memset mkfifo setlocale strcasecmp strchr strdup strncasecmp strrchr strstr uname gettimeofday strtoul socket
do :
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 `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
fi
done
#
# debug and ansi support
#
# Check whether --enable-debug_pg was given.
if test "${enable_debug_pg+set}" = set; then :
enableval=$enable_debug_pg;
else
enable_debug_pg=no
fi
# Check whether --enable-debug was given.
if test "${enable_debug+set}" = set; then :
enableval=$enable_debug;
else
enable_debug=no
fi
# Check whether --enable-ansi was given.
if test "${enable_ansi+set}" = set; then :
enableval=$enable_ansi;
else
enable_ansi=no
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for debug mode request" >&5
$as_echo_n "checking for debug mode request... " >&6; }
if test "$enable_debug" = "yes"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
$as_echo "#define DEBUG 1" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking With ansi compilate" >&5
$as_echo_n "checking With ansi compilate... " >&6; }
if test "$enable_ansi" = "yes"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
$as_echo "#define ENABLE_ANSI 1" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking With enable_debug_pg" >&5
$as_echo_n "checking With enable_debug_pg... " >&6; }
if test "$enable_debug_pg" = "yes"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
$as_echo "#define ENABLE_DEBUG_PG 1" >>confdefs.h
echo "***"
echo "*** enable_debug=yes, enable_ansi=yes, enable_debug_pg=yes"
echo "*** CFLAGS=-pg -g -O2 -Wall -ansi -D_REENTRANT -DLinux -Wl,--export-dynamic"
echo "***"
CFLAGS="-pg -g -O2 -Wall -ansi -D_REENTRANT -DLinux -Wl,--export-dynamic"
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
echo "***"
echo "*** enable_debug=yes, enable_ansi=yes, enable_debug_pg=no"
echo "*** CFLAGS=-g -O2 -Wall -ansi -D_REENTRANT -DLinux -Wl,--export-dynamic"
echo "***"
CFLAGS="-g -O2 -Wall -ansi -D_REENTRANT -DLinux -Wl,--export-dynamic"
fi
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking With enable_debug_pg" >&5
$as_echo_n "checking With enable_debug_pg... " >&6; }
if test "$enable_debug_pg" = "yes"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
$as_echo "#define ENABLE_DEBUG_PG 1" >>confdefs.h
echo "***"
echo "*** enable_debug=yes, enable_ansi=no, enable_debug_pg=yes"
echo "*** CFLAGS=-pg -g -O2 -Wall -D_REENTRANT -DLinux -Wl,--export-dynamic"
echo "***"
CFLAGS="-pg -g -O2 -Wall -D_REENTRANT -DLinux -Wl,--export-dynamic"
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
echo "***"
echo "*** enable_debug=yes, enable_ansi=no, enable_debug_pg=no"
echo "*** CFLAGS=-g -O2 -Wall -D_REENTRANT -DLinux -Wl,--export-dynamic"
echo "***"
CFLAGS="-g -O2 -Wall -D_REENTRANT -DLinux -Wl,--export-dynamic"
fi
fi
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking With ansi compilate" >&5
$as_echo_n "checking With ansi compilate... " >&6; }
if test "$enable_ansi" = "yes"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
$as_echo "#define ENABLE_ANSI 1" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking With enable_debug_pg" >&5
$as_echo_n "checking With enable_debug_pg... " >&6; }
if test "$enable_debug_pg" = "yes"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
$as_echo "#define ENABLE_DEBUG_PG 1" >>confdefs.h
echo "***"
echo "*** enable_debug=no, enable_ansi=yes, enable_debug_pg=yes"
echo "*** CFLAGS=-pg -Wall -ansi -D_REENTRANT -DLinux -Wl,--export-dynamic"
echo "***"
CFLAGS="-pg -Wall -ansi -D_REENTRANT -DLinux -Wl,--export-dynamic"
else
echo "***"
echo "*** enable_debug=no, enable_ansi=yes, enable_debug_pg=no"
echo "*** CFLAGS=-Wall -ansi -D_REENTRANT -DLinux -Wl,--export-dynamic"
echo "***"
CFLAGS="-Wall -ansi -D_REENTRANT -DLinux -Wl,--export-dynamic"
fi
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking With enable_debug_pg" >&5
$as_echo_n "checking With enable_debug_pg... " >&6; }
if test "$enable_debug_pg" = "yes"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
$as_echo "#define ENABLE_DEBUG_PG 1" >>confdefs.h
echo "***"
echo "*** enable_debug=no, enable_ansi=no, enable_debug_pg=yes"
echo "*** CFLAGS=-pg -Wall -D_REENTRANT -DLinux -Wl,--export-dynamic"
echo "***"
CFLAGS="-pg -Wall -D_REENTRANT -DLinux -Wl,--export-dynamic"
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
echo "***"
echo "*** enable_debug=no, enable_ansi=no, enable_debug_pg=no"
echo "*** CFLAGS=-Wall -O3 -D_REENTRANT -DLinux -Wl,--export-dynamic"
echo "***"
CFLAGS="-Wall -O3 -D_REENTRANT -DLinux -Wl,--export-dynamic"
fi
fi
fi
#
# Check for complex math functions support: -lm
#
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for roundf in -lm" >&5
$as_echo_n "checking for roundf in -lm... " >&6; }
if test "${ac_cv_lib_m_roundf+set}" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lm $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 roundf ();
int
main ()
{
return roundf ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_m_roundf=yes
else
ac_cv_lib_m_roundf=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_m_roundf" >&5
$as_echo "$ac_cv_lib_m_roundf" >&6; }
if test "x$ac_cv_lib_m_roundf" = x""yes; then :
LDFLAGS="-lm $LDFLAGS"
fi
#
# gtk support
#
pkg_modules="gtk+-2.0 cairo glib-2.0 gthread-2.0"
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
$as_echo_n "(cached) " >&6
else
case $PKG_CONFIG in
[\\/]* | ?:[\\/]*)
ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
;;
esac
fi
PKG_CONFIG=$ac_cv_path_PKG_CONFIG
if test -n "$PKG_CONFIG"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
fi
if test -z "$ac_cv_path_PKG_CONFIG"; then
ac_pt_PKG_CONFIG=$PKG_CONFIG
# Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
$as_echo_n "(cached) " >&6
else
case $ac_pt_PKG_CONFIG in
[\\/]* | ?:[\\/]*)
ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
;;
esac
fi
ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
if test -n "$ac_pt_PKG_CONFIG"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
$as_echo "$ac_pt_PKG_CONFIG" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
if test "x$ac_pt_PKG_CONFIG" = x; then
PKG_CONFIG=""
else
case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
PKG_CONFIG=$ac_pt_PKG_CONFIG
fi
else
PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
fi
fi
if test -n "$PKG_CONFIG"; then
_pkg_min_version=0.9.0
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
PKG_CONFIG=""
fi
fi
pkg_failed=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PACKAGE" >&5
$as_echo_n "checking for PACKAGE... " >&6; }
if test -n "$PACKAGE_CFLAGS"; then
pkg_cv_PACKAGE_CFLAGS="$PACKAGE_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$pkg_modules\""; } >&5
($PKG_CONFIG --exists --print-errors "$pkg_modules") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_PACKAGE_CFLAGS=`$PKG_CONFIG --cflags "$pkg_modules" 2>/dev/null`
else
pkg_failed=yes
fi
else
pkg_failed=untried
fi
if test -n "$PACKAGE_LIBS"; then
pkg_cv_PACKAGE_LIBS="$PACKAGE_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$pkg_modules\""; } >&5
($PKG_CONFIG --exists --print-errors "$pkg_modules") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_PACKAGE_LIBS=`$PKG_CONFIG --libs "$pkg_modules" 2>/dev/null`
else
pkg_failed=yes
fi
else
pkg_failed=untried
fi
if test $pkg_failed = yes; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
_pkg_short_errors_supported=yes
else
_pkg_short_errors_supported=no
fi
if test $_pkg_short_errors_supported = yes; then
PACKAGE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$pkg_modules" 2>&1`
else
PACKAGE_PKG_ERRORS=`$PKG_CONFIG --print-errors "$pkg_modules" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$PACKAGE_PKG_ERRORS" >&5
as_fn_error $? "Package requirements ($pkg_modules) were not met:
$PACKAGE_PKG_ERRORS
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables PACKAGE_CFLAGS
and PACKAGE_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details." "$LINENO" 5
elif test $pkg_failed = untried; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.
Alternatively, you may set the environment variables PACKAGE_CFLAGS
and PACKAGE_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
To get pkg-config, see .
See \`config.log' for more details" "$LINENO" 5 ; }
else
PACKAGE_CFLAGS=$pkg_cv_PACKAGE_CFLAGS
PACKAGE_LIBS=$pkg_cv_PACKAGE_LIBS
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
fi
#
# taglib support
#
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for taglib_file_new in -ltag_c" >&5
$as_echo_n "checking for taglib_file_new in -ltag_c... " >&6; }
if test "${ac_cv_lib_tag_c_taglib_file_new+set}" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-ltag_c $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 taglib_file_new ();
int
main ()
{
return taglib_file_new ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_tag_c_taglib_file_new=yes
else
ac_cv_lib_tag_c_taglib_file_new=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_tag_c_taglib_file_new" >&5
$as_echo "$ac_cv_lib_tag_c_taglib_file_new" >&6; }
if test "x$ac_cv_lib_tag_c_taglib_file_new" = x""yes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBTAG_C 1
_ACEOF
LIBS="-ltag_c $LIBS"
else
echo "***"
echo "*** Please, install libtag1-dev,libtagc0-dev development headers"
echo "*** OR"
echo "*** install taglib-dev for Fedora, Mandriva"
echo "***"
exit -1
fi
$as_echo "#define HAVE_TAGLIB 1" >>confdefs.h
#
# asound support
#
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for snd_pcm_open in -lasound" >&5
$as_echo_n "checking for snd_pcm_open in -lasound... " >&6; }
if test "${ac_cv_lib_asound_snd_pcm_open+set}" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lasound $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 snd_pcm_open ();
int
main ()
{
return snd_pcm_open ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_asound_snd_pcm_open=yes
else
ac_cv_lib_asound_snd_pcm_open=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_asound_snd_pcm_open" >&5
$as_echo "$ac_cv_lib_asound_snd_pcm_open" >&6; }
if test "x$ac_cv_lib_asound_snd_pcm_open" = x""yes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBASOUND 1
_ACEOF
LIBS="-lasound $LIBS"
else
echo "***"
echo "*** Please, install libasound2-dev development headers"
echo "***"
exit -1
fi
$as_echo "#define HAVE_ALSA 1" >>confdefs.h
#
# pthread support
#
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lpthread $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 pthread_create ();
int
main ()
{
return pthread_create ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_pthread_pthread_create=yes
else
ac_cv_lib_pthread_pthread_create=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_pthread_pthread_create" >&5
$as_echo "$ac_cv_lib_pthread_pthread_create" >&6; }
if test "x$ac_cv_lib_pthread_pthread_create" = x""yes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBPTHREAD 1
_ACEOF
LIBS="-lpthread $LIBS"
else
echo "***"
echo "*** Please, install pthread-dev development headers"
echo "***"
exit -1
fi
#
# curl support
#
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for curl_easy_init in -lcurl" >&5
$as_echo_n "checking for curl_easy_init in -lcurl... " >&6; }
if test "${ac_cv_lib_curl_curl_easy_init+set}" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lcurl $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 curl_easy_init ();
int
main ()
{
return curl_easy_init ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_curl_curl_easy_init=yes
else
ac_cv_lib_curl_curl_easy_init=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_curl_curl_easy_init" >&5
$as_echo "$ac_cv_lib_curl_curl_easy_init" >&6; }
if test "x$ac_cv_lib_curl_curl_easy_init" = x""yes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBCURL 1
_ACEOF
LIBS="-lcurl $LIBS"
else
echo "***"
echo "*** Please, install libcurl4-gnutls-dev or libcurl4-openssl-dev development headers"
echo "***"
exit -1
fi
$as_echo "#define HAVE_CURL 1" >>confdefs.h
#
# vte support
#
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for vte_terminal_feed in -lvte" >&5
$as_echo_n "checking for vte_terminal_feed in -lvte... " >&6; }
if test "${ac_cv_lib_vte_vte_terminal_feed+set}" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lvte $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 vte_terminal_feed ();
int
main ()
{
return vte_terminal_feed ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_vte_vte_terminal_feed=yes
else
ac_cv_lib_vte_vte_terminal_feed=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_vte_vte_terminal_feed" >&5
$as_echo "$ac_cv_lib_vte_vte_terminal_feed" >&6; }
if test "x$ac_cv_lib_vte_vte_terminal_feed" = x""yes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBVTE 1
_ACEOF
LIBS="-lvte $LIBS"
else
echo "***"
echo "*** Please, install libvte-dev development headers"
echo "***"
exit -1
fi
$as_echo "#define HAVE_VTE 1" >>confdefs.h
#
# for win_vte.c: directory vte.h ?
#
FILE_DEBIAN_VTE_H="/usr/include/vte/vte.h"
FILE_ARCH_VTE_H="/usr/include/vte-0.0/vte/vte.h"
FILE_FW_VTE_H="/usr/include/vte-2.90/vte/vte.h"
if test -f $FILE_DEBIAN_VTE_H; then
$as_echo "#define FILE_DEBIAN_VTE_H_IS_OK 1" >>confdefs.h
elif test -f $FILE_ARCH_VTE_H; then
$as_echo "#define FILE_ARCH_VTE_H_IS_OK 1" >>confdefs.h
elif test -f $FILE_FW_VTE_H; then
$as_echo "#define FILE_FW_VTE_H_IS_OK 1" >>confdefs.h
fi
#
# ? System info
#
case $host in
*linux*)
HOST="Linux-based system"
;;
*openbsd*)
HOST="OpenBSD"
;;
*netbsd*)
HOST="NetBSD"
;;
*freebsd*)
HOST="FreeBSD"
;;
*mingw*)
HOST="Mingw"
;;
*solaris*)
HOST="Solaris"
;;
*)
HOST="Other"
;;
esac
ac_config_files="$ac_config_files po/Makefile.in lib/Makefile Makefile src/Makefile man/Makefile pixmaps/Makefile menu/Makefile mime/Makefile glade/Makefile desktop/Makefile"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
# scripts and configure runs, see configure's option --config-cache.
# It is not useful on other systems. If it contains results you don't
# want to keep, you may remove or edit it.
#
# config.status only pays attention to the cache file if you give it
# the --recheck option to rerun configure.
#
# `ac_cv_env_foo' variables (set or unset) will be overridden when
# loading this file, other *unset* `ac_cv_foo' will be assigned the
# following values.
_ACEOF
# The following way of writing the cache mishandles newlines in values,
# but we know of no workaround that is simple, portable, and efficient.
# So, we kill variables containing newlines.
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
(
for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
eval ac_val=\$$ac_var
case $ac_val in #(
*${as_nl}*)
case $ac_var in #(
*_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
esac
case $ac_var in #(
_ | IFS | as_nl) ;; #(
BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
*) { eval $ac_var=; unset $ac_var;} ;;
esac ;;
esac
done
(set) 2>&1 |
case $as_nl`(ac_space=' '; set) 2>&1` in #(
*${as_nl}ac_space=\ *)
# `set' does not quote correctly, so add quotes: double-quote
# substitution turns \\\\ into \\, and sed turns \\ into \.
sed -n \
"s/'/'\\\\''/g;
s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
;; #(
*)
# `set' quotes correctly as required by POSIX, so do not add quotes.
sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
;;
esac |
sort
) |
sed '
/^ac_cv_env_/b end
t clear
:clear
s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
t end
s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
:end' >>confcache
if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
if test -w "$cache_file"; then
test "x$cache_file" != "x/dev/null" &&
{ $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
$as_echo "$as_me: updating cache $cache_file" >&6;}
cat confcache >$cache_file
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
fi
fi
rm -f confcache
test "x$prefix" = xNONE && prefix=$ac_default_prefix
# Let make expand exec_prefix.
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
DEFS=-DHAVE_CONFIG_H
ac_libobjs=
ac_ltlibobjs=
U=
for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
# 1. Remove the extension, and $U if already installed.
ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
# 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
# will be set to the directory where LIBOBJS objects are built.
as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
done
LIBOBJS=$ac_libobjs
LTLIBOBJS=$ac_ltlibobjs
if test -n "$EXEEXT"; then
am__EXEEXT_TRUE=
am__EXEEXT_FALSE='#'
else
am__EXEEXT_TRUE='#'
am__EXEEXT_FALSE=
fi
if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
as_fn_error $? "conditional \"AMDEP\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
: ${CONFIG_STATUS=./config.status}
ac_write_fail=0
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files $CONFIG_STATUS"
{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
as_write_fail=0
cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
#! $SHELL
# Generated by $as_me.
# Run this file to recreate the current configuration.
# Compiler output produced by configure, useful for debugging
# configure, is in config.log if it exists.
debug=false
ac_cs_recheck=false
ac_cs_silent=false
SHELL=\${CONFIG_SHELL-$SHELL}
export SHELL
_ASEOF
cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
## -------------------- ##
## M4sh Initialization. ##
## -------------------- ##
# Be more Bourne compatible
DUALCASE=1; export DUALCASE # for MKS sh
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
emulate sh
NULLCMD=:
# Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
setopt NO_GLOB_SUBST
else
case `(set -o) 2>/dev/null` in #(
*posix*) :
set -o posix ;; #(
*) :
;;
esac
fi
as_nl='
'
export as_nl
# Printing a long string crashes Solaris 7 /usr/bin/printf.
as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
# Prefer a ksh shell builtin over an external printf program on Solaris,
# but without wasting forks for bash or zsh.
if test -z "$BASH_VERSION$ZSH_VERSION" \
&& (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
as_echo='print -r --'
as_echo_n='print -rn --'
elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
as_echo='printf %s\n'
as_echo_n='printf %s'
else
if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
as_echo_n='/usr/ucb/echo -n'
else
as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
as_echo_n_body='eval
arg=$1;
case $arg in #(
*"$as_nl"*)
expr "X$arg" : "X\\(.*\\)$as_nl";
arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
esac;
expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
'
export as_echo_n_body
as_echo_n='sh -c $as_echo_n_body as_echo'
fi
export as_echo_body
as_echo='sh -c $as_echo_body as_echo'
fi
# The user is always right.
if test "${PATH_SEPARATOR+set}" != set; then
PATH_SEPARATOR=:
(PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
(PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
PATH_SEPARATOR=';'
}
fi
# IFS
# We need space, tab and new line, in precisely that order. Quoting is
# there to prevent editors from complaining about space-tab.
# (If _AS_PATH_WALK were called with IFS unset, it would disable word
# splitting by setting IFS to empty value.)
IFS=" "" $as_nl"
# Find who we are. Look in the path if we contain no directory separator.
case $0 in #((
*[\\/]* ) as_myself=$0 ;;
*) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
done
IFS=$as_save_IFS
;;
esac
# We did not find ourselves, most probably we were run as `sh COMMAND'
# in which case we are not to be found in the path.
if test "x$as_myself" = x; then
as_myself=$0
fi
if test ! -f "$as_myself"; then
$as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
exit 1
fi
# Unset variables that we do not need and which cause bugs (e.g. in
# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
# suppresses any "Segmentation fault" message there. '((' could
# trigger a bug in pdksh 5.2.14.
for as_var in BASH_ENV ENV MAIL MAILPATH
do eval test x\${$as_var+set} = xset \
&& ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
done
PS1='$ '
PS2='> '
PS4='+ '
# NLS nuisances.
LC_ALL=C
export LC_ALL
LANGUAGE=C
export LANGUAGE
# CDPATH.
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
# as_fn_error STATUS ERROR [LINENO LOG_FD]
# ----------------------------------------
# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
# script with STATUS, using 1 if that was 0.
as_fn_error ()
{
as_status=$1; test $as_status -eq 0 && as_status=1
if test "$4"; then
as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
$as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
fi
$as_echo "$as_me: error: $2" >&2
as_fn_exit $as_status
} # as_fn_error
# as_fn_set_status STATUS
# -----------------------
# Set $? to STATUS, without forking.
as_fn_set_status ()
{
return $1
} # as_fn_set_status
# as_fn_exit STATUS
# -----------------
# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
as_fn_exit ()
{
set +e
as_fn_set_status $1
exit $1
} # as_fn_exit
# as_fn_unset VAR
# ---------------
# Portably unset VAR.
as_fn_unset ()
{
{ eval $1=; unset $1;}
}
as_unset=as_fn_unset
# as_fn_append VAR VALUE
# ----------------------
# Append the text in VALUE to the end of the definition contained in VAR. Take
# advantage of any shell optimizations that allow amortized linear growth over
# repeated appends, instead of the typical quadratic growth present in naive
# implementations.
if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
eval 'as_fn_append ()
{
eval $1+=\$2
}'
else
as_fn_append ()
{
eval $1=\$$1\$2
}
fi # as_fn_append
# as_fn_arith ARG...
# ------------------
# Perform arithmetic evaluation on the ARGs, and store the result in the
# global $as_val. Take advantage of shells that can avoid forks. The arguments
# must be portable across $(()) and expr.
if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
eval 'as_fn_arith ()
{
as_val=$(( $* ))
}'
else
as_fn_arith ()
{
as_val=`expr "$@" || test $? -eq 1`
}
fi # as_fn_arith
if expr a : '\(a\)' >/dev/null 2>&1 &&
test "X`expr 00001 : '.*\(...\)'`" = X001; then
as_expr=expr
else
as_expr=false
fi
if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
as_basename=basename
else
as_basename=false
fi
if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
as_dirname=dirname
else
as_dirname=false
fi
as_me=`$as_basename -- "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
X"$0" : 'X\(//\)$' \| \
X"$0" : 'X\(/\)' \| . 2>/dev/null ||
$as_echo X/"$0" |
sed '/^.*\/\([^/][^/]*\)\/*$/{
s//\1/
q
}
/^X\/\(\/\/\)$/{
s//\1/
q
}
/^X\/\(\/\).*/{
s//\1/
q
}
s/.*/./; q'`
# Avoid depending upon Character Ranges.
as_cr_letters='abcdefghijklmnopqrstuvwxyz'
as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
as_cr_Letters=$as_cr_letters$as_cr_LETTERS
as_cr_digits='0123456789'
as_cr_alnum=$as_cr_Letters$as_cr_digits
ECHO_C= ECHO_N= ECHO_T=
case `echo -n x` in #(((((
-n*)
case `echo 'xy\c'` in
*c*) ECHO_T=' ';; # ECHO_T is single tab character.
xy) ECHO_C='\c';;
*) echo `echo ksh88 bug on AIX 6.1` > /dev/null
ECHO_T=' ';;
esac;;
*)
ECHO_N='-n';;
esac
rm -f conf$$ conf$$.exe conf$$.file
if test -d conf$$.dir; then
rm -f conf$$.dir/conf$$.file
else
rm -f conf$$.dir
mkdir conf$$.dir 2>/dev/null
fi
if (echo >conf$$.file) 2>/dev/null; then
if ln -s conf$$.file conf$$ 2>/dev/null; then
as_ln_s='ln -s'
# ... but there are two gotchas:
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
# In both cases, we have to default to `cp -p'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
as_ln_s='cp -p'
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
as_ln_s='cp -p'
fi
else
as_ln_s='cp -p'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null
# as_fn_mkdir_p
# -------------
# Create "$as_dir" as a directory, including parents if necessary.
as_fn_mkdir_p ()
{
case $as_dir in #(
-*) as_dir=./$as_dir;;
esac
test -d "$as_dir" || eval $as_mkdir_p || {
as_dirs=
while :; do
case $as_dir in #(
*\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
*) as_qdir=$as_dir;;
esac
as_dirs="'$as_qdir' $as_dirs"
as_dir=`$as_dirname -- "$as_dir" ||
$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$as_dir" : 'X\(//\)[^/]' \| \
X"$as_dir" : 'X\(//\)$' \| \
X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
$as_echo X"$as_dir" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
}
/^X\(\/\/\)[^/].*/{
s//\1/
q
}
/^X\(\/\/\)$/{
s//\1/
q
}
/^X\(\/\).*/{
s//\1/
q
}
s/.*/./; q'`
test -d "$as_dir" && break
done
test -z "$as_dirs" || eval "mkdir $as_dirs"
} || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
} # as_fn_mkdir_p
if mkdir -p . 2>/dev/null; then
as_mkdir_p='mkdir -p "$as_dir"'
else
test -d ./-p && rmdir ./-p
as_mkdir_p=false
fi
if test -x / >/dev/null 2>&1; then
as_test_x='test -x'
else
if ls -dL / >/dev/null 2>&1; then
as_ls_L_option=L
else
as_ls_L_option=
fi
as_test_x='
eval sh -c '\''
if test -d "$1"; then
test -d "$1/.";
else
case $1 in #(
-*)set "./$1";;
esac;
case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
???[sx]*):;;*)false;;esac;fi
'\'' sh
'
fi
as_executable_p=$as_test_x
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
# Sed expression to map a string onto a valid variable name.
as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
exec 6>&1
## ----------------------------------- ##
## Main body of $CONFIG_STATUS script. ##
## ----------------------------------- ##
_ASEOF
test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# Save the log message, to keep $0 and so on meaningful, and to
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by xcfa $as_me 4.3.6, which was
generated by GNU Autoconf 2.67. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
CONFIG_LINKS = $CONFIG_LINKS
CONFIG_COMMANDS = $CONFIG_COMMANDS
$ $0 $@
on `(hostname || uname -n) 2>/dev/null | sed 1q`
"
_ACEOF
case $ac_config_files in *"
"*) set x $ac_config_files; shift; ac_config_files=$*;;
esac
case $ac_config_headers in *"
"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
esac
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
config_files="$ac_config_files"
config_headers="$ac_config_headers"
config_commands="$ac_config_commands"
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
ac_cs_usage="\
\`$as_me' instantiates files and other configuration actions
from templates according to the current configuration. Unless the files
and actions are specified as TAGs, all are instantiated by default.
Usage: $0 [OPTION]... [TAG]...
-h, --help print this help, then exit
-V, --version print version number and configuration settings, then exit
--config print configuration, then exit
-q, --quiet, --silent
do not print progress messages
-d, --debug don't remove temporary files
--recheck update $as_me by reconfiguring in the same conditions
--file=FILE[:TEMPLATE]
instantiate the configuration file FILE
--header=FILE[:TEMPLATE]
instantiate the configuration header FILE
Configuration files:
$config_files
Configuration headers:
$config_headers
Configuration commands:
$config_commands
Report bugs to .
xcfa home page: ."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
xcfa config.status 4.3.6
configured by $0, generated by GNU Autoconf 2.67,
with options \\"\$ac_cs_config\\"
Copyright (C) 2010 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
ac_pwd='$ac_pwd'
srcdir='$srcdir'
INSTALL='$INSTALL'
MKDIR_P='$MKDIR_P'
AWK='$AWK'
test -n "\$AWK" || AWK=awk
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# The default lists apply if the user does not specify any file.
ac_need_defaults=:
while test $# != 0
do
case $1 in
--*=?*)
ac_option=`expr "X$1" : 'X\([^=]*\)='`
ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
ac_shift=:
;;
--*=)
ac_option=`expr "X$1" : 'X\([^=]*\)='`
ac_optarg=
ac_shift=:
;;
*)
ac_option=$1
ac_optarg=$2
ac_shift=shift
;;
esac
case $ac_option in
# Handling of the options.
-recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
ac_cs_recheck=: ;;
--version | --versio | --versi | --vers | --ver | --ve | --v | -V )
$as_echo "$ac_cs_version"; exit ;;
--config | --confi | --conf | --con | --co | --c )
$as_echo "$ac_cs_config"; exit ;;
--debug | --debu | --deb | --de | --d | -d )
debug=: ;;
--file | --fil | --fi | --f )
$ac_shift
case $ac_optarg in
*\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
'') as_fn_error $? "missing file argument" ;;
esac
as_fn_append CONFIG_FILES " '$ac_optarg'"
ac_need_defaults=false;;
--header | --heade | --head | --hea )
$ac_shift
case $ac_optarg in
*\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
esac
as_fn_append CONFIG_HEADERS " '$ac_optarg'"
ac_need_defaults=false;;
--he | --h)
# Conflict between --help and --header
as_fn_error $? "ambiguous option: \`$1'
Try \`$0 --help' for more information.";;
--help | --hel | -h )
$as_echo "$ac_cs_usage"; exit ;;
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil | --si | --s)
ac_cs_silent=: ;;
# This is an error.
-*) as_fn_error $? "unrecognized option: \`$1'
Try \`$0 --help' for more information." ;;
*) as_fn_append ac_config_targets " $1"
ac_need_defaults=false ;;
esac
shift
done
ac_configure_extra_args=
if $ac_cs_silent; then
exec 6>/dev/null
ac_configure_extra_args="$ac_configure_extra_args --silent"
fi
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
if \$ac_cs_recheck; then
set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
shift
\$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
CONFIG_SHELL='$SHELL'
export CONFIG_SHELL
exec "\$@"
fi
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
exec 5>>config.log
{
echo
sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
## Running $as_me. ##
_ASBOX
$as_echo "$ac_log"
} >&5
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
#
# INIT-COMMANDS
#
AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
# Capture the value of obsolete ALL_LINGUAS because we need it to compute
# POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
# from automake < 1.5.
eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
# Capture the value of LINGUAS because we need it to compute CATALOGS.
LINGUAS="${LINGUAS-%UNSET%}"
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# Handling of arguments.
for ac_config_target in $ac_config_targets
do
case $ac_config_target in
"config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
"depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
"po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;;
"po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
"lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
"man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
"pixmaps/Makefile") CONFIG_FILES="$CONFIG_FILES pixmaps/Makefile" ;;
"menu/Makefile") CONFIG_FILES="$CONFIG_FILES menu/Makefile" ;;
"mime/Makefile") CONFIG_FILES="$CONFIG_FILES mime/Makefile" ;;
"glade/Makefile") CONFIG_FILES="$CONFIG_FILES glade/Makefile" ;;
"desktop/Makefile") CONFIG_FILES="$CONFIG_FILES desktop/Makefile" ;;
*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
esac
done
# If the user did not use the arguments to specify the items to instantiate,
# then the envvar interface is used. Set only those that are not.
# We use the long form for the default assignment because of an extremely
# bizarre bug on SunOS 4.1.3.
if $ac_need_defaults; then
test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
fi
# Have a temporary directory for convenience. Make it in the build tree
# simply because there is no reason against having it here, and in addition,
# creating and moving files from /tmp can sometimes cause problems.
# Hook for its removal unless debugging.
# Note that there is a small window in which the directory will not be cleaned:
# after its creation but before its name has been assigned to `$tmp'.
$debug ||
{
tmp=
trap 'exit_status=$?
{ test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
' 0
trap 'as_fn_exit 1' 1 2 13 15
}
# Create a (secure) tmp directory for tmp files.
{
tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
test -n "$tmp" && test -d "$tmp"
} ||
{
tmp=./conf$$-$RANDOM
(umask 077 && mkdir "$tmp")
} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
# Set up the scripts for CONFIG_FILES section.
# No need to generate them if there are no CONFIG_FILES.
# This happens for instance with `./config.status config.h'.
if test -n "$CONFIG_FILES"; then
ac_cr=`echo X | tr X '\015'`
# On cygwin, bash can eat \r inside `` if the user requested igncr.
# But we know of no other shell where ac_cr would be empty at this
# point, so we can use a bashism as a fallback.
if test "x$ac_cr" = x; then
eval ac_cr=\$\'\\r\'
fi
ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null`
if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
ac_cs_awk_cr='\\r'
else
ac_cs_awk_cr=$ac_cr
fi
echo 'BEGIN {' >"$tmp/subs1.awk" &&
_ACEOF
{
echo "cat >conf$$subs.awk <<_ACEOF" &&
echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
echo "_ACEOF"
} >conf$$subs.sh ||
as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
ac_delim='%!_!# '
for ac_last_try in false false false false false :; do
. ./conf$$subs.sh ||
as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
if test $ac_delim_n = $ac_delim_num; then
break
elif $ac_last_try; then
as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
else
ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
fi
done
rm -f conf$$subs.sh
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
_ACEOF
sed -n '
h
s/^/S["/; s/!.*/"]=/
p
g
s/^[^!]*!//
:repl
t repl
s/'"$ac_delim"'$//
t delim
:nl
h
s/\(.\{148\}\)..*/\1/
t more1
s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
p
n
b repl
:more1
s/["\\]/\\&/g; s/^/"/; s/$/"\\/
p
g
s/.\{148\}//
t nl
:delim
h
s/\(.\{148\}\)..*/\1/
t more2
s/["\\]/\\&/g; s/^/"/; s/$/"/
p
b
:more2
s/["\\]/\\&/g; s/^/"/; s/$/"\\/
p
g
s/.\{148\}//
t delim
' >$CONFIG_STATUS || ac_write_fail=1
rm -f conf$$subs.awk
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
_ACAWK
cat >>"\$tmp/subs1.awk" <<_ACAWK &&
for (key in S) S_is_set[key] = 1
FS = ""
}
{
line = $ 0
nfields = split(line, field, "@")
substed = 0
len = length(field[1])
for (i = 2; i < nfields; i++) {
key = field[i]
keylen = length(key)
if (S_is_set[key]) {
value = S[key]
line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
len += length(value) + length(field[++i])
substed = 1
} else
len += 1 + keylen
}
print line
}
_ACAWK
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
else
cat
fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
|| as_fn_error $? "could not setup config files machinery" "$LINENO" 5
_ACEOF
# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
# trailing colons and then remove the whole line if VPATH becomes empty
# (actually we leave an empty line to preserve line numbers).
if test "x$srcdir" = x.; then
ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
h
s///
s/^/:/
s/[ ]*$/:/
s/:\$(srcdir):/:/g
s/:\${srcdir}:/:/g
s/:@srcdir@:/:/g
s/^:*//
s/:*$//
x
s/\(=[ ]*\).*/\1/
G
s/\n//
s/^[^=]*=[ ]*$//
}'
fi
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
fi # test -n "$CONFIG_FILES"
# Set up the scripts for CONFIG_HEADERS section.
# No need to generate them if there are no CONFIG_HEADERS.
# This happens for instance with `./config.status Makefile'.
if test -n "$CONFIG_HEADERS"; then
cat >"$tmp/defines.awk" <<\_ACAWK ||
BEGIN {
_ACEOF
# Transform confdefs.h into an awk script `defines.awk', embedded as
# here-document in config.status, that substitutes the proper values into
# config.h.in to produce config.h.
# Create a delimiter string that does not exist in confdefs.h, to ease
# handling of long lines.
ac_delim='%!_!# '
for ac_last_try in false false :; do
ac_t=`sed -n "/$ac_delim/p" confdefs.h`
if test -z "$ac_t"; then
break
elif $ac_last_try; then
as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
else
ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
fi
done
# For the awk script, D is an array of macro values keyed by name,
# likewise P contains macro parameters if any. Preserve backslash
# newline sequences.
ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
sed -n '
s/.\{148\}/&'"$ac_delim"'/g
t rset
:rset
s/^[ ]*#[ ]*define[ ][ ]*/ /
t def
d
:def
s/\\$//
t bsnl
s/["\\]/\\&/g
s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
D["\1"]=" \3"/p
s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
d
:bsnl
s/["\\]/\\&/g
s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
D["\1"]=" \3\\\\\\n"\\/p
t cont
s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
t cont
d
:cont
n
s/.\{148\}/&'"$ac_delim"'/g
t clear
:clear
s/\\$//
t bsnlc
s/["\\]/\\&/g; s/^/"/; s/$/"/p
d
:bsnlc
s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
b cont
' >$CONFIG_STATUS || ac_write_fail=1
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
for (key in D) D_is_set[key] = 1
FS = ""
}
/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
line = \$ 0
split(line, arg, " ")
if (arg[1] == "#") {
defundef = arg[2]
mac1 = arg[3]
} else {
defundef = substr(arg[1], 2)
mac1 = arg[2]
}
split(mac1, mac2, "(") #)
macro = mac2[1]
prefix = substr(line, 1, index(line, defundef) - 1)
if (D_is_set[macro]) {
# Preserve the white space surrounding the "#".
print prefix "define", macro P[macro] D[macro]
next
} else {
# Replace #undef with comments. This is necessary, for example,
# in the case of _POSIX_SOURCE, which is predefined and required
# on some systems where configure will not decide to define it.
if (defundef == "undef") {
print "/*", prefix defundef, macro, "*/"
next
}
}
}
{ print }
_ACAWK
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
fi # test -n "$CONFIG_HEADERS"
eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
shift
for ac_tag
do
case $ac_tag in
:[FHLC]) ac_mode=$ac_tag; continue;;
esac
case $ac_mode$ac_tag in
:[FHL]*:*);;
:L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
:[FH]-) ac_tag=-:-;;
:[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
esac
ac_save_IFS=$IFS
IFS=:
set x $ac_tag
IFS=$ac_save_IFS
shift
ac_file=$1
shift
case $ac_mode in
:L) ac_source=$1;;
:[FH])
ac_file_inputs=
for ac_f
do
case $ac_f in
-) ac_f="$tmp/stdin";;
*) # Look for the file first in the build tree, then in the source tree
# (if the path is not absolute). The absolute path cannot be DOS-style,
# because $ac_f cannot contain `:'.
test -f "$ac_f" ||
case $ac_f in
[\\/$]*) false;;
*) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
esac ||
as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
esac
case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
as_fn_append ac_file_inputs " '$ac_f'"
done
# Let's still pretend it is `configure' which instantiates (i.e., don't
# use $as_me), people would be surprised to read:
# /* config.h. Generated by config.status. */
configure_input='Generated from '`
$as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
`' by configure.'
if test x"$ac_file" != x-; then
configure_input="$ac_file. $configure_input"
{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
$as_echo "$as_me: creating $ac_file" >&6;}
fi
# Neutralize special characters interpreted by sed in replacement strings.
case $configure_input in #(
*\&* | *\|* | *\\* )
ac_sed_conf_input=`$as_echo "$configure_input" |
sed 's/[\\\\&|]/\\\\&/g'`;; #(
*) ac_sed_conf_input=$configure_input;;
esac
case $ac_tag in
*:-:* | *:-) cat >"$tmp/stdin" \
|| as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
esac
;;
esac
ac_dir=`$as_dirname -- "$ac_file" ||
$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$ac_file" : 'X\(//\)[^/]' \| \
X"$ac_file" : 'X\(//\)$' \| \
X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
$as_echo X"$ac_file" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
}
/^X\(\/\/\)[^/].*/{
s//\1/
q
}
/^X\(\/\/\)$/{
s//\1/
q
}
/^X\(\/\).*/{
s//\1/
q
}
s/.*/./; q'`
as_dir="$ac_dir"; as_fn_mkdir_p
ac_builddir=.
case "$ac_dir" in
.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
*)
ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
# A ".." for each directory in $ac_dir_suffix.
ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
case $ac_top_builddir_sub in
"") ac_top_builddir_sub=. ac_top_build_prefix= ;;
*) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
esac ;;
esac
ac_abs_top_builddir=$ac_pwd
ac_abs_builddir=$ac_pwd$ac_dir_suffix
# for backward compatibility:
ac_top_builddir=$ac_top_build_prefix
case $srcdir in
.) # We are building in place.
ac_srcdir=.
ac_top_srcdir=$ac_top_builddir_sub
ac_abs_top_srcdir=$ac_pwd ;;
[\\/]* | ?:[\\/]* ) # Absolute name.
ac_srcdir=$srcdir$ac_dir_suffix;
ac_top_srcdir=$srcdir
ac_abs_top_srcdir=$srcdir ;;
*) # Relative name.
ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
ac_top_srcdir=$ac_top_build_prefix$srcdir
ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
esac
ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
case $ac_mode in
:F)
#
# CONFIG_FILE
#
case $INSTALL in
[\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
*) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
esac
ac_MKDIR_P=$MKDIR_P
case $MKDIR_P in
[\\/$]* | ?:[\\/]* ) ;;
*/*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
esac
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# If the template does not know about datarootdir, expand it.
# FIXME: This hack should be removed a few years after 2.60.
ac_datarootdir_hack=; ac_datarootdir_seen=
ac_sed_dataroot='
/datarootdir/ {
p
q
}
/@datadir@/p
/@docdir@/p
/@infodir@/p
/@localedir@/p
/@mandir@/p'
case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
*datarootdir*) ac_datarootdir_seen=yes;;
*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_datarootdir_hack='
s&@datadir@&$datadir&g
s&@docdir@&$docdir&g
s&@infodir@&$infodir&g
s&@localedir@&$localedir&g
s&@mandir@&$mandir&g
s&\\\${datarootdir}&$datarootdir&g' ;;
esac
_ACEOF
# Neutralize VPATH when `$srcdir' = `.'.
# Shell code in configure.ac might set extrasub.
# FIXME: do we really want to maintain this feature?
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_sed_extra="$ac_vpsub
$extrasub
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
:t
/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
s|@configure_input@|$ac_sed_conf_input|;t t
s&@top_builddir@&$ac_top_builddir_sub&;t t
s&@top_build_prefix@&$ac_top_build_prefix&;t t
s&@srcdir@&$ac_srcdir&;t t
s&@abs_srcdir@&$ac_abs_srcdir&;t t
s&@top_srcdir@&$ac_top_srcdir&;t t
s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
s&@builddir@&$ac_builddir&;t t
s&@abs_builddir@&$ac_abs_builddir&;t t
s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
s&@INSTALL@&$ac_INSTALL&;t t
s&@MKDIR_P@&$ac_MKDIR_P&;t t
$ac_datarootdir_hack
"
eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
{ ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
{ ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
which seems to be undefined. Please make sure it is defined" >&5
$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
which seems to be undefined. Please make sure it is defined" >&2;}
rm -f "$tmp/stdin"
case $ac_file in
-) cat "$tmp/out" && rm -f "$tmp/out";;
*) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
esac \
|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
;;
:H)
#
# CONFIG_HEADER
#
if test x"$ac_file" != x-; then
{
$as_echo "/* $configure_input */" \
&& eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
} >"$tmp/config.h" \
|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
$as_echo "$as_me: $ac_file is unchanged" >&6;}
else
rm -f "$ac_file"
mv "$tmp/config.h" "$ac_file" \
|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
fi
else
$as_echo "/* $configure_input */" \
&& eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
|| as_fn_error $? "could not create -" "$LINENO" 5
fi
# Compute "$ac_file"'s index in $config_headers.
_am_arg="$ac_file"
_am_stamp_count=1
for _am_header in $config_headers :; do
case $_am_header in
$_am_arg | $_am_arg:* )
break ;;
* )
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
esac
done
echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$_am_arg" : 'X\(//\)[^/]' \| \
X"$_am_arg" : 'X\(//\)$' \| \
X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
$as_echo X"$_am_arg" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
}
/^X\(\/\/\)[^/].*/{
s//\1/
q
}
/^X\(\/\/\)$/{
s//\1/
q
}
/^X\(\/\).*/{
s//\1/
q
}
s/.*/./; q'`/stamp-h$_am_stamp_count
;;
:C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
$as_echo "$as_me: executing $ac_file commands" >&6;}
;;
esac
case $ac_file$ac_mode in
"depfiles":C) test x"$AMDEP_TRUE" != x"" || {
# Autoconf 2.62 quotes --file arguments for eval, but not when files
# are listed without --file. Let's play safe and only enable the eval
# if we detect the quoting.
case $CONFIG_FILES in
*\'*) eval set x "$CONFIG_FILES" ;;
*) set x $CONFIG_FILES ;;
esac
shift
for mf
do
# Strip MF so we end up with the name of the file.
mf=`echo "$mf" | sed -e 's/:.*$//'`
# Check whether this is an Automake generated Makefile or not.
# We used to match only the files named `Makefile.in', but
# some people rename them; so instead we look at the file content.
# Grep'ing the first line is not enough: some people post-process
# each Makefile.in and add a new line on top of each file to say so.
# Grep'ing the whole file is not good either: AIX grep has a line
# limit of 2048, but all sed's we know have understand at least 4000.
if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
dirpart=`$as_dirname -- "$mf" ||
$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$mf" : 'X\(//\)[^/]' \| \
X"$mf" : 'X\(//\)$' \| \
X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
$as_echo X"$mf" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
}
/^X\(\/\/\)[^/].*/{
s//\1/
q
}
/^X\(\/\/\)$/{
s//\1/
q
}
/^X\(\/\).*/{
s//\1/
q
}
s/.*/./; q'`
else
continue
fi
# Extract the definition of DEPDIR, am__include, and am__quote
# from the Makefile without running `make'.
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
test -z "$DEPDIR" && continue
am__include=`sed -n 's/^am__include = //p' < "$mf"`
test -z "am__include" && continue
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
# When using ansi2knr, U may be empty or an underscore; expand it
U=`sed -n 's/^U = //p' < "$mf"`
# Find all dependency output files, they are included files with
# $(DEPDIR) in their names. We invoke sed twice because it is the
# simplest approach to changing $(DEPDIR) to its actual value in the
# expansion.
for file in `sed -n "
s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
# Make sure the directory exists.
test -f "$dirpart/$file" && continue
fdir=`$as_dirname -- "$file" ||
$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$file" : 'X\(//\)[^/]' \| \
X"$file" : 'X\(//\)$' \| \
X"$file" : 'X\(/\)' \| . 2>/dev/null ||
$as_echo X"$file" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
}
/^X\(\/\/\)[^/].*/{
s//\1/
q
}
/^X\(\/\/\)$/{
s//\1/
q
}
/^X\(\/\).*/{
s//\1/
q
}
s/.*/./; q'`
as_dir=$dirpart/$fdir; as_fn_mkdir_p
# echo "creating $dirpart/$file"
echo '# dummy' > "$dirpart/$file"
done
done
}
;;
"po-directories":C)
for ac_file in $CONFIG_FILES; do
# Support "outfile[:infile[:infile...]]"
case "$ac_file" in
*:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
esac
# PO directories have a Makefile.in generated from Makefile.in.in.
case "$ac_file" in */Makefile.in)
# Adjust a relative srcdir.
ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
# In autoconf-2.13 it is called $ac_given_srcdir.
# In autoconf-2.50 it is called $srcdir.
test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
case "$ac_given_srcdir" in
.) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
/*) top_srcdir="$ac_given_srcdir" ;;
*) top_srcdir="$ac_dots$ac_given_srcdir" ;;
esac
# Treat a directory as a PO directory if and only if it has a
# POTFILES.in file. This allows packages to have multiple PO
# directories under different names or in different locations.
if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
rm -f "$ac_dir/POTFILES"
test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
POMAKEFILEDEPS="POTFILES.in"
# ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
# on $ac_dir but don't depend on user-specified configuration
# parameters.
if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
# The LINGUAS file contains the set of available languages.
if test -n "$OBSOLETE_ALL_LINGUAS"; then
test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
fi
ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
# Hide the ALL_LINGUAS assigment from automake < 1.5.
eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
else
# The set of available languages was given in configure.in.
# Hide the ALL_LINGUAS assigment from automake < 1.5.
eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
fi
# Compute POFILES
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
# Compute UPDATEPOFILES
# as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
# Compute DUMMYPOFILES
# as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
# Compute GMOFILES
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
case "$ac_given_srcdir" in
.) srcdirpre= ;;
*) srcdirpre='$(srcdir)/' ;;
esac
POFILES=
UPDATEPOFILES=
DUMMYPOFILES=
GMOFILES=
for lang in $ALL_LINGUAS; do
POFILES="$POFILES $srcdirpre$lang.po"
UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
done
# CATALOGS depends on both $ac_dir and the user's LINGUAS
# environment variable.
INST_LINGUAS=
if test -n "$ALL_LINGUAS"; then
for presentlang in $ALL_LINGUAS; do
useit=no
if test "%UNSET%" != "$LINGUAS"; then
desiredlanguages="$LINGUAS"
else
desiredlanguages="$ALL_LINGUAS"
fi
for desiredlang in $desiredlanguages; do
# Use the presentlang catalog if desiredlang is
# a. equal to presentlang, or
# b. a variant of presentlang (because in this case,
# presentlang can be used as a fallback for messages
# which are not translated in the desiredlang catalog).
case "$desiredlang" in
"$presentlang"*) useit=yes;;
esac
done
if test $useit = yes; then
INST_LINGUAS="$INST_LINGUAS $presentlang"
fi
done
fi
CATALOGS=
if test -n "$INST_LINGUAS"; then
for lang in $INST_LINGUAS; do
CATALOGS="$CATALOGS $lang.gmo"
done
fi
test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
if test -f "$f"; then
case "$f" in
*.orig | *.bak | *~) ;;
*) cat "$f" >> "$ac_dir/Makefile" ;;
esac
fi
done
fi
;;
esac
done ;;
esac
done # for ac_tag
as_fn_exit 0
_ACEOF
ac_clean_files=$ac_clean_files_save
test $ac_write_fail = 0 ||
as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
# configure is writing to config.log, and then calls config.status.
# config.status does its own redirection, appending to config.log.
# Unfortunately, on DOS this fails, as config.log is still kept open
# by configure, so config.status won't be able to write to it; its
# output is simply discarded. So we exec the FD to /dev/null,
# effectively closing config.log, so it can be properly (re)opened and
# appended to by config.status. When coming back to configure, we
# need to make the FD available again.
if test "$no_create" != yes; then
ac_cs_success=:
ac_config_status_args=
test "$silent" = yes &&
ac_config_status_args="$ac_config_status_args --quiet"
exec 5>/dev/null
$SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
exec 5>>config.log
# Use ||, not &&, to avoid exiting from the if with $? = 1, which
# would make configure fail if this is the last instruction.
$ac_cs_success || as_fn_exit 1
fi
if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
fi
the_hostname=`hostname`
pkg_config_modversion_gtk=`pkg-config --modversion gtk+-2.0`
pkg_config_modversion_cairo=`pkg-config --modversion cairo`
pkg_config_modversion_glib=`pkg-config --modversion glib-2.0`
pkg_config_modversion_gthread=`pkg-config --modversion gthread-2.0`
pkg_config_modversion_libcurl=`pkg-config --modversion libcurl`
pkg_config_modversion_vte=`pkg-config --modversion vte`
{ $as_echo "$as_me:${as_lineno-$LINENO}:
=================================================================
Configuration for $PACKAGE $VERSION :
=================================================================
Host System Type ................ : $host ( $HOST )
HosName ......................... : $the_hostname
Compiler ........................ : $CC $CPPFLAGS
LDFLAGS ......................... : $LDFLAGS
LIBS ............................ : $LIBS
NLS/gettext ..................... : $USE_NLS
ALL_LINGUAS ..................... : $ALL_LINGUAS
GTK+ version .................... : $pkg_config_modversion_gtk
CAIRO version ................... : $pkg_config_modversion_cairo
GLIB version .................... : $pkg_config_modversion_glib
GTHREAD version ................. : $pkg_config_modversion_gthread
LIBCURL version ................. : $pkg_config_modversion_libcurl
VTE version ..................... : $pkg_config_modversion_vte
Debug mode g .................... : $enable_debug
Debug mode pg ................... : $enable_debug_pg
WITH ANSI COMPILATE ............. : $enable_ansi
CFLAGS .......................... : $CFLAGS
INSTALL ......................... : $prefix/bin/xcfa
Options parameters:
-------------------
by default:
--disable-debug No debug support
--disable-debug-pg No debug support with gprof
--disable-ansi No define ansi for probleme compilate
Options is:
--enable-debug #define DEBUG 1 Define for debug: -g
--enable-debug-pg #define DEBUG_PG 1 Define for debug support with gprof: -pg
--enable-ansi #define ENABLE_ANSI 1 Define With ansi compilate
Now type 'make' to build $PACKAGE $VERSION,
and then type (under root) 'make install' for installation.
" >&5
$as_echo "$as_me:
=================================================================
Configuration for $PACKAGE $VERSION :
=================================================================
Host System Type ................ : $host ( $HOST )
HosName ......................... : $the_hostname
Compiler ........................ : $CC $CPPFLAGS
LDFLAGS ......................... : $LDFLAGS
LIBS ............................ : $LIBS
NLS/gettext ..................... : $USE_NLS
ALL_LINGUAS ..................... : $ALL_LINGUAS
GTK+ version .................... : $pkg_config_modversion_gtk
CAIRO version ................... : $pkg_config_modversion_cairo
GLIB version .................... : $pkg_config_modversion_glib
GTHREAD version ................. : $pkg_config_modversion_gthread
LIBCURL version ................. : $pkg_config_modversion_libcurl
VTE version ..................... : $pkg_config_modversion_vte
Debug mode g .................... : $enable_debug
Debug mode pg ................... : $enable_debug_pg
WITH ANSI COMPILATE ............. : $enable_ansi
CFLAGS .......................... : $CFLAGS
INSTALL ......................... : $prefix/bin/xcfa
Options parameters:
-------------------
by default:
--disable-debug No debug support
--disable-debug-pg No debug support with gprof
--disable-ansi No define ansi for probleme compilate
Options is:
--enable-debug #define DEBUG 1 Define for debug: -g
--enable-debug-pg #define DEBUG_PG 1 Define for debug support with gprof: -pg
--enable-ansi #define ENABLE_ANSI 1 Define With ansi compilate
Now type 'make' to build $PACKAGE $VERSION,
and then type (under root) 'make install' for installation.
" >&6;}
xcfa-4.3.6/src/ 0000755 0001750 0001750 00000000000 12224542444 010240 5 0000000 0000000 xcfa-4.3.6/src/split.h 0000644 0001750 0001750 00000024637 12122563437 011502 0000000 0000000 /*
* file : split.h
* project : xcfa
* with : Gtk-2
*
* copyright : (C) 2003 - 2013 by Claude Bulin
*
* xcfa - GTK+ implementation of the GNU shell command
* GNU General Public License
*
* This file is part of XCFA.
*
* XCFA is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* at your option) any later version.
*
* XCFA is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with XCFA. If not, see .
*/
#ifndef split_h
#define split_h 1
#define FOND_BLANC \
gdk_color.red = 65535; \
gdk_color.green = 65535; \
gdk_color.blue = 65535; \
gdk_color_alloc (colormap, &gdk_color); \
gdk_window_set_background (VarSplit.AdrWidgetSpectre->window, &gdk_color);
#define FOND_NOIR \
gdk_color.red = 0; \
gdk_color.green = 0; \
gdk_color.blue = 0; \
gdk_color_alloc (colormap, &gdk_color); \
gdk_window_set_background (VarSplit.AdrWidgetSpectre, &gdk_color);
#define FOND_BLEU \
gdk_color.red = 0; \
gdk_color.green = 0; \
gdk_color.blue = 65535; \
gdk_color_alloc (colormap, &gdk_color); \
gdk_window_set_background (VarSplit.AdrWidgetSpectre->window, &gdk_color);
#define CRAYON_NOIR \
gdk_color.red = 0; \
gdk_color.green = 0; \
gdk_color.blue = 0; \
gdk_color_alloc (colormap, &gdk_color); \
gdk_gc_set_foreground (gc, &gdk_color);
#define CRAYON_GRIS \
gdk_color.red = 21845; \
gdk_color.green = 21845; \
gdk_color.blue = 21845; \
gdk_color_alloc (colormap, &gdk_color); \
gdk_gc_set_foreground (gc, &gdk_color);
#define CRAYON_GRIS_CLAIR \
gdk_color.red = 30767; \
gdk_color.green = 30767; \
gdk_color.blue = 30767; \
gdk_color_alloc (colormap, &gdk_color); \
gdk_gc_set_foreground (gc, &gdk_color);
#define CRAYON_BLANC \
gdk_color.red = 65535; \
gdk_color.green = 65535; \
gdk_color.blue = 65535; \
gdk_color_alloc (colormap, &gdk_color); \
gdk_gc_set_foreground (gc, &gdk_color);
#define CRAYON_BLEU \
gdk_color.red = 0; \
gdk_color.green = 0; \
gdk_color.blue = 65535; \
gdk_color_alloc (colormap, &gdk_color); \
gdk_gc_set_foreground (gc, &gdk_color);
#define CRAYON_BLEU_CLAIR \
gdk_color.red = 0; \
gdk_color.green = 32000; \
gdk_color.blue = 65535; \
gdk_color_alloc (colormap, &gdk_color); \
gdk_gc_set_foreground (gc, &gdk_color);
#define CRAYON_BLEU_CLAIR_PLUS \
gdk_color.red = 0; \
gdk_color.green = 49000; \
gdk_color.blue = 65535; \
gdk_color_alloc (colormap, &gdk_color); \
gdk_gc_set_foreground (gc, &gdk_color);
#define CRAYON_ROUGE \
gdk_color.red = 65535; \
gdk_color.green = 0; \
gdk_color.blue = 0; \
gdk_color_alloc (colormap, &gdk_color); \
gdk_gc_set_foreground (gc, &gdk_color);
#define CRAYON_VERT \
gdk_color.red = 0; \
gdk_color.green = 65500; \
gdk_color.blue = 0; \
gdk_color_alloc (colormap, &gdk_color); \
gdk_gc_set_foreground (gc, &gdk_color);
#define CRAYON_JAUNE \
gdk_color.red = 65535; \
gdk_color.green = 65535; \
gdk_color.blue = 0; \
gdk_color_alloc (colormap, &gdk_color); \
gdk_gc_set_foreground (gc, &gdk_color);
#define CRAYON_ORANGE \
gdk_color.red = 0xffff; \
gdk_color.green = 0x9999; \
gdk_color.blue = 0; \
gdk_color_alloc (colormap, &gdk_color); \
gdk_gc_set_foreground (gc, &gdk_color);
#include "file.h"
typedef struct { // DEFINITION D'UN POINT POUR LA LECTURE DU FICHIER WAV
float Max; // Partie haute
float Min; // Partie basse
} POINTS_FILE;
typedef struct { // SPECIFICATION D'UN SELECTEUR
gint Nmr; // Numero du selecteur
float BeginPaint; // Position debut
float EndPaint; // Position fin
float PercentBegin; // Pourcentage debut
float PercentEnd; // Pourcentage fin
} SELECTEUR;
typedef enum {
_CURSOR_IS_NONE_ = 0, //
_CURSOR_IS_LEFT_, //
_CURSOR_IS_RIGHT_, //
_CURSOR_IS_HAND_ //
} TYPE_CURSOR;
/*
From Dzef:
Salut la bande,
Ouaip, 99 me semble être le bon choix : c'est le nombre de plages maximum
que l'on puisse trouver car c'est le nombre maximum que peuvent afficher les
afficheurs standards des players de salon...
Les CDs de 99 plages existent, c'est par exemple assez fréquent dans les
disques de bruitage...
*/
#define MAX_SELECTEURS_SPLIT 100
#define SPLIT_FILE_TMP_WAV "/tmp/split_wav2sox.wav"
#define SPLIT_FILE_TMP_WAV_SOX "/tmp/split_wav2wavsox.wav"
typedef struct {
GtkWidget *AdrWidgetSpectre; // Adr Widget Spectre
GtkWidget *AdrWidgetSpectreChrono; // Adr Widget Spectre Chrono
GtkWidget *AdrWidgetSpectreTop; // Adr Widget Spectre Chrono
GtkButton *Adr_button_destination; // Adr du widget de la destinations des decoupes
gint NbrSelecteurs; // Nombre total de selecteurs
SELECTEUR Selecteur [ MAX_SELECTEURS_SPLIT +2 ]; // Tableau des selecteurs
gint SelecteurActif; // Le selecteur actif si NbrSelecteurs > -1
gboolean BoolReadFileSpectre; // TRUE = BoolReadFileSpectre else NONE
gdouble TimeSongSec; // Duree totale du fichier en secondes
void (*FuncExternBegin) (gdouble Percent); // Rappel modif pointeur DEBUT
void (*FuncExternEnd) (gdouble Percent); // Rappel modif pointeur FIN
void (*FuncExternWaitPlay) (void); // Rappel selection d'ecoute
void (*FuncExternStopPlay) (void); // Rappel fin d'ecoute
gdouble PercentActivePlay; // Pointeur de lecture audio
gboolean BoolEventButtonPressSpectre; //
POINTS_FILE *Tab; // Tableau des amplitudes du fichier actif
glong TotalAllocation; // Longeur du tableau Tab
gint MaxPointsInTab; //
GdkPoint *MaxScale_0; //
GdkPoint *MinScale_0; //
GdkPoint *MaxScale_1; //
GdkPoint *MinScale_1; //
GdkPoint *MaxScale_2; //
GdkPoint *MinScale_2; //
glong TotalAllocationTabScreen; // Longeur du tableau TabScreen
gshort nBitsPerSample; // 8 16 24 et 32
gint nTotalChunckSize; // Taille des données
gchar *PathNameFile; // Nom complet du fichier
gchar *PathNameFileReal; // Nom reel du fichier
TYPE_FILE_IS TypeFileIs; // WAV, MP3, OGG, FLAC, SHN, WAVPACK
INFO_WAV *Tags; //
gboolean BoolInThread; //
guint HandlerTimeoutDo; //
TYPE_CURSOR TypeCursorSpectre; // NONE | LEFT | RIGHT
gboolean BoolPlay; // FALSE -> TRUE -> FALSE
gboolean BoolQueueDrawSpectre; //
gboolean BoolQueueDrawChrono; //
gboolean BoolQueueDrawTop; //
GtkAdjustment *AdjScroll; //
gboolean BoolBlankWithCue; //
} VAR_SPLIT;
#define VARSPLIT_CHRONO_X ( 0 )
#define VARSPLIT_CHRONO_Y ( 0 )
#define VARSPLIT_CHRONO_W ( VarSplit.AdrWidgetSpectreChrono->allocation.width - 1 )
#define VARSPLIT_CHRONO_H ( VarSplit.AdrWidgetSpectreChrono->allocation.height - 1 )
#define VARSPLIT_SPECTRE_TOP_X ( 0 )
#define VARSPLIT_SPECTRE_TOP_Y ( 0 )
#define VARSPLIT_SPECTRE_TOP_W ( VarSplit.AdrWidgetSpectreTop->allocation.width - 1 )
#define VARSPLIT_SPECTRE_TOP_H ( VarSplit.AdrWidgetSpectreTop->allocation.height - 1 )
#define VARSPLIT_SPECTRE_X ( 0 )
#define VARSPLIT_SPECTRE_Y ( 0 )
#define VARSPLIT_SPECTRE_W ( VarSplit.AdrWidgetSpectre->allocation.width - 1 )
#define VARSPLIT_SPECTRE_H ( VarSplit.AdrWidgetSpectre->allocation.height - 1 )
#define VARSPLIT_SPECTRE_WITH ( VarSplit.AdrWidgetSpectre->allocation.width )
typedef struct {
gfloat value; //
gfloat lower; //
gfloat upper; //
gfloat step_increment; //
gfloat page_size; //
gfloat page_increment; //
gint with; //
gint mul; //
} ADJUST;
//
// ---------------------------------------------------------------------------
// SPLIT_SPECTRE.C
// ---------------------------------------------------------------------------
//
void SplitSpectre_draw_lines_play( void );
gboolean SplitSpectre_read_file_spectre (gchar *PathNameFile);
void SplitSpectre_draw_lines (void);
void SplitSpectre_realize (GtkWidget *widget);
void split_draw (void);
void SplitSpectre_draw_chrono ( GtkWidget *widget );
void SplitSpectre_draw_top ( GtkWidget *widget );
gint SplitSpectre_get_with (void);
void SplitSpectre_remove (void);
//
// ---------------------------------------------------------------------------
// SPLIT.C
// ---------------------------------------------------------------------------
//
void split_file_load_continue (gchar *p_PathNameFile);
void split_load_from_dnd (GSList *p_list);
void split_set_name_file (void);
void split_play (void);
void split_set_stop (void);
void split_from_popup (gint p_choice);
void split_set_flag_buttons (void);
//
// ---------------------------------------------------------------------------
// SPLIT_SELECTOR.C
// ---------------------------------------------------------------------------
//
void SplitSelector_init (void);
void SplitSelector_cut (void);
void SplitSelector_add (gint p_CursorX);
void SplitSelector_set_pos_begin (gint p_begin);
void SplitSelector_set_pos_end (gint p_end);
void SplitSelector_get_pos (void);
gint SplitSelector_get_pos_begin (gint p_Sel);
gint SplitSelector_get_pos_end (gint p_Sel);
gdouble SplitSelector_get_percent_begin (gint p_Sel);
gdouble SplitSelector_get_percent_end (gint p_Sel);
gint SplitSelector_get_4_secondes_to_int (void);
gdouble SplitSelector_get_percent_for_x_secondes (gint p_secondes);
gboolean SplitSelector_cursor_in_box_play (gint p_cursor_x, gint p_cursor_y);
gboolean SplitSelector_cursor_in_line_play (gint p_cursor_x, gint p_cursor_y);
gint SplitSelector_get_pos_play (void);
void SplitSelector_set_pos_play (gint p_play);
gint SplitSelector_get_diff_sec (gdouble p_PercentBegin, gdouble p_PercentEnd);
//
// ---------------------------------------------------------------------------
// SPLIT_CUE.C
// ---------------------------------------------------------------------------
//
gchar *SplitCue_read_cue_file (gchar *p_pathname);
//
// ---------------------------------------------------------------------------
// SPLIT_CONV.C
// ---------------------------------------------------------------------------
//
void SplitConv_to (gchar *p_PathNameFile);
//
// ---------------------------------------------------------------------------
// SPLIT_WAV.C
// ---------------------------------------------------------------------------
//
void SplitWav_extract( void );
#endif
xcfa-4.3.6/src/cursor.h 0000644 0001750 0001750 00000002732 12122563437 011654 0000000 0000000 /*
* file : cursor.h
* project : xcfa
* with : Gtk-2
*
* copyright : (C) 2003 - 2013 by Claude Bulin
*
* xcfa - GTK+ implementation of the GNU shell command
* GNU General Public License
*
* This file is part of XCFA.
*
* XCFA is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* at your option) any later version.
*
* XCFA is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with XCFA. If not, see .
*/
#ifndef cursor_h
#define cursor_h 1
void cursor_set_clear (void);
void cursor_set_hand (void);
void cursor_set_saisie (void);
void cursor_set_gauche_droite (void);
void cursor_set_haut (void);
void cursor_set_bas (void);
void cursor_set_gauche (void);
void cursor_set_droit (void);
void cursor_set_haut_gauche (void);
void cursor_set_haut_droit (void);
void cursor_set_bas_gauche (void);
void cursor_set_bas_droit (void);
void cursor_set_move (void);
void cursor_set_old (void);
void cursor_set_watch (void);
gboolean cursor_get_watch (void);
#endif
xcfa-4.3.6/src/fileselect.c 0000644 0001750 0001750 00000072171 12141166616 012454 0000000 0000000 /*
* file : fileselect.c
* project : xcfa
* with : Gtk-2
*
* copyright : (C) 2003 - 2013 by Claude Bulin
*
* xcfa - GTK+ implementation of the GNU shell command
* GNU General Public License
*
* This file is part of XCFA.
*
* XCFA is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* at your option) any later version.
*
* XCFA is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with XCFA. If not, see .
*/
#ifdef HAVE_CONFIG_H
#include "../config.h"
#endif
#include
#include
#include
#ifdef ENABLE_STATIC_LIBRARY
#include "../lib/lib.h"
#endif
#include "global.h"
#include "configuser.h"
#include "file.h"
#include "poche.h"
#include "fileselect.h"
/*
*---------------------------------------------------------------------------
* DEFINITIONS
*---------------------------------------------------------------------------
*/
typedef enum {
_REP_SIMPLE_,
_REP_MULTIPLE_,
_FILE_SIMPLE_,
_FILE_MULTIPLE_,
_FILE_IMG_SIMPLE_,
_FILE_IMG_MULTIPLE_
} TYPE_SELECT;
typedef struct {
gchar *Title;
TYPE_SELECT TypeSelect;
GtkWidget *AdrFileChooser;
void (*Call_Func) (GtkButton *button, gpointer user_data);
void (*Func_Extern) (gchar *string);
} SELECT;
typedef struct {
TYPE_FILESELECTION TypeFileSelection;
} VAR_FILESELECT;
VAR_FILESELECT VarFileSelect;
/*
*---------------------------------------------------------------------------
* PROTOTYPES
*---------------------------------------------------------------------------
*/
void ON_button_PATH_CHOICE_DESTINATION_clicked (GtkButton *button, gpointer user_data);
void ON_button_PATH_LOAD_ONE_FILE_clicked (GtkButton *button, gpointer user_data);
void ON_button_PATH_IMPORT_IMAGES_clicked (GtkButton *button, gpointer user_data);
void ON_button_PATH_POCHETTE_clicked (GtkButton *button, gpointer user_data);
/*
*---------------------------------------------------------------------------
* DATAS
*---------------------------------------------------------------------------
*/
SELECT Select [ ] =
{
{gettext_noop("Choix d'un dossier de destination"), _REP_SIMPLE_, NULL, ON_button_PATH_CHOICE_DESTINATION_clicked, NULL},
{gettext_noop("Choix d'un fichier CUE WAV FLAC OGG MP3 APE WMA"), _FILE_SIMPLE_, NULL, ON_button_PATH_LOAD_ONE_FILE_clicked, NULL},
{gettext_noop("Choix d'un fichier musical"), _FILE_SIMPLE_, NULL, ON_button_PATH_LOAD_ONE_FILE_clicked, NULL},
{gettext_noop("Choix d'un fichier"), _FILE_SIMPLE_, NULL, ON_button_PATH_LOAD_ONE_FILE_clicked, NULL},
{gettext_noop("Choix de fichiers"), _FILE_MULTIPLE_, NULL, ON_button_PATH_LOAD_ONE_FILE_clicked, NULL},
{gettext_noop("Choix de fichiers WAV"), _FILE_MULTIPLE_, NULL, ON_button_PATH_LOAD_ONE_FILE_clicked, NULL},
{gettext_noop("Choix de fichiers MP3/OGG"), _FILE_MULTIPLE_, NULL, ON_button_PATH_LOAD_ONE_FILE_clicked, NULL},
{gettext_noop("Choix de fichiers FLAC MPC OGG MP3"), _FILE_MULTIPLE_, NULL, ON_button_PATH_LOAD_ONE_FILE_clicked, NULL},
{gettext_noop("Importer des images pour la pochette"), _FILE_IMG_MULTIPLE_, NULL, ON_button_PATH_IMPORT_IMAGES_clicked, NULL},
{gettext_noop("Choix d'un chemin de stockage des images"), _FILE_MULTIPLE_, NULL, ON_button_PATH_POCHETTE_clicked, NULL},
{gettext_noop("Choix d'un lieu de sauvegarde"), _FILE_MULTIPLE_, NULL, ON_button_PATH_POCHETTE_clicked, NULL},
{NULL, -1}
};
// CHOIX D UN LIEU DE SAUVEGARDE
//
void ON_button_PATH_POCHETTE_clicked (GtkButton *button, gpointer user_data)
{
gint Choice = GPOINTER_TO_INT(user_data);
gchar *Path = NULL;
Path = gtk_file_chooser_get_current_folder (GTK_FILE_CHOOSER (Select[ Choice ].AdrFileChooser));
gtk_widget_destroy(Select[ Choice ].AdrFileChooser);
Select[ Choice ].AdrFileChooser = NULL;
if (Select[ Choice ].Func_Extern) (*Select[ Choice ].Func_Extern) (Path);
g_free (Path);
Path = NULL;
}
// CHOIX D UN FICHIER IMAGE
//
void ON_button_PATH_IMPORT_IMAGES_clicked (GtkButton *button, gpointer user_data)
{
/*
gint Choice = GPOINTER_TO_INT(user_data);
PRINT_FUNC_LF();
gtk_widget_destroy(Select[ Choice ].AdrFileChooser);
Select[ Choice ].AdrFileChooser = NULL;
*/
gint Choice = GPOINTER_TO_INT(user_data);
gchar *Path = NULL;
GSList *List = NULL;
Path = gtk_file_chooser_get_current_folder (GTK_FILE_CHOOSER (Select[ Choice ].AdrFileChooser));
if (Select[ Choice ].Func_Extern) (*Select[ Choice ].Func_Extern) (Path);
g_free (Path);
Path = NULL;
List = gtk_file_chooser_get_filenames (GTK_FILE_CHOOSER (Select[ Choice ].AdrFileChooser));
gtk_widget_destroy(Select[ Choice ].AdrFileChooser);
Select[ Choice ].AdrFileChooser = NULL;
pochedir_add_img_file (List);
g_slist_free (List);
List = NULL;
}
// CHOIX D UN FICHIER
//
void ON_button_PATH_LOAD_ONE_FILE_clicked (GtkButton *button, gpointer user_data)
{
gint Choice = GPOINTER_TO_INT(user_data);
gchar *Path = NULL;
GSList *List = NULL;
if( _PATH_LOAD_FILE_MUSIC_ == VarFileSelect.TypeFileSelection ) {
Path = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (Select[ Choice ].AdrFileChooser));
if (Select[ Choice ].Func_Extern) (*Select[ Choice ].Func_Extern) (Path);
g_free (Path);
Path = NULL;
gtk_widget_destroy(Select[ Choice ].AdrFileChooser);
Select[ Choice ].AdrFileChooser = NULL;
}
else if (_PATH_LOAD_ONE_FILE_ == VarFileSelect.TypeFileSelection || _PATH_LOAD_SPLIT_FILE_ == VarFileSelect.TypeFileSelection) {
Path = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (Select[ Choice ].AdrFileChooser));
gtk_widget_destroy(Select[ Choice ].AdrFileChooser);
Select[ Choice ].AdrFileChooser = NULL;
if (Select[ Choice ].Func_Extern) (*Select[ Choice ].Func_Extern) (Path);
g_free (Path);
Path = NULL;
}
else if (_PATH_LOAD_FILE_ALL_ == VarFileSelect.TypeFileSelection) {
Path = gtk_file_chooser_get_current_folder (GTK_FILE_CHOOSER (Select[ Choice ].AdrFileChooser));
if (Select[ Choice ].Func_Extern) (*Select[ Choice ].Func_Extern) (Path);
g_free (Path);
Path = NULL;
List = gtk_file_chooser_get_filenames (GTK_FILE_CHOOSER (Select[ Choice ].AdrFileChooser));
gtk_widget_destroy(Select[ Choice ].AdrFileChooser);
Select[ Choice ].AdrFileChooser = NULL;
fileanalyze_add_file_to_treeview (VarFileSelect.TypeFileSelection, List);
g_slist_free (List);
List = NULL;
}
else if (_PATH_LOAD_FILE_WAV_ == VarFileSelect.TypeFileSelection) {
Path = gtk_file_chooser_get_current_folder (GTK_FILE_CHOOSER (Select[ Choice ].AdrFileChooser));
if (Select[ Choice ].Func_Extern) (*Select[ Choice ].Func_Extern) (Path);
g_free (Path);
Path = NULL;
List = gtk_file_chooser_get_filenames (GTK_FILE_CHOOSER (Select[ Choice ].AdrFileChooser));
gtk_widget_destroy(Select[ Choice ].AdrFileChooser);
Select[ Choice ].AdrFileChooser = NULL;
fileanalyze_add_file_to_treeview (VarFileSelect.TypeFileSelection, List);
g_slist_free (List);
List = NULL;
}
else if (_PATH_LOAD_FILE_MP3OGG_ == VarFileSelect.TypeFileSelection) {
Path = gtk_file_chooser_get_current_folder (GTK_FILE_CHOOSER (Select[ Choice ].AdrFileChooser));
if (Select[ Choice ].Func_Extern) (*Select[ Choice ].Func_Extern) (Path);
g_free (Path);
Path = NULL;
List = gtk_file_chooser_get_filenames (GTK_FILE_CHOOSER (Select[ Choice ].AdrFileChooser));
gtk_widget_destroy(Select[ Choice ].AdrFileChooser);
Select[ Choice ].AdrFileChooser = NULL;
fileanalyze_add_file_to_treeview (VarFileSelect.TypeFileSelection, List);
g_slist_free (List);
List = NULL;
}
else if (_PATH_LOAD_FILE_TAGS_ == VarFileSelect.TypeFileSelection) {
Path = gtk_file_chooser_get_current_folder (GTK_FILE_CHOOSER (Select[ Choice ].AdrFileChooser));
if (Select[ Choice ].Func_Extern) (*Select[ Choice ].Func_Extern) (Path);
g_free (Path);
Path = NULL;
List = gtk_file_chooser_get_filenames (GTK_FILE_CHOOSER (Select[ Choice ].AdrFileChooser));
gtk_widget_destroy(Select[ Choice ].AdrFileChooser);
Select[ Choice ].AdrFileChooser = NULL;
fileanalyze_add_file_to_treeview (VarFileSelect.TypeFileSelection, List);
g_slist_free (List);
List = NULL;
}
}
// CHOIX D UN DOSSIER DE DESTINATION
//
void ON_button_PATH_CHOICE_DESTINATION_clicked (GtkButton *button, gpointer user_data)
{
gchar *Path = NULL;
gint Choice = GPOINTER_TO_INT(user_data);
Path = gtk_file_chooser_get_current_folder (GTK_FILE_CHOOSER (Select[ Choice ].AdrFileChooser));
gtk_widget_destroy(Select[ Choice ].AdrFileChooser);
Select[ Choice ].AdrFileChooser = NULL;
if (Select[ Choice ].Func_Extern) (*Select[ Choice ].Func_Extern) (Path);
g_free (Path);
Path = NULL;
}
/*
*---------------------------------------------------------------------------
* GESTION FILESELECT
*---------------------------------------------------------------------------
*/
// Demande de destruction de la fenetre
//
gboolean fileselect_on_filechooserdialog_delete_event (GtkWidget *widget, GdkEvent *event, gpointer user_data)
{
gint Choice = GPOINTER_TO_INT(user_data);
/* PRINT_FUNC_LF(); */
/*
g_print ("user_data = %d\n", (gint)user_data);
g_print ("Choice = %d\n", Choice);
*/
gtk_widget_destroy(Select[ Choice ].AdrFileChooser);
Select[ Choice ].AdrFileChooser = NULL;
return FALSE;
}
// Demande de destruction de la fenetre
//
gboolean fileselect_on_filechooserdialog_destroy_event (GtkWidget *widget, GdkEvent *event, gpointer user_data)
{
gint Choice = GPOINTER_TO_INT(user_data);
/* PRINT_FUNC_LF(); */
/*
g_print ("user_data = %d\n", (gint)user_data);
g_print ("Choice = %d\n", Choice);
*/
gtk_widget_destroy(Select[ Choice ].AdrFileChooser);
Select[ Choice ].AdrFileChooser = NULL;
return FALSE;
}
//
//
void fileselect_on_button_cancel_clicked (GtkButton *button, gpointer user_data)
{
gint Choice = GPOINTER_TO_INT(user_data);
/* PRINT_FUNC_LF(); */
/*
g_print ("user_data = %d\n", (gint)user_data);
g_print ("Choice = %d\n", Choice);
*/
gtk_widget_destroy(Select[ Choice ].AdrFileChooser);
Select[ Choice ].AdrFileChooser = NULL;
}
//
//
void fileselect_on_button_ok_clicked (GtkButton *button, gpointer user_data)
{
gint Choice = GPOINTER_TO_INT(user_data);
/* PRINT_FUNC_LF(); */
/*
g_print ("user_data = %d\n", (gint)user_data);
g_print ("Choice = %d\n", Choice);
*/
gtk_widget_destroy(Select[ Choice ].AdrFileChooser);
Select[ Choice ].AdrFileChooser = NULL;
}
// http://forum.gtk-fr.org/viewtopic.php?pid=22743
//
void chooserDialog_preview_update (GtkFileChooser *filechooser, gpointer data)
{
GtkWidget *preview = NULL;
GdkPixbuf *pixbuf = NULL;
gchar *filename = NULL;
preview = GTK_WIDGET (data);
if( NULL != (filename = gtk_file_chooser_get_preview_filename(filechooser))) {
pixbuf = gdk_pixbuf_new_from_file_at_size(filename, 200, 200, NULL);
g_free (filename);
filename = NULL;
if( NULL != pixbuf ) {
gtk_image_set_from_pixbuf (GTK_IMAGE(preview), pixbuf);
g_object_unref(pixbuf);
gtk_file_chooser_set_preview_widget_active(filechooser, TRUE);
}
}
}
// Demande de creation de la fenetre de selection de fichier(s) ou de repertoire
//
void fileselect_create (TYPE_FILESELECTION Choice, gchar *Path, void *Func_Extern)
{
GtkWidget *filechooserdialog;
GtkWidget *dialog_vbox1;
GtkWidget *dialog_action_area1;
GtkWidget *button_cancel;
GtkWidget *button_ok;
GtkWidget *preview;
GtkFileFilter *filter;
if (_NB_PATH_ <= 0) return;
if (Choice < 0 || Choice > _NB_PATH_) return;
VarFileSelect.TypeFileSelection = Choice;
if (Choice < _PATH_CHOICE_DESTINATION_ || Choice > _NB_PATH_) return;
filechooserdialog = Select[ Choice ].AdrFileChooser;
if (filechooserdialog != NULL) {
gdk_window_raise (filechooserdialog->window);
return;
}
/* CORRECTIF DU 26 01 2006 */
Select[ Choice ].Func_Extern = Func_Extern;
/* CORRECTIF DU 28 05 2006 */
g_utf8_validate (Select[ Choice ].Title, -1, NULL);
if (NULL == Select[ Choice ].Title) {
PRINT("\tTITLE == NULL");
return;
}
/*
typedef enum
{
GTK_FILE_CHOOSER_ACTION_OPEN,
GTK_FILE_CHOOSER_ACTION_SAVE,
GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER,
GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER
} GtkFileChooserAction;
*/
if (Select[ Choice ].TypeSelect == _REP_SIMPLE_ || Select[ Choice ].TypeSelect == _REP_MULTIPLE_) {
/* selection de directory */
filechooserdialog = gtk_file_chooser_dialog_new (Select[ Choice ].Title,
NULL,
GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER,
/* |
GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER,
*/
NULL,
NULL);
}
else if (Select[ Choice ].TypeSelect == _FILE_SIMPLE_ || Select[ Choice ].TypeSelect == _FILE_MULTIPLE_) {
/* selection de fichiers(s) */
filechooserdialog = gtk_file_chooser_dialog_new (Select[ Choice ].Title,
NULL,
GTK_FILE_CHOOSER_ACTION_OPEN,
NULL,
NULL);
if (_PATH_LOAD_SPLIT_FILE_ == Choice) {
filter = gtk_file_filter_new ();
gtk_file_filter_add_pattern (filter, "*.wav");
gtk_file_filter_add_pattern (filter, "*.WAV");
gtk_file_filter_add_pattern (filter, "*.bwf");
gtk_file_filter_add_pattern (filter, "*.BWF");
gtk_file_filter_add_pattern (filter, "*.flac");
gtk_file_filter_add_pattern (filter, "*.FLAC");
gtk_file_filter_add_pattern (filter, "*.ogg");
gtk_file_filter_add_pattern (filter, "*.OGG");
gtk_file_filter_add_pattern (filter, "*.mp3");
gtk_file_filter_add_pattern (filter, "*.MP3");
gtk_file_filter_add_pattern (filter, "*.ape");
gtk_file_filter_add_pattern (filter, "*.APE");
gtk_file_filter_add_pattern (filter, "*.wma");
gtk_file_filter_add_pattern (filter, "*.WMA");
gtk_file_filter_add_pattern (filter, "*.cue");
gtk_file_filter_add_pattern (filter, "*.CUE");
gtk_file_filter_set_name (filter, "*.wav *.flac *.ogg *.mp3 *.ape *.wma *.cue");
gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (filechooserdialog), filter);
filter = gtk_file_filter_new ();
gtk_file_filter_set_name (filter, "WAV (*.wav)");
gtk_file_filter_add_pattern (filter, "*.wav");
gtk_file_filter_add_pattern (filter, "*.WAV");
gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (filechooserdialog), filter);
filter = gtk_file_filter_new ();
gtk_file_filter_set_name (filter, "BWF (*.bwf)");
gtk_file_filter_add_pattern (filter, "*.bwf");
gtk_file_filter_add_pattern (filter, "*.BWF");
gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (filechooserdialog), filter);
filter = gtk_file_filter_new ();
gtk_file_filter_set_name (filter, "FLAC (*.flac)");
gtk_file_filter_add_pattern (filter, "*.flac");
gtk_file_filter_add_pattern (filter, "*.FLAC");
gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (filechooserdialog), filter);
filter = gtk_file_filter_new ();
gtk_file_filter_set_name (filter, "MP3 (*.mp3)");
gtk_file_filter_add_pattern (filter, "*.mp3");
gtk_file_filter_add_pattern (filter, "*.MP3");
gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (filechooserdialog), filter);
filter = gtk_file_filter_new ();
gtk_file_filter_set_name (filter, "OGG (*.ogg)");
gtk_file_filter_add_pattern (filter, "*.ogg");
gtk_file_filter_add_pattern (filter, "*.OGG");
gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (filechooserdialog), filter);
filter = gtk_file_filter_new ();
gtk_file_filter_set_name (filter, "APE (*.ape)");
gtk_file_filter_add_pattern (filter, "*.ape");
gtk_file_filter_add_pattern (filter, "*.APE");
gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (filechooserdialog), filter);
filter = gtk_file_filter_new ();
gtk_file_filter_set_name (filter, "WMA (*.wma)");
gtk_file_filter_add_pattern (filter, "*.wma");
gtk_file_filter_add_pattern (filter, "*.WMA");
gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (filechooserdialog), filter);
filter = gtk_file_filter_new ();
gtk_file_filter_set_name (filter, "CUE (*.cue)");
gtk_file_filter_add_pattern (filter, "*.cue");
gtk_file_filter_add_pattern (filter, "*.CUE");
gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (filechooserdialog), filter);
}
else if( Choice == _PATH_LOAD_FILE_ALL_ || Choice == _PATH_LOAD_FILE_MUSIC_ ) {
filter = gtk_file_filter_new ();
gtk_file_filter_set_name (filter, _("All Files (*.*)"));
gtk_file_filter_add_pattern (filter, "*.wav");
gtk_file_filter_add_pattern (filter, "*.WAV");
gtk_file_filter_add_pattern (filter, "*.bwf");
gtk_file_filter_add_pattern (filter, "*.BWF");
gtk_file_filter_add_pattern (filter, "*.flac");
gtk_file_filter_add_pattern (filter, "*.FLAC");
gtk_file_filter_add_pattern (filter, "*.ape");
gtk_file_filter_add_pattern (filter, "*.APE");
gtk_file_filter_add_pattern (filter, "*.wv");
gtk_file_filter_add_pattern (filter, "*.WV");
gtk_file_filter_add_pattern (filter, "*.ogg");
gtk_file_filter_add_pattern (filter, "*.OGG");
gtk_file_filter_add_pattern (filter, "*.oga");
gtk_file_filter_add_pattern (filter, "*.OGA");
gtk_file_filter_add_pattern (filter, "*.m4a");
gtk_file_filter_add_pattern (filter, "*.M4A");
gtk_file_filter_add_pattern (filter, "*.aac");
gtk_file_filter_add_pattern (filter, "*.AAC");
gtk_file_filter_add_pattern (filter, "*.mpc");
gtk_file_filter_add_pattern (filter, "*.MPC");
gtk_file_filter_add_pattern (filter, "*.mp3");
gtk_file_filter_add_pattern (filter, "*.MP3");
gtk_file_filter_add_pattern (filter, "*.rm");
gtk_file_filter_add_pattern (filter, "*.RM");
gtk_file_filter_add_pattern (filter, "*.dts");
gtk_file_filter_add_pattern (filter, "*.DTS");
gtk_file_filter_add_pattern (filter, "*.aif");
gtk_file_filter_add_pattern (filter, "*.aiff");
gtk_file_filter_add_pattern (filter, "*.AIF");
gtk_file_filter_add_pattern (filter, "*.AIFF");
gtk_file_filter_add_pattern (filter, "*.shn");
gtk_file_filter_add_pattern (filter, "*.SHN");
gtk_file_filter_add_pattern (filter, "*.wma");
gtk_file_filter_add_pattern (filter, "*.WMA");
gtk_file_filter_add_pattern (filter, "*.ac3");
gtk_file_filter_add_pattern (filter, "*.AC3");
gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (filechooserdialog), filter);
filter = gtk_file_filter_new ();
gtk_file_filter_set_name (filter, "WAV (*.wav)");
gtk_file_filter_add_pattern (filter, "*.wav");
gtk_file_filter_add_pattern (filter, "*.WAV");
gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (filechooserdialog), filter);
filter = gtk_file_filter_new ();
gtk_file_filter_set_name (filter, "BWF (*.bwf)");
gtk_file_filter_add_pattern (filter, "*.bwf");
gtk_file_filter_add_pattern (filter, "*.BWF");
gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (filechooserdialog), filter);
filter = gtk_file_filter_new ();
gtk_file_filter_set_name (filter, "FLAC (*.flac)");
gtk_file_filter_add_pattern (filter, "*.flac");
gtk_file_filter_add_pattern (filter, "*.FLAC");
gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (filechooserdialog), filter);
filter = gtk_file_filter_new ();
gtk_file_filter_set_name (filter, "APE (*.ape)");
gtk_file_filter_add_pattern (filter, "*.ape");
gtk_file_filter_add_pattern (filter, "*.APE");
gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (filechooserdialog), filter);
filter = gtk_file_filter_new ();
gtk_file_filter_set_name (filter, "WAVPACK (*.wv)");
gtk_file_filter_add_pattern (filter, "*.wv");
gtk_file_filter_add_pattern (filter, "*.WV");
gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (filechooserdialog), filter);
filter = gtk_file_filter_new ();
gtk_file_filter_set_name (filter, "OGG (*.ogg)");
gtk_file_filter_add_pattern (filter, "*.ogg");
gtk_file_filter_add_pattern (filter, "*.OGG");
gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (filechooserdialog), filter);
filter = gtk_file_filter_new ();
gtk_file_filter_set_name (filter, "M4A (*.m4a)");
gtk_file_filter_add_pattern (filter, "*.m4a");
gtk_file_filter_add_pattern (filter, "*.M4A");
gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (filechooserdialog), filter);
filter = gtk_file_filter_new ();
gtk_file_filter_set_name (filter, "AAC (*.aac)");
gtk_file_filter_add_pattern (filter, "*.aac");
gtk_file_filter_add_pattern (filter, "*.AAC");
gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (filechooserdialog), filter);
filter = gtk_file_filter_new ();
gtk_file_filter_set_name (filter, "MPC (*.mpc)");
gtk_file_filter_add_pattern (filter, "*.mpc");
gtk_file_filter_add_pattern (filter, "*.MPC");
gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (filechooserdialog), filter);
filter = gtk_file_filter_new ();
gtk_file_filter_set_name (filter, "MP3 (*.mp3)");
gtk_file_filter_add_pattern (filter, "*.mp3");
gtk_file_filter_add_pattern (filter, "*.MP3");
gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (filechooserdialog), filter);
filter = gtk_file_filter_new ();
gtk_file_filter_set_name (filter, "AIFF (*.aif*)");
gtk_file_filter_add_pattern (filter, "*.aif*");
gtk_file_filter_add_pattern (filter, "*.AIF*");
gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (filechooserdialog), filter);
filter = gtk_file_filter_new ();
gtk_file_filter_set_name (filter, "RM (*.rm)");
gtk_file_filter_add_pattern (filter, "*.rm");
gtk_file_filter_add_pattern (filter, "*.RM");
gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (filechooserdialog), filter);
filter = gtk_file_filter_new ();
gtk_file_filter_set_name (filter, "DTS (*.dts)");
gtk_file_filter_add_pattern (filter, "*.dts");
gtk_file_filter_add_pattern (filter, "*.DTS");
gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (filechooserdialog), filter);
filter = gtk_file_filter_new ();
gtk_file_filter_set_name (filter, "SHORTEN (*.shn)");
gtk_file_filter_add_pattern (filter, "*.shn");
gtk_file_filter_add_pattern (filter, "*.SHN");
gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (filechooserdialog), filter);
filter = gtk_file_filter_new ();
gtk_file_filter_set_name (filter, "WMA (*.wma)");
gtk_file_filter_add_pattern (filter, "*.wma");
gtk_file_filter_add_pattern (filter, "*.WMA");
gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (filechooserdialog), filter);
filter = gtk_file_filter_new ();
gtk_file_filter_set_name (filter, "AC3 (*.ac3)");
gtk_file_filter_add_pattern (filter, "*.ac3");
gtk_file_filter_add_pattern (filter, "*.AC3");
gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (filechooserdialog), filter);
}
else if (Choice == _PATH_LOAD_FILE_WAV_) {
filter = gtk_file_filter_new ();
gtk_file_filter_set_name (filter, _("All Files (*.*)"));
gtk_file_filter_add_pattern (filter, "*.wav");
gtk_file_filter_add_pattern (filter, "*.WAV");
gtk_file_filter_add_pattern (filter, "*.bwf");
gtk_file_filter_add_pattern (filter, "*.BWF");
gtk_file_filter_set_name (filter, "*.wav *.bwf");
gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (filechooserdialog), filter);
}
else if (Choice == _PATH_LOAD_FILE_MP3OGG_) {
filter = gtk_file_filter_new ();
gtk_file_filter_set_name (filter, _("All Files (*.*)"));
gtk_file_filter_add_pattern (filter, "*.ogg");
gtk_file_filter_add_pattern (filter, "*.OGG");
gtk_file_filter_add_pattern (filter, "*.oga");
gtk_file_filter_add_pattern (filter, "*.OGA");
gtk_file_filter_add_pattern (filter, "*.mp3");
gtk_file_filter_add_pattern (filter, "*.MP3");
gtk_file_filter_set_name (filter, "*.mp3 *.ogg");
gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (filechooserdialog), filter);
filter = gtk_file_filter_new ();
gtk_file_filter_set_name (filter, "OGG (*.ogg)");
gtk_file_filter_add_pattern (filter, "*.ogg");
gtk_file_filter_add_pattern (filter, "*.OGG");
gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (filechooserdialog), filter);
filter = gtk_file_filter_new ();
gtk_file_filter_set_name (filter, "MP3 (*.mp3)");
gtk_file_filter_add_pattern (filter, "*.mp3");
gtk_file_filter_add_pattern (filter, "*.MP3");
gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (filechooserdialog), filter);
}
else if (Choice == _PATH_LOAD_FILE_TAGS_) {
filter = gtk_file_filter_new ();
gtk_file_filter_set_name (filter, _("All Files (*.*)"));
gtk_file_filter_add_pattern (filter, "*.flac");
gtk_file_filter_add_pattern (filter, "*.FLAC");
gtk_file_filter_add_pattern (filter, "*.ogg");
gtk_file_filter_add_pattern (filter, "*.OGG");
gtk_file_filter_add_pattern (filter, "*.oga");
gtk_file_filter_add_pattern (filter, "*.OGA");
gtk_file_filter_add_pattern (filter, "*.mpc");
gtk_file_filter_add_pattern (filter, "*.MPC");
gtk_file_filter_add_pattern (filter, "*.mp3");
gtk_file_filter_add_pattern (filter, "*.MP3");
gtk_file_filter_set_name (filter, "*.flac *.mpc *.mp3 *.ogg");
gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (filechooserdialog), filter);
filter = gtk_file_filter_new ();
gtk_file_filter_set_name (filter, "FLAC (*.flac)");
gtk_file_filter_add_pattern (filter, "*.flac");
gtk_file_filter_add_pattern (filter, "*.FLAC");
gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (filechooserdialog), filter);
filter = gtk_file_filter_new ();
gtk_file_filter_set_name (filter, "OGG (*.ogg)");
gtk_file_filter_add_pattern (filter, "*.ogg");
gtk_file_filter_add_pattern (filter, "*.OGG");
gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (filechooserdialog), filter);
filter = gtk_file_filter_new ();
gtk_file_filter_set_name (filter, "MPC (*.mpc)");
gtk_file_filter_add_pattern (filter, "*.mpc");
gtk_file_filter_add_pattern (filter, "*.MPC");
gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (filechooserdialog), filter);
filter = gtk_file_filter_new ();
gtk_file_filter_set_name (filter, "MP3 (*.mp3)");
gtk_file_filter_add_pattern (filter, "*.mp3");
gtk_file_filter_add_pattern (filter, "*.MP3");
gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (filechooserdialog), filter);
}
}
else if (Select[ Choice ].TypeSelect == _FILE_IMG_SIMPLE_ || Select[ Choice ].TypeSelect == _FILE_IMG_MULTIPLE_) {
/* selection de fichiers images avec previsualisation */
filechooserdialog = gtk_file_chooser_dialog_new (Select[ Choice ].Title,
NULL,
GTK_FILE_CHOOSER_ACTION_OPEN,
/*GTK_STOCK_CANCEL,
GTK_RESPONSE_CANCEL,
GTK_STOCK_OPEN,
GTK_RESPONSE_ACCEPT,*/
NULL,
NULL);
preview = gtk_image_new ();
gtk_widget_set_usize(GTK_WIDGET(preview), 200, 200);
gtk_file_chooser_set_preview_widget(GTK_FILE_CHOOSER(filechooserdialog), GTK_WIDGET(preview));
gtk_file_chooser_set_preview_widget_active (GTK_FILE_CHOOSER (filechooserdialog), TRUE);
g_signal_connect(GTK_FILE_CHOOSER(filechooserdialog), "update-preview", G_CALLBACK (chooserDialog_preview_update), preview);
}
if (Select[ Choice ].TypeSelect == _REP_MULTIPLE_ ||
Select[ Choice ].TypeSelect == _FILE_MULTIPLE_ ||
Select[ Choice ].TypeSelect == _FILE_IMG_MULTIPLE_) {
/* selection 'multiple' */
g_object_set (filechooserdialog, "select-multiple", TRUE, NULL);
gtk_file_chooser_set_select_multiple (GTK_FILE_CHOOSER (filechooserdialog), TRUE);
}
gtk_window_set_position (GTK_WINDOW (filechooserdialog), GTK_WIN_POS_CENTER);
gtk_window_set_transient_for (GTK_WINDOW(filechooserdialog), GTK_WINDOW(WindMain));
gtk_window_set_modal (GTK_WINDOW (filechooserdialog), TRUE);
gtk_file_chooser_set_current_folder (
GTK_FILE_CHOOSER (filechooserdialog),
Path);
Select[ Choice ].AdrFileChooser = filechooserdialog;
gtk_window_set_type_hint (GTK_WINDOW (filechooserdialog), GDK_WINDOW_TYPE_HINT_DIALOG);
dialog_vbox1 = GTK_DIALOG (filechooserdialog)->vbox;
gtk_widget_show (dialog_vbox1);
dialog_action_area1 = GTK_DIALOG (filechooserdialog)->action_area;
gtk_widget_show (dialog_action_area1);
gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area1), GTK_BUTTONBOX_END);
button_cancel = gtk_button_new_from_stock ("gtk-cancel");
gtk_widget_show (button_cancel);
gtk_dialog_add_action_widget (GTK_DIALOG (filechooserdialog), button_cancel, GTK_RESPONSE_CANCEL);
GTK_WIDGET_SET_FLAGS (button_cancel, GTK_CAN_DEFAULT);
button_ok = gtk_button_new_from_stock ("gtk-open");
gtk_widget_show (button_ok);
gtk_dialog_add_action_widget (GTK_DIALOG (filechooserdialog), button_ok, GTK_RESPONSE_OK);
GTK_WIDGET_SET_FLAGS (button_ok, GTK_CAN_DEFAULT);
g_signal_connect ((gpointer) filechooserdialog, "delete_event", G_CALLBACK (fileselect_on_filechooserdialog_delete_event), (gpointer)Choice);
g_signal_connect ((gpointer) filechooserdialog, "destroy_event", G_CALLBACK (fileselect_on_filechooserdialog_destroy_event), (gpointer)Choice);
g_signal_connect ((gpointer) button_cancel, "clicked", G_CALLBACK (fileselect_on_button_cancel_clicked), (gpointer)Choice);
g_signal_connect ((gpointer) button_ok, "clicked", G_CALLBACK (Select[ Choice ].Call_Func), (gpointer)Choice);
/* Store pointers to all widgets, for use by lookup_widget().
*/
GLADE_HOOKUP_OBJECT_NO_REF (filechooserdialog, filechooserdialog, "filechooserdialog");
GLADE_HOOKUP_OBJECT_NO_REF (filechooserdialog, dialog_vbox1, "dialog_vbox1");
GLADE_HOOKUP_OBJECT_NO_REF (filechooserdialog, dialog_action_area1, "dialog_action_area1");
GLADE_HOOKUP_OBJECT (filechooserdialog, button_cancel, "button_cancel");
GLADE_HOOKUP_OBJECT (filechooserdialog, button_ok, "button_ok");
gtk_widget_grab_default (button_ok);
gtk_widget_show (filechooserdialog);
}
xcfa-4.3.6/src/extra.h 0000644 0001750 0001750 00000002305 12122563437 011456 0000000 0000000 /*
* file : extra.h
* project : xcfa
* with : Gtk-2
*
* copyright : (C) 2003 - 2013 by Claude Bulin
*
* xcfa - GTK+ implementation of the GNU shell command
* GNU General Public License
*
* This file is part of XCFA.
*
* XCFA is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* at your option) any later version.
*
* XCFA is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with XCFA. If not, see .
*/
#ifndef extra_h
#define extra_h 1
gchar *extra_get_name_navigateur (void);
gboolean extra_get_navigateur_is_ok (void);
gchar *extra_get_name_lecteur_audio (void);
gchar *extra_get_param_name_lecteur_audio (void);
gboolean extra_get_lecteur_audio_is_ok (void);
gboolean extra_get_param_name_lecteur_audio_is_ok (void);
#endif
xcfa-4.3.6/src/main.c 0000644 0001750 0001750 00000062172 12211131106 011241 0000000 0000000 /*
* file : main.c
* project : xcfa
* with : Gtk-2
*
* copyright : (C) 2003 - 2013 by Claude Bulin
*
* xcfa - GTK+ implementation of the GNU shell command
* GNU General Public License
*
* This file is part of XCFA.
*
* XCFA is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* at your option) any later version.
*
* XCFA is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with XCFA. If not, see .
*/
#ifdef HAVE_CONFIG_H
#include "../config.h"
#endif
#include
// /usr/include/gtk-2.0/gdk/gdkkeysyms.h
#include
#include
#include
#include
#include
#include
#include
#include
#include
/* For the workspace/viewport stuff */
#ifdef GDK_WINDOWING_X11
#include
#include
#include
#include
#endif
#ifdef ENABLE_STATIC_LIBRARY
#include "../lib/lib.h"
#endif
#include "global.h"
#include "options.h"
#include "configuser.h"
#include "file.h"
#include "notify_send.h"
#include "parse.h"
#include "scan.h"
#include "cd_audio.h"
#include "dvd.h"
#include "web.h"
#include "poche.h"
#include "treeview.h"
#include "get_info.h"
#include "mplayer.h"
#include "win_about.h"
#include "process.h"
#include "split.h"
#include "alsa_play.h"
#include "win_info.h"
#include "statusbar.h"
#include "cd_curl.h"
#include "bacon.h"
// FIXME
// TODO
GtkBuilder *GtkXcfaProjet = NULL;
GtkWidget *WindMain = NULL;
HOST_CONF HostConf;
GtkWidget *AdrLabelStatusbarGlobal = NULL;
BaconMessageConnection *connection = NULL;
KEYS keys = {
FALSE, // gboolean BoolGDKPress
FALSE, // gboolean BoolGDK_Control_L_R
FALSE, // gboolean BoolGDK_Control_A
0, // guint keyval
};
//
//
void on_label_statusbar_global_realize (GtkWidget *widget, gpointer user_data)
{
AdrLabelStatusbarGlobal = widget;
}
// -RECUPERATION DES DATAS
// -SAUVEGARDE DES DATAS
//
void remove_memory_apply (void)
{
static gboolean BoolDoEnterRemove = FALSE;
if (TRUE == BoolDoEnterRemove) return;
BoolDoEnterRemove = TRUE;
VERBOSE ("\n--------------------------------------------------\n");
PRINT_FUNC_LF();
VERBOSE ("--------------------------------------------------\n");
VERBOSE("AlsaPlay_stop ()\n")
AlsaPlay_stop ();
VERBOSE ("split_set_stop ()\n");
split_set_stop ();
VERBOSE ("Recuperation position et taille de la fenetre\n");
gdk_window_get_root_origin (WindMain->window, &Config.WinPos_X, &Config.WinPos_Y);
gdk_window_get_size (WindMain->window, &Config.WinWidth, &Config.WinHeight);
VERBOSE ("Sauvegarde l'etat de l'expander CD\n");
Config.BoolEtatExpanderCd = gtk_expander_get_expanded (GTK_EXPANDER (var_cd.Adr_Expander));
VERBOSE ("Sauvegarde de la configuration\n");
config_save ();
VERBOSE ("config_remove ()\n");
config_remove ();
VERBOSE ("fileanalyze_remove_entetefile ()\n");
fileanalyze_remove_entetefile ();
VERBOSE ("dvdaudio_remove_GtkTree ()\n");
dvd_remove_GtkTree ();
VERBOSE ("dvdread_remove_list ()\n");
dvdread_remove_list ();
VERBOSE ("cdaudio_deallocate_glist ()\n");
cdaudio_deallocate_glist ();
VERBOSE ("NotifySend_remove ()\n");
NotifySend_remove ();
VERBOSE ("Parse_remove (PARSE_TYPE_STOCKAGE_CD)\n");
Parse_remove (PARSE_TYPE_STOCKAGE_CD, TRUE);
VERBOSE ("Parse_remove (PARSE_TYPE_TITLE_CD)\n");
Parse_remove (PARSE_TYPE_TITLE_CD, TRUE);
VERBOSE ("poche_remove_view()\n");
poche_remove_view();
VERBOSE ("poche_remove_ListImage()\n");
poche_remove_ListImage();
VERBOSE ("libcombo_remove ()\n");
libcombo_remove ();
VERBOSE ("scan_remove_glist_media ()\n");
scan_remove_glist_media ();
VERBOSE ("web_remove_temporary_rep ()\n");
web_remove_temporary_rep ();
VERBOSE ("CdCurl_remove_struct_all ()\n");
CdCurl_remove_struct_all();
VERBOSE ("mplayer_remove_list_args ()\n");
mplayer_remove_list_args ();
VERBOSE ("SplitSpectre_remove ()\n");
SplitSpectre_remove ();
VERBOSE ("AlsaPlay_remove ()\n");
AlsaPlay_remove ();
if (TRUE == libutils_test_file_exist (XCFA_FILE_LOAD)) {
if( TRUE == OptionsCommandLine.BoolVerboseMode )
g_print ("g_unlink (%s)\n", XCFA_FILE_LOAD);
g_unlink (XCFA_FILE_LOAD);
}
if (TRUE == libutils_test_file_exist (SPLIT_FILE_TMP_WAV)) {
if( TRUE == OptionsCommandLine.BoolVerboseMode )
g_print ("g_unlink (%s)\n", SPLIT_FILE_TMP_WAV);
g_unlink (SPLIT_FILE_TMP_WAV);
}
VERBOSE ("StatusBar_remove ()\n");
StatusBar_remove();
Config.PathPochette = libutils_remove_temporary_rep( Config.PathPochette );
if( NULL != Config.PathLoadImg ) {
g_free( Config.PathLoadImg );
Config.PathLoadImg = NULL;
}
if( Config.PathSaveImg ) {
g_free( Config.PathSaveImg );
Config.PathSaveImg = NULL;
}
g_print ("\n");
}
//
//
void on_notebook_general_switch_page (GtkNotebook *notebook, GtkNotebookPage *page, guint page_num, gpointer user_data)
{
if (TRUE == Config.BoolConfigOk) {
Config.NotebookGeneral = page_num;
if (NOTEBOOK_SPLIT == Config.NotebookGeneral) {
split_set_name_file ();
}
else {
StatusBar_puts();
}
}
}
//
//
void on_notebook_expander_cd_switch_page (GtkNotebook *notebook, GtkNotebookPage *page, guint page_num, gpointer user_data)
{
if (TRUE == Config.BoolConfigOk)
Config.NotebookExpanderCd = page_num;
}
//
//
void on_notebook_in_file_switch_page (GtkNotebook *notebook, GtkNotebookPage *page, guint page_num, gpointer user_data)
{
if (TRUE == Config.BoolConfigOk) {
Config.NotebookFile = page_num;
switch (Config.NotebookFile) {
case NOTEBOOK_FICHIERS_CONVERSION :
gtk_combo_box_remove_text (GTK_COMBO_BOX (var_file.Adr_combobox_DestFile), 2);
gtk_combo_box_append_text (GTK_COMBO_BOX (var_file.Adr_combobox_DestFile), Config.PathDestinationFileAll);
gtk_combo_box_set_active (GTK_COMBO_BOX (var_file.Adr_combobox_DestFile), Config.TabIndiceComboDestFile[ NOTEBOOK_FICHIERS_CONVERSION ]);
break;
case NOTEBOOK_FICHIERS_WAV :
gtk_combo_box_remove_text (GTK_COMBO_BOX (var_file.Adr_combobox_DestFile), 2);
gtk_combo_box_append_text (GTK_COMBO_BOX (var_file.Adr_combobox_DestFile), Config.PathDestinationFileWav);
gtk_combo_box_set_active (GTK_COMBO_BOX (var_file.Adr_combobox_DestFile), Config.TabIndiceComboDestFile[ NOTEBOOK_FICHIERS_WAV ]);
break;
case NOTEBOOK_FICHIERS_MP3OGG :
gtk_combo_box_remove_text (GTK_COMBO_BOX (var_file.Adr_combobox_DestFile), 2);
gtk_combo_box_append_text (GTK_COMBO_BOX (var_file.Adr_combobox_DestFile), Config.PathDestinationFileMp3Ogg);
gtk_combo_box_set_active (GTK_COMBO_BOX (var_file.Adr_combobox_DestFile), Config.TabIndiceComboDestFile[ NOTEBOOK_FICHIERS_MP3OGG ]);
break;
case NOTEBOOK_FICHIERS_TAGS :
gtk_combo_box_remove_text (GTK_COMBO_BOX (var_file.Adr_combobox_DestFile), 2);
gtk_combo_box_append_text (GTK_COMBO_BOX (var_file.Adr_combobox_DestFile), Config.PathDestinationFileTags);
gtk_combo_box_set_active (GTK_COMBO_BOX (var_file.Adr_combobox_DestFile), Config.TabIndiceComboDestFile[ NOTEBOOK_FICHIERS_TAGS ]);
break;
}
StatusBar_set_mess( NOTEBOOK_FICHIERS, _STATUSBAR_SIMPLE_, "" );
StatusBar_puts();
}
}
//
//
void on_notebook_options_switch_page (GtkNotebook *notebook, GtkNotebookPage *page, guint page_num, gpointer user_data)
{
if (TRUE == Config.BoolConfigOk)
Config.NotebookOptions = page_num;
}
//
//
void on_notebook_app_externes_switch_page (GtkNotebook *notebook, GtkNotebookPage *page, guint page_num, gpointer user_data)
{
if (TRUE == Config.BoolConfigOk)
Config.NotebookAppExterns = page_num;
}
//
//
gboolean on_wind_main_key_press_event( GtkWidget *widget, GdkEventKey *kevent, gpointer user_data )
{
keys.BoolGDKPress = TRUE;
keys.keyval = kevent->keyval;
if( kevent->keyval == GDK_Control_L || kevent->keyval == GDK_Control_R ) {
keys.BoolGDK_Control_L_R = TRUE;
}
else if( kevent->state == 20 || kevent->state == 21 ) {
if( kevent->keyval == 65 || kevent->keyval == 97 ) {
keys.BoolGDK_Control_A = TRUE;
}
}
if( NOTEBOOK_POCHETTE == Config.NotebookGeneral ) {
if( TRUE == keys.BoolGDK_Control_L_R ) {
pochedir_set_ctrl( TRUE );
}
else if( kevent->keyval == GDK_Delete) {
// poche_remove_image();
}
}
else if( NOTEBOOK_SPLIT == Config.NotebookGeneral ) {
if( kevent->keyval == GDK_Delete ) {
SplitSelector_cut ();
}
else if( kevent->keyval == GDK_space ) {
// Une action sur la barre espace agit sur sur le play/pause
split_play ();
}
}
return FALSE;
}
//
//
gboolean on_wind_main_key_release_event( GtkWidget *widget, GdkEventKey *kevent, gpointer user_data )
{
keys.BoolGDKPress = FALSE;
keys.BoolGDK_Control_L_R = FALSE;
keys.BoolGDK_Control_A = FALSE;
keys.keyval = 0;
if( NOTEBOOK_POCHETTE == Config.NotebookGeneral ) {
pochedir_set_ctrl( FALSE );
}
return FALSE;
}
gboolean on_wind_main_window_state_event( GtkWidget *widget, GdkEventWindowState *event, gpointer ser_data )
{
/*
typedef enum
{
GDK_WINDOW_STATE_WITHDRAWN = 1 << 0,
GDK_WINDOW_STATE_ICONIFIED = 1 << 1,
GDK_WINDOW_STATE_MAXIMIZED = 1 << 2,
GDK_WINDOW_STATE_STICKY = 1 << 3,
GDK_WINDOW_STATE_FULLSCREEN = 1 << 4,
GDK_WINDOW_STATE_ABOVE = 1 << 5,
GDK_WINDOW_STATE_BELOW = 1 << 6
} GdkWindowState;
*/
if( GDK_WINDOW_STATE_MAXIMIZED == event->new_window_state ) {
gdk_window_maximize( WindMain->window );
}
return FALSE;
}
//
//
gboolean on_wind_main_delete_event (GtkWidget *widget, GdkEvent *event, gpointer user_data)
{
remove_memory_apply ();
gtk_main_quit ();
return FALSE;
}
//
//
gboolean on_wind_main_destroy_event (GtkWidget *widget, GdkEvent *event, gpointer user_data)
{
remove_memory_apply ();
gtk_main_quit ();
return FALSE;
}
//
//
void on_quitter1_activate (GtkMenuItem *menuitem, gpointer user_data)
{
remove_memory_apply ();
gtk_main_quit ();
}
//
//
void on_a_propos1_activate (GtkMenuItem *menuitem, gpointer user_data)
{
gchar *StrAboutXcfa = g_strdup_printf ("About XCFA - %s", VERSION);
WinAbout_open (StrAboutXcfa);
g_free (StrAboutXcfa);
StrAboutXcfa = NULL;
}
//
//
void on_show_fields_activate (GtkMenuItem *menuitem, gpointer user_data)
{
treeview_open_window ();
}
/* Install un 'handler' sur une mauvaise allocation memoire
* --
* entree : int sig :
* retour : -
*/
void segfault_handler(int sig)
{
g_unlink (XCFA_FILE_LOAD);
remove_memory_apply ();
g_print ("\n=========================================================\n");
g_print ("= Segmentation fault\n");
g_print (_("= Adressage memoire invalide\n"));
g_print ("=-------------------------------------------------------=\n");
g_print ("= You've probably found a bug in XCFA\n");
g_print (_("= Vous avez probablement trouve un bug dans XCFA\n"));
g_print ("=========================================================\n\n");
exit (EXIT_FAILURE);
}
//
//
typedef enum {
_PARAMS_GET_ALL_OPTIONS_ = 0,
_PARAMS_GET_OPTIONS_ONLY_
} PARAMS_CMD_LINE;
//
//
GList *AnalyseCommandLine_set_argv( gint argc, gchar *argv[], PARAMS_CMD_LINE ParamsCmdLine )
{
gint i;
gchar *str_current_dir = NULL;
// FILE *fp = NULL;
GList *GListFile = NULL;
if( optind < argc ) {
for( i = optind; i < argc; i++ ) {
// VERBOSE MODE
if( 0 == strcmp( argv[i], "-verbose" )) {
OptionsCommandLine.BoolVerboseMode = TRUE;
// g_print( "\nVERBOSE MODE:\n");
// g_print( " argv[ %d ] = %s\n", i, argv[ i ] );
// g_print( " BoolVerboseMode = %s\n", OptionsCommandLine.BoolVerboseMode ? "TRUE" : "FALSE" );
// g_print( "\n" );
}
// VERSION MODE
else if( 0 == strcmp( argv[i], "-version" )) {
OptionsCommandLine.BoolVersionMode = TRUE;
// g_print( "\nVERSION MODE:\n");
// g_print( " argv[ %d ] = %s\n", i, argv[ i ] );
// g_print( " OptionsCommandLine.BoolVersionMode = %s\n", OptionsCommandLine.BoolVersionMode ? "TRUE" : "FALSE" );
// g_print( "\n" );
}
// HELP MODE
else if( 0 == strcmp( argv[i], "-help" ) || 0 == strcmp( argv[i], "-h" )) {
OptionsCommandLine.BoolHelpMode = TRUE;
}
}
// STOP ?
if( _PARAMS_GET_OPTIONS_ONLY_ == ParamsCmdLine )return( (GList *)NULL );
if( FALSE == OptionsCommandLine.BoolVerboseMode && FALSE == OptionsCommandLine.BoolVersionMode ) {
str_current_dir = g_get_current_dir();
// fp = fopen( XCFA_FILE_LOAD, "a" );
for( i = optind; i < argc; i++ )
{
if( *argv[ i ] == '-' ) continue;
// FROM DESKTOP
if( argv[i][0] == '/' ) {
// fprintf( fp, "%s\n", argv[ i ] );
GListFile = g_list_append( GListFile, g_strdup( argv[ i ] ));
}
else {
gchar *str = NULL;
str = g_strdup_printf( "%s/%s", str_current_dir, argv[i] );
// fprintf( fp, "%s\n", str );
GListFile = g_list_append( GListFile, g_strdup( str ));
g_free( str );
str = NULL;
}
}
// fclose( fp );
g_free( str_current_dir );
str_current_dir = NULL;
}
}
return( (GList *)GListFile );
}
//
//
void main_save( GList *p_GListFile )
{
GList *list = NULL;
gchar *PtrName = NULL;
FILE *fp = NULL;
// g_return_if_fail (p_GListFile != NULL);
if( NULL != p_GListFile ) {
if( NULL != (list = g_list_first( p_GListFile ))) {
fp = fopen( XCFA_FILE_LOAD, "a" );
while( list ) {
if (NULL != (PtrName = (gchar *)list->data)) {
fprintf( fp, "%s\n", PtrName );
if( TRUE == OptionsCommandLine.BoolVersionMode ) g_print( "%s\n", PtrName );
}
list = g_list_next( list );
}
fclose( fp );
}
}
}
//
//
static void on_message_received( const char *message, gpointer data )
{
FILE *fp = NULL;
fp = fopen( XCFA_FILE_LOAD, "a" );
fprintf( fp, "%s\n", message );
fclose( fp );
gtk_window_present (GTK_WINDOW (WindMain));
}
/* gint main (gint argc, gchar *argv[], gchar **envp)
*
* argc designe le nombre d'arguments transmis au moment du lancement de l'executable
* argv designe le vecteur contenant les differents arguments
* envp designe le vecteur contenant les informations sur l'environnement
*/
gint main (gint argc, gchar *argv[], gchar **envp)
{
GError *p_err = NULL;
gchar *CurrentDir = g_get_current_dir ();
gchar *PathCurrentDir = NULL;
gchar *PathShareProjet = NULL;
gchar *Path = NULL;
gchar *PackageVersion = NULL;
GList *GListFile = NULL;
/* Init type system as soon as possible */
// g_type_init ();
g_set_prgname ("xcfa");
PRINT_FUNC_LF();
g_print ("\n");
g_print ("***************************\n");
g_print ("%s %s\n", PACKAGE, VERSION);
g_print ("***************************\n");
g_print ("%s %s compiled at %s %s\n", PACKAGE_NAME, VERSION, __DATE__, __TIME__);
g_print ("Compiler: gcc %s\n", __VERSION__);
g_print ("***************************\n");
g_print ("Gtk version = %d.%d.%d\n", GTK_MAJOR_VERSION, GTK_MICRO_VERSION, GTK_MINOR_VERSION);
g_print ("Glib version = %d.%d.%d\n", GLIB_MAJOR_VERSION, GLIB_MICRO_VERSION, GLIB_MINOR_VERSION);
g_print ("***************************\n\n");
// ANALYSE UNIQUEMENT LES OPTIONS
AnalyseCommandLine_set_argv( argc, &argv[0], _PARAMS_GET_OPTIONS_ONLY_ );
if( TRUE == OptionsCommandLine.BoolVersionMode || TRUE == OptionsCommandLine.BoolHelpMode ) {
if( TRUE == OptionsCommandLine.BoolHelpMode ) {
g_print( "HELP MODE:\n");
g_print( " -help -h Displays this help section and exits\n" );
g_print( " -version Displays the version of the program and exits\n" );
g_print( " -verbose Activate verbose mode\n" );
}
g_print( "\n" );
g_unlink( XCFA_FILE_LOAD );
g_unlink( SPLIT_FILE_TMP_WAV );
return( EXIT_SUCCESS );
}
#ifdef ENABLE_NLS
if( TRUE == OptionsCommandLine.BoolVerboseMode ) {
g_print ("ENABLE_NLS OK\n");
g_print ("\tGETTEXT_PACKAGE = %s\n", GETTEXT_PACKAGE);
g_print ("\tLOCALE_DIR = %s\n", LOCALE_DIR);
}
setlocale( LC_ALL, "" );
bindtextdomain (GETTEXT_PACKAGE, LOCALE_DIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE);
#else
// g_error ("ENABLE_NLS IS NOT OK\n\n");
#endif
GetInfo_cpu_print ();
// IF Segmentation fault
signal (SIGSEGV, segfault_handler);
config_read();
setlocale( LC_ALL, "" );
gtk_init( &argc, &argv );
/*
Code revu depuis:
bacon-message-connection.c bacon-message-connection.h
Copyright (C) 2003
Bastien Nocera
LA connection PEUT ETRE LIBEREE DES LE CHARGEMENT TOTAL DEPUIS LA LIGNE DE COMMANDE
LES FICHIERS SERONT PRIT EN COMPTE DEPUIS:
process_goto_timeout()
*/
connection = bacon_message_connection_new( "xcfa" );
if( NULL != connection )
{
if( FALSE == bacon_message_connection_get_is_server( connection ))
{
// g_print( "\nCLIENT:\nGET COMMAND LINE AND EXIT\n" );
GListFile = AnalyseCommandLine_set_argv( argc, &argv[0], _PARAMS_GET_ALL_OPTIONS_ ); // Get and save param-file
// SEND WITH:
// bacon_message_connection_send( connection, str );
bacon_message_connection_send( connection, GListFile );
GListFile = libutils_remove_glist( GListFile );
// g_print( "bacon_utils_get_current_workspace() = %d\n", bacon_utils_get_current_workspace() +1 );
bacon_message_connection_free( connection );
exit( EXIT_SUCCESS );
}
else
{
g_unlink( XCFA_FILE_LOAD );
g_unlink( SPLIT_FILE_TMP_WAV );
// g_print( "\nSERVER:\nGET COMMAND LINE AND CONTINUE\n" );
bacon_message_connection_set_callback( connection, on_message_received, NULL );
GListFile = AnalyseCommandLine_set_argv( argc, &argv[0], _PARAMS_GET_ALL_OPTIONS_ ); // Get and save param-file
// SAVE TO:
// XCFA_FILE_LOAD
main_save( GListFile );
GListFile = libutils_remove_glist( GListFile );
}
}
else
{
g_warning( "Cannot create the 'gedit' connection." );
}
gdk_threads_enter ();
if (NULL == (GtkXcfaProjet = gtk_builder_new ())) {
gdk_threads_leave ();
return (EXIT_FAILURE);
}
gtk_builder_set_translation_domain (GtkXcfaProjet, NULL);
PathCurrentDir = g_strdup_printf ("%s/glade/%s", CurrentDir, PACKAGE_NAME_GLADE);
g_free (CurrentDir);
CurrentDir = NULL;
// PathShareProjet = g_strdup_printf ("%s/%s/glade/%s", DATA_DIR, PACKAGE_NAME, PACKAGE_NAME_GLADE);
PathShareProjet = xdg_search_data_xdg( PACKAGE_NAME_GLADE );
if( TRUE == OptionsCommandLine.BoolVerboseMode ) {
g_print("\n");
g_print("!---\n");
g_print("! File XML: [ %s ] %s\n", PathCurrentDir != NULL ? PathCurrentDir : PACKAGE_NAME_GLADE, g_file_test (PathCurrentDir, G_FILE_TEST_EXISTS) ? "Found" : "Not Found !!!" );
g_print("!---\n");
g_print("! File XML: [ %s ] %s\n", PathShareProjet != NULL ? PathShareProjet : PACKAGE_NAME_GLADE, g_file_test (PathShareProjet, G_FILE_TEST_EXISTS) ? "Found" : "Not Found !!!" );
g_print("!---\n");
}
if (FALSE == g_file_test (PathCurrentDir, G_FILE_TEST_EXISTS) && FALSE == g_file_test (PathShareProjet, G_FILE_TEST_EXISTS)) {
g_free (PathCurrentDir);
PathCurrentDir = NULL;
g_free (PathShareProjet);
PathShareProjet = NULL;
gdk_threads_leave ();
return (EXIT_FAILURE);
}
else if (TRUE == g_file_test (PathCurrentDir, G_FILE_TEST_EXISTS)) {
Path = PathCurrentDir;
}
else if (TRUE == g_file_test (PathShareProjet, G_FILE_TEST_EXISTS)) {
Path = PathShareProjet;
}
if( TRUE == OptionsCommandLine.BoolVerboseMode )
g_print("\nPATHNAME FILE %s: %s\n\n", PACKAGE_NAME_GLADE, Path);
if (gtk_builder_add_from_file (GtkXcfaProjet, Path, &p_err) <= 0) {
g_warning ("Couldn't load builder file: %s", p_err->message);
g_error_free (p_err);
g_free (PathCurrentDir);
PathCurrentDir = NULL;
g_free (PathShareProjet);
PathShareProjet = NULL;
Path = NULL;
gdk_threads_leave ();
return (EXIT_FAILURE);
}
g_free (PathCurrentDir);
PathCurrentDir = NULL;
g_free (PathShareProjet);
PathShareProjet = NULL;
Path = NULL;
gtk_builder_set_translation_domain (GtkXcfaProjet, setlocale( LC_ALL, "" ) );
gtk_builder_connect_signals (GtkXcfaProjet, NULL);
WindMain = GTK_WIDGET (GLADE_GET_OBJECT("wind_main"));
// REDIMENSIONNER LA FENETRE
gtk_window_resize(GTK_WINDOW(WindMain), Config.WinWidth, Config.WinHeight);
// PLACER LA FENETRE
gtk_window_move(GTK_WINDOW(WindMain), Config.WinPos_X, Config.WinPos_Y);
PackageVersion = g_strdup_printf ("X Convert File Audio - %s", VERSION);
gtk_window_set_title (GTK_WINDOW (WindMain), PackageVersion);
g_free (PackageVersion);
PackageVersion = NULL;
libutils_set_default_icone_to_win (WindMain);
gtk_widget_show (WindMain);
// NOTEBOOK
gtk_notebook_set_current_page (GTK_NOTEBOOK (GLADE_GET_OBJECT("notebook_general")), NOTEBOOK_PRGEXTERNES);
gtk_notebook_set_current_page (GTK_NOTEBOOK (GLADE_GET_OBJECT("notebook_app_externes")), NOTEBOOK_OPTIONS_EXTRA);
gtk_notebook_set_current_page (GTK_NOTEBOOK (GLADE_GET_OBJECT("notebook_app_externes")), NOTEBOOK_OPTIONS_PRGEXTERNES);
// OPTIONS
gtk_notebook_set_current_page (GTK_NOTEBOOK (GLADE_GET_OBJECT("notebook_general")), NOTEBOOK_OPTIONS);
gtk_notebook_set_current_page (GTK_NOTEBOOK (GLADE_GET_OBJECT("notebook_options")), NOTEBOOK_OPTIONS_EXPORT_TAGS);
gtk_notebook_set_current_page (GTK_NOTEBOOK (GLADE_GET_OBJECT("notebook_options")), NOTEBOOK_OPTIONS_AACPLUSENC);
gtk_notebook_set_current_page (GTK_NOTEBOOK (GLADE_GET_OBJECT("notebook_options")), NOTEBOOK_OPTIONS_FAAC);
gtk_notebook_set_current_page (GTK_NOTEBOOK (GLADE_GET_OBJECT("notebook_options")), NOTEBOOK_OPTIONS_MUSEPACK);
gtk_notebook_set_current_page (GTK_NOTEBOOK (GLADE_GET_OBJECT("notebook_options")), NOTEBOOK_OPTIONS_WAVPACK);
gtk_notebook_set_current_page (GTK_NOTEBOOK (GLADE_GET_OBJECT("notebook_options")), NOTEBOOK_OPTIONS_MAC);
gtk_notebook_set_current_page (GTK_NOTEBOOK (GLADE_GET_OBJECT("notebook_options")), NOTEBOOK_OPTIONS_FLAC);
gtk_notebook_set_current_page (GTK_NOTEBOOK (GLADE_GET_OBJECT("notebook_options")), NOTEBOOK_OPTIONS_OGGENC);
gtk_notebook_set_current_page (GTK_NOTEBOOK (GLADE_GET_OBJECT("notebook_options")), NOTEBOOK_OPTIONS_LAME);
gtk_notebook_set_current_page (GTK_NOTEBOOK (GLADE_GET_OBJECT("notebook_options")), NOTEBOOK_OPTIONS_CD_AUDIO);
gtk_notebook_set_current_page (GTK_NOTEBOOK (GLADE_GET_OBJECT("notebook_options")), NOTEBOOK_OPTIONS_GENERAL);
// POCHETTE
gtk_notebook_set_current_page (GTK_NOTEBOOK (GLADE_GET_OBJECT("notebook_general")), NOTEBOOK_POCHETTE);
// SPLIT
gtk_notebook_set_current_page (GTK_NOTEBOOK (GLADE_GET_OBJECT("notebook_general")), NOTEBOOK_SPLIT);
// FICHIERS
gtk_notebook_set_current_page (GTK_NOTEBOOK (GLADE_GET_OBJECT("notebook_general")), NOTEBOOK_FICHIERS);
gtk_notebook_set_current_page (GTK_NOTEBOOK (GLADE_GET_OBJECT("notebook_in_file")), NOTEBOOK_FICHIERS_TAGS);
gtk_notebook_set_current_page (GTK_NOTEBOOK (GLADE_GET_OBJECT("notebook_in_file")), NOTEBOOK_FICHIERS_MP3OGG);
gtk_notebook_set_current_page (GTK_NOTEBOOK (GLADE_GET_OBJECT("notebook_in_file")), NOTEBOOK_FICHIERS_WAV);
gtk_notebook_set_current_page (GTK_NOTEBOOK (GLADE_GET_OBJECT("notebook_in_file")), NOTEBOOK_FICHIERS_CONVERSION);
// CD-AUDIO
gtk_notebook_set_current_page (GTK_NOTEBOOK (GLADE_GET_OBJECT("notebook_general")), NOTEBOOK_CD_AUDIO);
gtk_notebook_set_current_page (GTK_NOTEBOOK (GLADE_GET_OBJECT("notebook_expander_cd")), NOTEBOOK_CD_AUDIO_CUE);
gtk_notebook_set_current_page (GTK_NOTEBOOK (GLADE_GET_OBJECT("notebook_expander_cd")), NOTEBOOK_CD_AUDIO_TITRE_CD);
gtk_notebook_set_current_page (GTK_NOTEBOOK (GLADE_GET_OBJECT("notebook_expander_cd")), NOTEBOOK_CD_AUDIO_TAGS);
// DVD-AUDIO
gtk_notebook_set_current_page (GTK_NOTEBOOK (GLADE_GET_OBJECT("notebook_general")), NOTEBOOK_DVD_AUDIO);
var_options.ColorLineCommand = COLOR_INIT;
options_set_all_interne ();
var_options.ColorLineCommand = COLOR_NONE;
Config.BoolConfigOk = TRUE;
gtk_notebook_set_current_page (GTK_NOTEBOOK (GLADE_GET_OBJECT("notebook_general")), Config.NotebookGeneral);
gtk_notebook_set_current_page (GTK_NOTEBOOK (GLADE_GET_OBJECT("notebook_expander_cd")), Config.NotebookExpanderCd);
gtk_notebook_set_current_page (GTK_NOTEBOOK (GLADE_GET_OBJECT("notebook_in_file")), Config.NotebookFile);
gtk_notebook_set_current_page (GTK_NOTEBOOK (GLADE_GET_OBJECT("notebook_options")), Config.NotebookOptions);
gtk_notebook_set_current_page (GTK_NOTEBOOK (GLADE_GET_OBJECT("notebook_app_externes")), Config.NotebookAppExterns);
if (NOTEBOOK_SPLIT == Config.NotebookGeneral) {
split_set_name_file ();
}
cdaudio_set_flag_buttons ();
file_set_flag_buttons ();
FileWav_set_flag_buttons ();
FileMp3Ogg_set_flag_buttons ();
FileTags_set_flag_buttons ();
gtk_widget_set_sensitive (GTK_WIDGET (var_file_tags.Adr_table_tag), FALSE);
gtk_widget_set_sensitive (GTK_WIDGET (GLADE_GET_OBJECT("button_tag_appliquer")), FALSE);
gtk_widget_hide( GTK_WIDGET (GLADE_GET_OBJECT("frame_discid")));
treeview_set_etat_fields ();
treeview_radiobutton_set_PosFieldsName ();
filetrash_test_trash_is_ok ();
poche_set_flag_buttons();
// SI CHARGEMENT DE FICHIERS DEPUIS LE BUREAU AVEC LE MENU CONTEXTUEL
process_goto_timeout ();
// ADMINISTRATOR MODE ?
if( 0 == getuid() ) {
wininfo_create (
WindMain,
_("MODE ADMINISTRATEUR"),
"\n",
_(" Vous ne devriez pas utiliser "),
"\n",
_(" XCFA sous ROOT !"),
"\n",
"");
}
xdg_print_list_config_path();
xdg_print_list_data_path();
gtk_main ();
// bacon_message_connection_free( connection );
gdk_threads_leave ();
exit(EXIT_SUCCESS);
}
xcfa-4.3.6/src/tags_mpc.c 0000644 0001750 0001750 00000021331 12122563465 012124 0000000 0000000 /*
* file : tags_mpc.c
* project : xcfa
* with : Gtk-2
*
* copyright : (C) 2003 - 2013 by Claude Bulin
*
* xcfa - GTK+ implementation of the GNU shell command
* GNU General Public License
*
* This file is part of XCFA.
*
* XCFA is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* at your option) any later version.
*
* XCFA is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with XCFA. If not, see .
*/
#ifdef HAVE_CONFIG_H
#include "../config.h"
#endif
#include
#include
#include
#include
#include
#include
#include
#include
#include
#ifdef ENABLE_STATIC_LIBRARY
#include "../lib/lib.h"
#endif
#include "global.h"
#include "tags.h"
#include
/*
*---------------------------------------------------------------------------
* VARIABLES
*---------------------------------------------------------------------------
*/
typedef struct {
unsigned is_4d : 8;
unsigned is_50 : 8;
unsigned is_2b : 8;
unsigned is_StreamMajorVersion : 4;
unsigned is_StreamMinorVersion : 4;
} MPC_BIT_0;
typedef struct {
unsigned is_FrameCount : 32;
} MPC_BIT_1;
typedef struct {
unsigned is_MaxLevel : 16;
unsigned is_SampleFreq : 2;
unsigned is_Link : 2;
unsigned is_Profile : 4;
unsigned is_MaxBand : 6;
unsigned is_MidSideStereo : 1;
unsigned is_IntensityStereo : 1;
} MPC_BIT_2;
typedef struct {
unsigned is_TitlePeak : 16;
unsigned is_TitleGain : 16;
} MPC_BIT_3;
typedef struct {
unsigned is_AlbumPeak : 16;
unsigned is_AlbumGain : 16;
} MPC_BIT_4;
typedef struct {
unsigned is_unusued : 19;
unsigned is_Safely : 1;
unsigned is_LastFrameLength : 11;
unsigned is_TrueGapless : 1;
} MPC_BIT_5;
typedef struct {
unsigned is_unusued : 24;
unsigned is_EncoderVersion : 8;
} MPC_BIT_6;
typedef struct {
MPC_BIT_0 bit_0;
MPC_BIT_1 bit_1;
MPC_BIT_2 bit_2;
MPC_BIT_3 bit_3;
MPC_BIT_4 bit_4;
MPC_BIT_5 bit_5;
MPC_BIT_6 bit_6;
} MPC_HEADER;
/*
*---------------------------------------------------------------------------
* FILE IS MPC ?
*---------------------------------------------------------------------------
*/
void tagsmpc_print_entete_mpc (gchar *namefile, MPC_HEADER *fm)
{
/*PRINT_FUNC_LF();*/
g_print ("\n");
g_print ("%s\n", namefile);
g_print ("\n");
g_print ("-- BIT 0 -----------------------------------------\n");
g_print ("\tis_4d %4d - 0x%x\n", fm->bit_0.is_4d, fm->bit_0.is_4d);
g_print ("\tis_50 %4d - 0x%x\n", fm->bit_0.is_50, fm->bit_0.is_50);
g_print ("\tis_2b %4d - 0x%x\n", fm->bit_0.is_2b, fm->bit_0.is_2b);
g_print ("\tis_StreamMajorVersion %4d - 0x%x\n", fm->bit_0.is_StreamMajorVersion, fm->bit_0.is_StreamMajorVersion);
g_print ("\tis_StreamMinorVersion %4d - 0x%x\n", fm->bit_0.is_StreamMinorVersion, fm->bit_0.is_StreamMinorVersion);
g_print ("-- BIT 1 -----------------------------------------\n");
g_print ("\tis_FrameCount %4d - 0x%x\n", fm->bit_1.is_FrameCount, fm->bit_1.is_FrameCount);
g_print ("-- BIT 2 -----------------------------------------\n");
g_print ("\tis_MaxLevel %4d - 0x%x\n", fm->bit_2.is_MaxLevel, fm->bit_2.is_MaxLevel);
g_print ("\tis_SampleFreq %4d - 0x%x\n", fm->bit_2.is_SampleFreq, fm->bit_2.is_SampleFreq);
switch(fm->bit_2.is_SampleFreq) {
case 0 : g_print ("\t\t44100 Hz\n"); break;
case 1 : g_print ("\t\t48000 Hz\n"); break;
case 2 : g_print ("\t\t37800 Hz\n"); break;
case 3 : g_print ("\t\t32000 Hz\n"); break;
}
g_print ("\tis_Link %4d - 0x%x\n", fm->bit_2.is_Link, fm->bit_2.is_Link);
switch(fm->bit_2.is_Link) {
case 0 : g_print ("\t\tTitle start or ends with a very low level\n"); break;
case 1 : g_print ("\t\tTitle ends loudly\n"); break;
case 2 : g_print ("\t\tTitle start loudly\n"); break;
case 3 : g_print ("\t\tTitle start loudly and ends loudly\n"); break;
}
g_print ("\tis_Profile %4d - 0x%x\n", fm->bit_2.is_Profile, fm->bit_2.is_Profile);
switch (fm->bit_2.is_Profile) {
case 0 : g_print ("\t\tno profile\n"); break;
case 1 : g_print ("\t\tUnstable/Experimental\n"); break;
case 2 : g_print ("\t\tunused\n"); break;
case 3 : g_print ("\t\tunused\n"); break;
case 4 : g_print ("\t\tunused\n"); break;
case 5 : g_print ("\t\tbelow telephone : q=0.0\n"); break;
case 6 : g_print ("\t\tbelow telephone : q=1.0\n"); break;
case 7 : g_print ("\t\ttelephone : q=2.0\n"); break;
case 8 : g_print ("\t\tThumb : q=3.0\n"); break;
case 9 : g_print ("\t\tRadio : q=4.0\n"); break;
case 10 : g_print ("\t\tStandard : q=5.0\n"); break;
case 11 : g_print ("\t\tXtreme : q=6.0\n"); break;
case 12 : g_print ("\t\tInsane : q=7.0\n"); break;
case 13 : g_print ("\t\tBrainDead : q=8.0\n"); break;
case 14 : g_print ("\t\tabove BrainDead : q=9.0\n"); break;
case 15 : g_print ("\t\tabove BrainDead : q=10.0\n"); break;
}
g_print ("\tis_MaxBand %4d - 0x%x\n", fm->bit_2.is_MaxBand, fm->bit_2.is_MaxBand);
g_print ("\tis_MidSideStereo %4d - 0x%x\n", fm->bit_2.is_MidSideStereo, fm->bit_2.is_MidSideStereo);
g_print ("\tis_IntensityStereo %4d - 0x%x\n", fm->bit_2.is_IntensityStereo, fm->bit_2.is_IntensityStereo);
g_print ("-- BIT 3 -----------------------------------------\n");
g_print ("\tis_TitlePeak %4d - 0x%x\n", fm->bit_3.is_TitlePeak, fm->bit_3.is_TitlePeak);
g_print ("\tis_TitleGain %4d - 0x%x\n", fm->bit_3.is_TitleGain, fm->bit_3.is_TitleGain);
g_print ("-- BIT 4 -----------------------------------------\n");
g_print ("\tis_AlbumPeak %4d - 0x%x\n", fm->bit_4.is_AlbumPeak, fm->bit_4.is_AlbumPeak);
g_print ("\tis_AlbumGain %4d - 0x%x\n", fm->bit_4.is_AlbumGain, fm->bit_4.is_AlbumGain);
g_print ("-- BIT 5 -----------------------------------------\n");
g_print ("\tis_unusued %4d - 0x%x\n", fm->bit_5.is_unusued, fm->bit_5.is_unusued);
g_print ("\tis_Safely %4d - 0x%x\n", fm->bit_5.is_Safely, fm->bit_5.is_Safely);
g_print ("\tis_LastFrameLength %4d - 0x%x\n", fm->bit_5.is_LastFrameLength, fm->bit_5.is_LastFrameLength);
g_print ("\tis_TrueGapless %4d - 0x%x\n", fm->bit_5.is_TrueGapless, fm->bit_5.is_TrueGapless);
g_print ("-- BIT 6 -----------------------------------------\n");
g_print ("\tis_EncoderVersion %4d - 0x%x\n", fm->bit_6.is_EncoderVersion, fm->bit_6.is_EncoderVersion);
g_print ("\n");
}
/*
*---------------------------------------------------------------------------
* GET HEADER
*---------------------------------------------------------------------------
*/
INFO_MPC *tagsmpc_remove_info (INFO_MPC *info)
{
if (info) {
info->tags = (TAGS *)tags_remove (info->tags);
g_free (info);
info = NULL;
}
return ((INFO_MPC *)NULL);
}
INFO_MPC *tagsmpc_get_info (DETAIL *detail)
{
INFO_MPC *ptrinfo = NULL;
TagLib_File *file;
TagLib_Tag *tag;
ptrinfo = (INFO_MPC *)g_malloc0 (sizeof (INFO_MPC));
if (ptrinfo == NULL) return (NULL);
ptrinfo->tags = (TAGS *)tags_alloc (FALSE);
if ((file = taglib_file_new (detail->namefile))) {
taglib_set_strings_unicode(FALSE);
tag = taglib_file_tag(file);
ptrinfo->tags->Title = g_strdup (taglib_tag_title(tag));
ptrinfo->tags->Artist = g_strdup (taglib_tag_artist(tag));
ptrinfo->tags->Album = g_strdup (taglib_tag_album(tag));
ptrinfo->tags->IntYear = taglib_tag_year(tag);
ptrinfo->tags->Year = g_strdup_printf ("%d", ptrinfo->tags->IntYear);
ptrinfo->tags->Comment = g_strdup (taglib_tag_comment(tag));
ptrinfo->tags->IntNumber = taglib_tag_track(tag);
ptrinfo->tags->Number = g_strdup_printf ("%d", ptrinfo->tags->IntNumber);
ptrinfo->tags->Genre = g_strdup (taglib_tag_genre(tag));
ptrinfo->tags->IntGenre = tags_get_genre_by_value (ptrinfo->tags->Genre);
/*
printf("title - \"%s\"\n", taglib_tag_title(tag));
printf("artist - \"%s\"\n", taglib_tag_artist(tag));
printf("album - \"%s\"\n", taglib_tag_album(tag));
printf("year - \"%i\"\n", taglib_tag_year(tag));
printf("comment - \"%s\"\n", taglib_tag_comment(tag));
printf("track - \"%i\"\n", taglib_tag_track(tag));
printf("genre - \"%s\"\n", taglib_tag_genre(tag));
*/
taglib_tag_free_strings();
taglib_file_free (file);
}
else {
ptrinfo->tags = (TAGS *)tags_alloc (FALSE);
tags_set (detail->namefile, ptrinfo->tags);
}
return (ptrinfo);
}
xcfa-4.3.6/src/win_about.h 0000644 0001750 0001750 00000001724 12122563437 012326 0000000 0000000 /*
* file : wind_about.h
* project : xcfa
* with : Gtk-2
*
* copyright : (C) 2003 - 2013 by Claude Bulin
*
* xcfa - GTK+ implementation of the GNU shell command
* GNU General Public License
*
* This file is part of XCFA.
*
* XCFA is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* at your option) any later version.
*
* XCFA is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with XCFA. If not, see .
*/
#ifndef win_about_h
#define win_about_h 1
void WinAbout_open (gchar *title);
#endif
xcfa-4.3.6/src/tags_aiff.c 0000644 0001750 0001750 00000004077 12122563465 012262 0000000 0000000 /*
* file : tags_aiff.c
* project : xcfa
* with : Gtk-2
*
* copyright : (C) 2003 - 2013 by Claude Bulin
*
* xcfa - GTK+ implementation of the GNU shell command
* GNU General Public License
*
* This file is part of XCFA.
*
* XCFA is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* at your option) any later version.
*
* XCFA is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with XCFA. If not, see .
*/
#ifdef HAVE_CONFIG_H
#include "../config.h"
#endif
#include
#include
#include
#include
#include
#include
#include
#include
#include
#ifdef ENABLE_STATIC_LIBRARY
#include "../lib/lib.h"
#endif
#include "global.h"
#include "tags.h"
#include
/*
*---------------------------------------------------------------------------
* REMOVE HEADER
*---------------------------------------------------------------------------
*/
INFO_AIFF *tagsaiff_remove_info (INFO_AIFF *info)
{
if (info) {
info->tags = (TAGS *)tags_remove (info->tags);
g_free (info);
info = NULL;
}
return ((INFO_AIFF *)NULL);
}
/*
*---------------------------------------------------------------------------
* GET HEADER
*---------------------------------------------------------------------------
*/
INFO_AIFF *tagsaiff_get_info (DETAIL *detail)
{
INFO_AIFF *ptrinfo = NULL;
ptrinfo = (INFO_AIFF *)g_malloc0 (sizeof (INFO_AIFF));
if (ptrinfo == NULL) return (NULL);
ptrinfo->tags = (TAGS *)tags_alloc (FALSE);
tags_set (detail->namefile, ptrinfo->tags);
return ((INFO_AIFF *)ptrinfo);
}
xcfa-4.3.6/src/file_mp3ogg.c 0000644 0001750 0001750 00000075266 12122677071 012541 0000000 0000000 /*
* file : file_mp3ogg.c
* project : xcfa
* with : Gtk-2
*
* copyright : (C) 2003 - 2013 by Claude Bulin
*
* xcfa - GTK+ implementation of the GNU shell command
* GNU General Public License
*
* This file is part of XCFA.
*
* XCFA is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* at your option) any later version.
*
* XCFA is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with XCFA. If not, see .
*/
#ifdef HAVE_CONFIG_H
#include "../config.h"
#endif
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#ifdef ENABLE_STATIC_LIBRARY
#include "../lib/lib.h"
#endif
#include "global.h"
#include "configuser.h"
#include "dragNdrop.h"
#include "fileselect.h"
#include "tags.h"
#include "file.h"
#include "statusbar.h"
#include "popup.h"
/*
typedef struct {
GtkWidget *Adr_scroll; // Adresse
GtkListStore *Adr_List_Store; // Adresse
GtkTreeModel *Adr_Tree_Model; // Adresse
GtkTreeSelection *Adr_Line_Selected; // Adresse
GtkWidget *Adr_TreeView; // Adresse
GtkWidget *Adr_Entry_Dest; // Adresse
GtkWidget *Adr_Button_Dest; // Adresse
GtkComboBox *Adr_combobox_DestFile; // Adresse
GdkPixbuf *Pixbuf_NotInstall; // not_install.png
GtkCellRenderer *Renderer;
GtkTreeViewColumn *Adr_ColumnFileMp3OggType;
GtkTreeViewColumn *Adr_ColumnFileMp3OggBitrate;
GtkTreeViewColumn *Adr_ColumnFileMp3OggNewBitrate;
GtkTreeViewColumn *Adr_ColumnFileMp3OggSize;
GtkTreeViewColumn *Adr_ColumnFileMp3OggTime;
GtkTreeViewColumn *Adr_ColumnFileMp3OggName;
gboolean BoolPopUpIsSelected; //
} VAR_FILE_MP3OGG;
*/
VAR_FILE_MP3OGG var_file_mp3ogg = {
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
};
enum
{
COLUMN_FILEMP3OGG_TYPE,
COLUMN_FILEMP3OGG_BITRATE,
COLUMN_FILEMP3OGG_NEWBITRATE,
COLUMN_FILEMP3OGG_SIZE,
COLUMN_FILEMP3OGG_TIME,
COLUMN_FILEMP3OGG_NAME,
COLUMN_FILEMP3OGG_COLOR,
COLUMN_FILEMP3OGG_POINTER_STRUCT,
COLUMN_FILE_NUM
};
enum
{
NUM_TREE_FILEMP3OGG_Type = 0,
NUM_TREE_FILEMP3OGG_Bitrate,
NUM_TREE_FILEMP3OGG_NOUVEAUBITRATE,
NUM_TREE_FILEMP3OGG_Size,
NUM_TREE_FILEMP3OGG_Time,
NUM_TREE_FILEMP3OGG_Nom,
NUM_TREE_FILEMP3OGG_ALL_COLUMN
};
/*
//
// IDEE POUR AFFICHAGE AVEC PLUS DE DETAILS POUR L'UTILISATEUR
//
gchar *str_abr [] = {
"ABR: -b 32",
"ABR: -b 40",
"ABR: -b 48",
"ABR: -b 56",
"ABR: -b 64",
"ABR: -b 80",
"ABR: -b 96",
"ABR: -b 112",
"ABR: -b 128",
"ABR: -b 160",
"ABR: -b 192",
"ABR: -b 224",
"ABR: -b 256",
"ABR: -b 320"
};
gchar *str_cbr [] = {
"CBR: -b 32",
"CBR: -b 40",
"CBR: -b 48",
"CBR: -b 56",
"CBR: -b 64",
"CBR: -b 80",
"CBR: -b 96",
"CBR: -b 112",
"CBR: -b 128",
"CBR: -b 160",
"CBR: -b 192",
"CBR: -b 224",
"CBR: -b 256",
"CBR: -b 320",
"CBR: --preset insane"
};
gchar *str_vbr [] = {
"VBR: --preset medium",
"VBR: --preset standard",
"VBR: --preset extreme",
"VBR: --preset fast standard",
"VBR: --preset fast extreme",
"VBR: -V0",
"VBR: -V1",
"VBR: -V2",
"VBR: -V3",
"VBR: -V4",
"VBR: -V5",
"VBR: -V6",
"VBR: -V7",
"VBR: -V8",
"VBR: -V9"
};
gchar *str_vbr_new [] = {
"VBR NEW",
"VBR NEW: --preset medium",
"VBR NEW: --preset standard",
"VBR NEW: --preset extreme",
"VBR NEW: --preset fast standard",
"VBR NEW: --preset fast extreme",
"VBR NEW: -V0",
"VBR NEW: -V1",
"VBR NEW: -V2",
"VBR NEW: -V3",
"VBR NEW: -V4",
"VBR NEW: -V5",
"VBR NEW: -V6",
"VBR NEW: -V7",
"VBR NEW: -V8",
"VBR NEW: -V9"
};
gchar *val[] = {
"--bitrate=45",
"--bitrate=64",
"--bitrate=80",
"--bitrate=96",
"--bitrate=112",
"--bitrate=128",
"--bitrate=160",
"--bitrate=192",
"--bitrate=224",
"--bitrate=256",
"--bitrate=320",
"--quality=-1",
"--quality=0",
"--quality=1",
"--quality=2",
"--quality=3",
"--quality=4",
"--quality=5",
"--quality=6",
"--quality=7",
"--quality=8",
"--quality=9",
"--quality=10"
};
*/
// MISE A JOUR DES PARAMETRES EN TENANT COMPTE DU FLAG: detail->BoolChanged == TRUE
//
void FileMp3Ogg_change_parameters (void)
{
GtkTreeIter iter;
DETAIL *detail = NULL;
gboolean valid;
gchar *PtrBitrate = NULL;
valid = gtk_tree_model_get_iter_first (var_file_mp3ogg.Adr_Tree_Model, &iter);
while (valid) {
PtrBitrate = NULL;
gtk_tree_model_get (var_file_mp3ogg.Adr_Tree_Model, &iter, COLUMN_FILEMP3OGG_POINTER_STRUCT, &detail, -1);
if (NULL != detail && TRUE == detail->BoolChanged) {
if (FILE_IS_OGG == detail->type_infosong_file_is) {
INFO_OGG *info = (INFO_OGG *)detail->info;
detail->info = (INFO_OGG *)tagsogg_remove_info (info);
info = (INFO_OGG *)detail->info;
detail->info = (INFO_OGG *)tagsogg_get_info (detail);
info = (INFO_OGG *)detail->info;
PtrBitrate = info->Nominal_bitrate;
}
else if (FILE_IS_MP3 == detail->type_infosong_file_is) {
INFO_MP3 *info = (INFO_MP3 *)detail->info;
detail->info = (INFO_MP3 *)tagsmp3_remove_info (info);
info = (INFO_MP3 *)detail->info;
detail->info = (INFO_MP3 *)tagsmp3_get_info (detail);
info = (INFO_MP3 *)detail->info;
PtrBitrate = info->bitrate;
}
if (NULL != PtrBitrate) {
gtk_list_store_set (var_file_mp3ogg.Adr_List_Store, &iter, COLUMN_FILEMP3OGG_BITRATE, PtrBitrate, -1);
gtk_list_store_set (var_file_mp3ogg.Adr_List_Store, &iter, COLUMN_FILEMP3OGG_NEWBITRATE, "", -1);
gtk_list_store_set (var_file_mp3ogg.Adr_List_Store, &iter, COLUMN_FILEMP3OGG_SIZE, file_get_size (detail), -1);
gtk_list_store_set (var_file_mp3ogg.Adr_List_Store, &iter, COLUMN_FILEMP3OGG_TIME, file_get_time (detail), -1);
detail->Mp3_Debit =
detail->Mp3_Mode =
detail->Ogg_Debit =
detail->Ogg_Managed =
detail->Ogg_Downmix = -1;
detail->BoolChanged = FALSE;
}
// BUG SOLVED: 24 03 2012
// valid = gtk_tree_model_iter_next (var_file_mp3ogg.Adr_Tree_Model, &iter);
}
valid = gtk_tree_model_iter_next (var_file_mp3ogg.Adr_Tree_Model, &iter);
}
}
//
//
gboolean FileMp3Ogg_is_appliqued (void)
{
GList *List = NULL;
DETAIL *detail = NULL;
List = g_list_first (entetefile);
while (List) {
if( NULL != (detail = (DETAIL *)List->data)) {
if( TRUE == detail->BoolChanged ) return( TRUE );
}
List = g_list_next (List);
}
return (FALSE);
}
//
//
gboolean FileMp3Ogg_is_removed (void)
{
GtkTreeIter iter;
GtkTreeModel *model = NULL;
GList *list = NULL;
GtkTreePath *path;
DETAIL *detail = NULL;
model = gtk_tree_view_get_model (GTK_TREE_VIEW(var_file_mp3ogg.Adr_TreeView));
list = gtk_tree_selection_get_selected_rows (var_file_mp3ogg.Adr_Line_Selected, &model);
list = g_list_first (list);
while (list) {
if (NULL != (path = list->data)) {
gtk_tree_model_get_iter (model, &iter, path);
gtk_tree_model_get (var_file_mp3ogg.Adr_Tree_Model, &iter, COLUMN_FILEMP3OGG_POINTER_STRUCT, &detail, -1);
if( NULL != detail && TRUE == detail->BoolChanged ) return (TRUE);
}
list = g_list_next (list);
}
return (FALSE);
}
//
//
gboolean FileMp3Ogg_is_selected_FILE (TYPE_FILE_IS TypeFileIs)
{
GtkTreeIter iter;
GtkTreeModel *model = NULL;
GList *list = NULL;
GtkTreePath *path;
DETAIL *detail = NULL;
model = gtk_tree_view_get_model (GTK_TREE_VIEW(var_file_mp3ogg.Adr_TreeView));
list = gtk_tree_selection_get_selected_rows (var_file_mp3ogg.Adr_Line_Selected, &model);
list = g_list_first (list);
while (list) {
if (NULL != (path = list->data)) {
gtk_tree_model_get_iter (model, &iter, path);
gtk_tree_model_get (var_file_mp3ogg.Adr_Tree_Model, &iter, COLUMN_FILEMP3OGG_POINTER_STRUCT, &detail, -1);
if (NULL != detail && TypeFileIs == detail->type_infosong_file_is) return (TRUE);
}
list = g_list_next (list);
}
return (FALSE);
}
// ACTIVE OU DESACTIVE LES ACTIONS
//
void FileMp3Ogg_set_flag_buttons (void)
{
gboolean BoolButtonsAudio [ 3 ] = { FALSE, FALSE, FALSE };
// APPLIQUE
BoolButtonsAudio [ 0 ] = FileMp3Ogg_is_appliqued();
// EFFACE
BoolButtonsAudio [ 1 ] = FileMp3Ogg_is_removed ();
// REMOVE FILE
BoolButtonsAudio [ 2 ] = FileMp3Ogg_is_selected_FILE (FILE_IS_MP3) | FileMp3Ogg_is_selected_FILE (FILE_IS_OGG);
// ACTION
gtk_widget_set_sensitive (GTK_WIDGET (GLADE_GET_OBJECT("button_applique_file_mp3ogg")), BoolButtonsAudio [ 0 ]);
gtk_widget_set_sensitive (GTK_WIDGET (GLADE_GET_OBJECT("button_efface_bitrate_mp3ogg")), BoolButtonsAudio [ 1 ]);
gtk_widget_set_sensitive (GTK_WIDGET (GLADE_GET_OBJECT("button_del_file")), BoolButtonsAudio [ 2 ]);
}
// MARQUER LES LIGNES POUR LA DESTRUCTION
//
gboolean FileMp3Ogg_del_file_clicked (void)
{
GtkTreeIter iter;
GtkTreeModel *model = NULL;
GList *BeginList = NULL;
GList *list = NULL;
GtkTreePath *path;
DETAIL *detail = NULL;
gboolean BoolPrint = FALSE;
// RECUP. LIGNES EN SELECTION POUR DESTRUCTION
model = gtk_tree_view_get_model (GTK_TREE_VIEW(var_file_mp3ogg.Adr_TreeView));
if ((BeginList = gtk_tree_selection_get_selected_rows (var_file_mp3ogg.Adr_Line_Selected, &model))) {
BoolPrint = TRUE;
list = g_list_first (BeginList);
while (list) {
if ((path = list->data)) {
gtk_tree_model_get_iter (model, &iter, path);
gtk_tree_model_get (var_file_mp3ogg.Adr_Tree_Model, &iter, COLUMN_FILEMP3OGG_POINTER_STRUCT, &detail, -1);
// MARQUER LA LIGNE DU GLIST A DETRUIRE AVANT LE REAFFICHAGE
if (NULL != detail) detail->BoolRemove = TRUE;
}
list = g_list_next (list);
}
// gtk_tree_selection_unselect_all (var_file_mp3ogg.Adr_Line_Selected);
}
return (BoolPrint);
}
// UPDATE NEW BITRATE
//
void FileMp3Ogg_update_newbitrate( TYPE_FILE_IS p_TypeFileIs, gint p_debit, gint p_mode_managed, gint p_downmix )
{
GtkTreeModel *model = NULL;
GList *list = NULL;
GtkTreePath *path;
DETAIL *detail = NULL;
GtkTreeIter iter;
gchar *Str = NULL;
model = gtk_tree_view_get_model (GTK_TREE_VIEW(var_file_mp3ogg.Adr_TreeView));
list = g_list_first (gtk_tree_selection_get_selected_rows (var_file_mp3ogg.Adr_Line_Selected, &model));
while (list) {
if (NULL != (path = list->data)) {
gtk_tree_model_get_iter (model, &iter, path);
gtk_tree_model_get (var_file_mp3ogg.Adr_Tree_Model, &iter, COLUMN_FILEMP3OGG_POINTER_STRUCT, &detail, -1);
if (NULL == detail) {
list = g_list_next(list);
continue;
}
// FILE_IS_MP3
if (FILE_IS_MP3 == p_TypeFileIs && FILE_IS_MP3 == detail->type_infosong_file_is) {
// Str = popup_get_param_mp3( detail->Mp3_Debit, detail->Mp3_Mode );
detail->Mp3_Debit = p_debit;
detail->Mp3_Mode = p_mode_managed;
Str = popup_get_param_mp3( p_debit, p_mode_managed );
gtk_list_store_set (var_file_mp3ogg.Adr_List_Store, &iter, COLUMN_FILEMP3OGG_NEWBITRATE, Str != NULL ? Str : "", -1);
detail->BoolChanged = (Str != NULL) ? TRUE : FALSE;
if( NULL != Str ) {
g_free (Str);
Str = NULL;
}
}
// FILE_IS_OGG
else if (FILE_IS_OGG == p_TypeFileIs && FILE_IS_OGG == detail->type_infosong_file_is) {
// Str = popup_get_param_ogg( detail->Ogg_Debit, detail->Ogg_Managed, detail->Ogg_Downmix );
detail->Ogg_Debit = p_debit;
detail->Ogg_Managed = p_mode_managed;
detail->Ogg_Downmix = p_downmix;
Str = popup_get_param_ogg( p_debit, p_mode_managed, p_downmix );
gtk_list_store_set (var_file_mp3ogg.Adr_List_Store, &iter, COLUMN_FILEMP3OGG_NEWBITRATE, Str != NULL ? Str : "", -1);
detail->BoolChanged = (Str != NULL) ? TRUE : FALSE;
if( NULL != Str ) {
g_free (Str);
Str = NULL;
}
}
}
list = g_list_next(list);
}
FileMp3Ogg_set_flag_buttons ();
}
//
//
void FileMp3Ogg_affiche_glist (void)
{
DETAIL *detail = NULL;
GList *List = NULL;
GtkTreeIter iter;
GtkAdjustment *Adj = NULL;
gdouble AdjValue;
gint Line = 0; // LIGNE EN COURS
INFO_MP3 *info_mp3 = NULL;
INFO_OGG *info_ogg = NULL;
gchar *StrInfo = NULL;
gchar *PtrBitrate = NULL;
gchar *NameDest = NULL;
gint NumLineSelected = -1;
gboolean BoolNumLineSelected = FALSE;
// RECUP SELECTION
//
NumLineSelected = libutils_get_first_line_is_selected( var_file_mp3ogg.Adr_Line_Selected, var_file_mp3ogg.Adr_Tree_Model );
gtk_tree_selection_unselect_all (var_file_mp3ogg.Adr_Line_Selected);
// DELETE TREEVIEW
//
gtk_list_store_clear (GTK_LIST_STORE (var_file_mp3ogg.Adr_List_Store));
// COORDONNEES POUR UN REAJUSTEMENT VISUEL DE LA PAGE
//
Adj = gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (var_file_mp3ogg.Adr_scroll));
AdjValue = gtk_adjustment_get_value (Adj);
// AFFICHAGE DE LA LISTE
//
Line = 0;
List = g_list_first (entetefile);
while (List) {
if (NULL != ((detail = (DETAIL *)List->data)) && FALSE == detail->BoolRemove) {
if (FILE_IS_MP3 == detail->type_infosong_file_is) {
if (NULL != (info_mp3 = (INFO_MP3 *)detail->info)) PtrBitrate = info_mp3->bitrate;
}
else if (FILE_IS_OGG == detail->type_infosong_file_is) {
if (NULL != (info_ogg = (INFO_OGG *)detail->info)) PtrBitrate = info_ogg->Nominal_bitrate;
}
else {
List = g_list_next (List);
continue;
}
if (NULL == info_mp3 && NULL == info_ogg) {
List = g_list_next (List);
continue;
}
if (detail->type_infosong_file_is == FILE_IS_MP3) {
StrInfo = popup_get_param_mp3( detail->Mp3_Debit, detail->Mp3_Mode );
}
else {
StrInfo = popup_get_param_ogg( detail->Ogg_Debit, detail->Ogg_Managed, detail->Ogg_Downmix );
}
NameDest = libutils_get_name_without_ext_with_amp (detail->namefile);
gtk_list_store_append (var_file_mp3ogg.Adr_List_Store, &iter);
gtk_list_store_set (var_file_mp3ogg.Adr_List_Store, &iter,
COLUMN_FILEMP3OGG_TYPE, tags_get_str_type_file_is (detail->type_infosong_file_is),
COLUMN_FILEMP3OGG_BITRATE, PtrBitrate,
COLUMN_FILEMP3OGG_NEWBITRATE, detail->BoolChanged == TRUE ? StrInfo : "",
COLUMN_FILEMP3OGG_SIZE, file_get_size (detail),
COLUMN_FILEMP3OGG_TIME, file_get_time (detail),
COLUMN_FILEMP3OGG_NAME, NameDest,
COLUMN_FILEMP3OGG_COLOR, &YellowColor,
COLUMN_FILEMP3OGG_POINTER_STRUCT, detail,
-1);
g_free (NameDest); NameDest = NULL;
g_free (StrInfo); StrInfo = NULL;
// AFFICHE LES EVENTUELLES LIGNES EN SELECTION
//
if( NumLineSelected == Line ) {
gtk_tree_selection_select_iter (var_file_mp3ogg.Adr_Line_Selected, &iter);
BoolNumLineSelected = TRUE;
}
Line ++;
}
List = g_list_next (List);
}
// SUPPRESSON TABLEAU DES EVENTUELLES LIGNES EN SELECTION
//
if( NumLineSelected == -1 ) {
if (gtk_tree_model_get_iter_first (var_file_mp3ogg.Adr_Tree_Model, &iter)) {
gtk_tree_selection_select_iter (var_file_mp3ogg.Adr_Line_Selected, &iter);
BoolNumLineSelected = TRUE;
}
}
if( NumLineSelected > 0 && NULL != entetefile && BoolNumLineSelected == FALSE ) {
gtk_tree_selection_select_iter (var_file_mp3ogg.Adr_Line_Selected, &iter);
}
// REAJUSTEMENT DE LA LISTE
//
gtk_adjustment_set_value (Adj, AdjValue);
gtk_scrolled_window_set_vadjustment (GTK_SCROLLED_WINDOW (var_file_mp3ogg.Adr_scroll), Adj);
FileMp3Ogg_set_flag_buttons ();
}
//
//
void on_filemp3ogg_button_efface_bitrate_clicked (GtkButton *button, gpointer user_data)
{
GtkTreeIter iter;
GtkTreeModel *model = NULL;
GList *BeginList = NULL;
GList *list = NULL;
GtkTreePath *path;
DETAIL *detail = NULL;
// CHERCHE LES ELEMENTS A DETRUIRE
model = gtk_tree_view_get_model (GTK_TREE_VIEW(var_file_mp3ogg.Adr_TreeView));
BeginList = gtk_tree_selection_get_selected_rows (var_file_mp3ogg.Adr_Line_Selected, &model);
list = g_list_first (BeginList);
while (list) {
if (NULL != (path = list->data)) {
gtk_tree_model_get_iter (model, &iter, path);
gtk_tree_model_get (var_file_mp3ogg.Adr_Tree_Model, &iter, COLUMN_FILEMP3OGG_POINTER_STRUCT, &detail, -1);
if (NULL != detail) {
if (detail->type_infosong_file_is == FILE_IS_MP3 || detail->type_infosong_file_is == FILE_IS_OGG) {
detail->Mp3_Debit = -1; // SET DEBIT
detail->Mp3_Mode = -1; // SET MODE
detail->Ogg_Debit = -1; // SET DEBIT
detail->Ogg_Managed = -1; // SET MANAGED
detail->Ogg_Downmix = -1; // SET DOWNMIX
detail->BoolChanged = FALSE;
}
gtk_list_store_set (var_file_mp3ogg.Adr_List_Store, &iter, COLUMN_FILEMP3OGG_NEWBITRATE, "", -1);
}
}
list = g_list_next (list);
}
FileMp3Ogg_set_flag_buttons ();
}
//
//
void FileMp3Ogg_changed_selection_row (GtkTreeSelection *selection, gpointer data)
{
var_file_mp3ogg.Adr_Line_Selected = selection;
FileMp3Ogg_set_flag_buttons ();
}
//
//
gboolean FileMp3Ogg_key_press_event (GtkWidget *widget, GdkEventKey *event, gpointer user_data)
{
if( TRUE == keys.BoolGDK_Control_A ) { // CONTROL_A
gtk_tree_selection_unselect_all (var_file_mp3ogg.Adr_Line_Selected);
gtk_tree_selection_select_all (var_file_mp3ogg.Adr_Line_Selected);
}
if (keys.keyval == GDK_Delete) {
GtkTreeIter iter;
if (gtk_tree_model_get_iter_first (var_file_mp3ogg.Adr_Tree_Model, &iter)) {
on_file_button_del_file_clicked (NULL, NULL);
return (FALSE);
}
}
return (TRUE);
}
// AFFICHAGE DU NOM COMPLET DU FICHIER SI SURVOL PAR LE CURSEUR SOURIS DU CHAMPS 'Nom'
//
gboolean FileMp3Ogg_event (GtkWidget *treeview, GdkEvent *event, gpointer user_data)
{
gint x, y;
GdkModifierType state;
GtkTreePath *path;
GtkTreeViewColumn *column;
GtkTreeViewColumn *ColumnDum;
GtkTreeIter iter;
GtkTreeModel *model = (GtkTreeModel *)user_data;
DETAIL *detail = NULL;
gint Pos_X = 0, Pos_Y = 0;
gint i;
gboolean BoolSelectColNom = FALSE;
gboolean BoolSelectNewBitrate = FALSE;
// SI PAS DANS LE TREEVIEW
gdk_window_get_pointer (((GdkEventButton*)event)->window, &x, &y, &state);
if (FALSE == gtk_tree_view_get_path_at_pos (GTK_TREE_VIEW(treeview),
x, y,
&path, &column, &Pos_X, &Pos_Y)) {
StatusBar_set_mess( NOTEBOOK_FICHIERS, _STATUSBAR_SIMPLE_, "" );
return (FALSE);
}
// RECUPERATION DE LA STRUCTURE POINTEE PAR LE CURSEUR SOURIS
gtk_tree_model_get_iter (model, &iter, path);
gtk_tree_model_get (var_file_mp3ogg.Adr_Tree_Model, &iter, COLUMN_FILEMP3OGG_POINTER_STRUCT, &detail, -1);
if (NULL == detail) return (FALSE);
// DANS TOUS LES CAS, EFFACE LA BARRE DE TACHE
StatusBar_set_mess( NOTEBOOK_FICHIERS, _STATUSBAR_SIMPLE_, "" );
/* IDEE POUR REMPLACER LES COMPARAISON PAR NOMS. EXEMPLES:
* PLAY = 0
* TRASH = 1
* TYPE = 2
* etc ...
* NOTA:
* CET ALGO PERMET DE RENOMMER AISEMENT LES ENTETES DE COLONNES DANS TOUTES LES LANGUES: FR, EN, DE, ...
*/
for (i = 0; i < NUM_TREE_FILEMP3OGG_ALL_COLUMN; i ++) {
ColumnDum = gtk_tree_view_get_column (GTK_TREE_VIEW(treeview), i);
if (ColumnDum == column) {
switch ( i ) {
case NUM_TREE_FILEMP3OGG_Nom : BoolSelectColNom = TRUE; break;
case NUM_TREE_FILEMP3OGG_NOUVEAUBITRATE : BoolSelectNewBitrate = TRUE; break;
default:
StatusBar_set_mess( NOTEBOOK_FICHIERS, _STATUSBAR_SIMPLE_, "");
StatusBar_puts();
return (FALSE);
}
/* La colonne est trouvee ... sortie de la boucle */
break;
}
}
if( BoolSelectColNom ) {
StatusBar_set_mess( NOTEBOOK_FICHIERS, _STATUSBAR_SIMPLE_, detail->namefile );
}
else if( BoolSelectNewBitrate ) {
StatusBar_set_mess( NOTEBOOK_FICHIERS, _STATUSBAR_SIMPLE_, _("Click droit: acces popup") );
}
StatusBar_puts( );
return (FALSE);
}
//
//
static void FileMp3Ogg_drag_data_received (GtkWidget *widget,
GdkDragContext *drag_context,
gint x,
gint y,
GtkSelectionData *data,
guint info,
guint time)
{
/* Une copie ne peut aller vers elle meme !!! */
if (gtk_drag_get_source_widget(drag_context) != widget) {
dragndrop_list_drag_data (widget, (gchar *)data->data);
}
}
//
//
static void FileMp3Ogg_drag_data_drop (GtkWidget *widget,
GdkDragContext *dc,
GtkSelectionData *selection_data,
guint info,
guint t,
gpointer data)
{
GtkTreeIter iter;
GtkTreeModel *model = NULL;
GList *begin_list = NULL;
GList *list = NULL;
GtkTreePath *path;
DETAIL *detail = NULL;
gchar *text = NULL;
model = gtk_tree_view_get_model (GTK_TREE_VIEW(widget));
begin_list = gtk_tree_selection_get_selected_rows (var_file_mp3ogg.Adr_Line_Selected, &model);
list = g_list_first (begin_list);
while (list) {
if ((path = list->data)) {
gtk_tree_model_get_iter (model, &iter, path);
gtk_tree_model_get (var_file_mp3ogg.Adr_Tree_Model, &iter, COLUMN_FILEMP3OGG_POINTER_STRUCT, &detail, -1);
// DEBUG DRAG AND DROP
// [ Tue, 03 May 2011 17:39:08 +0200 ]
// XCFA-4.1.0
// -----------------------------------------------------------
// OLD CODE:
// text = g_strdup( detail->namefile );
// NEW_CODE:
text = g_strdup_printf( "file://%s", detail->namefile );
gdk_drag_status (dc, GDK_ACTION_COPY, t);
gtk_selection_data_set( selection_data,
// GDK_SELECTION_TYPE_STRING,
selection_data->target,
8,
(guchar *)text,
strlen( text )
);
g_free (text);
text = NULL;
}
list = g_list_next (list);
}
}
//
//
gboolean FileMp3Ogg_event_click_mouse( GtkWidget *treeview, GdkEventButton *event, gpointer data )
{
GtkTreePath *path;
GtkTreeViewColumn *column;
GtkTreeIter iter;
GtkTreeModel *model = (GtkTreeModel *)data;
DETAIL *detail = NULL;
gint Pos_X = 0, Pos_Y = 0;
gboolean bool_click_droit = (event->button == 3);
/* Single clicks only */
if (event->type != GDK_BUTTON_PRESS) return (FALSE);
/* Si pas de selection a cet endroit retour */
if (FALSE == gtk_tree_view_get_path_at_pos (GTK_TREE_VIEW(treeview),
(gint)event->x, (gint)event->y,
&path, &column, &Pos_X, &Pos_Y)) return (FALSE);
// RECUP DE LA STRUCTURE
gtk_tree_model_get_iter (model, &iter, path);
gtk_tree_model_get (var_file_mp3ogg.Adr_Tree_Model, &iter, COLUMN_FILEMP3OGG_POINTER_STRUCT, &detail, -1);
if (NULL == detail) return (FALSE);
/*-----------------*/
/*if( (bool_click_droit) && (FILE_IS_MP3 == detail->type_infosong_file_is || FILE_IS_OGG == detail->type_infosong_file_is) )
{
GtkTreeSelection *selection;
selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(treeview));
if (gtk_tree_selection_count_selected_rows(selection) <= 1)
{
GtkTreePath *path;
if (gtk_tree_view_get_path_at_pos(GTK_TREE_VIEW(treeview),
(gint) event->x,
(gint) event->y,
&path, NULL, NULL, NULL))
{
gtk_tree_selection_unselect_all(selection);
gtk_tree_selection_select_path(selection, path);
gtk_tree_path_free(path);
}
}
}
*/
/*-----------------*/
if( bool_click_droit && FILE_IS_MP3 == detail->type_infosong_file_is )
{
// DEBIT MODE
popup_file_mp3_type( detail, detail->Mp3_Debit, detail->Mp3_Mode );
// AUTORISE LE POPUP SUR UNE SELECTION MULTIPLE
var_file_mp3ogg.Adr_Line_Selected = gtk_tree_view_get_selection(GTK_TREE_VIEW(treeview));
gtk_tree_selection_select_path(var_file_mp3ogg.Adr_Line_Selected, path);
// gtk_tree_path_free(path);
return TRUE;
}
else if( bool_click_droit && FILE_IS_OGG == detail->type_infosong_file_is )
{
// DEBIT MANAGED DOWNMIX
popup_file_ogg_type( detail, detail->Ogg_Debit, detail->Ogg_Managed, detail->Ogg_Downmix );
var_file_mp3ogg.Adr_Line_Selected = gtk_tree_view_get_selection(GTK_TREE_VIEW(treeview));
// AUTORISE LE POPUP SUR UNE SELECTION MULTIPLE
gtk_tree_selection_select_path(var_file_mp3ogg.Adr_Line_Selected, path);
// gtk_tree_path_free(path);
return TRUE;
}
return (FALSE);
}
//
//
static void FileMp3Ogg_add_columns_scrolledwindow (GtkTreeView *treeview)
{
GtkCellRenderer *renderer;
GtkTreeViewColumn *column;
GtkTreeModel *model = gtk_tree_view_get_model (treeview);
// SIGNAL : 'event'
g_signal_connect(G_OBJECT(treeview),
"event",
(GCallback) FileMp3Ogg_event,
model);
// SIGNAL : 'Gestion click click'
g_signal_connect(G_OBJECT(treeview),
"button-press-event",
(GCallback) FileMp3Ogg_event_click_mouse,
model);
// SIGNAL : Ligne actuellement selectionnee 'changed'
var_file_mp3ogg.Adr_Line_Selected = gtk_tree_view_get_selection(GTK_TREE_VIEW(treeview));
g_signal_connect(G_OBJECT(var_file_mp3ogg.Adr_Line_Selected),
"changed",
G_CALLBACK(FileMp3Ogg_changed_selection_row),
model);
// SIGNAL 'key-press-event'
g_signal_connect(G_OBJECT(treeview),
"key-press-event",
(GCallback) FileMp3Ogg_key_press_event,
model);
// Drag and drop support
// SIGNAL : 'drag-data-received'
gtk_drag_dest_set (GTK_WIDGET (treeview),
GTK_DEST_DEFAULT_MOTION |
GTK_DEST_DEFAULT_DROP,
drag_types, n_drag_types,
GDK_ACTION_COPY| GDK_ACTION_MOVE );
g_signal_connect(G_OBJECT(treeview),
"drag-data-received",
G_CALLBACK(FileMp3Ogg_drag_data_received),
NULL);
gtk_drag_source_set(
GTK_WIDGET(treeview),
GDK_BUTTON1_MASK | GDK_BUTTON2_MASK | GTK_DEST_DEFAULT_MOTION | GTK_DEST_DEFAULT_DROP,
drag_types, n_drag_types,
GDK_ACTION_MOVE | GDK_ACTION_COPY | GDK_ACTION_DEFAULT
);
g_signal_connect(G_OBJECT(treeview),
"drag-data-get",
G_CALLBACK(FileMp3Ogg_drag_data_drop),
treeview);
// COLUMN_FILEMP3OGG_PLAY
// var_file_mp3ogg.Adr_ColumnFileMp3OggPlay =
// COLUMN_FILEMP3OGG_TYPE
renderer = gtk_cell_renderer_text_new ();
g_object_set (renderer, "xalign", 0.5, NULL);
var_file_mp3ogg.Adr_ColumnFileMp3OggType =
column = gtk_tree_view_column_new_with_attributes (_("Type"),
renderer,
"text", COLUMN_FILEMP3OGG_TYPE,
NULL);
gtk_tree_view_column_set_sizing (GTK_TREE_VIEW_COLUMN (column),
GTK_TREE_VIEW_COLUMN_FIXED);
gtk_tree_view_column_set_fixed_width (GTK_TREE_VIEW_COLUMN (column), 90);
gtk_tree_view_column_set_alignment (GTK_TREE_VIEW_COLUMN (column), 0.5);
/* TRIS */
gtk_tree_view_column_set_sort_column_id (column, COLUMN_FILEMP3OGG_TYPE);
gtk_tree_view_append_column (treeview, column);
// COLUMN_FILEMP3OGG_BITRATE
renderer = gtk_cell_renderer_text_new ();
g_object_set (renderer, "xalign", 0.5, NULL);
var_file_mp3ogg.Adr_ColumnFileMp3OggBitrate =
column = gtk_tree_view_column_new_with_attributes (_("Bitrate"),
renderer,
"text", COLUMN_FILEMP3OGG_BITRATE,
NULL);
gtk_tree_view_column_set_sizing (GTK_TREE_VIEW_COLUMN (column),
GTK_TREE_VIEW_COLUMN_FIXED);
gtk_tree_view_column_set_fixed_width (GTK_TREE_VIEW_COLUMN (column), 90);
gtk_tree_view_column_set_alignment (GTK_TREE_VIEW_COLUMN (column), 0.5);
// TRIS
gtk_tree_view_column_set_sort_column_id (column, COLUMN_FILEMP3OGG_BITRATE);
gtk_tree_view_append_column (treeview, column);
// COLUMN_FILEMP3OGG_NEWBITRATE
renderer = gtk_cell_renderer_text_new ();
g_object_set (renderer, "xalign", 0.5, NULL);
var_file_mp3ogg.Adr_ColumnFileMp3OggNewBitrate =
column = gtk_tree_view_column_new_with_attributes (_("Nouveau bitrate"),
renderer,
"markup", COLUMN_FILEMP3OGG_NEWBITRATE,
NULL);
gtk_tree_view_column_set_sizing (GTK_TREE_VIEW_COLUMN (column),
GTK_TREE_VIEW_COLUMN_FIXED);
gtk_tree_view_column_set_fixed_width (GTK_TREE_VIEW_COLUMN (column), 350);
gtk_tree_view_column_set_alignment (GTK_TREE_VIEW_COLUMN (column), 0.5);
gtk_tree_view_append_column (treeview, column);
// COLUMN_FILEMP3OGG_SIZE
renderer = gtk_cell_renderer_text_new ();
g_object_set (renderer, "xalign", 0.5, NULL);
var_file_mp3ogg.Adr_ColumnFileMp3OggSize =
column = gtk_tree_view_column_new_with_attributes (_("Taille"),
renderer,
"text", COLUMN_FILEMP3OGG_SIZE,
NULL);
gtk_tree_view_column_set_sizing (GTK_TREE_VIEW_COLUMN (column),
GTK_TREE_VIEW_COLUMN_FIXED);
gtk_tree_view_column_set_fixed_width (GTK_TREE_VIEW_COLUMN (column), 90);
gtk_tree_view_column_set_alignment (GTK_TREE_VIEW_COLUMN (column), 0.5);
gtk_tree_view_append_column (treeview, column);
// COLUMN_FILEMP3OGG_TIME
renderer = gtk_cell_renderer_text_new ();
g_object_set (renderer, "xalign", 0.5, NULL);
var_file_mp3ogg.Adr_ColumnFileMp3OggTime =
column = gtk_tree_view_column_new_with_attributes (_("Temps"),
renderer,
"text", COLUMN_FILEMP3OGG_TIME,
NULL);
gtk_tree_view_column_set_sizing (GTK_TREE_VIEW_COLUMN (column),
GTK_TREE_VIEW_COLUMN_FIXED);
gtk_tree_view_column_set_fixed_width (GTK_TREE_VIEW_COLUMN (column), 90);
gtk_tree_view_column_set_alignment (GTK_TREE_VIEW_COLUMN (column), 0.5);
gtk_tree_view_append_column (treeview, column);
// COLUMN_FILEMP3OGG_NAME
var_file_mp3ogg.Renderer =
renderer = gtk_cell_renderer_text_new ();
g_object_set (renderer, "xalign", 0.5, NULL);
var_file_mp3ogg.Adr_ColumnFileMp3OggName =
column = gtk_tree_view_column_new_with_attributes (_("Nom"),
renderer,
"markup", COLUMN_FILEMP3OGG_NAME,
"background-gdk", COLUMN_FILEMP3OGG_COLOR,
NULL);
gtk_tree_view_column_set_sizing (GTK_TREE_VIEW_COLUMN (column),
GTK_TREE_VIEW_COLUMN_FIXED);
gtk_tree_view_column_set_fixed_width (GTK_TREE_VIEW_COLUMN (column), 90);
gtk_tree_view_column_set_alignment (GTK_TREE_VIEW_COLUMN (column), 0.5);
gtk_tree_view_append_column (treeview, column);
}
//
//
void on_scrolledwindow_file_mp3ogg_realize (GtkWidget *widget, gpointer user_data)
{
GtkListStore *store;
GtkTreeModel *model;
GtkWidget *treeview;
var_file_mp3ogg.Adr_scroll = widget;
var_file_mp3ogg.Pixbuf_NotInstall = libutils_init_pixbufs ("xcfa/not_install.png");
var_file_mp3ogg.Adr_List_Store = store =
gtk_list_store_new ( COLUMN_FILE_NUM, /* TOTAL NUMBER */
G_TYPE_STRING, /* COLUMN_FILEMP3OGG_TYPE */
G_TYPE_STRING, /* COLUMN_FILEMP3OGG_BITRATE */
G_TYPE_STRING, /* COLUMN_FILEMP3OGG_NEWBITRATE */
G_TYPE_STRING, /* COLUMN_FILEMP3OGG_SIZE */
G_TYPE_STRING, /* COLUMN_FILEMP3OGG_TIME */
G_TYPE_STRING, /* COLUMN_FILEMP3OGG_NAME */
GDK_TYPE_COLOR, /* COLUMN_FILEMP3OGG_COLOR */
G_TYPE_POINTER /* COLUMN_FILEMP3OGG_POINTER_STRUCT */
);
var_file_mp3ogg.Adr_Tree_Model = model = GTK_TREE_MODEL (store);
var_file_mp3ogg.Adr_TreeView =
treeview = gtk_tree_view_new_with_model (model);
gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (treeview), TRUE);
gtk_tree_selection_set_mode (gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview)), GTK_SELECTION_MULTIPLE); // GTK_SELECTION_BROWSE MULTIPLE
g_object_unref (model);
gtk_container_add (GTK_CONTAINER (widget), treeview);
FileMp3Ogg_add_columns_scrolledwindow (GTK_TREE_VIEW (treeview));
gtk_widget_show_all (widget);
}
xcfa-4.3.6/src/split.c 0000644 0001750 0001750 00000117676 12164023131 011467 0000000 0000000 /*
* file : split.c
* project : xcfa
* with : Gtk-2
*
* copyright : (C) 2003 - 2013 by Claude Bulin
*
* xcfa - GTK+ implementation of the GNU shell command
* GNU General Public License
*
* This file is part of XCFA.
*
* XCFA is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* at your option) any later version.
*
* XCFA is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with XCFA. If not, see .
*/
#ifdef HAVE_CONFIG_H
#include "../config.h"
#endif
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#ifdef ENABLE_STATIC_LIBRARY
#include "../lib/lib.h"
#endif
#include "global.h"
#include "configuser.h"
#include "fileselect.h"
#include "win_info.h"
#include "cursor.h"
#include "dragNdrop.h"
#include "get_info.h"
#include "tags.h"
#include "win_scan.h"
#include "popup.h"
#include "mplayer.h"
#include "alsa_play.h"
#include "prg_init.h"
#include "split.h"
#include "statusbar.h"
extern gint n_drag_types; /* Drag And Drop */
VAR_SPLIT VarSplit;
ADJUST Adjust;
void SetAjust (void);
//
// PERCENT = ( VALUE_X / LONGUEUR_TOTALE ) * 100.0
// VALUE_X = ( LONGUEUR_TOTALE * PERCENT ) / 100.0
//
void split_set_time (void)
{
gint sec;
// gdouble dsec;
gdouble TimeSongSec;
gdouble Percent;
gint H, M, S;
// gint C, hundr;
gchar *Str = NULL;
if (NULL == VarSplit.Tags || VarSplit.NbrSelecteurs <= 0) {
gtk_label_set_use_markup (GTK_LABEL(GLADE_GET_OBJECT("label_begin_time_split")), TRUE);
gtk_label_set_markup (GTK_LABEL(GLADE_GET_OBJECT("label_begin_time_split")),
" 00:00:00 ");
gtk_label_set_use_markup (GTK_LABEL(GLADE_GET_OBJECT("label_end_time_split")), TRUE);
gtk_label_set_markup (GTK_LABEL(GLADE_GET_OBJECT("label_end_time_split")),
" 00:00:00 ");
gtk_label_set_use_markup (GTK_LABEL(GLADE_GET_OBJECT("label_time_split")), TRUE);
gtk_label_set_markup (GTK_LABEL(GLADE_GET_OBJECT("label_time_split")),
" 00:00:00 ");
gtk_label_set_use_markup (GTK_LABEL(GLADE_GET_OBJECT("label_nmr_plage_split")), TRUE);
gtk_label_set_markup (GTK_LABEL(GLADE_GET_OBJECT("label_nmr_plage_split")), " Plage -- / -- ");
//
gtk_label_set_use_markup (GTK_LABEL(GLADE_GET_OBJECT("label_curseur_lecture_split")), TRUE);
gtk_label_set_markup (GTK_LABEL(GLADE_GET_OBJECT("label_curseur_lecture_split")), " 00:00:00 ");
return;
}
// ACQUISITION DUREE TOTALE DU FICHIER EN SECONDES
TimeSongSec = VarSplit.Tags->SecTime;
// POSITION INDEX DEBUT
Percent = SplitSelector_get_percent_begin (VarSplit.SelecteurActif);
sec = (gint) (((gdouble)TimeSongSec * (gdouble)Percent) / 100.0);
// dsec = ((gdouble)TimeSongSec *(gdouble)Percent) / 100.0;
// hundr = ((gdouble)dsec - (gdouble)sec) * 100.0;
H = (sec / 60) / 60;
M = (sec / 60) % 60;
S = sec % 60;
// C = hundr;
Str = g_strdup_printf (" %02d:%02d:%02d ", H, M, S);
gtk_label_set_use_markup (GTK_LABEL(GLADE_GET_OBJECT("label_begin_time_split")), TRUE);
gtk_label_set_markup (GTK_LABEL(GLADE_GET_OBJECT("label_begin_time_split")), Str);
g_free (Str); Str = NULL;
// POSITION INDEX FIN
Percent = SplitSelector_get_percent_end (VarSplit.SelecteurActif);
sec = (gint) (((gdouble)TimeSongSec * (gdouble)Percent) / 100.0);
// dsec = ((gdouble)TimeSongSec *(gdouble)Percent) / 100.0;
// hundr = ((gdouble)dsec - (gdouble)sec) * 100.0;
H = (sec / 60) / 60;
M = (sec / 60) % 60;
S = sec % 60;
// C = hundr;
Str = g_strdup_printf (" %02d:%02d:%02d ", H, M, S);
gtk_label_set_use_markup (GTK_LABEL(GLADE_GET_OBJECT("label_end_time_split")), TRUE);
gtk_label_set_markup (GTK_LABEL(GLADE_GET_OBJECT("label_end_time_split")), Str);
g_free (Str); Str = NULL;
// NUMERO DE PLAGE EN COURS
gtk_label_set_use_markup (GTK_LABEL(GLADE_GET_OBJECT("label_nmr_plage_split")), TRUE);
Str = g_strdup_printf (" Plage %02d / %02d ", VarSplit.SelecteurActif +1, VarSplit.NbrSelecteurs);
gtk_label_set_markup (GTK_LABEL(GLADE_GET_OBJECT("label_nmr_plage_split")), Str);
g_free (Str); Str = NULL;
// DUREE DE LA PLAGE
Percent = SplitSelector_get_percent_end (VarSplit.SelecteurActif) - SplitSelector_get_percent_begin (VarSplit.SelecteurActif);
sec = (gint) (((gdouble)TimeSongSec * (gdouble)Percent) / 100.0);
// dsec = ((gdouble)TimeSongSec *(gdouble)Percent) / 100.0;
// hundr = ((gdouble)dsec - (gdouble)sec) * 100.0;
H = (sec / 60) / 60;
M = (sec / 60) % 60;
S = sec % 60;
// C = hundr;
Str = g_strdup_printf (" %02d:%02d:%02d ", H, M, S);
gtk_label_set_use_markup (GTK_LABEL(GLADE_GET_OBJECT("label_time_split")), TRUE);
gtk_label_set_markup (GTK_LABEL(GLADE_GET_OBJECT("label_time_split")), Str);
g_free (Str); Str = NULL;
// TEMPS DU PLAY
Percent = VarSplit.PercentActivePlay;
sec = (gint) (((gdouble)TimeSongSec * (gdouble)Percent) / 100.0);
// dsec = ((gdouble)TimeSongSec *(gdouble)Percent) / 100.0;
// hundr = ((gdouble)dsec - (gdouble)sec) * 100.0;
H = (sec / 60) / 60;
M = (sec / 60) % 60;
S = sec % 60;
// C = hundr;
Str = g_strdup_printf (" %02d:%02d:%02d ", H, M, S);
gtk_label_set_use_markup (GTK_LABEL(GLADE_GET_OBJECT("label_curseur_lecture_split")), TRUE);
gtk_label_set_markup (GTK_LABEL(GLADE_GET_OBJECT("label_curseur_lecture_split")), Str);
g_free (Str); Str = NULL;
}
//
//
void split_set_flag_buttons (void)
{
gboolean Bool [ 3 ];
Bool [ 0 ] = VarSplit.BoolReadFileSpectre;
Bool [ 1 ] = VarSplit.NbrSelecteurs > 1 && !VarSplit.BoolPlay ? TRUE : FALSE;
Bool [ 2 ] = VarSplit.NbrSelecteurs > 0 && !VarSplit.BoolPlay? TRUE : FALSE;
gtk_widget_set_sensitive (GTK_WIDGET (GLADE_GET_OBJECT("button_del_cut_split")), Bool [ 1 ]);
gtk_widget_set_sensitive (GTK_WIDGET (GLADE_GET_OBJECT("button_play_begin_split")), Bool [ 2 ]);
gtk_widget_set_sensitive (GTK_WIDGET (GLADE_GET_OBJECT("button_play_split")), Bool [ 2 ]);
gtk_widget_set_sensitive (GTK_WIDGET (GLADE_GET_OBJECT("button_play_end_split")), Bool [ 2 ]);
gtk_widget_set_sensitive (GTK_WIDGET (GLADE_GET_OBJECT("button_gen_cue_split")), Bool [ 2 ]);
gtk_widget_set_sensitive (GTK_WIDGET (GLADE_GET_OBJECT("button_action_split")), Bool [ 2 ]);
gtk_widget_grab_focus (VarSplit.AdrWidgetSpectre);
split_set_time ();
split_set_name_file ();
StatusBar_puts();
}
//
//
void SplitSpectre_scroll_droite_play (void)
{
gdouble Value;
gint Begin;
gint LenScroll;
if (VarSplit.NbrSelecteurs == 0) return;
SplitSelector_get_pos ();
Value = (gint)VarSplit.AdjScroll->value;
LenScroll = VARSPLIT_SPECTRE_WITH -1;
Begin = SplitSelector_get_pos_play () - (gint)Value;
while( Begin > 100 && Value + LenScroll < SplitSpectre_get_with() ) {
Begin --;
Value ++;
}
if (Value < 0.0) {
Value = 0.0;
}
Adjust.value = Value;
SetAjust ();
}
// DEMANDE DE REDRAW
//
void split_redraw_image (void)
{
if (NULL == VarSplit.AdrWidgetSpectre) return;
// PRINT_FUNC_LF();
gtk_widget_queue_draw_area (
VarSplit.AdrWidgetSpectre,
VarSplit.AdrWidgetSpectre->allocation.x,
VarSplit.AdrWidgetSpectre->allocation.y,
VarSplit.AdrWidgetSpectre->allocation.width,
VarSplit.AdrWidgetSpectre->allocation.height
);
}
//
//
static void split_drag_data_received_file (GtkWidget *widget,
GdkDragContext *drag_context,
gint x,
gint y,
GtkSelectionData *data,
guint info,
guint time)
{
if (gtk_drag_get_source_widget(drag_context) != widget) {
dragndrop_list_drag_data (widget, (gchar *)data->data);
}
}
//
//
void split_set_name_file (void)
{
gchar *Ptr = NULL;
gchar *NewName = NULL;
if (NULL != VarSplit.PathNameFileReal && NULL != (Ptr = strrchr (VarSplit.PathNameFileReal, '/'))) {
gchar *Str = NULL;
Ptr ++;
NewName = utf8_eperluette_name( Ptr );
if (NULL != VarSplit.Tags) {
Str = g_strdup_printf ("%s %s\n%s Hertz\n%s voies\n%s bits ",
NewName, VarSplit.Tags->time, VarSplit.Tags->hertz, VarSplit.Tags->voie, VarSplit.Tags->bits);
}
else {
Str = g_strdup_printf ("%s", NewName);
}
g_free( NewName ); NewName = NULL;
gtk_label_set_use_markup (GTK_LABEL(GLADE_GET_OBJECT("label_temps_actuel_curseur_split")), TRUE);
gtk_label_set_markup (GTK_LABEL(GLADE_GET_OBJECT("label_temps_actuel_curseur_split")), Str);
g_free (Str); Str = NULL;
if (VarSplit.NbrSelecteurs > 1) {
StatusBar_set_mess( NOTEBOOK_SPLIT, _STATUSBAR_SIMPLE_, _("Menu: Click droit / Ajout plage: Click bouton centre / Zoom: Ctrl+Scroll") );
}
else {
StatusBar_set_mess( NOTEBOOK_SPLIT, _STATUSBAR_SIMPLE_, _("Ajout plage: Click bouton centre / Zoom: Ctrl+Scroll") );
}
}
else {
StatusBar_set_mess( NOTEBOOK_SPLIT, _STATUSBAR_SIMPLE_, _("Pret pour l'import d'un fichier CUE, WAV, FLAC, OGG, MP3, APE, WMA") );
}
}
//
//
static void VarSplit_thread (void *arg)
{
VarSplit.BoolInThread = TRUE;
SplitSpectre_read_file_spectre (VarSplit.PathNameFile);
VarSplit.BoolInThread = FALSE;
PRINT("FIN THREAD SPLIT");
pthread_exit(0);
}
//
//
static gint VarSplit_timeout (gpointer data)
{
if (FALSE == VarSplit.BoolInThread) {
gint IndicePoints = 0;
gtk_timeout_remove (VarSplit.HandlerTimeoutDo);
VarSplit.Tags = tagswav_remove_info (VarSplit.Tags);
VarSplit.Tags = (INFO_WAV *)tagswav_get_info (VarSplit.PathNameFile);
//
split_set_name_file ();
if( TRUE == OptionsCommandLine.BoolVerboseMode ) {
g_print("\ttime : Temps d'ecoute = %s\n", VarSplit.Tags->time);
g_print("\tSecTime : Temps d'ecoute en secondes = %d\n", VarSplit.Tags->SecTime);
g_print("\thertz : Taux d'échantillonnage = %s\n", VarSplit.Tags->hertz);
g_print("\tvoie : 1, 2, 4, 6 = %s\n", VarSplit.Tags->voie);
g_print("\tbits : 8, 16, 24, 32 ou 64 = %s\n", VarSplit.Tags->bits);
g_print("\n");
}
for (IndicePoints = 0; IndicePoints < MAX_SELECTEURS_SPLIT; IndicePoints ++) {
if (-1 != VarSplit.Selecteur [ IndicePoints ] . Nmr) {
VarSplit.NbrSelecteurs ++;
}
}
SplitSelector_get_pos ();
gtk_widget_queue_draw( VarSplit.AdrWidgetSpectre );
gtk_widget_queue_draw( VarSplit.AdrWidgetSpectreTop );
split_set_flag_buttons ();
split_set_time ();
VarSplit.PercentActivePlay = 0.0;
gtk_widget_queue_draw (VarSplit.AdrWidgetSpectre);
WindScan_close ();
PRINT("FIN TIMEOUT SPLIT");
}
return (TRUE);
}
//
// IMPORT D'UN FICHIER
//
void split_file_load (gchar *p_PathNameFile)
{
gchar *PathNameFile = NULL;
TYPE_FILE_IS TypeFileIs = GetInfo_file_is (p_PathNameFile);
if (0 == strcmp (p_PathNameFile, SPLIT_FILE_TMP_WAV)) {
wininfo_create (
WindMain,
_("Ce fichier appartient a XCFA"),
_("Selectionnez un autre fichier."),
"");
return;
}
if (libutils_get_size_file (p_PathNameFile) <= 0) {
wininfo_create (
WindMain,
_("Fichier vide"),
_("Le fichier ne contient aucune donnee !!!"),
"");
return;
}
// INIT STRUCTURES: Selecteur
SplitSelector_init ();
if (TRUE == FileIs_g_str_has_suffix (p_PathNameFile, ".CUE")) {
PRINT("FILE IS CUE ;-)");
if (NULL == (PathNameFile = SplitCue_read_cue_file (p_PathNameFile))) {
g_print ("\tBAD FORMAT OF CUE FILE :/\n");
return;
}
if (0 == strcmp (PathNameFile, SPLIT_FILE_TMP_WAV)) {
wininfo_create (
WindMain,
_("Ce fichier appartient a XCFA"),
_("Selectionnez un autre fichier."),
"");
g_free (PathNameFile);
PathNameFile = NULL;
return;
}
VarSplit.BoolBlankWithCue = TRUE;
}
else {
PathNameFile = g_strdup (p_PathNameFile);
}
if (FILE_IS_WAV == TypeFileIs ||
FILE_IS_FLAC == TypeFileIs ||
FILE_IS_MP3 == TypeFileIs ||
FILE_IS_OGG == TypeFileIs ||
FILE_IS_APE == TypeFileIs ||
FILE_IS_WMA== TypeFileIs
) {
if (FALSE == PrgInit.bool_sox || FALSE == PrgInit.bool_mplayer) {
wininfo_create (
WindMain,
_("Sox et Mplayer absents"),
_("Sox et Mplayer sont absents de votre"),
"\n",
_("configuration."),
"\n\n",
_("Veuillez les installer pour pouvoir continuer."),
"");
return;
}
}
if (NULL != VarSplit.PathNameFileReal) {
g_free (VarSplit.PathNameFileReal);
VarSplit.PathNameFileReal = NULL;
}
VarSplit.PathNameFileReal = g_strdup (p_PathNameFile);
SplitConv_to (PathNameFile);
}
void split_file_load_continue (gchar *p_PathNameFile)
{
pthread_t nmr_tid;
gchar *PathNameFile = p_PathNameFile;
TYPE_FILE_IS TypeFileIs = libutils_test_file_exist (p_PathNameFile);
if (TRUE == libutils_test_file_exist (PathNameFile) &&
(FILE_IS_WAV == TypeFileIs || FILE_IS_FLAC == TypeFileIs || FILE_IS_MP3 == TypeFileIs || FILE_IS_OGG == TypeFileIs || FILE_IS_APE == TypeFileIs)) {
AlsaPlay_stop ();
// REAJUSTEMENT DU ZOOM A 100%
Adjust.mul = 1;
SetAjust() ;
gtk_widget_queue_draw( VarSplit.AdrWidgetSpectre );
gtk_widget_queue_draw( VarSplit.AdrWidgetSpectreTop );
gtk_widget_queue_draw( VarSplit.AdrWidgetSpectreChrono );
WindScan_set_pulse ();
WindScan_set_label ("Analyse du fichier ...");
if (NULL != VarSplit.PathNameFile) {
g_free (VarSplit.PathNameFile);
VarSplit.PathNameFile = NULL;
}
VarSplit.PathNameFile = g_strdup (PathNameFile);
VarSplit.BoolInThread = TRUE;
PRINT("DEBUT TIMEOUT SPLIT");
PRINT("DEBUT THREAD SPLIT");
VarSplit.HandlerTimeoutDo = gtk_timeout_add (100, VarSplit_timeout, 0);
pthread_create (&nmr_tid, NULL ,(void *)VarSplit_thread, (void *)NULL);
}
else {
wininfo_create (
WindMain,
_("Erreur de choix de fichier"),
_("Veuillez selectionner un fichier de type WAV FLAC MP3 OGG APE"),
"");
}
split_set_flag_buttons ();
}
// IMPORT D'UN FICHIER
//
void split_maj_file_load (gchar *path)
{
gchar *Ptr = NULL;
TYPE_FILE_IS TypeFileIs = FILE_IS_NONE;
gboolean BoolTypeFileIsOk = FALSE;
g_free (Config.PathLoadSplit);
Config.PathLoadSplit = NULL;
Config.PathLoadSplit = g_strdup (path);
if (NULL != (Ptr = strrchr (Config.PathLoadSplit, '/'))) {
*Ptr = '\0';
}
TypeFileIs = GetInfo_file_is (path);
if (FILE_IS_WAV == TypeFileIs ||
FILE_IS_FLAC == TypeFileIs ||
FILE_IS_MP3 == TypeFileIs ||
FILE_IS_OGG == TypeFileIs ||
FILE_IS_APE == TypeFileIs ||
FILE_IS_WMA == TypeFileIs ||
TRUE == FileIs_g_str_has_suffix (path, ".CUE")) {
split_file_load (path);
BoolTypeFileIsOk = TRUE;
}
if (FALSE == BoolTypeFileIsOk) {
wininfo_create (
WindMain,
_("Mauvais type de fichier"),
_("Les types de fichiers acceptes\nsont: WAV FLAC MP3 OGG APE WMA CUE"),
"");
}
}
//
//
void on_button_importer_split_clicked (GtkButton *button, gpointer user_data)
{
if (GDK_space != keys.keyval)
fileselect_create (_PATH_LOAD_SPLIT_FILE_, Config.PathLoadSplit, split_maj_file_load);
}
// INIT WIDGET DE LA DESTINAION DES DECOUPES
//
void on_button_destination_split_realize (GtkWidget *widget, gpointer user_data)
{
VarSplit.Adr_button_destination = GTK_BUTTON (widget);
gtk_button_set_use_underline (GTK_BUTTON (VarSplit.Adr_button_destination), FALSE);
gtk_button_set_label (GTK_BUTTON (VarSplit.Adr_button_destination), Config.PathDestinationSplit);
}
// CHOIX D'UNE DESTINATION POUR LES DECOUPES
//
void split_maj_destination (gchar *path)
{
if (libutils_test_write (path) == TRUE) {
g_free (Config.PathDestinationSplit);
Config.PathDestinationSplit = NULL;
Config.PathDestinationSplit = g_strdup (path);
gtk_button_set_label (GTK_BUTTON (VarSplit.Adr_button_destination), Config.PathDestinationSplit);
}
}
//
//
void on_button_destination_split_clicked (GtkButton *button, gpointer user_data)
{
if (GDK_space != keys.keyval) {
fileselect_create (_PATH_CHOICE_DESTINATION_, Config.PathDestinationSplit, split_maj_destination);
split_set_flag_buttons ();
}
}
// LOAD DEPUIS UN DRAG AND DROP
//
void split_load_from_dnd (GSList *p_list)
{
GSList *gs_List = p_list;
gchar *Ptr = NULL;
TYPE_FILE_IS TypeFileIs = FILE_IS_NONE;
gboolean BoolTypeFileIsOk = FALSE;
// PRINT_FUNC_LF();
while (NULL != gs_List) {
if (NULL != (Ptr = (gchar *)gs_List->data)) {
if( TRUE == OptionsCommandLine.BoolVerboseMode )
g_print("\t%s\n", Ptr);
TypeFileIs = GetInfo_file_is (Ptr);
if (FILE_IS_WAV == TypeFileIs ||
FILE_IS_FLAC == TypeFileIs ||
FILE_IS_MP3 == TypeFileIs ||
FILE_IS_OGG == TypeFileIs ||
FILE_IS_APE == TypeFileIs ||
FILE_IS_WMA == TypeFileIs ||
TRUE == FileIs_g_str_has_suffix (Ptr, ".CUE")) {
split_file_load (Ptr);
BoolTypeFileIsOk = TRUE;
break;
}
}
gs_List = g_slist_next (gs_List);
}
if (FALSE == BoolTypeFileIsOk) {
wininfo_create (
WindMain,
_("Mauvais type de fichier"),
_("Les types de fichiers acceptes\nsont: WAV FLAC MP3 OGG APE WMA CUE"),
"");
}
split_set_flag_buttons ();
split_set_time ();
}
//
//
void split_set_value (gdouble p_value)
{
VarSplit.PercentActivePlay = p_value;
if (VarSplit.PercentActivePlay >= 100.0) VarSplit.PercentActivePlay = 99.99;
if( SplitSelector_get_pos_play () > VARSPLIT_SPECTRE_WITH + (gint)VarSplit.AdjScroll->value &&
(gint)VarSplit.AdjScroll->value < SplitSpectre_get_with() ) {
SplitSpectre_scroll_droite_play ();
}
split_set_time ();
gtk_widget_queue_draw( VarSplit.AdrWidgetSpectreTop );
SplitSpectre_draw_lines_play();
// gtk_widget_queue_draw( VarSplit.AdrWidgetSpectre );
}
//
//
void split_end_play (void)
{
PRINT_FUNC_LF();
split_set_stop ();
gtk_widget_show (GTK_WIDGET (GLADE_GET_OBJECT("button_play_split")));
gtk_widget_hide (GTK_WIDGET (GLADE_GET_OBJECT("button_pause_split")));
gtk_widget_set_sensitive (GTK_WIDGET (GLADE_GET_OBJECT("button_play_begin_split")), TRUE);
gtk_widget_set_sensitive (GTK_WIDGET (GLADE_GET_OBJECT("button_play_split")), TRUE);
gtk_widget_set_sensitive (GTK_WIDGET (GLADE_GET_OBJECT("button_play_end_split")), TRUE);
gtk_widget_set_sensitive (GTK_WIDGET (GLADE_GET_OBJECT("button_del_cut_split")), TRUE);
gtk_widget_set_sensitive (GTK_WIDGET (GLADE_GET_OBJECT("button_gen_cue_split")), TRUE);
gtk_widget_set_sensitive (GTK_WIDGET (GLADE_GET_OBJECT("button_action_split")), TRUE);
gtk_widget_set_sensitive (GTK_WIDGET (GLADE_GET_OBJECT("button_importer_split")), TRUE);
}
//
//
void split_set_stop (void)
{
VarSplit.BoolPlay = FALSE;
}
//
//
gboolean split_is_stop (void)
{
return (VarSplit.BoolPlay ? FALSE : TRUE);
}
// DEBUT DE LECTURE
//
void on_button_play_split_clicked (GtkButton *button, gpointer user_data)
{
// PRINT_FUNC_LF();
VarSplit.BoolPlay = TRUE;
gtk_widget_show (GTK_WIDGET (GLADE_GET_OBJECT("button_pause_split")));
gtk_widget_hide (GTK_WIDGET (GLADE_GET_OBJECT("button_play_split")));
gtk_widget_set_sensitive (GTK_WIDGET (GLADE_GET_OBJECT("button_play_begin_split")), FALSE);
gtk_widget_set_sensitive (GTK_WIDGET (GLADE_GET_OBJECT("button_play_end_split")), FALSE);
gtk_widget_set_sensitive (GTK_WIDGET (GLADE_GET_OBJECT("button_del_cut_split")), FALSE);
gtk_widget_set_sensitive (GTK_WIDGET (GLADE_GET_OBJECT("button_importer_split")), FALSE);
gtk_widget_set_sensitive (GTK_WIDGET (GLADE_GET_OBJECT("button_gen_cue_split")), FALSE);
gtk_widget_set_sensitive (GTK_WIDGET (GLADE_GET_OBJECT("button_action_split")), FALSE);
AlsaPlay_song (
VarSplit.PathNameFile,
VarSplit.PercentActivePlay,
100.0,
split_set_value,
split_end_play
);
}
// FIN DE LECTURE
//
void on_button_pause_split_clicked (GtkButton *button, gpointer user_data)
{
// PRINT_FUNC_LF();
VarSplit.BoolPlay = FALSE;
AlsaPlay_stop ();
gtk_widget_show (GTK_WIDGET (GLADE_GET_OBJECT("button_play_split")));
gtk_widget_hide (GTK_WIDGET (GLADE_GET_OBJECT("button_pause_split")));
}
// FROM BARRE ESPACE
//
void split_play (void)
{
if (VarSplit.NbrSelecteurs > 0) {
if (FALSE == VarSplit.BoolPlay) {
on_button_play_split_clicked (NULL, NULL);
}
else {
on_button_pause_split_clicked (NULL, NULL);
}
}
}
// LECTURE 5 SECONDES DEBUT
//
void on_button_play_begin_split_clicked (GtkButton *button, gpointer user_data)
{
// gdouble Percent;
// PRINT_FUNC_LF();
gdouble PercentBegin = SplitSelector_get_percent_begin (VarSplit.SelecteurActif);
gdouble PercentEnd = SplitSelector_get_percent_begin (VarSplit.SelecteurActif) + SplitSelector_get_percent_for_x_secondes (5);
VarSplit.BoolPlay = TRUE;
// Percent = SplitSelector_get_percent_begin (VarSplit.SelecteurActif);
SplitSelector_get_percent_begin (VarSplit.SelecteurActif);
AlsaPlay_song (
VarSplit.PathNameFile,
PercentBegin,
PercentEnd,
split_set_value,
split_end_play
);
// gtk_widget_set_sensitive (GTK_WIDGET (GLADE_GET_OBJECT("frame_choice_reader")), FALSE);
gtk_widget_set_sensitive (GTK_WIDGET (GLADE_GET_OBJECT("button_play_begin_split")), FALSE);
gtk_widget_set_sensitive (GTK_WIDGET (GLADE_GET_OBJECT("button_play_split")), FALSE);
gtk_widget_set_sensitive (GTK_WIDGET (GLADE_GET_OBJECT("button_play_end_split")), FALSE);
gtk_widget_set_sensitive (GTK_WIDGET (GLADE_GET_OBJECT("button_del_cut_split")), FALSE);
gtk_widget_set_sensitive (GTK_WIDGET (GLADE_GET_OBJECT("button_gen_cue_split")), FALSE);
gtk_widget_set_sensitive (GTK_WIDGET (GLADE_GET_OBJECT("button_action_split")), FALSE);
gtk_widget_set_sensitive (GTK_WIDGET (GLADE_GET_OBJECT("button_importer_split")), FALSE);
}
// LECTURE 5 SECONDES FIN
//
void on_button_play_end_split_clicked (GtkButton *button, gpointer user_data)
{
// gdouble Percent;
// PRINT_FUNC_LF();
gdouble PercentBegin = SplitSelector_get_percent_end (VarSplit.SelecteurActif) - SplitSelector_get_percent_for_x_secondes (5);
gdouble PercentEnd = SplitSelector_get_percent_end (VarSplit.SelecteurActif);
VarSplit.BoolPlay = TRUE;
// Percent = SplitSelector_get_percent_begin (VarSplit.SelecteurActif);
SplitSelector_get_percent_begin (VarSplit.SelecteurActif);
AlsaPlay_song (
VarSplit.PathNameFile,
PercentBegin,
PercentEnd,
split_set_value,
split_end_play
);
gtk_widget_set_sensitive (GTK_WIDGET (GLADE_GET_OBJECT("button_play_begin_split")), FALSE);
gtk_widget_set_sensitive (GTK_WIDGET (GLADE_GET_OBJECT("button_play_split")), FALSE);
gtk_widget_set_sensitive (GTK_WIDGET (GLADE_GET_OBJECT("button_play_end_split")), FALSE);
gtk_widget_set_sensitive (GTK_WIDGET (GLADE_GET_OBJECT("button_del_cut_split")), FALSE);
gtk_widget_set_sensitive (GTK_WIDGET (GLADE_GET_OBJECT("button_gen_cue_split")), FALSE);
gtk_widget_set_sensitive (GTK_WIDGET (GLADE_GET_OBJECT("button_action_split")), FALSE);
gtk_widget_set_sensitive (GTK_WIDGET (GLADE_GET_OBJECT("button_importer_split")), FALSE);
}
//
//
void split_from_popup (gint p_choice)
{
// PRINT_FUNC_LF();
switch (p_choice) {
// Selecteur suivant
case 0 :
if (VarSplit.NbrSelecteurs -1 == VarSplit.SelecteurActif)
VarSplit.SelecteurActif = 0;
else VarSplit.SelecteurActif ++;
gtk_widget_queue_draw (VarSplit.AdrWidgetSpectre);
gtk_widget_queue_draw( VarSplit.AdrWidgetSpectreTop );
break;
// Selecteur precedant
case 1 :
if (VarSplit.SelecteurActif == 0)
VarSplit.SelecteurActif = VarSplit.NbrSelecteurs -1;
else VarSplit.SelecteurActif --;
gtk_widget_queue_draw (VarSplit.AdrWidgetSpectre);
gtk_widget_queue_draw( VarSplit.AdrWidgetSpectreTop );
break;
// Supprimer le selecteur actif
case 2 :
SplitSelector_cut ();
gtk_widget_queue_draw (VarSplit.AdrWidgetSpectre);
gtk_widget_queue_draw( VarSplit.AdrWidgetSpectreTop );
break;
}
}
//
//
void SetAjust (void)
{
// PRINT_FUNC_LF();
VarSplit.AdjScroll->value = Adjust.value;
VarSplit.AdjScroll->lower = Adjust.lower;
VarSplit.AdjScroll->upper = Adjust.upper;
VarSplit.AdjScroll->step_increment = Adjust.step_increment;
VarSplit.AdjScroll->page_increment = Adjust.page_increment;
VarSplit.AdjScroll->page_size = Adjust.page_size;
gtk_adjustment_value_changed( VarSplit.AdjScroll );
}
//
//
void page_plus_scrolled ( gint p_CursorX )
{
// PRINT_FUNC_LF();
Adjust.mul += 1;
Adjust.with = SplitSpectre_get_with();
Adjust.lower = 0.;
Adjust.upper = Adjust.with;
Adjust.step_increment = 10;
Adjust.page_size = VarSplit.AdrWidgetSpectre->allocation.width;
Adjust.page_increment = VarSplit.AdrWidgetSpectre->allocation.width;
Adjust.value = VarSplit.AdjScroll->value + p_CursorX;
SetAjust ();
}
//
//
void rigtht_plus_scrolled (void)
{
// PRINT_FUNC_LF();
// Adjust.mul += 1;
Adjust.with = SplitSpectre_get_with();
Adjust.lower = 0.;
Adjust.upper = Adjust.with;
Adjust.step_increment = 10;
Adjust.page_size = VarSplit.AdrWidgetSpectre->allocation.width;
Adjust.page_increment = VarSplit.AdrWidgetSpectre->allocation.width;
Adjust.value = VarSplit.AdjScroll->value;
Adjust.value += 10;
while( Adjust.value > Adjust.with - VarSplit.AdrWidgetSpectre->allocation.width )
Adjust.value --;
SetAjust ();
}
//
//
void page_moins_scrolled ( gint p_CursorX )
{
// PRINT_FUNC_LF();
Adjust.mul -= 1;
if( Adjust.mul < 1 ) Adjust.mul = 1;
Adjust.with = SplitSpectre_get_with();
if( Adjust.with < VarSplit.AdrWidgetSpectre->allocation.width ) {
Adjust.with = VarSplit.AdrWidgetSpectre->allocation.width;
Adjust.value = 0;
} else {
Adjust.value = VarSplit.AdjScroll->value - p_CursorX;
}
while( Adjust.value > Adjust.with - VarSplit.AdrWidgetSpectre->allocation.width )
Adjust.value --;
if( Adjust.value < 0. ) Adjust.value = 0.;
Adjust.lower = 0.;
Adjust.upper = Adjust.with;
Adjust.step_increment = 10;
Adjust.page_size = VarSplit.AdrWidgetSpectre->allocation.width;
Adjust.page_increment = VarSplit.AdrWidgetSpectre->allocation.width;
SetAjust ();
}
//
//
void left_plus_scrolled (void)
{
// PRINT_FUNC_LF();
// Adjust.mul += 1;
Adjust.with = SplitSpectre_get_with();
Adjust.lower = 0.;
Adjust.upper = Adjust.with;
Adjust.step_increment = 10;
Adjust.page_size = VarSplit.AdrWidgetSpectre->allocation.width;
Adjust.page_increment = VarSplit.AdrWidgetSpectre->allocation.width;
Adjust.value = VarSplit.AdjScroll->value;
Adjust.value -= 10;
while( Adjust.value < 0.0 )
Adjust.value = 0.0;
SetAjust ();
}
// CHRONO
//
void on_image_splitspectre_chrono_realize (GtkWidget *widget, gpointer user_data)
{
VarSplit.AdrWidgetSpectreChrono = widget;
}
//
//
gboolean on_eventbox_splitspectre_chrono_expose_event (GtkWidget *drawing, GdkEventExpose *e, gpointer data)
{
SplitSpectre_draw_chrono( VarSplit.AdrWidgetSpectreChrono );
return TRUE;
}
//
//
gboolean on_eventbox_splitspectre_chrono_event (GtkWidget *widget, GdkEvent *event, gpointer user_data)
{
gint CursorX, CursorY;
GdkModifierType state;
// GET EMPLACEMENT CURSOR MOUSE
gdk_window_get_pointer (((GdkEventButton*)event)->window, &CursorX, &CursorY, &state);
// SI LE CURSEUR N EST PAS DANS LA ZONE ALORS SORTIE
if (CursorX < VARSPLIT_CHRONO_X) return FALSE;
if (CursorX > VARSPLIT_CHRONO_X + VARSPLIT_CHRONO_W) return FALSE;
if (CursorY < VARSPLIT_CHRONO_Y) return FALSE;
if (CursorY > VARSPLIT_CHRONO_Y + VARSPLIT_CHRONO_H) return FALSE;
gtk_widget_queue_draw (VarSplit.AdrWidgetSpectreChrono);
return FALSE;
}
// TOP
//
void on_image_splitspectre_top_realize (GtkWidget *widget, gpointer user_data)
{
VarSplit.AdrWidgetSpectreTop = widget;
}
//
//
gboolean on_eventbox_splitspectre_top_event (GtkWidget *widget, GdkEvent *event, gpointer user_data)
{
// static gint Nbr = 0;
gboolean BoolEventTypeScroll = (GDK_SCROLL == event->type) ? TRUE : FALSE;
gint EventTypeScrollDirection = ((GdkEventScroll*)event)->direction;
gint CursorX, CursorY;
GdkModifierType state;
// gboolean bool_click_droit = (((GdkEventButton*)event)->button == 3);
// gboolean bool_click_centre = (((GdkEventButton*)event)->button == 2);
gboolean bool_click_gauche = (((GdkEventButton*)event)->button == 1);
// PRINT("");
// GET EMPLACEMENT CURSOR MOUSE
gdk_window_get_pointer (((GdkEventButton*)event)->window, &CursorX, &CursorY, &state);
// UN CLICK BOUTON SOURIS : PRESSED
if (TRUE == bool_click_gauche && event->type == GDK_BUTTON_PRESS) {
gint Pos;
CursorX += (gint)VarSplit.AdjScroll->value;
for (Pos = 0; Pos < VarSplit.NbrSelecteurs ; Pos ++) {
if (CursorX > SplitSelector_get_pos_begin (Pos) && CursorX < SplitSelector_get_pos_end (Pos)) {
VarSplit.SelecteurActif = Pos;
split_set_time ();
gtk_widget_queue_draw( VarSplit.AdrWidgetSpectre );
gtk_widget_queue_draw( VarSplit.AdrWidgetSpectreTop );
break;
}
}
}
else if( TRUE == BoolEventTypeScroll ) {
if( GDK_SCROLL_UP == EventTypeScrollDirection || GDK_SCROLL_DOWN == EventTypeScrollDirection ) {
if( GDK_SCROLL_UP == EventTypeScrollDirection ) {
if (VarSplit.SelecteurActif < VarSplit.NbrSelecteurs -1) {
VarSplit.SelecteurActif ++;
}
} else if( GDK_SCROLL_DOWN == EventTypeScrollDirection ) {
if (VarSplit.SelecteurActif > 0) {
VarSplit.SelecteurActif --;
}
}
gint BeginPos = SplitSelector_get_pos_begin (VarSplit.SelecteurActif);
gint EndPos = SplitSelector_get_pos_end (VarSplit.SelecteurActif);
gint LenPos = EndPos - BeginPos;
gint LenWin = VARSPLIT_SPECTRE_WITH;
gint demi;
// LA SELECTION EST PLUS PETITE QUE LA FENETRE
if( LenPos < LenWin ) {
demi = ( LenWin - LenPos ) / 2;
Adjust.value = BeginPos - demi;
}
// LA SELECTION EST PLUS GRANDE QUE LA FENETRE
else if( LenPos > LenWin ) {
Adjust.value = BeginPos - 50;
}
while( Adjust.value + LenWin > SplitSpectre_get_with() )
Adjust.value --;
if( Adjust.value < 0.0 ) Adjust.value = 0.0;
SetAjust();
gtk_widget_queue_draw( VarSplit.AdrWidgetSpectre );
gtk_widget_queue_draw( VarSplit.AdrWidgetSpectreTop );
}
}
else {
gtk_widget_queue_draw( VarSplit.AdrWidgetSpectreChrono );
}
return FALSE;
}
//
//
gboolean on_eventbox_splitspectre_top_expose_event (GtkWidget *drawing, GdkEventExpose *e, gpointer data)
{
SplitSpectre_draw_top( VarSplit.AdrWidgetSpectreTop );
return TRUE;
}
// IMAGE
//
void on_image_split_spectre_realize (GtkWidget *widget, gpointer user_data)
{
GtkScrolledWindow *AdrScrolledWindow;
// INIT COORDONNEES WIDGET
VarSplit.AdrWidgetSpectre = widget;
//
gtk_widget_grab_focus (VarSplit.AdrWidgetSpectre);
/* Drag and drop support
* SIGNAL : 'drag-data-received'
*/
gtk_drag_dest_set (GTK_WIDGET (widget),
GTK_DEST_DEFAULT_MOTION |
GTK_DEST_DEFAULT_DROP,
drag_types, n_drag_types,
GDK_ACTION_COPY| GDK_ACTION_MOVE );
gtk_drag_source_set(
GTK_WIDGET(widget),
GDK_BUTTON1_MASK | GDK_BUTTON2_MASK | GTK_DEST_DEFAULT_MOTION | GTK_DEST_DEFAULT_DROP,
drag_types, n_drag_types,
GDK_ACTION_MOVE | GDK_ACTION_COPY | GDK_ACTION_DEFAULT
);
g_signal_connect(G_OBJECT(widget),
"drag-data-received",
G_CALLBACK(split_drag_data_received_file),
NULL);
VarSplit.BoolEventButtonPressSpectre = FALSE;
VarSplit.BoolReadFileSpectre = FALSE;
VarSplit.PathNameFile = NULL;
VarSplit.NbrSelecteurs = 0;
VarSplit.TypeCursorSpectre = _CURSOR_IS_NONE_;
VarSplit.BoolPlay = FALSE;
VarSplit.PercentActivePlay = 0.0;
VarSplit.BoolQueueDrawSpectre = FALSE;
VarSplit.BoolQueueDrawChrono = FALSE;
VarSplit.BoolQueueDrawTop = FALSE;
VarSplit.BoolBlankWithCue = FALSE;
// INIT SCROLL
AdrScrolledWindow = GTK_SCROLLED_WINDOW (GLADE_GET_OBJECT("scrolledwindow_splitspectre"));
VarSplit.AdjScroll = gtk_scrolled_window_get_hadjustment (GTK_SCROLLED_WINDOW (AdrScrolledWindow));
Adjust.mul = 1;
Adjust.with = VarSplit.AdrWidgetSpectre->allocation.width;
Adjust.lower = VarSplit.AdjScroll->lower = 0.0;
Adjust.upper = VarSplit.AdrWidgetSpectre->allocation.width;
Adjust.step_increment = VarSplit.AdjScroll->step_increment = 10.0;
Adjust.page_size = VarSplit.AdrWidgetSpectre->allocation.width;
Adjust.page_increment = VarSplit.AdrWidgetSpectre->allocation.width;
Adjust.value = VarSplit.AdjScroll->value = 0.0;
SetAjust ();
gtk_widget_show (GTK_WIDGET (GLADE_GET_OBJECT("button_play_split")));
gtk_widget_hide (GTK_WIDGET (GLADE_GET_OBJECT("button_pause_split")));
split_set_flag_buttons ();
split_set_time ();
}
//
//
gboolean on_eventbox_splitspectre_event (GtkWidget *widget, GdkEvent *event, gpointer user_data)
{
gboolean BoolEventTypeScroll = (GDK_SCROLL == event->type) ? TRUE : FALSE;
gint EventTypeScrollDirection = ((GdkEventScroll*)event)->direction;
gint CursorX, _CursorX, CursorY;
GdkModifierType state;
gboolean bool_click_droit = (((GdkEventButton*)event)->button == 3);
gboolean bool_click_centre = (((GdkEventButton*)event)->button == 2);
gboolean bool_click_gauche = (((GdkEventButton*)event)->button == 1);
// PRINT_FUNC_LF();
// IMPOSER UN REAFFICHAGE COMPLET
// g_print( "event->type = %d\n", event->type );
if( 29 == event->type ) {
gtk_widget_queue_draw( VarSplit.AdrWidgetSpectre );
// return FALSE;
}
if (VarSplit.NbrSelecteurs > 1 && GDK_BUTTON_PRESS == event->type && TRUE == bool_click_droit && VarSplit.NbrSelecteurs > 0) {
popup_file_Split ();
return FALSE;
}
Adjust.with = SplitSpectre_get_with();
Adjust.lower = VarSplit.AdjScroll->lower;
Adjust.upper = Adjust.with;
Adjust.step_increment = VarSplit.AdjScroll->step_increment;
Adjust.page_size = VarSplit.AdrWidgetSpectre->allocation.width;
Adjust.page_increment = VarSplit.AdrWidgetSpectre->allocation.width;
Adjust.value = VarSplit.AdjScroll->value;
while( Adjust.value + Adjust.page_size > Adjust.upper )
Adjust.value --;
SetAjust ();
// GET EMPLACEMENT CURSOR MOUSE
gdk_window_get_pointer (((GdkEventButton*)event)->window, &CursorX, &CursorY, &state);
_CursorX = CursorX + (gint)VarSplit.AdjScroll->value;
// CHERCHE SI SELECTION
if (FALSE == VarSplit.BoolEventButtonPressSpectre) {
if (VarSplit.NbrSelecteurs > 0) {
gint SelBegin = SplitSelector_get_pos_begin (VarSplit.SelecteurActif);
gint SelEnd = SplitSelector_get_pos_end (VarSplit.SelecteurActif);
if( TRUE == SplitSelector_cursor_in_box_play( _CursorX, CursorY )) {
cursor_set_hand ();
VarSplit.TypeCursorSpectre = _CURSOR_IS_HAND_;
}
else if( SelBegin -1 == _CursorX ||
SelBegin == _CursorX ||
SelBegin +1 == _CursorX ) {
cursor_set_gauche ();
VarSplit.TypeCursorSpectre = _CURSOR_IS_LEFT_;
}
else if( SelEnd -1 == _CursorX ||
SelEnd == _CursorX ||
SelEnd +1 == _CursorX ) {
cursor_set_droit ();
VarSplit.TypeCursorSpectre = _CURSOR_IS_RIGHT_;
}
else {
cursor_set_old ();
VarSplit.TypeCursorSpectre = _CURSOR_IS_NONE_;
}
}
else {
cursor_set_old ();
VarSplit.TypeCursorSpectre = _CURSOR_IS_NONE_;
}
}
// SCROLL
if( TRUE == BoolEventTypeScroll && VarSplit.NbrSelecteurs > 0 ) {
if( TRUE == keys.BoolGDK_Control_L_R ) {
if (GDK_SCROLL_UP == EventTypeScrollDirection) {
page_plus_scrolled( CursorX );
gtk_widget_queue_draw( VarSplit.AdrWidgetSpectre );
gtk_widget_queue_draw( VarSplit.AdrWidgetSpectreTop );
}
else if (GDK_SCROLL_DOWN == EventTypeScrollDirection) {
page_moins_scrolled( CursorX );
gtk_widget_queue_draw( VarSplit.AdrWidgetSpectre );
gtk_widget_queue_draw( VarSplit.AdrWidgetSpectreTop );
}
}
else {
if (GDK_SCROLL_UP == EventTypeScrollDirection) {
rigtht_plus_scrolled ();
}
else if (GDK_SCROLL_DOWN == EventTypeScrollDirection) {
left_plus_scrolled ();
}
}
}
//
else if (TRUE == bool_click_centre && GDK_BUTTON_PRESS == event->type && VarSplit.NbrSelecteurs > 0) {
// CLICK CENTRE : GENERE UN NOUVEL INDEX
//
// @Dzef:
// Pour ajouter manuellement un marqueur de début, j'ajoute, par défaut, au même endroit celui de sortie de la plage précédente.
// En mode lecture un double clic sur le bandeau des index place un sélecteur à la position de la tête de lecture ?
// En mode pause un double clic sur le bandeau des index place un sélecteur à l'endroit où on a cliqué ?
//
// 4 CAS D INSERTION SONT POSSISBLES. VOIR LA FONCTION : void SplitSelector_add (gint p_CursorX);
// SplitSelector_add (CursorX + (gint)Adj->value);
if (TRUE == VarSplit.BoolPlay) {
SplitSelector_add( SplitSelector_get_pos_play ());
}
else {
SplitSelector_add( _CursorX );
}
gtk_widget_queue_draw( VarSplit.AdrWidgetSpectre );
gtk_widget_queue_draw( VarSplit.AdrWidgetSpectreTop );
}
// UN CLICK BOUTON SOURIS : PRESSED
else if (TRUE == bool_click_gauche && event->type == GDK_BUTTON_PRESS) {
if (VarSplit.TypeCursorSpectre == _CURSOR_IS_LEFT_ ||
VarSplit.TypeCursorSpectre == _CURSOR_IS_RIGHT_ ||
VarSplit.TypeCursorSpectre == _CURSOR_IS_HAND_) {
if (VarSplit.TypeCursorSpectre == _CURSOR_IS_HAND_) {
AlsaPlay_Pause ();
}
}
// REPOSITIONNEMENT DU CURSEUR DE LECTURE PAR CLICK SUR LE SPECTRE
else {
SplitSelector_set_pos_play( _CursorX );
AlsaPlay_fseek( VarSplit.PercentActivePlay );
}
VarSplit.BoolEventButtonPressSpectre = TRUE;
// 1 000 000 = 1 seconde
// g_usleep( 150000 );
}
// GESTION CLICK BOUTON SOURIS : RELEASE
else if (event->type == GDK_BUTTON_RELEASE) {
if (TRUE == VarSplit.BoolEventButtonPressSpectre) {
VarSplit.BoolEventButtonPressSpectre = FALSE;
if (VarSplit.TypeCursorSpectre == _CURSOR_IS_HAND_) {
AlsaPlay_fseek (VarSplit.PercentActivePlay);
}
else if (VarSplit.TypeCursorSpectre == _CURSOR_IS_LEFT_) {
SplitSelector_set_pos_begin( _CursorX );
}
else if (VarSplit.TypeCursorSpectre == _CURSOR_IS_RIGHT_) {
SplitSelector_set_pos_end( _CursorX );
}
gtk_widget_queue_draw( VarSplit.AdrWidgetSpectre );
gtk_widget_queue_draw( VarSplit.AdrWidgetSpectreTop );
cursor_set_old ();
VarSplit.TypeCursorSpectre = _CURSOR_IS_NONE_;
}
split_set_name_file ();
// g_usleep( 500000 );
}
// MOVE CURSEUR
if (TRUE == VarSplit.BoolEventButtonPressSpectre && TRUE == bool_click_gauche) {
gint end = VARSPLIT_SPECTRE_WITH + (gint)VarSplit.AdjScroll->value;
// SCROLL RIGHT
if( (gint)VarSplit.AdjScroll->value >= 0 && _CursorX >= end ) {
rigtht_plus_scrolled ();
rigtht_plus_scrolled ();
gtk_widget_queue_draw( VarSplit.AdrWidgetSpectre );
gtk_widget_queue_draw( VarSplit.AdrWidgetSpectreTop );
}
// SCROLL LEFT
else if( (gint)VarSplit.AdjScroll->value > 0 && _CursorX < (gint)VarSplit.AdjScroll->value ) {
left_plus_scrolled ();
left_plus_scrolled ();
gtk_widget_queue_draw( VarSplit.AdrWidgetSpectre );
gtk_widget_queue_draw( VarSplit.AdrWidgetSpectreTop );
}
if( VarSplit.TypeCursorSpectre == _CURSOR_IS_HAND_ ) {
SplitSelector_set_pos_play( _CursorX );
gtk_widget_queue_draw( VarSplit.AdrWidgetSpectre );
gtk_widget_queue_draw( VarSplit.AdrWidgetSpectreTop );
}
if( VarSplit.TypeCursorSpectre == _CURSOR_IS_LEFT_ ) {
SplitSelector_set_pos_begin( _CursorX );
gtk_widget_queue_draw( VarSplit.AdrWidgetSpectre );
gtk_widget_queue_draw( VarSplit.AdrWidgetSpectreTop );
}
else if( VarSplit.TypeCursorSpectre == _CURSOR_IS_RIGHT_ ) {
SplitSelector_set_pos_end( _CursorX );
gtk_widget_queue_draw( VarSplit.AdrWidgetSpectre );
gtk_widget_queue_draw( VarSplit.AdrWidgetSpectreTop );
}
split_set_time ();
}
split_set_flag_buttons ();
if( 4 == event->type || 7 == event->type || 29 == event->type ) {
// gtk_widget_queue_draw( VarSplit.AdrWidgetSpectre );
}
gtk_widget_queue_draw( VarSplit.AdrWidgetSpectreChrono );
return FALSE;
}
//
//
gboolean on_eventbox_splitspectre_expose_event (GtkWidget *drawing, GdkEventExpose *e, gpointer data)
{
SplitSpectre_draw_lines();
return TRUE;
}
// SCROLLEDWINDOW
//
gboolean on_scrolledwindow_splitspectre_event (GtkWidget *widget, GdkEvent *event, gpointer user_data)
{
// PRINT_FUNC_LF();
Adjust.value = VarSplit.AdjScroll->value;
if (GDK_EXPOSE == event->type) {
gtk_widget_queue_draw( VarSplit.AdrWidgetSpectre );
gtk_widget_queue_draw( VarSplit.AdrWidgetSpectreTop );
gtk_widget_queue_draw( VarSplit.AdrWidgetSpectreChrono );
}
return FALSE;
}
xcfa-4.3.6/src/tags_wma.c 0000644 0001750 0001750 00000004613 12122563465 012135 0000000 0000000 /*
* file : tags_wma.c
* project : xcfa
* with : Gtk-2
*
* copyright : (C) 2003 - 2013 by Claude Bulin
*
* xcfa - GTK+ implementation of the GNU shell command
* GNU General Public License
*
* This file is part of XCFA.
*
* XCFA is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* at your option) any later version.
*
* XCFA is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with XCFA. If not, see .
*/
#ifdef HAVE_CONFIG_H
#include "../config.h"
#endif
#include
#include
#include
#include
#include
#include
#include
#include
#include
#ifdef ENABLE_STATIC_LIBRARY
#include "../lib/lib.h"
#endif
#include "global.h"
#include "tags.h"
#include
/*
*---------------------------------------------------------------------------
* VARIABLES
*---------------------------------------------------------------------------
*/
/*
*---------------------------------------------------------------------------
* FILE IS WMA ?
*---------------------------------------------------------------------------
*/
/*
*---------------------------------------------------------------------------
* REMOVE HEADER
*---------------------------------------------------------------------------
*/
INFO_WMA *tagswma_remove_info (INFO_WMA *info)
{
if (info) {
info->tags = (TAGS *)tags_remove (info->tags);
g_free (info);
info = NULL;
}
return ((INFO_WMA *)NULL);
}
/*
*---------------------------------------------------------------------------
* GET HEADER
*---------------------------------------------------------------------------
*/
INFO_WMA *tagswma_get_info (DETAIL *detail)
{
INFO_WMA *ptrinfo = NULL;
ptrinfo = (INFO_WMA *)g_malloc0 (sizeof (INFO_WMA));
if (ptrinfo == NULL) return (NULL);
ptrinfo->tags = (TAGS *)tags_alloc (FALSE);
tags_set (detail->namefile, ptrinfo->tags);
return ((INFO_WMA *)ptrinfo);
}
xcfa-4.3.6/src/split_spectre.c 0000644 0001750 0001750 00000107015 12122563465 013213 0000000 0000000 /*
* file : split_spectre.c
* project : xcfa
* with : Gtk-2
*
* copyright : (C) 2003 - 2013 by Claude Bulin
*
* xcfa - GTK+ implementation of the GNU shell command
* GNU General Public License
*
* This file is part of XCFA.
*
* XCFA is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* at your option) any later version.
*
* XCFA is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with XCFA. If not, see .
*/
#ifdef HAVE_CONFIG_H
#include "../config.h"
#endif
#include
#include
#ifdef ENABLE_STATIC_LIBRARY
#include "../lib/lib.h"
#endif
#include "global.h"
#include "get_info.h"
#include "tags.h"
#include "split.h"
#define SAMPLE_SHADES 3
extern VAR_SPLIT VarSplit;
extern ADJUST Adjust;
gint MarkerOld = -1;
//
//
gint SplitSpectre_get_with (void)
{
return( VarSplit.AdrWidgetSpectre->allocation.width * Adjust.mul );
/*
if( 1 == Adjust.mul )
return( VarSplit.AdrWidgetSpectre->allocation.width * Adjust.mul );
return( VarSplit.MaxPointsInTab * Adjust.mul );
*/
}
// AFFICHAGE IMAGE CHRONO
//
void SplitSpectre_draw_chrono ( GtkWidget *widget )
{
GdkColor gdk_color;
GdkColormap *colormap;
GdkGC *gc;
GdkPoint poly [ 10 ];
PangoContext *p_context = NULL;
PangoLayout *layout = NULL;
PangoFontDescription *fontdesc;
gint layoutX = 0;
gint layoutY = 0;
gint CursorX, CursorY;
GdkModifierType state;
gint ChronoX;
gint sec;
// gdouble dsec;
gdouble TimeSongSec;
gdouble Percent;
gint H, M, S;
gchar *Str = NULL;
// gint hundr;
// gint C;
/*
cairo_t *cr;
if (NULL == widget) return;
cr = gdk_cairo_create( widget->window );
cairo_scale( cr, 1.0, 1.0 );
cairo_translate( cr, 0.0, 0.0 );
// COLOR: 0 .. 255 -> PRG: colorname
gdouble red, blue, green;
// CLEAR PREVIEW SURFACE
// CRAYON_GRIS
red = 99
blue = 99
green = 99
cairo_set_source_rgb( cr, red/255.0, green/255.0, blue/255.0 );
cairo_rectangle( cr,
0,
0,
widget ->allocation.width,
widget->allocation.height
);
cairo_fill( cr );
// ECRITURE BARRE CHRONOLOGIQUE
// CRAYON_BLANC
red = 255
blue = 255
green = 255
cairo_set_source_rgb( cr, red/255.0, green/255.0, blue/255.0 );
#define SPLIT_TIME_CHRONO_ 80
for (ChronoX = 2; ChronoX +60 <= VARSPLIT_CHRONO_W +80; ChronoX += SPLIT_TIME_CHRONO_) {
if (ChronoX > 2) {
gdk_draw_line (
widget->window,
gc,
ChronoX -2,
VARSPLIT_CHRONO_Y,
ChronoX -2,
VARSPLIT_CHRONO_Y + VARSPLIT_CHRONO_H
);
}
}
cairo_paint( cr );
*/
if (NULL == widget) return;
colormap = gdk_drawable_get_colormap (widget->window);
gc = gdk_gc_new (widget->window);
// CLEAR
poly [ 0 ] . x = VARSPLIT_CHRONO_X;
poly [ 0 ] . y = VARSPLIT_CHRONO_Y;
poly [ 1 ] . x = VARSPLIT_CHRONO_X + VARSPLIT_CHRONO_W +1;
poly [ 1 ] . y = VARSPLIT_CHRONO_Y;
poly [ 2 ] . x = VARSPLIT_CHRONO_X + VARSPLIT_CHRONO_W +1;
poly [ 2 ] . y = VARSPLIT_CHRONO_Y + VARSPLIT_CHRONO_H +1;
poly [ 3 ] . x = VARSPLIT_CHRONO_Y;
poly [ 3 ] . y = VARSPLIT_CHRONO_Y + VARSPLIT_CHRONO_H +1;
poly [ 4 ] . x = VARSPLIT_CHRONO_X;
poly [ 4 ] . y = VARSPLIT_CHRONO_Y;
CRAYON_GRIS
gdk_draw_polygon (
widget->window,
gc,
TRUE,
poly,
4
);
#define SPLIT_TIME_CHRONO_ 80
// ECRITURE BARRE CHRONOLOGIQUE
CRAYON_BLANC
for (ChronoX = 2; ChronoX +60 <= VARSPLIT_CHRONO_W +80; ChronoX += SPLIT_TIME_CHRONO_) {
if (ChronoX > 2) {
gdk_draw_line (
widget->window,
gc,
ChronoX -2,
VARSPLIT_CHRONO_Y,
ChronoX -2,
VARSPLIT_CHRONO_Y + VARSPLIT_CHRONO_H
);
}
p_context = gtk_widget_get_pango_context (widget);
layout = pango_layout_new (p_context);
fontdesc = pango_font_description_from_string ("Times New Roman 8");
pango_layout_set_font_description (layout, fontdesc);
layoutX = ChronoX;
layoutY = VARSPLIT_CHRONO_Y + 3;
CursorX = (gint)VarSplit.AdjScroll->value;
CursorX += ChronoX;
CursorX -= 2;
if (NULL != VarSplit.Tags) {
TimeSongSec = VarSplit.Tags->SecTime;
}
else {
TimeSongSec = 300;
}
Percent = ((gdouble)CursorX / (gdouble)SplitSpectre_get_with() ) * 100.0;
sec = (gint) (((gdouble)TimeSongSec * (gdouble)Percent) / 100.0);
// dsec = ((gdouble)TimeSongSec *(gdouble)Percent) / 100.0;
// hundr = ((gdouble)dsec - (gdouble)sec) * 100.0;
H = (sec / 60) / 60;
M = (sec / 60) % 60;
S = sec % 60;
// C = hundr;
Str = g_strdup_printf ("%02d:%02d:%02d", H, M, S);
pango_layout_set_markup (layout, Str, -1);
gdk_draw_layout (
widget->window,
gc,
layoutX,
layoutY,
layout
);
g_object_unref (layout);
g_free (Str);
Str = NULL;
}
gdk_window_get_pointer (widget->window, &CursorX, &CursorY, &state);
if (CursorX < VARSPLIT_CHRONO_X)
CursorX = VARSPLIT_CHRONO_X;
else if (CursorX > (VARSPLIT_CHRONO_X + VARSPLIT_CHRONO_W) -1)
CursorX = VARSPLIT_CHRONO_X + VARSPLIT_CHRONO_W;
if (CursorY < VARSPLIT_CHRONO_Y)
CursorY = VARSPLIT_CHRONO_Y;
else if (CursorY > (VARSPLIT_CHRONO_Y + VARSPLIT_CHRONO_H) -1)
CursorY = VARSPLIT_CHRONO_Y + VARSPLIT_CHRONO_H;
// REPAIR VERTICAL PARTIE HAUTE
if (VarSplit.NbrSelecteurs > 0) {
CRAYON_ROUGE
gdk_draw_line (
widget->window,
gc,
CursorX,
VARSPLIT_CHRONO_Y,
CursorX,
VARSPLIT_CHRONO_Y + VARSPLIT_CHRONO_H
);
}
gdk_gc_destroy (gc);
// POSITION DU CURSEUR DANS LA FORME D ONDE
/*
if (NULL != VarSplit.Tags) {
TimeSongSec = VarSplit.Tags->SecTime;
}
else {
TimeSongSec = 300;
}
CursorX += (gint)Adj->value;
Percent = ((gdouble)CursorX / (gdouble)VarSplit.AdrWidgetSpectre->allocation.width) * 100.0;
sec = (gint) (((gdouble)TimeSongSec * (gdouble)Percent) / 100.0);
dsec = ((gdouble)TimeSongSec *(gdouble)Percent) / 100.0;
hundr = ((gdouble)dsec - (gdouble)sec) * 100.0;
H = (sec / 60) / 60;
M = (sec / 60) % 60;
S = sec % 60;
C = hundr;
gtk_label_set_use_markup (GTK_LABEL(GLADE_GET_OBJECT("label_temps_actuel_curseur_split")), TRUE);
if (VarSplit.NbrSelecteurs > 0) {
// Str = g_strdup_printf ("Codage en cours ...\n%02d:%02d:%02d.%02d", H, M, S, C);
Str = g_strdup_printf ("Codage en cours ...\n%02d:%02d:%02d", H, M, S);
}
else {
// Str = g_strdup ("Codage en cours ...\n00:00:00.00");
Str = g_strdup ("Codage en cours ...\n00:00:00");
}
gtk_label_set_markup (GTK_LABEL(GLADE_GET_OBJECT("label_temps_actuel_curseur_split")), Str);
// g_print("%s\n", Str);
g_free (Str);
Str = NULL;
*/
}
// AFFICHAGE IMAGE TOP
//
void SplitSpectre_draw_top ( GtkWidget *widget )
{
GdkColor gdk_color;
GdkColormap *colormap;
GdkGC *gc;
GdkPoint poly [ 10 ];
if (NULL == widget) return;
colormap = gdk_drawable_get_colormap (widget->window);
gc = gdk_gc_new (widget->window);
// CLEAR
poly [ 0 ] . x = VARSPLIT_SPECTRE_TOP_X;
poly [ 0 ] . y = VARSPLIT_SPECTRE_TOP_Y;
poly [ 1 ] . x = VARSPLIT_SPECTRE_TOP_X + VARSPLIT_SPECTRE_TOP_W +1;
poly [ 1 ] . y = VARSPLIT_SPECTRE_TOP_Y;
poly [ 2 ] . x = VARSPLIT_SPECTRE_TOP_X + VARSPLIT_SPECTRE_TOP_W +1;
poly [ 2 ] . y = VARSPLIT_SPECTRE_TOP_Y + VARSPLIT_SPECTRE_TOP_H +1;
poly [ 3 ] . x = VARSPLIT_SPECTRE_TOP_Y;
poly [ 3 ] . y = VARSPLIT_SPECTRE_TOP_Y + VARSPLIT_SPECTRE_TOP_H +1;
poly [ 4 ] . x = VARSPLIT_SPECTRE_TOP_X;
poly [ 4 ] . y = VARSPLIT_SPECTRE_TOP_Y;
CRAYON_GRIS_CLAIR
gdk_draw_polygon (
widget->window,
gc,
TRUE,
poly,
4
);
if (VarSplit.NbrSelecteurs > 0) {
gint begin = 0;
gint Len;
gint SelBegin;
gint SelEnd;
gint Cpt;
gint i;
PangoContext *p_context = NULL;
PangoLayout *layout = NULL;
PangoFontDescription *fontdesc;
gint layoutX = 0;
gint layoutY = 0;
gchar *Str = NULL;
// PRINT_FUNC_LF();
begin = (gint)VarSplit.AdjScroll->value;
Len = SplitSpectre_get_with () + begin;
// DRAW ALL SELECTEURS
for (Cpt = 0; Cpt < MAX_SELECTEURS_SPLIT; Cpt ++) {
// if (Cpt == VarSplit.SelecteurActif) continue;
if (VarSplit.Selecteur [ Cpt ] . Nmr == -1) break;
// FLECHE LIGNE DEBUT
SelBegin = SplitSelector_get_pos_begin (Cpt);
if (SelBegin >= begin && SelBegin <= Len) {
poly [ 0 ] . x = SelBegin;
CRAYON_NOIR
for (i = 0; i < 9; i++) {
gdk_draw_line (widget->window,
gc,
SelBegin - begin + i,
(VARSPLIT_SPECTRE_TOP_Y + 1) + i,
SelBegin - begin + i,
(VARSPLIT_SPECTRE_TOP_Y + 16) - i
);
}
p_context = gtk_widget_get_pango_context (widget);
layout = pango_layout_new (p_context);
fontdesc = pango_font_description_from_string ("Times New Roman 9");
pango_layout_set_font_description (layout, fontdesc);
Str = g_strdup_printf("%d", Cpt +1);
layoutX = poly [ 0 ] . x + 10;
layoutY = VARSPLIT_SPECTRE_TOP_Y +2;
pango_layout_set_markup (layout, Str, -1);
CRAYON_NOIR
gdk_draw_layout (
widget->window,
gc,
layoutX - begin,
layoutY,
layout
);
g_free (Str);
Str = NULL;
g_object_unref (layout);
}
// FLECHE LIGNE FIN
SelEnd = SplitSelector_get_pos_end (Cpt);
if (SelEnd > SelBegin && SelEnd > begin && SelEnd < Len) {
poly [ 0 ] . x = SelEnd;
CRAYON_NOIR
for (i = 0; i < 9; i++) {
gdk_draw_line (widget->window,
gc,
SelEnd - begin - i,
(VARSPLIT_SPECTRE_TOP_Y + 1) + i,
SelEnd - begin - i,
(VARSPLIT_SPECTRE_TOP_Y + 16) - i
);
}
p_context = gtk_widget_get_pango_context (widget);
layout = pango_layout_new (p_context);
fontdesc = pango_font_description_from_string ("Times New Roman 9");
pango_layout_set_font_description (layout, fontdesc);
Str = g_strdup_printf("%d", Cpt +1);
if (Cpt +1 < 10)
layoutX = poly [ 0 ] . x - 16;
else layoutX = poly [ 0 ] . x - 21;
layoutY = VARSPLIT_SPECTRE_TOP_Y +2;
pango_layout_set_markup (layout, Str, -1);
CRAYON_NOIR
gdk_draw_layout (
widget->window,
gc,
layoutX - begin,
layoutY,
layout
);
g_free (Str);
Str = NULL;
g_object_unref (layout);
}
}
// DRAW SELECTEUR ACTIF
// FLECHE LIGNE DEBUT
SelBegin = SplitSelector_get_pos_begin (VarSplit.SelecteurActif);
if (SelBegin >= begin && SelBegin < Len) {
poly [ 0 ] . x = SelBegin;
//
CRAYON_ORANGE
for (i = 0; i < 9; i++) {
gdk_draw_line (widget->window,
gc,
SelBegin - begin + i,
(VARSPLIT_SPECTRE_TOP_Y + 1) + i,
SelBegin - begin + i,
(VARSPLIT_SPECTRE_TOP_Y + 16) - i
);
}
p_context = gtk_widget_get_pango_context (widget);
layout = pango_layout_new (p_context);
fontdesc = pango_font_description_from_string ("Times New Roman 9");
pango_layout_set_font_description (layout, fontdesc);
Str = g_strdup_printf("%d", VarSplit.SelecteurActif +1);
layoutX = poly [ 0 ] . x + 10;
layoutY = VARSPLIT_SPECTRE_TOP_Y +2;
pango_layout_set_markup (layout, Str, -1);
CRAYON_BLANC
gdk_draw_layout (
widget->window,
gc,
layoutX - begin,
layoutY,
layout
);
g_free (Str);
Str = NULL;
g_object_unref (layout);
}
// FLECHE LIGNE FIN
SelEnd = SplitSelector_get_pos_end (VarSplit.SelecteurActif);
if (SelEnd >= begin && SelEnd < Len) {
if (VarSplit.SelecteurActif == VarSplit.NbrSelecteurs -1) SelEnd --;
poly [ 0 ] . x = SelEnd;
//
CRAYON_VERT
for (i = 0; i < 9; i++) {
gdk_draw_line (widget->window,
gc,
SelEnd - begin - i,
(VARSPLIT_SPECTRE_TOP_Y + 1) + i,
SelEnd - begin - i,
(VARSPLIT_SPECTRE_TOP_Y + 16) - i
);
}
p_context = gtk_widget_get_pango_context (widget);
layout = pango_layout_new (p_context);
fontdesc = pango_font_description_from_string ("Times New Roman 9");
pango_layout_set_font_description (layout, fontdesc);
Str = g_strdup_printf("%d", VarSplit.SelecteurActif +1);
if (VarSplit.SelecteurActif +1 < 10)
layoutX = poly [ 0 ] . x - 16;
else layoutX = poly [ 0 ] . x - 21;
layoutY = VARSPLIT_SPECTRE_TOP_Y +2;
pango_layout_set_markup (layout, Str, -1);
CRAYON_BLANC
gdk_draw_layout (
widget->window,
gc,
layoutX - begin,
layoutY,
layout
);
g_free (Str);
Str = NULL;
g_object_unref (layout);
}
}
gdk_gc_destroy (gc);
}
//
//
void SplitSpectre_remove_draw (void)
{
if (NULL != VarSplit.MaxScale_0) { g_free (VarSplit.MaxScale_0); VarSplit.MaxScale_0 = NULL; }
if (NULL != VarSplit.MinScale_0) { g_free (VarSplit.MinScale_0); VarSplit.MinScale_0 = NULL; }
if (NULL != VarSplit.MaxScale_1) { g_free (VarSplit.MaxScale_1); VarSplit.MaxScale_1 = NULL; }
if (NULL != VarSplit.MinScale_1) { g_free (VarSplit.MinScale_1); VarSplit.MinScale_1 = NULL; }
if (NULL != VarSplit.MaxScale_2) { g_free (VarSplit.MaxScale_2); VarSplit.MaxScale_2 = NULL; }
if (NULL != VarSplit.MinScale_2) { g_free (VarSplit.MinScale_2); VarSplit.MinScale_2 = NULL; }
}
//
//
void SplitSpectre_remove (void)
{
if (NULL != VarSplit.Tab) { g_free (VarSplit.Tab); VarSplit.Tab = NULL; }
SplitSpectre_remove_draw ();
VarSplit.Tags = tagswav_remove_info (VarSplit.Tags);
}
//
// PERCENT = ( VALUE_X / LONGUEUR_TOTALE ) * 100.0
// VALUE_X = ( LONGUEUR_TOTALE * PERCENT ) / 100.0
//
// xavier a écrit :
// Le marqueur de début doit coller le début de la forme d'onde. Celui de fin à la fin de la forme d'onde
//
// From @Dzef:
// Sinon, Claude, pour le soucis de not'
// Christophe-coupeur-d'album-en-rondelles-sans-cue, la parade existe en partie
// dans le cas où les plages sont séparées par des "blancs" (ce qui n'est pas
// le cas des albums "live" par exemple) : il suffit de détecter le niveau
// audio et en dessous d'un seuil fixé (typiquement < ~-50 dB), hop, 1 plage !
// C'est peut être une option (un bouton) à cogiter pour une future mouture,
// non ? M'est avis qu'not' Christophe serait pas contre...
//
// PS:
// Et chose fut faite: MERCI Xavier :-)
//
void SplitSpectre_search_blank_pass (void)
{
gint IndicePoints = -1;
gint PointBegin = -1;
gint PointEnd = -1;
gint Indice;
gdouble PercentBegin;
gdouble PercentEnd;
gint ValueBegin;
gint ValueEnd;
gint MaxPoints = VarSplit.MaxPointsInTab;
gboolean BoolErr = FALSE;
if (TRUE == VarSplit.BoolBlankWithCue) {
PRINT("TRUE == VarSplit.BoolBlankWithCue");
return;
}
PRINT_FUNC_LF();
Indice = 0;
do {
if (VarSplit.Tab [ Indice ].Min == 0 && VarSplit.Tab [ Indice ].Max == 0) {
if (-1 == PointBegin) {
while (Indice < MaxPoints && VarSplit.Tab [ Indice ].Min == 0 && VarSplit.Tab [ Indice ].Max == 0) Indice ++;
PointBegin = Indice;
while (Indice < MaxPoints && (VarSplit.Tab [ Indice ].Min != 0 || VarSplit.Tab [ Indice ].Max != 0)) Indice ++;
PointEnd = Indice;
if (PointBegin > -1 && PointEnd - PointBegin > 13) {
IndicePoints ++;
if( TRUE == OptionsCommandLine.BoolVerboseMode )
g_print ("PointBegin = %6d PointEnd = %6d Diff = %6d\n", PointBegin, PointEnd, PointEnd - PointBegin);
PercentBegin = ((gdouble)PointBegin / (gdouble)MaxPoints) * 100.0;
ValueBegin = ((gdouble)SplitSpectre_get_with() * (gdouble)PercentBegin) / 100.0;
PercentEnd = ((gdouble)PointEnd / (gdouble)MaxPoints) * 100.0;
ValueEnd = ((gdouble)SplitSpectre_get_with() * (gdouble)PercentEnd) / 100.0;
VarSplit.Selecteur [ IndicePoints ] . Nmr = IndicePoints;
VarSplit.Selecteur [ IndicePoints ] . BeginPaint = ValueBegin;
VarSplit.Selecteur [ IndicePoints ] . PercentBegin = PercentBegin;
VarSplit.Selecteur [ IndicePoints ] . EndPaint = ValueEnd;
VarSplit.Selecteur [ IndicePoints ] . PercentEnd = PercentEnd;
}
PointBegin = -1;
PointEnd = -1;
}
}
Indice ++;
} while (Indice < MaxPoints);
if (-1 == IndicePoints) {
IndicePoints = 0;
VarSplit.Selecteur [ IndicePoints ] . Nmr = IndicePoints;
PercentEnd = ((gdouble)(MaxPoints - 1) / (gdouble)MaxPoints) * 100.0;
ValueEnd = ((gdouble)SplitSpectre_get_with() * (gdouble)PercentEnd) / 100.0;
VarSplit.Selecteur [ 0 ] . PercentEnd = PercentEnd;
VarSplit.Selecteur [ 0 ] . EndPaint = ValueEnd;
}
if( TRUE == OptionsCommandLine.BoolVerboseMode ) {
g_print ("\n");
g_print ("IndicePoints = [ 0 .. %d ]\n", IndicePoints);
g_print ("\n");
}
// DEBUT
Indice = 0;
while (Indice < MaxPoints && VarSplit.Tab [ Indice ].Min == 0 && VarSplit.Tab [ Indice ].Max == 0) Indice ++;
PercentBegin = ((gdouble)Indice / (gdouble)MaxPoints) * 100.0;
ValueBegin = ((gdouble)SplitSpectre_get_with() * (gdouble)PercentBegin) / 100.0;
VarSplit.Selecteur [ 0 ] . PercentBegin = PercentBegin;
VarSplit.Selecteur [ 0 ] . BeginPaint = ValueBegin;
// VERIFIE QUE LES POINTS NE SE CHEVAUCHENT PAS
BoolErr = FALSE;
for (IndicePoints = 0; VarSplit.Selecteur [ IndicePoints ] . Nmr != -1; IndicePoints ++) {
if (IndicePoints > 0) {
// if ((gint)VarSplit.Selecteur [ IndicePoints -1 ] . End >= (gint)VarSplit.Selecteur [ IndicePoints ] . Begin) {
// g_print ("[ %02d ] ERREUR entre End %d et Begin %d --> RECTIFICATION\n", IndicePoints, IndicePoints -1, IndicePoints);
// BoolErr = TRUE;
// break;
// }
if ((gint)VarSplit.Selecteur [ IndicePoints ] . BeginPaint >= (gint)VarSplit.Selecteur [ IndicePoints ] . EndPaint) {
if( TRUE == OptionsCommandLine.BoolVerboseMode )
g_print ("[ %02d ]ERREUR entre Begin %d et End %d --> RECTIFICATION\n", IndicePoints, IndicePoints, IndicePoints);
BoolErr = TRUE;
break;
}
}
}
// VERIFICATION DE LA COHERENCE DU TEMPS ENTRE DEUX POINTS BEGIN et END
if (FALSE == BoolErr) {
for (IndicePoints = 0; VarSplit.Selecteur [ IndicePoints ] . Nmr != -1; IndicePoints ++) {
if (SplitSelector_get_diff_sec (VarSplit.Selecteur [ IndicePoints ] . PercentBegin, VarSplit.Selecteur [ IndicePoints ] . PercentEnd) <= 5) {
if( TRUE == OptionsCommandLine.BoolVerboseMode )
g_print ("ERREUR Temps < a 5 secondes entre BEGIN %d et END %d --> RECTIFICATION\n", IndicePoints, IndicePoints);
BoolErr = TRUE;
break;
}
}
}
if (TRUE == BoolErr) {
for (IndicePoints = 1; IndicePoints < MAX_SELECTEURS_SPLIT; IndicePoints ++) {
VarSplit.Selecteur [ IndicePoints ] . Nmr = -1;
VarSplit.Selecteur [ IndicePoints ] . BeginPaint = -1;
VarSplit.Selecteur [ IndicePoints ] . EndPaint = -1;
VarSplit.Selecteur [ IndicePoints ] . PercentBegin =
VarSplit.Selecteur [ IndicePoints ] . PercentEnd = 0.0;
}
IndicePoints = 0;
VarSplit.Selecteur [ IndicePoints ] . Nmr = IndicePoints;
PercentEnd = ((gdouble)(MaxPoints - 1) / (gdouble)MaxPoints) * 100.0;
ValueEnd = ((gdouble)SplitSpectre_get_with() * (gdouble)PercentEnd) / 100.0;
VarSplit.Selecteur [ 0 ] . PercentEnd = PercentEnd;
VarSplit.Selecteur [ 0 ] . EndPaint = ValueEnd;
}
// PRINT CONSOLE
if( TRUE == OptionsCommandLine.BoolVerboseMode ) {
for (IndicePoints = 0; VarSplit.Selecteur [ IndicePoints ] . Nmr != -1; IndicePoints ++) {
g_print ("[ %2d ] BEGIN = %5d END = %5d PERCENTBEGIN = %f PERCENTEND = %f\n",
VarSplit.Selecteur [ IndicePoints ] . Nmr,
(gint)VarSplit.Selecteur [ IndicePoints ] . BeginPaint,
(gint)VarSplit.Selecteur [ IndicePoints ] . EndPaint,
VarSplit.Selecteur [ IndicePoints ] . PercentBegin,
VarSplit.Selecteur [ IndicePoints ] . PercentEnd
);
}
g_print ("\n");
}
}
// LECTURE FICHIER
//
gboolean SplitSpectre_read_file_spectre (gchar *PathNameFile)
{
FILE *pFile = NULL;
gboolean found = FALSE;
gint Ret;
gint Indice;
gint ChannelNext;
gint min, max;
gint tmp = 0;
gint points;
unsigned char devbuf[ BLOCK_SIZE +10 ];
WAVE WaveHeader;
TYPE_FILE_IS TypeFileIs = FILE_IS_NONE;
PRINT_FUNC_LF();
if( TRUE == OptionsCommandLine.BoolVerboseMode )
g_print("\t%s\n\n", PathNameFile);
VarSplit.MaxPointsInTab = 0;
VarSplit.TypeFileIs = FILE_IS_NONE;
if (FILE_IS_WAV != (TypeFileIs = GetInfo_file_is (PathNameFile))) {
//
SplitSpectre_remove_draw ();
// DEL ALLOC MEMORY
if (NULL != VarSplit.Tab) {
g_free (VarSplit.Tab); VarSplit.Tab = NULL;
return (TRUE);
}
}
if (FALSE == tagswav_read_file (PathNameFile, &WaveHeader)) {
tagswav_close_file (&WaveHeader);
if( TRUE == OptionsCommandLine.BoolVerboseMode )
printf ("\nImpossible d'ouvrir le fichier : \"%s\"\n\n", PathNameFile);
return FALSE;
}
pFile = WaveHeader.file;
WaveHeader.file = NULL;
if (pFile == NULL) {
PRINT_FUNC_LF();
if( TRUE == OptionsCommandLine.BoolVerboseMode )
g_print ("\nImpossible d'ouvrir le fichier : \"%s\"\n\n", PathNameFile);
return FALSE;
}
VarSplit.nBitsPerSample = WaveHeader.FMT.BitsPerSample;
switch (WaveHeader.FMT.BitsPerSample) {
case 8 :
case 16 :
case 24 :
case 32 :
break;
default :
{
fclose (pFile);
PRINT_FUNC_LF();
if( TRUE == OptionsCommandLine.BoolVerboseMode )
g_print("Seuls ces formats de bitrates : 8 16 24 et 32 sont pris en charge pour la lecture\n"
"Format de bitrate [ %d ] non prit en charge\n",
WaveHeader.FMT.BitsPerSample);
// DEL ALLOC MEMORY
if (NULL != VarSplit.Tab) {
g_free (VarSplit.Tab); VarSplit.Tab = NULL;
}
return FALSE;
}
}
VarSplit.nTotalChunckSize = WaveHeader.DATA.Subchunk2Size;
found = TRUE;
// DEL ALLOC MEMORY
if (NULL != VarSplit.Tab) {
g_free (VarSplit.Tab); VarSplit.Tab = NULL;
}
if (found == TRUE) {
VarSplit.TotalAllocation = sizeof(POINTS_FILE) * ((WaveHeader.DATA.Subchunk2Size / BLOCK_SIZE) +10);
VarSplit.Tab = (POINTS_FILE *)g_malloc0 (VarSplit.TotalAllocation + 10);
points = 0;
if (WaveHeader.FMT.BitsPerSample <= 0) WaveHeader.FMT.BitsPerSample = 8;
// TRAITEMENT UNIQUES: 8, 16, 24 et 32 bits
switch (WaveHeader.FMT.BitsPerSample) {
case 8 :
case 16 :
case 24 :
case 32 :
// PRE - CALCUL
ChannelNext = (WaveHeader.FMT.NumChannels -1) * (WaveHeader.FMT.BitsPerSample / 8);
// LECTURE DES DATAS
// #define BLOCK_SIZE 2352
//
while ((Ret = fread (devbuf, 1, BLOCK_SIZE, pFile)) > 0) {
min = max = 0;
for (Indice = 0; Indice < Ret; Indice++) {
if (WaveHeader.FMT.BitsPerSample == 8) {
tmp = devbuf [ Indice ];
tmp -= 128;
}
else if (WaveHeader.FMT.BitsPerSample == 16) {
tmp = (gchar)devbuf [ Indice +1 ] << 8 | (gchar)devbuf [ Indice ];
Indice ++;
}
else if (WaveHeader.FMT.BitsPerSample == 24) {
tmp = (gchar)devbuf [ Indice +0 ] >> 16;
tmp += (gchar)devbuf [ Indice +1 ] >> 8;
tmp += (gchar)devbuf [ Indice +2 ];
Indice += 2;
}
else if (WaveHeader.FMT.BitsPerSample == 32) {
tmp = (gchar)devbuf [ Indice +0 ] >> 24;
tmp += (gchar)devbuf [ Indice +1 ] >> 16;
tmp += (gchar)devbuf [ Indice +2 ] >> 8;
tmp += (gchar)devbuf [ Indice +3 ];
Indice += 2;
}
if (tmp > max) {
max = tmp;
} else if (tmp <= min) {
min = tmp;
}
// skip over any extra channels
Indice += ChannelNext;
}
VarSplit.Tab [ points ].Min = min;
VarSplit.Tab [ points ].Max = max;
points ++;
}
break;
default :
PRINT("Ne doit pas arriver ici !!!!");
if( TRUE == OptionsCommandLine.BoolVerboseMode )
g_print ("Ce format n'est pas pris en charge : %d\n", WaveHeader.FMT.BitsPerSample);
fclose (pFile);
return FALSE;
}
}
fclose (pFile);
VarSplit.MaxPointsInTab = points;
// ALL DATAS
// points * BLOCK_SIZE
/*g_print( "points(%d) * BLOCK_SIZE(%d) = \n\t%d octets\n\t%d Ko\n\t%d Mo\n\n",
points,
BLOCK_SIZE,
points * BLOCK_SIZE,
(points * BLOCK_SIZE) / 1024,
((points * BLOCK_SIZE) / 1024) / 1024
);*/
// TODO: MARQUAGE DES PASSAGES BLANC SOIT < ~-50 dB
for (Indice = 0; Indice < points; Indice ++) {
if (VarSplit.Tab [ Indice ].Min >= -1. && VarSplit.Tab [ Indice ].Max <= 1.) {
VarSplit.Tab [ Indice ].Min =
VarSplit.Tab [ Indice ].Max = 0.0;
}
}
VarSplit.Tags = tagswav_remove_info (VarSplit.Tags);
VarSplit.Tags = (INFO_WAV *)tagswav_get_info (PathNameFile);
// RECHEFCHE DES PLAGES SELON L IDEE DE @Dzef ;-)
SplitSpectre_search_blank_pass ();
VarSplit.BoolReadFileSpectre = TRUE;
VarSplit.TypeFileIs = TypeFileIs;
return (TRUE);
}
// TODO
// AFFICHAGE DU SPECTRE
// RAPIDITE DE REAFFICHAGE DE L'AMPLITUDE ACCRUE AVEC LES FONCTIONS gdk_draw_ (...)
// 13 juillet 2009
// 12 mars 2010
//
void SplitSpectre_draw_lines (void)
{
GdkColor gdk_color;
GdkColormap *colormap;
GdkGC *gc;
gint y_min;
gint y_max;
gint xaxis;
gint scale;
gint points = 0;
gint k;
gdouble Percent;
gint AdjValue;
gint begin = 0;
gint end = 0;
gint save_begin = 0;
gboolean BoolAllocateMemory = FALSE;
gint SelBegin = 0;
gint SelEnd = 0;
gint Len;
GdkPoint poly [ 10 ];
gdouble SpectreGetWith;
// static gint Nbr = 0;
// PRINT_FUNC_LF();
// WAV if bitrate == 8 16 24 32
if (VarSplit.Tab != NULL && VarSplit.TypeFileIs == FILE_IS_WAV && VarSplit.MaxPointsInTab > 0) {
// PRINT_FUNC_LF();
// g_print( "\tNbr = %d\n", Nbr++ );
// OPEN DRAW
colormap = gdk_window_get_colormap (VarSplit.AdrWidgetSpectre->window);
gc = gdk_gc_new (VarSplit.AdrWidgetSpectre->window);
//
// NE PAS REALLOUER A CHAQUE FOIS !!!
//
if (NULL == VarSplit.MaxScale_0) {
BoolAllocateMemory = TRUE;
}
if (VarSplit.TotalAllocationTabScreen < (sizeof(GdkPoint) * (VARSPLIT_SPECTRE_WITH + 20))) {
BoolAllocateMemory = TRUE;
}
if (TRUE == BoolAllocateMemory) {
SplitSpectre_remove_draw ();
VarSplit.TotalAllocationTabScreen = sizeof(GdkPoint) * (VARSPLIT_SPECTRE_WITH + 20);
VarSplit.MaxScale_0 = (GdkPoint *)g_malloc0 (VarSplit.TotalAllocationTabScreen);
VarSplit.MinScale_0 = (GdkPoint *)g_malloc0 (VarSplit.TotalAllocationTabScreen);
VarSplit.MaxScale_1 = (GdkPoint *)g_malloc0 (VarSplit.TotalAllocationTabScreen);
VarSplit.MinScale_1 = (GdkPoint *)g_malloc0 (VarSplit.TotalAllocationTabScreen);
VarSplit.MaxScale_2 = (GdkPoint *)g_malloc0 (VarSplit.TotalAllocationTabScreen);
VarSplit.MinScale_2 = (GdkPoint *)g_malloc0 (VarSplit.TotalAllocationTabScreen);
}
// LA LIGNE MEDIANE DU GRAPHE
// xaxis = HAUTEUR_WIDGET / 2;
xaxis = (VARSPLIT_SPECTRE_H) / 2;
if (xaxis != 0) {
if (VarSplit.nBitsPerSample == 16)
scale = SHRT_MAX / (xaxis -1);
else scale = UCHAR_MAX / (xaxis -1);
if (scale == 0) {
scale = 1;
}
} else {
scale = 1;
}
//
begin =
save_begin =
AdjValue = (gint)VarSplit.AdjScroll->value;
Len =
end = begin + VARSPLIT_SPECTRE_WITH;
// PRE - CALCUL
// 4.0.8~beta1
// Fri, 22 Apr 2011 15:03:02 +0200
SpectreGetWith = SplitSpectre_get_with();
// Thu, 23 Sep 2010 21:32:41 +0200
for( points = 0; begin < end; begin ++, points ++ ) {
Percent = ( (gdouble)begin / SpectreGetWith ) * 100.;
k = ( Percent * (gdouble)VarSplit.MaxPointsInTab ) / 100.;
y_max = xaxis - VarSplit.Tab[ k ].Max / scale;
y_min = xaxis + fabs( VarSplit.Tab[ k ].Min ) / scale;
// shade = 0;
VarSplit.MaxScale_0 [ points ] . x = begin;
VarSplit.MaxScale_0 [ points ] . y = y_max - (y_max - xaxis) * 0 / SAMPLE_SHADES;
VarSplit.MinScale_0 [ points ] . x = begin;
VarSplit.MinScale_0 [ points ] . y = y_min + (xaxis - y_min) * 0 / SAMPLE_SHADES;
// shade = 1;
VarSplit.MaxScale_1 [ points ] . x = begin;
VarSplit.MaxScale_1 [ points ] . y = y_max - (y_max - xaxis) * 1 / SAMPLE_SHADES;
VarSplit.MinScale_1 [ points ] . x = begin;
VarSplit.MinScale_1 [ points ] . y = y_min + (xaxis - y_min) * 1 / SAMPLE_SHADES;
// shade = 2;
VarSplit.MaxScale_2 [ points ] . x = begin;
VarSplit.MaxScale_2 [ points ] . y = y_max - (y_max - xaxis) * 2 / SAMPLE_SHADES;
VarSplit.MinScale_2 [ points ] . x = begin;
VarSplit.MinScale_2 [ points ] . y = y_min + (xaxis - y_min) * 2 / SAMPLE_SHADES;
// RECTIF HAUT
if (VarSplit.MaxScale_0 [ points ] . y < VARSPLIT_SPECTRE_Y) {
VarSplit.MaxScale_0 [ points ] . y = VARSPLIT_SPECTRE_Y;
}
// RECTIF BAS
if (VarSplit.MinScale_0 [ points ] . y > VARSPLIT_SPECTRE_H) {
VarSplit.MinScale_0 [ points ] . y = VARSPLIT_SPECTRE_H -1;
}
// RECTIF HAUT
if (VarSplit.MaxScale_1 [ points ] . y < VARSPLIT_SPECTRE_Y) {
VarSplit.MaxScale_1 [ points ] . y = VARSPLIT_SPECTRE_Y;
}
// RECTIF BAS
if (VarSplit.MinScale_1 [ points ] . y > VARSPLIT_SPECTRE_H) {
VarSplit.MinScale_1 [ points ] . y = VARSPLIT_SPECTRE_H -1;
}
// RECTIF HAUT
if (VarSplit.MaxScale_2 [ points ] . y < VARSPLIT_SPECTRE_Y) {
VarSplit.MaxScale_2 [ points ] . y = VARSPLIT_SPECTRE_Y;
}
// RECTIF BAS
if (VarSplit.MinScale_2 [ points ] . y > VARSPLIT_SPECTRE_H) {
VarSplit.MinScale_2 [ points ] . y = VARSPLIT_SPECTRE_H -1;
}
}
// (CLEAR) NETTOYER LA SURFACE
poly [ 0 ] . x = VARSPLIT_SPECTRE_X;
poly [ 0 ] . y = VARSPLIT_SPECTRE_Y;
poly [ 1 ] . x = VARSPLIT_SPECTRE_X + VARSPLIT_SPECTRE_W +1;
poly [ 1 ] . y = VARSPLIT_SPECTRE_Y;
poly [ 2 ] . x = VARSPLIT_SPECTRE_X + VARSPLIT_SPECTRE_W +1;
poly [ 2 ] . y = VARSPLIT_SPECTRE_Y + VARSPLIT_SPECTRE_H +1;
poly [ 3 ] . x = VARSPLIT_SPECTRE_X;
poly [ 3 ] . y = VARSPLIT_SPECTRE_Y + VARSPLIT_SPECTRE_H +1;
poly [ 4 ] . x = VARSPLIT_SPECTRE_X;
poly [ 4 ] . y = VARSPLIT_SPECTRE_Y;
CRAYON_BLANC
gdk_draw_polygon (
VarSplit.AdrWidgetSpectre->window,
gc,
TRUE,
poly,
4
);
SelBegin = SplitSelector_get_pos_begin (VarSplit.SelecteurActif);
SelEnd = SplitSelector_get_pos_end (VarSplit.SelecteurActif);
begin = save_begin;
for (points = 0; begin < end; begin ++, points ++) {
// MaxScale_0
if (begin >= SelBegin && begin <= SelEnd) {
CRAYON_BLEU // LA SELECTION
} else {
CRAYON_NOIR // LA NON SELECTION
}
gdk_draw_line (VarSplit.AdrWidgetSpectre->window,
gc,
points,
VarSplit.MaxScale_0 [ points ] . y,
points,
VarSplit.MinScale_0 [ points ] . y
);
// MaxScale_1
if (begin >= SelBegin && begin <= SelEnd) {
CRAYON_BLEU_CLAIR // LA SELECTION
} else {
CRAYON_GRIS // LA NON SELECTION
}
gdk_draw_line (VarSplit.AdrWidgetSpectre->window,
gc,
points,
VarSplit.MaxScale_1 [ points ] . y,
points,
VarSplit.MinScale_1 [ points ] . y
);
// MaxScale_2
if (begin >= SelBegin && begin <= SelEnd) {
CRAYON_BLEU_CLAIR_PLUS // LA SELECTION
} else {
CRAYON_GRIS_CLAIR // LA NON SELECTION
}
gdk_draw_line (VarSplit.AdrWidgetSpectre->window,
gc,
points,
VarSplit.MaxScale_2 [ points ] . y,
points,
VarSplit.MinScale_2 [ points ] . y
);
}
// AFFICHE CURSEUR DEBUT
if (SelBegin >= save_begin && SelBegin < Len) {
CRAYON_ORANGE
gdk_draw_line (
VarSplit.AdrWidgetSpectre->window,
gc,
SelBegin -save_begin,
VARSPLIT_SPECTRE_Y,
SelBegin - save_begin,
VARSPLIT_SPECTRE_Y + VARSPLIT_SPECTRE_H
);
}
// AFFICHE CURSEUR FIN
if (VarSplit.SelecteurActif == VarSplit.NbrSelecteurs -1) SelEnd --;
if (SelEnd >= save_begin && SelEnd < Len) {
CRAYON_VERT
gdk_draw_line (
VarSplit.AdrWidgetSpectre->window,
gc,
SelEnd - save_begin,
VARSPLIT_SPECTRE_Y,
SelEnd - save_begin,
VARSPLIT_SPECTRE_Y + VARSPLIT_SPECTRE_H
);
}
// AFFICHE LE CURSEUR AUDIO
if (VarSplit.PercentActivePlay >= 0.0) {
MarkerOld = (gint)(((gdouble)SplitSpectre_get_with() * VarSplit.PercentActivePlay) / 100.0);
if (MarkerOld >= save_begin && MarkerOld < Len) {
CRAYON_ROUGE
gdk_draw_line (
VarSplit.AdrWidgetSpectre->window,
gc,
MarkerOld - save_begin,
VARSPLIT_SPECTRE_Y,
MarkerOld - save_begin,
VARSPLIT_SPECTRE_Y + VARSPLIT_SPECTRE_H -2
);
gdk_draw_rectangle (
VarSplit.AdrWidgetSpectre->window,
gc,
TRUE,
MarkerOld - save_begin -6,
VARSPLIT_SPECTRE_Y + VARSPLIT_SPECTRE_H -12,
14,
12
);
}
}
// CLOSE DRAW
gdk_gc_destroy (gc);
}
}
// AFFICHAGE DU CURSEUR EN MODE PLAY: GAIN DE TEMPS POUR LE CPU
//
void SplitSpectre_draw_lines_play( void )
{
GdkColor gdk_color;
GdkColormap *colormap;
GdkGC *gc;
gint points = 0;
gint AdjValue;
gint begin = 0;
gint end = 0;
gint save_begin = 0;
gint SelBegin = 0;
gint SelEnd = 0;
gint Len;
gint Marker;
// WAV if bitrate == 8 16 24 32
if (VarSplit.Tab != NULL && VarSplit.TypeFileIs == FILE_IS_WAV && VarSplit.MaxPointsInTab > 0) {
// PRINT_FUNC_LF();
// OPEN DRAW
colormap = gdk_window_get_colormap (VarSplit.AdrWidgetSpectre->window);
gc = gdk_gc_new (VarSplit.AdrWidgetSpectre->window);
//
begin =
save_begin =
AdjValue = (gint)VarSplit.AdjScroll->value;
Len =
end = begin + VARSPLIT_SPECTRE_WITH;
Marker = (gint)(((gdouble)SplitSpectre_get_with() * VarSplit.PercentActivePlay) / 100.0);
SelBegin = SplitSelector_get_pos_begin (VarSplit.SelecteurActif);
SelEnd = SplitSelector_get_pos_end (VarSplit.SelecteurActif);
begin = save_begin;
if( -1 == MarkerOld )
MarkerOld = ( Marker - 20 );
else MarkerOld -= 20;
for (points = 0; begin < end; begin ++, points ++) {
if( begin < MarkerOld || begin > Marker +20 ) {
continue;
}
CRAYON_BLANC
gdk_draw_line (VarSplit.AdrWidgetSpectre->window,
gc,
points,
VARSPLIT_SPECTRE_Y,
points,
VARSPLIT_SPECTRE_Y + VARSPLIT_SPECTRE_H +1
);
// MaxScale_0
if (begin >= SelBegin && begin <= SelEnd) {
CRAYON_BLEU // LA SELECTION
} else {
CRAYON_NOIR // LA NON SELECTION
}
gdk_draw_line (VarSplit.AdrWidgetSpectre->window,
gc,
points,
VarSplit.MaxScale_0 [ points ] . y,
points,
VarSplit.MinScale_0 [ points ] . y
);
// MaxScale_1
if (begin >= SelBegin && begin <= SelEnd) {
CRAYON_BLEU_CLAIR // LA SELECTION
} else {
CRAYON_GRIS // LA NON SELECTION
}
gdk_draw_line (VarSplit.AdrWidgetSpectre->window,
gc,
points,
VarSplit.MaxScale_1 [ points ] . y,
points,
VarSplit.MinScale_1 [ points ] . y
);
// MaxScale_2
if (begin >= SelBegin && begin <= SelEnd) {
CRAYON_BLEU_CLAIR_PLUS // LA SELECTION
} else {
CRAYON_GRIS_CLAIR // LA NON SELECTION
}
gdk_draw_line (VarSplit.AdrWidgetSpectre->window,
gc,
points,
VarSplit.MaxScale_2 [ points ] . y,
points,
VarSplit.MinScale_2 [ points ] . y
);
}
// AFFICHE CURSEUR DEBUT
if (SelBegin >= save_begin && SelBegin < Len) {
CRAYON_ORANGE
gdk_draw_line (
VarSplit.AdrWidgetSpectre->window,
gc,
SelBegin -save_begin,
VARSPLIT_SPECTRE_Y,
SelBegin - save_begin,
VARSPLIT_SPECTRE_Y + VARSPLIT_SPECTRE_H
);
}
// AFFICHE CURSEUR FIN
if (VarSplit.SelecteurActif == VarSplit.NbrSelecteurs -1) SelEnd --;
if (SelEnd >= save_begin && SelEnd < Len) {
CRAYON_VERT
gdk_draw_line (
VarSplit.AdrWidgetSpectre->window,
gc,
SelEnd - save_begin,
VARSPLIT_SPECTRE_Y,
SelEnd - save_begin,
VARSPLIT_SPECTRE_Y + VARSPLIT_SPECTRE_H
);
}
// AFFICHE LE CURSEUR AUDIO
if (VarSplit.PercentActivePlay >= 0.0) {
if (Marker >= save_begin && Marker < Len) {
CRAYON_ROUGE
gdk_draw_line (
VarSplit.AdrWidgetSpectre->window,
gc,
Marker - save_begin,
VARSPLIT_SPECTRE_Y,
Marker - save_begin,
VARSPLIT_SPECTRE_Y + VARSPLIT_SPECTRE_H -2
);
gdk_draw_rectangle (
VarSplit.AdrWidgetSpectre->window,
gc,
TRUE,
Marker - save_begin -6,
VARSPLIT_SPECTRE_Y + VARSPLIT_SPECTRE_H -12,
14,
12
);
}
}
// CLOSE DRAW
gdk_gc_destroy (gc);
MarkerOld = Marker;
}
}
xcfa-4.3.6/src/Makefile.am 0000644 0001750 0001750 00000004315 12110457065 012215 0000000 0000000 #
# src/Makefile.am
#
AUTOMAKE_OPTIONS= gnu
AM_CPPFLAGS = \
-DPACKAGE_DATA_DIR=\""$(datadir)"\" \
-DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
-DPIXMAPS_DIR=\""$(datadir)/pixmaps/xcfa"\" \
@PACKAGE_CFLAGS@
AM_CFLAGS = @PACKAGE_CFLAGS@ \
-DDATA_DIR=\""$(datadir)"\" \
-DLOCALE_DIR=\""$(datadir)/locale"\" \
-DPIXMAPS_DIR=\""$(datadir)/pixmaps/xcfa"\"
bin_PROGRAMS=xcfa
xcfa_SOURCES=main.c \
alsa_audio.c alsa_audio.h alsa_play.c alsa_play.h \
bacon.c bacon.h \
cd_audio.c cd_audio_extract.c cd_audio_extract.h cd_audio_toc.c cd_cue.c cd_cue.h cd_expander.c cd_normalise.c cd_normalise.h cd_audio.h cd_curl.c cd_curl.h \
configuser.c configuser.h \
conv.c conv.h \
cursor.c cursor.h \
dvd.c dvd_table.c dvd_read.c dvd_extract.c dvd.h \
dragNdrop.c dragNdrop.h \
extra.c extra.h \
file.c file_analyze.c file_wav.c file_mp3ogg.c file_tags.c file_scan_db.c file_action.c file_lc.c file_conv.c file_wav_conv.c file_mp3ogg_conv.c file_trash.c file.h \
fileselect.c fileselect.h \
get_info.c get_info.h \
mplayer.c mplayer.h \
normalise.c normalise.h \
notify_send.c notify_send.h \
options.c options_cd.c options_mp3.c options_oggenc.c options_flac.c options_mac.c options_wavpack.c options_musepack.c options_faac.c options_aacplusenc.c options_tags.c options_internal.c options.h \
parse.c parse.h \
play_file.c play_file.h \
poche.c poche_dir.c poche_draw.c poche_save.c poche_txt.c poche_web.c poche.h \
popup.c popup.h \
prg_init.c prg_init.h \
proc.c proc.h \
process.c process.h \
replaygain.c replaygain.h \
scan.c scan.h \
split.c split_selector.c split_spectre.c split_cue.c split_conv.c split_wav.c split.h \
statusbar.c statusbar.h \
tags.c tags_aac.c tags_aiff.c tags_ape.c tags_dts.c tags_flac.c tags_m4a.c tags_mp3.c tags_mpc.c tags_ogg.c tags_rm.c tags_shn.c tags_wav.c tags_wavpack.c tags_wma.c tags_ac3.c tags.h \
translate.c \
treeview.c treeview.h \
web.c web.h \
win_about.c win_about.h \
win_info.c win_info.h \
win_reader.c win_reader.h \
win_scan.c win_scan.h \
win_vte.c win_vte.h \
global.h
xcfa_CPPFLAGS=-I${top_srcdir}/lib
datadir = @datadir@
localedir = $(datadir)/locale
DEFS = -DLOCALEDIR="$(localedir)" @DEFS@
xcfa_LDADD =@PACKAGE_LIBS@ $(INTLLIBS) ${top_builddir}/lib/lib.a -lm -lX11
xcfa-4.3.6/src/win_info.c 0000644 0001750 0001750 00000006420 12122563465 012141 0000000 0000000 /*
* file : win_info.c
* project : xcfa
* with : Gtk-2
*
* copyright : (C) 2003 - 2013 by Claude Bulin
*
* xcfa - GTK+ implementation of the GNU shell command
* GNU General Public License
*
* This file is part of XCFA.
*
* XCFA is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* at your option) any later version.
*
* XCFA is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with XCFA. If not, see .
*/
#ifdef HAVE_CONFIG_H
#include "../config.h"
#endif
#include
#include
#ifdef ENABLE_STATIC_LIBRARY
#include "../lib/lib.h"
#endif
#include "global.h"
#include "win_info.h"
typedef struct {
GtkWidget *AdrWin;
gboolean IsShow;
} VAR_WININFO;
VAR_WININFO VarWinInfo = { NULL, FALSE };
// QUITTER
//
gboolean on_wind_info_destroy_event( GtkWidget *widget, GdkEvent *event, gpointer user_data )
{
VarWinInfo.IsShow = FALSE;
gtk_widget_hide (VarWinInfo.AdrWin);
return TRUE;
}
// QUITTER
//
gboolean on_wind_info_delete_event( GtkWidget *widget, GdkEvent *event, gpointer user_data )
{
VarWinInfo.IsShow = FALSE;
gtk_widget_hide (VarWinInfo.AdrWin);
return TRUE;
}
// QUITTER
//
void on_button_quitter_wininfo_clicked (GtkButton *button, gpointer user_data)
{
VarWinInfo.IsShow = FALSE;
gtk_widget_hide (VarWinInfo.AdrWin);
}
// WIN-READER OPEN
//
void wininfo_create( GtkWidget *p_WindMain, gchar *title, ... )
{
gchar *StrTitle = NULL;
va_list Arguments;
gchar *PtrArg = NULL;
GString *StrTxt = NULL;
if (TRUE == VarWinInfo.IsShow) {
gdk_window_raise (VarWinInfo.AdrWin->window);
}
else {
if (NULL == VarWinInfo.AdrWin) {
VarWinInfo.AdrWin = GTK_WIDGET (GLADE_GET_OBJECT("wind_info"));
gtk_builder_connect_signals (GtkXcfaProjet, NULL);
}
gtk_window_set_transient_for (GTK_WINDOW(VarWinInfo.AdrWin), GTK_WINDOW(p_WindMain));
gtk_window_set_modal (GTK_WINDOW (VarWinInfo.AdrWin), TRUE);
libutils_set_default_icone_to_win (VarWinInfo.AdrWin);
StrTitle = g_strdup_printf ("\n %s \n", title);
gtk_label_set_markup (GTK_LABEL (GLADE_GET_OBJECT("label_titre_wininfo")), StrTitle);
g_free (StrTitle); StrTitle = NULL;
StrTxt = g_string_new (NULL); // Creation du GString
va_start (Arguments, title); // Debut des arguments
while ( *(PtrArg = va_arg (Arguments, gchar *)) != '\0') { // TANSQUE message ALORS
g_string_append_printf (StrTxt, "%s", &PtrArg[0]); // message.stock
} // FIN_TANSQUE
va_end (Arguments); // Fin des arguments
g_string_append_printf (StrTxt, "\n\n");
gtk_label_set_markup (GTK_LABEL (GLADE_GET_OBJECT("label_texte_wininfo")), StrTxt->str);
g_string_free (StrTxt, TRUE);
gtk_window_set_title (GTK_WINDOW(VarWinInfo.AdrWin), title);
gtk_widget_show (VarWinInfo.AdrWin);
}
VarWinInfo.IsShow = TRUE;
}
xcfa-4.3.6/src/tags.c 0000644 0001750 0001750 00000024751 12122563465 011276 0000000 0000000 /*
* file : tags.c
* project : xcfa
* with : Gtk-2
*
* copyright : (C) 2003 - 2013 by Claude Bulin
*
* xcfa - GTK+ implementation of the GNU shell command
* GNU General Public License
*
* This file is part of XCFA.
*
* XCFA is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* at your option) any later version.
*
* XCFA is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with XCFA. If not, see .
*/
#ifdef HAVE_CONFIG_H
#include "../config.h"
#endif
#include
#include
#include
#include
#include
#include
#include
#include
#ifdef ENABLE_STATIC_LIBRARY
#include "../lib/lib.h"
#endif
#include "global.h"
#include "tags.h"
#include
//
//
TAGS *tags_alloc (gboolean bool_tag_cd)
{
TAGS *new = (TAGS *)g_malloc0 (sizeof (TAGS));
/* TRUE is CD-AUDIO
* FALSE is FILE
*/
if (new) {
new->bool_tag_cd = bool_tag_cd;
new->bool_save = FALSE;
}
return ((TAGS *)new);
}
//
//
TAGS *tags_remove (TAGS *tags)
{
if (NULL != tags) {
if (NULL != tags->Album) { g_free (tags->Album); tags->Album = NULL; }
if (NULL != tags->Artist) { g_free (tags->Artist); tags->Artist = NULL; }
if (NULL != tags->Title) { g_free (tags->Title); tags->Title = NULL; }
if (NULL != tags->Number) { g_free (tags->Number); tags->Number = NULL; }
if (NULL != tags->Genre) { g_free (tags->Genre); tags->Genre = NULL; }
if (NULL != tags->Year) { g_free (tags->Year); tags->Year = NULL; }
if (NULL != tags->Comment) { g_free (tags->Comment); tags->Comment = NULL; }
if (NULL != tags->Description) { g_free (tags->Description); tags->Description = NULL; }
g_free (tags);
tags = NULL;
}
return ((TAGS *)NULL);
}
//
//
void tags_set_flag_modification (TAGS *tags, gboolean p_flag)
{
if (tags) tags->bool_save = p_flag;
}
//
//
gboolean tags_is_modified (TAGS *tags)
{
return (tags ? tags->bool_save : FALSE);
}
//
//
TAGS *tags_set (gchar *filename, TAGS *tags)
{
gchar *Ptr = NULL;
if (tags->Artist == NULL) {
Ptr = strrchr (filename, '/');
if (Ptr) {
Ptr ++;
tags->Artist = g_strdup (Ptr);
Ptr = strrchr (tags->Artist, '.');
if (Ptr) *Ptr = '\0';
}
else {
tags->Artist = g_strdup (filename);
}
}
if (tags->Title == NULL) {
Ptr = strrchr (filename, '/');
if (Ptr) {
Ptr ++;
tags->Title = g_strdup (Ptr);
Ptr = strrchr (tags->Title, '.');
if (Ptr) *Ptr = '\0';
}
else {
tags->Title = g_strdup (filename);
}
}
// Complete l'allocation
if (NULL == tags->Album) tags->Album = g_strdup ("");
if (NULL == tags->Artist) tags->Artist = g_strdup ("");
if (NULL == tags->Title) tags->Title = g_strdup ("");
if (NULL == tags->Number) {
tags->Number = g_strdup ("1");
tags->IntNumber = 1;
} else {
tags->IntNumber = atoi (tags->Number);
}
if (NULL == tags->Genre) {
tags->Genre = g_strdup ("1");
tags->IntGenre = 1;
} else {
tags->IntGenre = atoi (tags->Genre);
}
if (NULL == tags->Year) {
tags->Year = g_strdup ("1962");
tags->IntYear = 1962;
} else {
tags->IntYear = atoi (tags->Year);
}
if (NULL == tags->Comment) tags->Comment = g_strdup ("");
if (NULL == tags->Description) tags->Description = g_strdup ("");
return ((TAGS *)tags);
}
//
//
gchar *tags_get_time (gchar *namefile)
{
TagLib_File *file;
// TagLib_Tag *tag;
const TagLib_AudioProperties *properties;
gint seconds;
gint minutes;
gchar *RetTime = NULL;
if ((file = taglib_file_new (namefile))) {
taglib_set_strings_unicode(FALSE);
// tag = taglib_file_tag(file);
taglib_file_tag(file);
properties = taglib_file_audioproperties(file);
seconds = taglib_audioproperties_length(properties) % 60;
minutes = (taglib_audioproperties_length(properties) - seconds) / 60;
RetTime = g_strdup_printf ("%02d:%02d", minutes, seconds);
taglib_tag_free_strings();
taglib_file_free (file);
}
else {
RetTime = g_strdup ("???");
}
return (RetTime);
}
//
//
gchar *tags_get_time_wav (gchar *namefile)
{
gchar *ptr = NULL;
INFO_WAV *info = NULL;
if ((info = tagswav_get_info (namefile))) {
ptr = g_strdup (info->time);
info = tagswav_remove_info (info);
}
if (NULL == ptr) ptr = g_strdup ("???");
return (ptr);
}
//
//
//
//
// typedef struct {
// gint num;
// gchar *name;
// } STRUCT_TAGS_FILE_MP3;
//
//
STRUCT_TAGS_FILE_MP3 StructTagsFileMp3 [] = {
{123, "A Cappella"},
{ 74, "Acid Jazz"},
{ 73, "Acid Punk"},
{ 34, "Acid"},
{ 99, "Acoustic"},
{ 40, "Alt. Rock"},
{ 20, "Alternative"},
{ 26, "Ambient"},
{145, "Anime"},
{ 90, "Avantgarde"},
{116, "Ballad"},
{ 41, "Bass"},
{135, "Beat"},
{ 85, "Bebob"},
{ 96, "Big Band"},
{138, "Black Metal"},
{ 89, "Bluegrass"},
{ 0, "Blues"},
{107, "Booty Bass"},
{132, "BritPop"},
{ 65, "Cabaret"},
{ 88, "Celtic"},
{104, "Chamber Music"},
{102, "Chanson"},
{ 97, "Chorus"},
{136, "Christian Gangsta Rap"},
{ 61, "Christian Rap"},
{141, "Christian Rock"},
{ 1, "Classic Rock"},
{ 32, "Classical"},
{128, "Club-House"},
{112, "Club"},
{ 57, "Comedy"},
{140, "Contemporary Christian"},
{ 2, "Country"},
{139, "Crossover"},
{ 58, "Cult"},
{125, "Dance Hall"},
{ 3, "Dance"},
{ 50, "Darkwave"},
{ 22, "Death Metal"},
{ 4, "Disco"},
{ 55, "Dream"},
{127, "Drum & Bass"},
{122, "Drum Solo"},
{120, "Duet"},
{ 98, "Easy Listening"},
{ 52, "Electronic"},
{ 48, "Ethnic"},
{124, "Euro-House"},
{ 25, "Euro-Techno"},
{ 54, "Eurodance"},
{ 84, "Fast-Fusion"},
{ 81, "Folk/Rock"},
{115, "Folklore"},
{ 80, "Folk"},
{119, "Freestyle"},
{ 5, "Funk"},
{ 30, "Fusion"},
{ 36, "Game"},
{ 59, "Gangsta Rap"},
{126, "Goa"},
{ 38, "Gospel"},
{ 91, "Gothic Rock"},
{ 49, "Gothic"},
{ 6, "Grunge"},
{ 79, "Hard Rock"},
{129, "Hardcore"},
{137, "Heavy Metal"},
{ 7, "Hip-Hop"},
{ 35, "House"},
{100, "Humour"},
{131, "Indie"},
{ 19, "Industrial"},
{ 46, "Instrumental Pop"},
{ 47, "Instrumental Rock"},
{ 33, "Instrumental"},
{146, "JPop"},
{ 29, "Jazz+Funk"},
{ 8, "Jazz"},
{ 63, "Jungle"},
{ 86, "Latin"},
{ 71, "Lo-Fi"},
{ 45, "Meditative"},
{142, "Merengue"},
{ 9, "Metal"},
{148, "Misc"},
{ 77, "Musical"},
{ 82, "National Folk"},
{ 64, "Native American"},
{133, "Negerpunk"},
{ 10, "New Age"},
{ 10, "NewAge"},
{ 66, "New Wave"},
{ 39, "Noise"},
{ 11, "Oldies"},
{103, "Opera"},
{ 12, "Other"},
{ 75, "Polka"},
{134, "Polsk Punk"},
{ 53, "Pop-Folk"},
{ 62, "Pop/Funk"},
{ 13, "Pop"},
{109, "Porn Groove"},
{117, "Power Ballad"},
{ 23, "Pranks"},
{108, "Primus"},
{ 92, "Progressive Rock"},
{ 93, "Psychedelic Rock"},
{ 67, "Psychedelic"},
{121, "Punk Rock"},
{ 43, "Punk"},
{ 14, "R&B"},
{ 15, "Rap"},
{ 68, "Rave"},
{ 16, "Reggae"},
{ 76, "Retro"},
{ 87, "Revival"},
{118, "Rhythmic Soul"},
{ 78, "Rock & Roll"},
{ 17, "Rock"},
{143, "Salsa"},
{114, "Samba"},
{110, "Satire"},
{ 69, "Showtunes"},
{ 21, "Ska"},
{111, "Slow Jam"},
{ 95, "Slow Rock"},
{105, "Sonata"},
{ 42, "Soul"},
{ 37, "Sound Clip"},
{ 24, "Soundtrack"},
{ 56, "Southern Rock"},
{ 44, "Space"},
{101, "Speech"},
{ 83, "Swing"},
{ 94, "Symphonic Rock"},
{106, "Symphony"},
{147, "Synthpop"},
{113, "Tango"},
{ 51, "Techno-Industrial"},
{ 18, "Techno"},
{130, "Terror"},
{144, "Thrash Metal"},
{ 60, "Top 40"},
{ 70, "Trailer"},
{ 31, "Trance"},
{ 72, "Tribal"},
{ 27, "Trip-Hop"},
{ 28, "Vocal"},
{102, "Chanson française"},
{-1, NULL}
};
//
//
gint tags_get_genre_by_value( gchar *p_name )
{
gint i;
gint RetNum = -1;
gchar *NameSrc = g_ascii_strdown( p_name, -1 );
gchar *NameStruct = NULL;
// g_print( "-- RECHERCHE DE: '%s' '%s'\n", p_name, NameSrc );
for( i=0; StructTagsFileMp3[ i ].num != -1; i++ ) {
NameStruct = g_ascii_strdown( StructTagsFileMp3[ i ].name, -1 );
// if( strlen( NameSrc ) == strlen( NameStruct ) && 0 == strcmp( NameSrc, NameStruct ) ) {
if( strlen( NameSrc ) == strlen( NameStruct ) && 0 == strncmp( NameSrc, NameStruct, strlen( NameSrc ))) {
// g_print( "NameSrc = %s NameStruct = %s\n", NameSrc, NameStruct );
RetNum = StructTagsFileMp3[ i ].num;
break;
}
g_free( NameStruct ); NameStruct = NULL;
}
if( NULL != NameSrc ) { g_free( NameSrc ); NameSrc = NULL; }
if( NULL != NameStruct ) { g_free( NameStruct ); NameStruct = NULL; }
return( RetNum );
}
//
//
void tags_set_elements_combobox (GtkWidget *widget)
{
gint i;
for (i=0; StructTagsFileMp3[ i ].num != -1; i++)
gtk_combo_box_append_text (GTK_COMBO_BOX (widget), StructTagsFileMp3[ i ].name);
}
//
//
gint tags_get_elements_combobox (gint num)
{
gint i;
for (i=0; StructTagsFileMp3[ i ].num != num; i++);
if (i > 148) i = 0;
return (i);
}
//
//
gint tags_get_num_combobox (gint value)
{
return (StructTagsFileMp3[ value ].num);
}
//
//
gchar *tags_get_genre_by_name( gint value )
{
gint i;
if( value < 0 || value > 148 ) return ((gchar *)NULL );
for( i=0; StructTagsFileMp3[ i ].num != value; i++ );
return( (gchar *)StructTagsFileMp3[ i ].name );
}
//
//
gchar *tags_get_str_type_file_is (TYPE_FILE_IS type)
{
static gchar str_type_file [ 8 ];
/* PRINT_FUNC_LF(); */
if (type == FILE_IS_FLAC) strcpy (str_type_file, "FLAC");
else if (type == FILE_IS_WAV) strcpy (str_type_file, "WAV ");
else if (type == FILE_IS_MP3) strcpy (str_type_file, "MP3 ");
else if (type == FILE_IS_OGG) strcpy (str_type_file, "OGG ");
else if (type == FILE_IS_SHN) strcpy (str_type_file, "SHN ");
else if (type == FILE_IS_M4A) strcpy (str_type_file, "M4A ");
else if (type == FILE_IS_VID_M4A) strcpy (str_type_file, "M4A ");
else if (type == FILE_IS_AAC) strcpy (str_type_file, "AAC ");
else if (type == FILE_IS_WMA) strcpy (str_type_file, "WMA ");
else if (type == FILE_IS_RM) strcpy (str_type_file, "RM ");
else if (type == FILE_IS_DTS) strcpy (str_type_file, "DTS ");
else if (type == FILE_IS_AIFF) strcpy (str_type_file, "AIFF ");
else if (type == FILE_IS_MPC) strcpy (str_type_file, "MPC ");
else if (type == FILE_IS_APE) strcpy (str_type_file, "APE ");
else if (type == FILE_IS_WAVPACK) strcpy (str_type_file, "WVP ");
else if (type == FILE_IS_AC3) strcpy (str_type_file, "AC3 ");
else strcpy (str_type_file, "???");
return (&str_type_file[0]);
}
xcfa-4.3.6/src/file_trash.c 0000644 0001750 0001750 00000021143 12122563465 012450 0000000 0000000 /*
* file : file_trash.h
* project : xcfa
* with : Gtk-2
*
* copyright : (C) 2003 - 2013 by Claude Bulin
*
* xcfa - GTK+ implementation of the GNU shell command
* GNU General Public License
*
* This file is part of XCFA.
*
* XCFA is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* at your option) any later version.
*
* XCFA is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with XCFA. If not, see .
*/
/*
void main_trash (void )
{
GFile *file = NULL;
file = g_file_new_for_path( "/home/cat/coucou.txt" );
if( FALSE == g_file_trash( file, NULL, NULL )) {
g_print("TRASH BAD\n");
}
else {
g_print("TRASH OK\n");
}
g_object_unref( file );
}
*/
#ifdef HAVE_CONFIG_H
#include "../config.h"
#endif
#include
#include
#include
#include
#include
#include
#ifdef ENABLE_STATIC_LIBRARY
#include "../lib/lib.h"
#endif
#include "global.h"
#include "win_scan.h"
#include "file.h"
/*
*---------------------------------------------------------------------------
* VARIABLES
*---------------------------------------------------------------------------
*/
typedef struct {
gboolean BoolTrashIsOk;
gboolean Bool_kde_full_session;
pthread_t nmr_tid;
guint handler_timeout;
gboolean bool_thread_end;
double total_percent;
gint nbr_trash;
gint ElementActif;
gboolean BoolEtat;
gboolean bool_pass_conv;
gint pass_conv;
gboolean bool_set_end_of_user;
gchar PathNameTrash [ 1024 ];
} VAR_FILE_TRASH;
VAR_FILE_TRASH var_filetrash = { FALSE, FALSE };
/*
mv ./11\ Track_11.wav /home/cat/.Trash/11\ Track_11.wav
Sous Ubuntu
$HOME/.Trash
Kubuntu et Xubuntu
$HOME/.local/share/Trash/files
*/
/* #include
*
* gboolean g_file_trash (GFile *file, GCancellable *cancellable, GError **error);
*
*
*
void filetrash_test (gchar *Name)
{
GError *error;
g_file_trash ((GFile *)Name, NULL, &error);
}
*
*
*/
//
//
gboolean filetrash_test_desktop_is_kde (void)
{
FILE *fp;
#define MAX_CARS_KDE 255
gchar buf [ MAX_CARS_KDE +1 ];
gboolean BoolRet = FALSE;
/*
KDE_FULL_SESSION
*/
system ("env | grep \"KDE_FULL_SESSION\" > /tmp/tst_kde_full_session.txt");
if ((fp = fopen ("/tmp/tst_kde_full_session.txt", "r")) != NULL) {
while (fgets (buf, MAX_CARS_KDE, fp) != NULL) {
if (strcmp (buf, "KDE_FULL_SESSION") == 0) {
if (strcmp (buf, "true") == 0 || strcmp (buf, "TRUE") == 0) {
BoolRet = TRUE;
break;
}
}
}
fclose (fp);
}
g_unlink ("/tmp/tst_kde_full_session.txt");
return (BoolRet);
}
//
//
gboolean filetrash_move_to_trash (gchar *Name)
{
gchar *NameDest = NULL;
gchar *Ptr = NULL;
gchar *LineCommand = NULL;
/*PRINT_FUNC_LF();*/
if ((Ptr = strrchr (Name, '/')))
Ptr ++;
else Ptr = Name;
NameDest = g_strdup_printf ("%s/%s", filetrash_get_trash (), Ptr);
LineCommand = g_strdup_printf ("mv -f \"%s\" \"%s\"", Name, NameDest);
g_print ("To Trash:\n\t%s\n", LineCommand);
system (LineCommand);
g_free (LineCommand);
LineCommand = NULL;
g_free (NameDest);
NameDest = NULL;
return (TRUE);
}
//
//
gchar *filetrash_get_trash (void)
{
if (var_filetrash.Bool_kde_full_session == TRUE)
g_sprintf (var_filetrash.PathNameTrash, "%s/.local/share/Trash/files", getenv ("HOME"));
else g_sprintf (var_filetrash.PathNameTrash, "%s/.Trash", getenv ("HOME"));
return ((gchar *)var_filetrash.PathNameTrash);
}
//
//
void filetrash_test_trash_is_ok (void)
{
gboolean BoolExistTrashOLD;
gboolean BoolExistTrashNEW;
gchar *Path = NULL;
gchar *StrTrash = NULL;
if( TRUE == OptionsCommandLine.BoolVerboseMode )
g_print ("\n[ Trash ]\n");
if (var_filetrash.BoolTrashIsOk == TRUE) return;
var_filetrash.BoolTrashIsOk = TRUE;
var_filetrash.Bool_kde_full_session = filetrash_test_desktop_is_kde ();
if( TRUE == OptionsCommandLine.BoolVerboseMode )
g_print ("KDE SESSION : %s\n", var_filetrash.Bool_kde_full_session ? "TRUE" : "FALSE");
Path = g_strdup_printf ("%s/.Trash", getenv ("HOME"));
BoolExistTrashOLD = libutils_test_dir_exist (Path);
if( TRUE == OptionsCommandLine.BoolVerboseMode ) {
if (BoolExistTrashOLD == TRUE)
g_print ("EXIST ......: %s\n", Path);
else g_print ("NOT EXIST ..: %s\n", Path);
}
g_free (Path);
Path = NULL;
Path = g_strdup_printf ("%s/.local/share/Trash/files", getenv ("HOME"));
BoolExistTrashNEW = libutils_test_dir_exist (Path);
if( TRUE == OptionsCommandLine.BoolVerboseMode ) {
if (BoolExistTrashNEW == TRUE)
g_print ("EXIST ......: %s\n", Path);
else g_print ("NOT EXIST ..: %s\n", Path);
}
g_free (Path);
Path = NULL;
// SI SESSION KDE
if (var_filetrash.Bool_kde_full_session == TRUE) {
if (BoolExistTrashNEW == FALSE) {
StrTrash = g_strdup_printf ("mkdir -p %s", filetrash_get_trash ());
system (StrTrash);
g_free (StrTrash);
StrTrash = NULL;
BoolExistTrashNEW = TRUE;
}
}
// SI PAS SESSION KDE
else {
if (BoolExistTrashNEW == TRUE) {
var_filetrash.Bool_kde_full_session = TRUE;
}
else if (BoolExistTrashOLD == FALSE) {
var_filetrash.Bool_kde_full_session = TRUE;
StrTrash = g_strdup_printf ("mkdir -p %s", filetrash_get_trash ());
system (StrTrash);
g_free (StrTrash);
StrTrash = NULL;
BoolExistTrashNEW = TRUE;
}
else {
}
}
if( TRUE == OptionsCommandLine.BoolVerboseMode )
g_print ("---\nUSE ........: %s\n---\n\n", filetrash_get_trash ());
}
//
//
static void filetrash_thread (void *arg)
{
GList *list = NULL;
DETAIL *detail = NULL;
var_filetrash.bool_thread_end = FALSE;
var_filetrash.bool_pass_conv = TRUE;
list = g_list_first (entetefile);
while (list) {
if (NULL != (detail = (DETAIL *)list->data)) {
if (detail->EtatTrash == FILE_TRASH_VERIF_OK) {
var_filetrash.ElementActif ++;
var_filetrash.BoolEtat = TRUE;
if (filetrash_move_to_trash (detail->namefile) == TRUE) {
detail->BoolRemove = TRUE;
}
}
}
list = g_list_next (list);
}
var_filetrash.bool_pass_conv = FALSE;
var_filetrash.bool_thread_end = TRUE;
pthread_exit(0);
}
//
//
static gint filetrash_timeout (gpointer data)
{
// if (TRUE == WindScan_close_request (void)) {
// var_filetrash.bool_thread_end = TRUE;
// }
if (var_filetrash.bool_pass_conv == TRUE) {
gchar *str = NULL;
gchar *spinner="|/-\\";
gchar foo [ 2 ];
foo [ 0 ] = spinner[var_filetrash.pass_conv++%4];
foo [ 1 ] = '\0';
str = g_strdup_printf ("En cours: %d / %d %s",
var_filetrash.ElementActif,
var_filetrash.nbr_trash,
foo
);
WindScan_set_label (str);
g_free (str);
str = NULL;
}
if (var_filetrash.BoolEtat == TRUE) {
gchar *Str = NULL;
var_filetrash.total_percent = (double)((double)var_filetrash.ElementActif / (double)var_filetrash.nbr_trash);
Str = g_strdup_printf ("%d%%", (int)(var_filetrash.total_percent * 100));
WindScan_set_progress (Str, var_filetrash.total_percent);
g_free (Str);
Str = NULL;
var_filetrash.BoolEtat = FALSE;
return (TRUE);
}
if (var_filetrash.bool_thread_end == TRUE) {
WindScan_close ();
fileaction_set_end (TYPE_TRASH);
gtk_timeout_remove (var_filetrash.handler_timeout);
on_file_button_del_file_clicked (NULL, NULL);
}
return (TRUE);
}
//
//
void filetrash_action (void)
{
// PRINT_FUNC_LF();
var_filetrash.bool_thread_end = FALSE;
var_filetrash.ElementActif = 0;
var_filetrash.BoolEtat = FALSE;
var_filetrash.bool_pass_conv = FALSE;
WindScan_open (_("Trash"), WINDSCAN_PULSE);
WindScan_set_label (_("Trash files ..."));
pthread_create (&var_filetrash.nmr_tid, NULL ,(void *)filetrash_thread, (void *)NULL);
var_filetrash.handler_timeout = gtk_timeout_add (100, filetrash_timeout, 0);
}
//
//
gboolean filetrash_ok (void)
{
GList *list = NULL;
DETAIL *detail = NULL;
gboolean BoolTrash = FALSE;
var_filetrash.nbr_trash = 0;
list = g_list_first (entetefile);
while (list) {
if (NULL != (detail = (DETAIL *)list->data)) {
if (detail->EtatTrash != FILE_TRASH_NONE) {
BoolTrash = TRUE;
var_filetrash.nbr_trash ++;
}
}
list = g_list_next (list);
}
return (BoolTrash);
}
xcfa-4.3.6/src/process.c 0000644 0001750 0001750 00000006710 12122563465 012011 0000000 0000000 /*
* file : process.c
* project : xcfa
* with : Gtk-2
*
* copyright : (C) 2003 - 2013 by Claude Bulin
*
* xcfa - GTK+ implementation of the GNU shell command
* GNU General Public License
*
* This file is part of XCFA.
*
* XCFA is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* at your option) any later version.
*
* XCFA is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with XCFA. If not, see .
*/
#ifdef HAVE_CONFIG_H
#include "../config.h"
#endif
#include
#include
#include
#include
#include
#include
#include
#include
#ifdef ENABLE_STATIC_LIBRARY
#include "../lib/lib.h"
#endif
#include "global.h"
#include "file.h"
#include "bacon.h"
#include "process.h"
typedef struct {
guint handler_timeout;
size_t Size_XCFA_FILE_LOAD;
GSList *gslist;
FILE *fp;
GList *GslistBacon;
} VAR_PROCESS;
VAR_PROCESS VarProcess = {
0,
-1,
NULL,
NULL,
NULL
};
extern BaconMessageConnection *connection;
//
//
// VarProcess.GslistBacon = libutils_remove_glist( VarProcess.GslistBacon )
//
void process_set_list_bacon( gchar *p_Name )
{
VarProcess.GslistBacon = g_list_append( VarProcess.GslistBacon, g_strdup( p_Name ));
}
//
//
void process_debug (gchar *p_trace)
{
FILE *fp = NULL;
fp = fopen ("/tmp/xcfa_trace.txt", "a");
fprintf (fp, "%s\n", p_trace);
fclose (fp);
}
//
//
static gint process_level_timeout_do (gpointer data)
{
#define PROCESS_MAX_CARS 2048
if (VarProcess.Size_XCFA_FILE_LOAD != libutils_get_size_file (XCFA_FILE_LOAD)) {
VarProcess.Size_XCFA_FILE_LOAD = libutils_get_size_file (XCFA_FILE_LOAD);
return (TRUE);
}
// LECTURE DU FICHIER [ XCFA_FILE_LOAD ] ET CONSTRUCTION DU GSLIST
if (NULL != (VarProcess.fp = fopen (XCFA_FILE_LOAD, "r"))) {
gchar buf [ PROCESS_MAX_CARS +1 ];
gchar *ptr = NULL;
while (fgets (buf, PROCESS_MAX_CARS, VarProcess.fp) != NULL) {
if ((ptr = strchr (buf, '\n'))) *ptr = '\0';
VarProcess.gslist = g_slist_append (VarProcess.gslist, g_strdup (buf));
}
fclose (VarProcess.fp);
// ANALYSE DE LA LISTE
fileanalyze_add_file_to_treeview (_PATH_LOAD_FILE_ALL_, VarProcess.gslist);
}
// DESTRUCTION DE LA LISTE
VarProcess.gslist = libutils_remove_gslist (VarProcess.gslist);
// DESTRUCTION DU FICHIER [ XCFA_FILE_LOAD ]
g_unlink (XCFA_FILE_LOAD);
// FIN DU TIMEOUT
gtk_timeout_remove (VarProcess.handler_timeout);
//
bacon_message_connection_free( connection );
#undef PROCESS_MAX_CARS
return (TRUE);
}
//
//
void process_goto_timeout (void)
{
if (TRUE == libutils_test_file_exist (XCFA_FILE_LOAD)) {
gtk_notebook_set_current_page (GTK_NOTEBOOK (GLADE_GET_OBJECT("notebook_general")), NOTEBOOK_FICHIERS);
gtk_notebook_set_current_page (GTK_NOTEBOOK (GLADE_GET_OBJECT("notebook_in_file")), NOTEBOOK_FICHIERS_CONVERSION);
g_usleep (20);
VarProcess.handler_timeout = gtk_timeout_add (400, process_level_timeout_do, 0);
}
else {
bacon_message_connection_free( connection );
}
}
xcfa-4.3.6/src/file_tags.c 0000644 0001750 0001750 00000107500 12123000465 012252 0000000 0000000 /*
* file : file_tags.c
* project : xcfa
* with : Gtk-2
*
* copyright : (C) 2003 - 2013 by Claude Bulin
*
* xcfa - GTK+ implementation of the GNU shell command
* GNU General Public License
*
* This file is part of XCFA.
*
* XCFA is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* at your option) any later version.
*
* XCFA is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with XCFA. If not, see .
*/
// FILE_IS_FLAC
// FILE_IS_MP3
// FILE_IS_OGG
// FILE_IS_MPC
#ifdef HAVE_CONFIG_H
#include "../config.h"
#endif
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#ifdef ENABLE_STATIC_LIBRARY
#include "../lib/lib.h"
#endif
#include "global.h"
#include "configuser.h"
#include "dragNdrop.h"
#include "tags.h"
#include "file.h"
#include
#include "statusbar.h"
VAR_FILE_TAGS var_file_tags;
enum
{
COLUMN_FILETAGS_TYPE = 0,
COLUMN_FILETAGS_TIME,
COLUMN_FILETAGS_NAME,
COLUMN_FILETAGS_COLOR,
COLUMN_FILETAGS_POINTER_STRUCT,
COLUMN_FILETAGS_NUM
};
enum
{
NUM_TREE_FILETAGS_TYPE = 0,
NUM_TREE_FILETAGS_TIME,
NUM_TREE_FILETAGS_NAME,
NUM_TREE_FILETAGS_ALL_COLUMN
};
#define TAG_GENRE 0
#define TAG_TRACK 1
#define TAG_YEAR 2
#define TAG_COMMENT 3
#define TAG_ARTIST 4
#define TAG_ALBUM 5
#define TAG_TITLE 6
gboolean FileTags_bool_changed_OK = FALSE;
//
//
gboolean FileTags_get_line_is_selected (void)
{
GtkTreeModel *model = NULL;
GList *list = NULL;
if (var_file_tags.Adr_TreeView == NULL) return (FALSE);
if (var_file_tags.Adr_Line_Selected == NULL) return (FALSE);
model = gtk_tree_view_get_model (GTK_TREE_VIEW(var_file_tags.Adr_TreeView));
list = gtk_tree_selection_get_selected_rows (var_file_tags.Adr_Line_Selected, &model);
return (list ? TRUE : FALSE);
}
//
//
void FileTags_set_flag_buttons (void)
{
gtk_widget_set_sensitive (GTK_WIDGET (GLADE_GET_OBJECT("button_del_file")), FileTags_get_line_is_selected ());
}
//
//
DETAIL *FileTags_get_line_selected (void)
{
GtkTreeIter iter;
GtkTreeModel *model = NULL;
GList *begin_list = NULL;
GList *list = NULL;
GtkTreePath *path;
DETAIL *detail = NULL;
if (NULL == var_file_tags.Adr_TreeView) return ((DETAIL *)detail);
if (NULL == var_file_tags.Adr_Tree_Model) return ((DETAIL *)detail);
if (NULL == var_file_tags.Adr_Line_Selected) return ((DETAIL *)detail);
model = gtk_tree_view_get_model (GTK_TREE_VIEW(var_file_tags.Adr_TreeView));
if (NULL != (begin_list = gtk_tree_selection_get_selected_rows (var_file_tags.Adr_Line_Selected, &model))) {
list = g_list_first (begin_list);
while (list) {
if (NULL != (path = list->data)) {
gtk_tree_model_get_iter (model, &iter, path);
gtk_tree_model_get (var_file_tags.Adr_Tree_Model, &iter, COLUMN_FILETAGS_POINTER_STRUCT, &detail, -1);
if (NULL != (DETAIL *)detail) return ((DETAIL *)detail);
}
list = g_list_next (list);
}
}
return ((DETAIL *)detail);
}
//
//
TAGS *FileTags_get_tag (DETAIL *detail)
{
INFO_WAV *infoWAV = NULL;
INFO_SHN *infoSHN = NULL;
INFO_WMA *infoWMA = NULL;
INFO_RM *infoRM = NULL;
INFO_DTS *infoDTS = NULL;
INFO_AIFF *infoAIFF = NULL;
INFO_APE *infoAPE = NULL;
INFO_FLAC *infoFLAC = NULL;
INFO_MP3 *infoMP3 = NULL;
INFO_OGG *infoOGG = NULL;
INFO_M4A *infoM4A = NULL;
INFO_AAC *infoAAC = NULL;
INFO_MPC *infoMPC = NULL;
INFO_WAVPACK *infoWAVPACK = NULL;
INFO_AC3 *infoAC3 = NULL;
TAGS *tags = NULL;
if (NULL == detail) {
detail = FileTags_get_line_selected ();
if (NULL == detail) return ((TAGS *)tags);
}
switch (detail->type_infosong_file_is) {
case FILE_IS_NONE :
case FILE_IS_WAVPACK_MD5 :
case FILE_TO_NORMALISE :
case FILE_TO_NORMALISE_COLLECTIF :
case FILE_TO_REPLAYGAIN :
break;
case FILE_IS_WAV :
infoWAV = (INFO_WAV *)detail->info;
tags = (TAGS *)infoWAV->tags;
break;
case FILE_IS_SHN :
infoSHN = (INFO_SHN *)detail->info;
tags = (TAGS *)infoSHN->tags;
break;
case FILE_IS_WMA :
infoWMA = (INFO_WMA *)detail->info;
tags = (TAGS *)infoWMA->tags;
break;
case FILE_IS_RM :
infoRM = (INFO_RM *)detail->info;
tags = (TAGS *)infoRM->tags;
break;
case FILE_IS_DTS :
infoDTS = (INFO_DTS *)detail->info;
tags = (TAGS *)infoDTS->tags;
break;
case FILE_IS_AIFF :
infoAIFF = (INFO_AIFF *)detail->info;
// tags = (TAGS *)infoDTS->tags;
tags = (TAGS *)infoAIFF->tags;
break;
case FILE_IS_APE :
infoAPE = (INFO_APE *)detail->info;
tags = (TAGS *)infoAPE->tags;
break;
case FILE_IS_M4A :
infoM4A = (INFO_M4A *)detail->info;
tags = (TAGS *)infoM4A->tags;
break;
case FILE_IS_VID_M4A :
infoM4A = (INFO_M4A *)detail->info;
tags = (TAGS *)infoM4A->tags;
break;
case FILE_IS_AAC :
infoAAC = (INFO_AAC *)detail->info;
tags = (TAGS *)infoAAC->tags;
break;
case FILE_IS_WAVPACK :
infoWAVPACK = (INFO_WAVPACK *)detail->info;
tags = (TAGS *)infoWAVPACK->tags;
break;
case FILE_IS_AC3 :
infoAC3 = (INFO_AC3 *)detail->info;
tags = (TAGS *)infoAC3->tags;
break;
// FICHIER GERES PAR LA LIBRARIE TagFile
case FILE_IS_FLAC :
infoFLAC = (INFO_FLAC *)detail->info;
tags = (TAGS *)infoFLAC->tags;
break;
case FILE_IS_MP3 :
infoMP3 = (INFO_MP3 *)detail->info;
tags = (TAGS *)infoMP3->tags;
break;
case FILE_IS_OGG :
infoOGG = (INFO_OGG *)detail->info;
tags = (TAGS *)infoOGG->tags;
break;
case FILE_IS_MPC :
infoMPC = (INFO_MPC *)detail->info;
tags = (TAGS *)infoMPC->tags;
break;
}
return ((TAGS *)tags);
}
//
//
void FileTags_set_entry_tag_album (void)
{
TAGS *tags = FileTags_get_tag (NULL);
// gchar *ptr = NULL;
gchar *PtrStr = NULL;
if (NULL == var_file_tags.Adr_entry_tag_album) return;
FileTags_bool_changed_OK = FALSE;
// ptr = g_strdup (tags ? tags->Album : "ééé");
// PtrStr = utils_convert_string (tags->Album, TRUE);
// PtrStr = g_strdup (tags->Album);
PtrStr = utf8_convert_to_utf8 (tags->Album);
gtk_entry_set_text (GTK_ENTRY (var_file_tags.Adr_entry_tag_album), tags ? tags->Album ? PtrStr : "" : "");
g_free (PtrStr);
PtrStr = NULL;
FileTags_bool_changed_OK = TRUE;
}
//
//
void FileTags_set_entry_tag_title (void)
{
TAGS *tags = FileTags_get_tag (NULL);
gchar *PtrStr = NULL;
if (NULL == var_file_tags.Adr_entry_tag_title) return;
FileTags_bool_changed_OK = FALSE;
// PtrStr = utils_convert_string (tags->Title, TRUE);
// PtrStr = g_strdup (tags->Title);
PtrStr = utf8_convert_to_utf8 (tags->Title);
gtk_entry_set_text (GTK_ENTRY (var_file_tags.Adr_entry_tag_title), tags ? tags->Title ? PtrStr : "" : "");
g_free (PtrStr);
PtrStr = NULL;
FileTags_bool_changed_OK = TRUE;
}
//
//
void FileTags_set_entry_tag_artist (void)
{
TAGS *tags = FileTags_get_tag (NULL);
gchar *PtrStr = NULL;
if (NULL == var_file_tags.Adr_entry_tag_artist) return;
FileTags_bool_changed_OK = FALSE;
// PtrStr = utils_convert_string (tags->Artist, TRUE);
// PtrStr = g_strdup (tags->Artist);
PtrStr = utf8_convert_to_utf8 (tags->Artist);
gtk_entry_set_text (GTK_ENTRY (var_file_tags.Adr_entry_tag_artist), tags ? tags->Artist ? PtrStr : "" : "");
g_free (PtrStr);
PtrStr = NULL;
FileTags_bool_changed_OK = TRUE;
}
//
//
void FileTags_set_entry_tag_comment (void)
{
TAGS *tags = FileTags_get_tag (NULL);
gchar *PtrStr = NULL;
if (NULL == var_file_tags.Adr_entry_tag_comment) return;
FileTags_bool_changed_OK = FALSE;
// PtrStr = utils_convert_string (tags->Comment, TRUE);
// PtrStr = g_strdup (tags->Comment);
PtrStr = utf8_convert_to_utf8 (tags->Comment);
gtk_entry_set_text (GTK_ENTRY (var_file_tags.Adr_entry_tag_comment), tags ? tags->Comment ? PtrStr : "" : "");
g_free (PtrStr);
PtrStr = NULL;
FileTags_bool_changed_OK = TRUE;
}
//
//
void FileTags_set_spinbutton_tag_year (void)
{
TAGS *tags = FileTags_get_tag (NULL);
if (NULL == var_file_tags.Adr_spinbutton_tag_year) return;
if (NULL == tags) return;
FileTags_bool_changed_OK = FALSE;
gtk_spin_button_set_value (GTK_SPIN_BUTTON (var_file_tags.Adr_spinbutton_tag_year), (gdouble)tags->IntYear);
FileTags_bool_changed_OK = TRUE;
}
//
//
void FileTags_set_spinbutton_tag_track (void)
{
TAGS *tags = FileTags_get_tag (NULL);
if (NULL == var_file_tags.Adr_spinbutton_tag_track) return;
if (NULL == tags) return;
FileTags_bool_changed_OK = FALSE;
gtk_spin_button_set_value (GTK_SPIN_BUTTON (var_file_tags.Adr_spinbutton_tag_track), (gdouble)tags->IntNumber);
FileTags_bool_changed_OK = TRUE;
}
//
//
void FileTags_set_combobox_tag_genre (void)
{
TAGS *tags = FileTags_get_tag (NULL);
if (NULL == var_file_tags.Adr_combobox_tag_genre) return;
if (NULL == tags) return;
FileTags_bool_changed_OK = FALSE;
gtk_combo_box_set_active (GTK_COMBO_BOX (var_file_tags.Adr_combobox_tag_genre), tags_get_elements_combobox (tags->IntGenre));
FileTags_bool_changed_OK = TRUE;
}
// CETTE FONCTION INDIQUE QU UNE MODIFICATION DE TAG A EU LIEU
// FLAG MODIFIE: : LA COLONNE 'TYPE' EST EN ROUGE GRAS
// APRES UNE SAUVEGARDE : COLONNE 'TYPE' EST EN COULEUR NORMALE
//
void FileTags_affiche_type (void)
{
GtkTreeIter iter;
gboolean valid;
DETAIL *detail = NULL;
TAGS *tags = NULL;
// PRINT_FUNC_LF();
if (NULL == var_file_tags.Adr_Tree_Model) return;
valid = gtk_tree_model_get_iter_first (var_file_tags.Adr_Tree_Model, &iter);
while (valid) {
gtk_tree_model_get (var_file_tags.Adr_Tree_Model, &iter, COLUMN_FILETAGS_POINTER_STRUCT, &detail, -1);
if (detail && (detail->type_infosong_file_is == FILE_IS_FLAC ||
detail->type_infosong_file_is == FILE_IS_MP3 ||
detail->type_infosong_file_is == FILE_IS_OGG ||
detail->type_infosong_file_is == FILE_IS_MPC)) {
if ((tags = (TAGS *)FileTags_get_tag (detail))) {
gchar *old_text = NULL;
GtkTreeModel *model = var_file_tags.Adr_Tree_Model;
gtk_tree_model_get (model, &iter, COLUMN_FILETAGS_TYPE, &old_text, -1);
g_free (old_text);
old_text = NULL;
if (TRUE == tags->bool_save) {
gtk_list_store_set (var_file_tags.Adr_List_Store,
&iter,
COLUMN_FILETAGS_TYPE,
g_strdup_printf ("%s",
tags_get_str_type_file_is (detail->type_infosong_file_is)),
-1);
}
else {
gtk_list_store_set (var_file_tags.Adr_List_Store,
&iter,
COLUMN_FILETAGS_TYPE,
g_strdup (tags_get_str_type_file_is (detail->type_infosong_file_is)),
-1);
}
}
}
valid = gtk_tree_model_iter_next (var_file_tags.Adr_Tree_Model, &iter);
}
}
//
//
void FileTags_set_label_tag_change (void)
{
GList *list = NULL;
DETAIL *detail = NULL;
TAGS *tags = NULL;
gchar *str = NULL;
gint changed = 0;
if (NULL == var_file_tags.Adr_label_tag_change) return;
tags = FileTags_get_tag (NULL);
gtk_widget_set_sensitive (GTK_WIDGET (var_file_tags.Adr_table_tag), tags ? TRUE : FALSE);
if (NULL != tags) {
list = g_list_first (entetefile);
while (list) {
if (NULL != (detail = (DETAIL *)list->data)) {
if (detail->type_infosong_file_is == FILE_IS_FLAC ||
detail->type_infosong_file_is == FILE_IS_MP3 ||
detail->type_infosong_file_is == FILE_IS_OGG ||
detail->type_infosong_file_is == FILE_IS_MPC) {
if (NULL != (tags = (TAGS *)FileTags_get_tag (detail)) && TRUE == tags->bool_save) {
changed ++;
}
}
}
list = g_list_next (list);
}
}
gtk_widget_set_sensitive (GTK_WIDGET (GLADE_GET_OBJECT("button_tag_appliquer")), changed > 0 ? TRUE : FALSE);
gtk_label_set_use_markup (GTK_LABEL (var_file_tags.Adr_label_tag_change), TRUE);
str = g_strdup_printf ("%d ", changed);
gtk_label_set_markup (GTK_LABEL (var_file_tags.Adr_label_tag_change), str);
g_free (str);
str = NULL;
FileTags_affiche_type ();
}
//
//
void FileTags_changed_all_tags (gint TYPE_TAG)
{
GtkTreeIter iter;
GtkTreeModel *model = NULL;
GList *begin_list = NULL;
GList *list = NULL;
GtkTreePath *path;
DETAIL *detail = NULL;
TAGS *tags = NULL;
if (NULL == var_file_tags.Adr_TreeView) return;
if (NULL == var_file_tags.Adr_Tree_Model) return;
if (NULL == var_file_tags.Adr_Line_Selected) return;
model = gtk_tree_view_get_model (GTK_TREE_VIEW(var_file_tags.Adr_TreeView));
begin_list = gtk_tree_selection_get_selected_rows (var_file_tags.Adr_Line_Selected, &model);
list = g_list_first (begin_list);
while (list) {
if (NULL != (path = list->data)) {
gtk_tree_model_get_iter (model, &iter, path);
gtk_tree_model_get (var_file_tags.Adr_Tree_Model, &iter, COLUMN_FILETAGS_POINTER_STRUCT, &detail, -1);
if (NULL != (DETAIL *)detail) {
switch (TYPE_TAG) {
case TAG_GENRE :
if (NULL != (tags = FileTags_get_tag (detail))) {
g_free (tags->Genre);
tags->Genre = NULL;
tags->Genre = g_strdup ((gchar *)gtk_combo_box_get_active_text (var_file_tags.Adr_combobox_tag_genre));
tags->IntGenre = tags_get_num_combobox ((gint)gtk_combo_box_get_active (var_file_tags.Adr_combobox_tag_genre));
tags_set_flag_modification (tags, TRUE);
FileTags_set_label_tag_change ();
}
break;
case TAG_TRACK :
if (NULL != (tags = FileTags_get_tag (detail))) {
g_free (tags->Number);
tags->Number = NULL;
tags->IntNumber = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON(var_file_tags.Adr_spinbutton_tag_track));
tags->Number = g_strdup_printf ("%d", tags->IntNumber);
tags_set_flag_modification (tags, TRUE);
FileTags_set_label_tag_change ();
}
break;
case TAG_YEAR :
if (NULL != (tags = FileTags_get_tag (detail))) {
g_free (tags->Year);
tags->Year = NULL;
tags->IntYear = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON(var_file_tags.Adr_spinbutton_tag_year));
tags->Year = g_strdup_printf ("%d", tags->IntYear);
tags_set_flag_modification (tags, TRUE);
FileTags_set_label_tag_change ();
}
break;
case TAG_COMMENT :
if (NULL != (tags = FileTags_get_tag (detail))) {
g_free (tags->Comment);
tags->Comment = NULL;
tags->Comment = g_strdup ((gchar *)gtk_entry_get_text (GTK_ENTRY (var_file_tags.Adr_entry_tag_comment)));
tags_set_flag_modification (tags, TRUE);
FileTags_set_label_tag_change ();
}
break;
case TAG_ARTIST :
if (NULL != (tags = FileTags_get_tag (detail))) {
g_free (tags->Artist);
tags->Artist = NULL;
tags->Artist = g_strdup ((gchar *)gtk_entry_get_text (GTK_ENTRY (var_file_tags.Adr_entry_tag_artist)));
tags_set_flag_modification (tags, TRUE);
FileTags_set_label_tag_change ();
}
break;
case TAG_ALBUM :
if (NULL != (tags = FileTags_get_tag (detail))) {
g_free (tags->Album);
tags->Album = NULL;
tags->Album = g_strdup ((gchar *)gtk_entry_get_text (GTK_ENTRY (var_file_tags.Adr_entry_tag_album)));
tags_set_flag_modification (tags, TRUE);
FileTags_set_label_tag_change ();
}
break;
case TAG_TITLE :
if (NULL != (tags = FileTags_get_tag (detail))) {
gchar *str = NULL;
gchar *ptr = NULL;
g_free (tags->Title);
tags->Title = NULL;
tags->Title = g_strdup ((gchar *)gtk_entry_get_text (GTK_ENTRY (var_file_tags.Adr_entry_tag_title)));
// Suppression du caracteres '/' interdit si il existe
str = g_strdup (tags->Title);
if (strchr (str, '/')) {
while ((ptr = strchr (str, '/'))) {
strcpy (ptr, ptr+1);
}
gtk_entry_set_text (GTK_ENTRY (var_file_tags.Adr_entry_tag_title), str);
}
g_free (tags->Title);
tags->Title = NULL;
tags->Title = g_strdup (str);
g_free (str);
str = NULL;
tags_set_flag_modification (tags, TRUE);
FileTags_set_label_tag_change ();
}
break;
}
}
}
list = g_list_next (list);
}
}
//
//
void on_entry_tag_title_file_realize (GtkWidget *widget, gpointer user_data)
{
var_file_tags.Adr_entry_tag_title = widget;
}
//
//
void on_entry_tag_title_file_changed (GtkEditable *editable, gpointer user_data)
{
if (NULL == var_file_tags.Adr_entry_tag_title) return;
if (FALSE == FileTags_bool_changed_OK) return;
FileTags_changed_all_tags (TAG_TITLE);
}
//
//
void on_entry_tag_album_file_realize (GtkWidget *widget, gpointer user_data)
{
var_file_tags.Adr_entry_tag_album = widget;
}
//
//
void on_entry_tag_album_file_changed (GtkEditable *editable, gpointer user_data)
{
if (NULL == var_file_tags.Adr_entry_tag_album) return;
if (FALSE == FileTags_bool_changed_OK) return;
FileTags_changed_all_tags (TAG_ALBUM);
}
//
//
void on_entry_tag_artist_file_realize (GtkWidget *widget, gpointer user_data)
{
var_file_tags.Adr_entry_tag_artist = widget;
}
//
//
void on_entry_tag_artist_file_changed (GtkEditable *editable, gpointer user_data)
{
if (NULL == var_file_tags.Adr_entry_tag_artist) return;
if (FALSE == FileTags_bool_changed_OK) return;
FileTags_changed_all_tags (TAG_ARTIST);
}
//
//
void on_entry_tag_comment_file_realize (GtkWidget *widget, gpointer user_data)
{
var_file_tags.Adr_entry_tag_comment = widget;
}
//
//
void on_entry_tag_comment_file_changed (GtkEditable *editable, gpointer user_data)
{
if (NULL == var_file_tags.Adr_entry_tag_comment) return;
if (FALSE == FileTags_bool_changed_OK) return;
FileTags_changed_all_tags (TAG_COMMENT);
}
//
//
void on_spinbutton_tag_year_file_realize (GtkWidget *widget, gpointer user_data)
{
var_file_tags.Adr_spinbutton_tag_year = widget;
}
//
//
void on_spinbutton_tag_year_file_changed (GtkWidget *widget, gpointer user_data)
{
if (NULL == var_file_tags.Adr_spinbutton_tag_year) return;
if (FALSE == FileTags_bool_changed_OK) return;
FileTags_changed_all_tags (TAG_YEAR);
}
//
//
void on_combobox_tag_genre_file_realize (GtkWidget *widget, gpointer user_data)
{
libcombo_alloc (GTK_COMBO_BOX (widget));
tags_set_elements_combobox (widget);
gtk_combo_box_set_wrap_width (GTK_COMBO_BOX (widget), 4);
gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 0);
var_file_tags.Adr_combobox_tag_genre = GTK_COMBO_BOX (widget);
}
//
//
void on_combobox_tag_genre_file_changed (GtkComboBox *combobox, gpointer user_data)
{
if (NULL == var_file_tags.Adr_combobox_tag_genre) return;
if (FALSE == FileTags_bool_changed_OK) return;
FileTags_changed_all_tags (TAG_GENRE);
}
//
//
void on_spinbutton_tag_track_file_realize (GtkWidget *widget, gpointer user_data)
{
var_file_tags.Adr_spinbutton_tag_track = widget;
}
//
//
void on_spinbutton_tag_track_file_changed (GtkWidget *widget, gpointer user_data)
{
if (NULL == var_file_tags.Adr_spinbutton_tag_track) return;
if (FALSE == FileTags_bool_changed_OK) return;
FileTags_changed_all_tags (TAG_TRACK);
}
//
//
void FileTags_appliquer_clicked (void)
{
TAGS *tags = FileTags_get_tag (NULL);
TagLib_File *file;
TagLib_Tag *tag;
DETAIL *detail = NULL;
GList *list = NULL;
gchar *Ptr = NULL;
list = g_list_first (entetefile);
while (list) {
if (NULL != (detail = (DETAIL *)list->data)) {
if (detail->type_infosong_file_is == FILE_IS_FLAC ||
detail->type_infosong_file_is == FILE_IS_MP3 ||
detail->type_infosong_file_is == FILE_IS_OGG ||
detail->type_infosong_file_is == FILE_IS_MPC) {
if ((tags = (TAGS *)FileTags_get_tag (detail)) && tags->bool_save == TRUE) {
/*
g_print ("\n");
g_print ("Album = %s\n", tags->Album);
g_print ("Artist = %s\n", tags->Artist);
g_print ("Title = %s\n", tags->Title);
g_print ("Comment = %s\n", tags->Comment);
g_print ("Genre = %s [%d]\n", tags->Genre, tags->IntGenre);
g_print ("Year = %s [%d]\n", tags->Year, tags->IntYear);
g_print ("Number = %s [%d]\n", tags->Number, tags->IntNumber);
g_print ("\n");
*/
if ((file = taglib_file_new (detail->namefile))) {
tag = taglib_file_tag(file);
/*
// Ptr = utils_convert_from_utf8 (tags->Title);
Ptr = tags->Title;
taglib_tag_set_title (tag, Ptr);
// g_free (Ptr); Ptr = NULL;
// Ptr = utils_convert_from_utf8 (tags->Artist);
Ptr = tags->Artist;//
taglib_tag_set_artist (tag, Ptr);
// g_free (Ptr); Ptr = NULL;
// Ptr = utils_convert_from_utf8 (tags->Album);
Ptr = tags->Album;
taglib_tag_set_album (tag, Ptr);
// g_free (Ptr); Ptr = NULL;
// Ptr = utils_convert_from_utf8 (tags->Comment);
Ptr = tags->Comment;
taglib_tag_set_comment (tag, Ptr);
// g_free (Ptr); Ptr = NULL;
// Ptr = utils_convert_from_utf8 (tags->Genre);
Ptr = tags->Genre;
taglib_tag_set_genre (tag, Ptr);
// g_free (Ptr); Ptr = NULL;
taglib_tag_set_year (tag, tags->IntYear);
taglib_tag_set_track (tag, tags->IntNumber);
*/
// -----------------
Ptr = utf8_convert_to_utf8 (tags->Title);
taglib_tag_set_title (tag, Ptr);
g_free (Ptr); Ptr = NULL;
Ptr = utf8_convert_to_utf8 (tags->Artist);
taglib_tag_set_artist (tag, Ptr);
g_free (Ptr); Ptr = NULL;
Ptr = utf8_convert_to_utf8 (tags->Album);
taglib_tag_set_album (tag, Ptr);
g_free (Ptr); Ptr = NULL;
Ptr = utf8_convert_to_utf8 (tags->Comment);
taglib_tag_set_comment (tag, Ptr);
g_free (Ptr); Ptr = NULL;
Ptr = utf8_convert_to_utf8 (tags->Genre);
taglib_tag_set_genre (tag, Ptr);
g_free (Ptr); Ptr = NULL;
taglib_tag_set_year (tag, tags->IntYear);
taglib_tag_set_track (tag, tags->IntNumber);
taglib_file_save(file);
taglib_tag_free_strings();
taglib_file_free (file);
}
tags->bool_save = FALSE;
}
}
}
list = g_list_next (list);
}
gtk_widget_set_sensitive (GTK_WIDGET (GLADE_GET_OBJECT("button_tag_appliquer")), FALSE);
gtk_label_set_use_markup (GTK_LABEL (var_file_tags.Adr_label_tag_change), TRUE);
gtk_label_set_markup (GTK_LABEL (var_file_tags.Adr_label_tag_change), "0");
FileTags_affiche_type ();
}
//
//
void on_label_tag_change_realize (GtkWidget *widget, gpointer user_data)
{
var_file_tags.Adr_label_tag_change = widget;
}
//
//
void on_table_tag_realize (GtkWidget *widget, gpointer user_data)
{
var_file_tags.Adr_table_tag = widget;
}
// MARQUER LES LIGNES POUR LA DESTRUCTION
//
gboolean FileTags_del_file_clicked (void)
{
GtkTreeIter iter;
GtkTreeModel *model = NULL;
GList *BeginList = NULL;
GList *list = NULL;
GtkTreePath *path;
DETAIL *detail = NULL;
gboolean BoolPrint = FALSE;
// RECUP. LIGNES EN SELECTION POUR DESTRUCTION
model = gtk_tree_view_get_model (GTK_TREE_VIEW(var_file_tags.Adr_TreeView));
if ((BeginList = gtk_tree_selection_get_selected_rows (var_file_tags.Adr_Line_Selected, &model))) {
BoolPrint = TRUE;
list = g_list_first (BeginList);
while (list) {
if (NULL != (path = list->data)) {
gtk_tree_model_get_iter (model, &iter, path);
gtk_tree_model_get (var_file_tags.Adr_Tree_Model, &iter, COLUMN_FILETAGS_POINTER_STRUCT, &detail, -1);
// MARQUER LA LIGNE DU GLIST A DETRUIRE AVANT LE REAFFICHAGE
if (NULL != detail) detail->BoolRemove = TRUE;
}
list = g_list_next (list);
}
// gtk_tree_selection_unselect_all (var_file_tags.Adr_Line_Selected);
}
return (BoolPrint);
}
// FILE_IS_FLAC
// FILE_IS_MP3
// FILE_IS_OGG
// FILE_IS_MPC
//
//
void FileTags_affiche_glist( void )
{
DETAIL *detail = NULL;
GList *List = NULL;
GtkTreeIter iter;
GtkAdjustment *Adj = NULL;
gdouble AdjValue;
gint Line = 0; // LIGNE EN COURS
gchar *NameDest = NULL;
gint NumLineSelected = -1;
gboolean BoolNumLineSelected = FALSE;
// PRINT_FUNC_LF();
// RECUP SELECTION
//
NumLineSelected = libutils_get_first_line_is_selected( var_file_tags.Adr_Line_Selected, var_file_tags.Adr_Tree_Model );
gtk_tree_selection_unselect_all (var_file_tags.Adr_Line_Selected);
// DELETE TREEVIEW
//
gtk_list_store_clear (GTK_LIST_STORE (var_file_tags.Adr_List_Store));
// COORDONNEES POUR UN REAJUSTEMENT VISUEL DE LA PAGE
//
Adj = gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (var_file_tags.Adr_scroll));
AdjValue = gtk_adjustment_get_value (Adj);
// AFFICHAGE DE LA LISTE
//
Line = 0;
List = g_list_first (entetefile);
while (List) {
if (NULL != ((detail = (DETAIL *)List->data)) && FALSE == detail->BoolRemove) {
if (FILE_IS_FLAC != detail->type_infosong_file_is &&
FILE_IS_MP3 != detail->type_infosong_file_is &&
FILE_IS_OGG != detail->type_infosong_file_is &&
FILE_IS_MPC != detail->type_infosong_file_is) {
List = g_list_next (List);
continue;
}
NameDest = libutils_get_name_without_ext_with_amp (detail->namefile);
gtk_list_store_append (var_file_tags.Adr_List_Store, &iter);
gtk_list_store_set (var_file_tags.Adr_List_Store, &iter,
COLUMN_FILETAGS_TYPE, tags_get_str_type_file_is (detail->type_infosong_file_is),
COLUMN_FILETAGS_TIME, file_get_time (detail),
COLUMN_FILETAGS_NAME, NameDest,
COLUMN_FILETAGS_COLOR, &YellowColor,
COLUMN_FILETAGS_POINTER_STRUCT, detail,
-1);
g_free (NameDest); NameDest = NULL;
// AFFICHE LES EVENTUELLES LIGNES EN SELECTION
//
if( NumLineSelected == Line ) {
gtk_tree_selection_select_iter (var_file_tags.Adr_Line_Selected, &iter);
BoolNumLineSelected = TRUE;
}
Line ++;
}
List = g_list_next (List);
}
// SUPPRESSON TABLEAU DES EVENTUELLES LIGNES EN SELECTION
//
if( NumLineSelected == -1 ) {
if (gtk_tree_model_get_iter_first (var_file_tags.Adr_Tree_Model, &iter)) {
gtk_tree_selection_select_iter (var_file_tags.Adr_Line_Selected, &iter);
BoolNumLineSelected = TRUE;
}
}
if( NumLineSelected > 0 && NULL != entetefile && BoolNumLineSelected == FALSE ) {
gtk_tree_selection_select_iter (var_file_tags.Adr_Line_Selected, &iter);
}
// REAJUSTEMENT DE LA LISTE
//
gtk_adjustment_set_value (Adj, AdjValue);
gtk_scrolled_window_set_vadjustment (GTK_SCROLLED_WINDOW (var_file_tags.Adr_scroll), Adj);
FileTags_set_flag_buttons ();
FileTags_set_label_tag_change ();
}
//
//
void FileTags_changed_selection_row (GtkTreeSelection *selection, gpointer data)
{
var_file_tags.Adr_Line_Selected = selection;
if (NOTEBOOK_FICHIERS == Config.NotebookGeneral && NOTEBOOK_FICHIERS_TAGS == Config.NotebookFile) {
if (NULL != FileTags_get_line_selected ()) {
FileTags_set_entry_tag_album ();
FileTags_set_entry_tag_title ();
FileTags_set_entry_tag_artist ();
FileTags_set_entry_tag_comment ();
FileTags_set_spinbutton_tag_year ();
FileTags_set_spinbutton_tag_track ();
FileTags_set_combobox_tag_genre ();
}
FileTags_set_label_tag_change ();
}
FileTags_set_flag_buttons ();
}
//
//
gboolean FileTags_key_press_event (GtkWidget *widget, GdkEventKey *event, gpointer user_data)
{
if( TRUE == keys.BoolGDK_Control_A ) { // CONTROL_A
gtk_tree_selection_unselect_all (var_file_tags.Adr_Line_Selected);
gtk_tree_selection_select_all (var_file_tags.Adr_Line_Selected);
}
if (keys.keyval == GDK_Delete) {
GtkTreeIter iter;
if (gtk_tree_model_get_iter_first (var_file_tags.Adr_Tree_Model, &iter)) {
on_file_button_del_file_clicked (NULL, NULL);
return (FALSE);
}
}
return (TRUE);
}
// AFFICHAGE DU NOM COMPLET DU FICHIER SI SURVOL PAR LE CURSEUR SOURIS DU CHAMPS 'Nom'
//
gboolean FileTags_event (GtkWidget *treeview, GdkEvent *event, gpointer user_data)
{
gint x, y;
GdkModifierType state;
GtkTreePath *path;
GtkTreeViewColumn *column;
GtkTreeViewColumn *ColumnDum;
GtkTreeIter iter;
GtkTreeModel *model = (GtkTreeModel *)user_data;
DETAIL *detail = NULL;
gint Pos_X = 0, Pos_Y = 0;
gint i;
gboolean BoolSelectColNom = FALSE;
// TODO : @Tetsumaki http://forum.ubuntu-fr.org/viewtopic.php?pid=3889380#p3889380
// return (FALSE);
// PRINT_FUNC_LF();
// SI PAS DANS LE TREEVIEW
gdk_window_get_pointer (((GdkEventButton*)event)->window, &x, &y, &state);
if (FALSE == gtk_tree_view_get_path_at_pos (GTK_TREE_VIEW(treeview),
x, y,
&path, &column, &Pos_X, &Pos_Y)) {
StatusBar_set_mess( NOTEBOOK_FICHIERS, _STATUSBAR_SIMPLE_, "" );
return (FALSE);
}
// RECUPERATION DE LA STRUCTURE POINTEE PAR LE CURSEUR SOURIS
gtk_tree_model_get_iter (model, &iter, path);
gtk_tree_model_get (var_file_tags.Adr_Tree_Model, &iter, COLUMN_FILETAGS_POINTER_STRUCT, &detail, -1);
if (NULL == detail) return (FALSE);
// DANS TOUS LES CAS, EFFACE LA BARRE DE TACHE
StatusBar_set_mess( NOTEBOOK_FICHIERS, _STATUSBAR_SIMPLE_, "" );
/* IDEE POUR REMPLACER LES COMPARAISON PAR NOMS. EXEMPLES:
* PLAY = 0
* TRASH = 1
* TYPE = 2
* etc ...
* NOTA:
* CET ALGO PERMET DE RENOMMER AISEMENT LES ENTETES DE COLONNES DANS TOUTES LES LANGUES: FR, EN, DE, ...
*/
for (i = 0; i < NUM_TREE_FILETAGS_ALL_COLUMN; i ++) {
ColumnDum = gtk_tree_view_get_column (GTK_TREE_VIEW(treeview), i);
if (ColumnDum == column) {
switch ( i ) {
case NUM_TREE_FILETAGS_NAME : BoolSelectColNom = TRUE; break;
default:
StatusBar_set_mess( NOTEBOOK_FICHIERS, _STATUSBAR_SIMPLE_, "");
StatusBar_puts();
return (FALSE);
}
// LA COLONNE ES TROUVEE ... SRTIE DE LA BOUCLE
break;
}
}
if (BoolSelectColNom) {
StatusBar_set_mess( NOTEBOOK_FICHIERS, _STATUSBAR_SIMPLE_, detail->namefile );
}
return (FALSE);
}
//
//
static void FileTags_drag_data_received (GtkWidget *widget,
GdkDragContext *drag_context,
gint x,
gint y,
GtkSelectionData *data,
guint info,
guint time)
{
/* PRINT_FUNC_LF(); */
/* Une copie ne peut aller vers elle meme !!! */
if (gtk_drag_get_source_widget(drag_context) != widget) {
dragndrop_list_drag_data (widget, (gchar *)data->data);
}
}
//
//
static void FileTags_drag_data_drop (GtkWidget *widget,
GdkDragContext *dc,
GtkSelectionData *selection_data,
guint info,
guint t,
gpointer data)
{
GtkTreeIter iter;
GtkTreeModel *model = NULL;
GList *begin_list = NULL;
GList *list = NULL;
GtkTreePath *path;
DETAIL *detail = NULL;
gchar *text = NULL;
/* PRINT_FUNC_LF(); */
model = gtk_tree_view_get_model (GTK_TREE_VIEW(widget));
begin_list = gtk_tree_selection_get_selected_rows (var_file_tags.Adr_Line_Selected, &model);
list = g_list_first (begin_list);
while (list) {
if ((path = list->data)) {
gtk_tree_model_get_iter (model, &iter, path);
gtk_tree_model_get (var_file_tags.Adr_Tree_Model, &iter, COLUMN_FILETAGS_POINTER_STRUCT, &detail, -1);
// DEBUG DRAG AND DROP
// [ Tue, 03 May 2011 17:39:08 +0200 ]
// XCFA-4.1.0
// -----------------------------------------------------------
// OLD CODE:
// text = g_strdup( detail->namefile );
// NEW_CODE:
text = g_strdup_printf( "file://%s", detail->namefile );
gdk_drag_status (dc, GDK_ACTION_COPY, t);
gtk_selection_data_set( selection_data,
// GDK_SELECTION_TYPE_STRING,
selection_data->target,
8,
(guchar *)text,
strlen( text )
);
g_free (text);
text = NULL;
}
list = g_list_next (list);
}
}
//
//
void FileTags_add_columns_scrolledwindow (GtkTreeView *treeview)
{
GtkTreeModel *model = gtk_tree_view_get_model (treeview);
GtkCellRenderer *renderer;
GtkTreeViewColumn *column;
// TODO : @Tetsumaki http://forum.ubuntu-fr.org/viewtopic.php?pid=3889380#p3889380
// SIGNAL : 'event'
g_signal_connect(G_OBJECT(treeview),
"event",
(GCallback) FileTags_event,
model);
// SIGNAL 'key-press-event'
g_signal_connect(G_OBJECT(treeview),
"key-press-event",
(GCallback) FileTags_key_press_event,
model);
// SIGNAL : Ligne actuellement selectionnee 'changed'
var_file_tags.Adr_Line_Selected = gtk_tree_view_get_selection(GTK_TREE_VIEW(treeview));
g_signal_connect(G_OBJECT(var_file_tags.Adr_Line_Selected),
"changed",
G_CALLBACK(FileTags_changed_selection_row),
"1");
// Drag and drop support
// SIGNAL : 'drag-data-received'
gtk_drag_dest_set (GTK_WIDGET (treeview),
GTK_DEST_DEFAULT_MOTION |
GTK_DEST_DEFAULT_DROP,
drag_types, n_drag_types,
GDK_ACTION_COPY| GDK_ACTION_MOVE );
g_signal_connect(G_OBJECT(treeview),
"drag-data-received",
G_CALLBACK(FileTags_drag_data_received),
NULL);
gtk_drag_source_set(
GTK_WIDGET(treeview),
GDK_BUTTON1_MASK | GDK_BUTTON2_MASK | GTK_DEST_DEFAULT_MOTION | GTK_DEST_DEFAULT_DROP,
drag_types, n_drag_types,
GDK_ACTION_MOVE | GDK_ACTION_COPY | GDK_ACTION_DEFAULT
);
g_signal_connect(G_OBJECT(treeview),
"drag-data-get",
G_CALLBACK(FileTags_drag_data_drop),
treeview);
// COLUMN_FILETAGS_TYPE
renderer = gtk_cell_renderer_text_new ();
g_object_set (renderer, "xalign", 0.5, NULL);
// var_file_tags.Adr_ColumnFileWavNewHertz =
var_file_tags.Adr_ColumnFileTagsType =
column = gtk_tree_view_column_new_with_attributes (_("Type"),
renderer,
"markup", COLUMN_FILETAGS_TYPE,
NULL);
gtk_tree_view_column_set_sizing (GTK_TREE_VIEW_COLUMN (column),
GTK_TREE_VIEW_COLUMN_FIXED);
gtk_tree_view_column_set_fixed_width (GTK_TREE_VIEW_COLUMN (column), 90);
gtk_tree_view_column_set_alignment (GTK_TREE_VIEW_COLUMN (column), 0.5);
gtk_tree_view_append_column (treeview, column);
// COLUMN_FILETAGS_TIME
renderer = gtk_cell_renderer_text_new ();
g_object_set (renderer, "xalign", 0.5, NULL);
// var_file_tags.Adr_ColumnFileWavNewHertz =
var_file_tags.Adr_ColumnFileTagsTime =
column = gtk_tree_view_column_new_with_attributes (_("Temps"),
renderer,
"markup", COLUMN_FILETAGS_TIME,
NULL);
gtk_tree_view_column_set_sizing (GTK_TREE_VIEW_COLUMN (column),
GTK_TREE_VIEW_COLUMN_FIXED);
gtk_tree_view_column_set_fixed_width (GTK_TREE_VIEW_COLUMN (column), 90);
gtk_tree_view_column_set_alignment (GTK_TREE_VIEW_COLUMN (column), 0.5);
gtk_tree_view_append_column (treeview, column);
// COLUMN_FILETAGS_NAME
var_file_tags.Renderer =
renderer = gtk_cell_renderer_text_new ();
g_object_set (renderer, "xalign", 0.5, NULL);
// var_file_tags.Adr_ColumnFileWavNewHertz =
var_file_tags.Adr_ColumnFileTagsName =
column = gtk_tree_view_column_new_with_attributes (_("Nom"),
renderer,
"markup", COLUMN_FILETAGS_NAME,
"background-gdk", COLUMN_FILETAGS_COLOR,
NULL);
gtk_tree_view_column_set_sizing (GTK_TREE_VIEW_COLUMN (column),
GTK_TREE_VIEW_COLUMN_FIXED);
gtk_tree_view_column_set_fixed_width (GTK_TREE_VIEW_COLUMN (column), 90);
gtk_tree_view_column_set_alignment (GTK_TREE_VIEW_COLUMN (column), 0.5);
gtk_tree_view_append_column (treeview, column);
}
//
//
void on_scrolledwindow_tags_file_realize (GtkWidget *widget, gpointer user_data)
{
GtkListStore *store;
GtkTreeModel *model;
GtkWidget *treeview;
var_file_tags.Adr_scroll = widget;
var_file_tags.Adr_List_Store = store =
gtk_list_store_new ( COLUMN_FILETAGS_NUM, // TOTAL NUMBER
G_TYPE_STRING, // COLUMN_FILETAGS_TYPE
G_TYPE_STRING, // COLUMN_FILETAGS_TIME
G_TYPE_STRING, // COLUMN_FILETAGS_NAME
GDK_TYPE_COLOR, // COLUMN_FILETAGS_COLOR
G_TYPE_POINTER // COLUMN_FILETAGS_POINTER_STRUCT
);
var_file_tags.Adr_Tree_Model = model = GTK_TREE_MODEL (store);
var_file_tags.Adr_TreeView =
treeview = gtk_tree_view_new_with_model (model);
gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (treeview), TRUE);
gtk_tree_selection_set_mode (gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview)), GTK_SELECTION_MULTIPLE); // GTK_SELECTION_BROWSE MULTIPLE
g_object_unref (model);
gtk_container_add (GTK_CONTAINER (widget), treeview);
FileTags_add_columns_scrolledwindow (GTK_TREE_VIEW (treeview));
gtk_widget_show_all (widget);
}
xcfa-4.3.6/src/poche.c 0000644 0001750 0001750 00000105567 12122563465 011443 0000000 0000000 /*
* file : poche.c
* project : xcfa
* with : Gtk-2
*
* copyright : (C) 2003 - 2013 by Claude Bulin
*
* xcfa - GTK+ implementation of the GNU shell command
* GNU General Public License
*
* This file is part of XCFA.
*
* XCFA is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* at your option) any later version.
*
* XCFA is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with XCFA. If not, see .
*/
#ifdef HAVE_CONFIG_H
#include "../config.h"
#endif
#include
#include
#include
#include
#include
#include
#include
#include
#include // M_PI
#include
#include
#include
#include
#include
#ifdef ENABLE_STATIC_LIBRARY
#include "../lib/lib.h"
#endif
#include "global.h"
#include "popup.h"
#include "cursor.h"
#include "dragNdrop.h"
#include "fileselect.h"
#include "configuser.h"
#include "cd_curl.h"
#include "poche.h"
VIEW view = {
FALSE, // BoolAccessChanged; // COMBOBOX changed is TRUE
NULL, // *AdrComboBoxChoice; //
NULL, // *AdrEntrySearchImgWeb; // Adresse saisie image web
NULL, // *AdrEntryNameFileSave; // Adresse saisie nom fichier image
NULL, // *AdrEntryTitleCD; // Adresse saisie titre du CD
NULL, // *TitleCD; //
NULL, // *Buffer_none; //
NULL, // *Buffer_title; //
NULL, // *Buffer_title_time; //
NULL, // *Buffer_artist_title_time; //
NULL, // *AdrDrawingarea; // Adresse de la surface
FALSE, // BoolScaleAdjust; // TRUE = ajustement de l'echelle avec la surface de la fentre
NULL, // *image; // Adresse de l'image
1.0, // scale; // Pourcentage de surface de l'image
0.0, // x0; // Pos X
0.0, // y0; // Pos Y
0, // image_width; // Width
0, // image_height; // Height
NULL, // *ListImage; // Pointeur de structure IMAGE pour AdrDrawingarea
FALSE, // BoolEventButtonPress; // TRUE == BOUTON SOURIS PRESSED
NULL, // *GetImage; // Adresse de l'image en selection
IMG_NONE, // ImgCorner; // See IMG_CORNER
NULL, // *Adr_viewport_image_preview; // Adresse viewport
NULL, // *Adr_table; // Adresse table contenu dans le viewport
NULL, // *glist; // Contient les structures GLIST_POCHETTE
NULL, // *AdrTextview; // Adresse textview
FALSE, // BoolSaveToFile; // TRUE si sauvegarde vers fichier
// HandleMove; // Les coordonnees de saisie de l'image
};
gdouble oldX = -1.0;
gdouble oldY = -1.0;
//
//
void poche_remove_view (void)
{
if( NULL != view.TitleCD ) {
g_free( view.TitleCD );
view.TitleCD = NULL;
}
if( NULL != view.Buffer_none ) {
g_free( view.Buffer_none );
view.Buffer_none = NULL;
}
if( NULL != view.Buffer_title ) {
g_free( view.Buffer_title );
view.Buffer_title = NULL;
}
if( NULL != view.Buffer_title_time ) {
g_free( view.Buffer_title_time );
view.Buffer_title_time = NULL;
}
if( NULL != view.Buffer_artist_title_time ) {
g_free( view.Buffer_artist_title_time );
view.Buffer_artist_title_time = NULL;
}
}
//
//
void poche_remove_ListImage( void )
{
GList *List = NULL;
IMAGE *Image = NULL;
gint NbrFree = 0;
List = g_list_first( view.ListImage );
while( List ) {
if( NULL != (Image = (IMAGE *)List->data )) {
if( NULL != Image->Texte ) {
g_free( Image->Texte );
Image->Texte = NULL;
}
if( NULL != Image->FontName ) {
g_free( Image->FontName );
Image->FontName = NULL;
}
if( NULL != Image->Pixbuf ) {
g_object_unref( Image->Pixbuf );
Image->Pixbuf = NULL;
}
if( NULL != Image->PixbufOriginal ) {
g_object_unref( Image->PixbufOriginal );
Image->PixbufOriginal = NULL;
}
g_free( Image );
List->data = Image = NULL;
NbrFree ++;
}
List = g_list_next( List );
}
g_list_free( view.ListImage );
view.ListImage = NULL;
if( TRUE == OptionsCommandLine.BoolVerboseMode )
g_print( "\tRemove: %d\n", NbrFree );
}
//
//
gboolean poche_is_erase_active( void )
{
GList *List = NULL;
IMAGE *Image = NULL;
gboolean BoolEraseActive = FALSE;
List = g_list_first( view.ListImage );
while( List ) {
if( NULL != (Image = (IMAGE *)List->data ) && FALSE == Image->BoolStructRemove ) {
if( TRUE == Image->BoolIsSelected ) return( TRUE );
}
List = g_list_next( List );
}
return( BoolEraseActive );
}
//
//
void poche_set_flag_buttons (void )
{
IMAGE *Image = poche_get_struct_selected_is_txt();
gtk_widget_set_sensitive( GTK_WIDGET(GLADE_GET_OBJECT("button_erase")), poche_is_erase_active() );
gtk_widget_set_sensitive( GTK_WIDGET(GLADE_GET_OBJECT("button_load_file")), TRUE );
gtk_widget_set_sensitive( GTK_WIDGET(GLADE_GET_OBJECT("button_save")), *pochetxt_get_ptr_entry_name_file_to_save() == '\0' ? FALSE : TRUE );
gtk_widget_set_sensitive( GTK_WIDGET(GLADE_GET_OBJECT("button_moins")), TRUE );
gtk_widget_set_sensitive( GTK_WIDGET(GLADE_GET_OBJECT("button_normal")), TRUE );
gtk_widget_set_sensitive( GTK_WIDGET(GLADE_GET_OBJECT("button_plus")), TRUE );
gtk_widget_set_sensitive( GTK_WIDGET(GLADE_GET_OBJECT("button_ajuster")), TRUE );
gtk_widget_set_sensitive( GTK_WIDGET(GLADE_GET_OBJECT("button_change_font")), poche_get_struct_selected_is_txt() == NULL ? FALSE : TRUE );
gtk_widget_set_sensitive( GTK_WIDGET(GLADE_GET_OBJECT("togglebutton_font_bold")), poche_get_struct_selected_is_txt() == NULL ? FALSE : TRUE );
gtk_widget_set_sensitive( GTK_WIDGET(GLADE_GET_OBJECT("togglebutton_font_italic")), poche_get_struct_selected_is_txt() == NULL ? FALSE : TRUE );
gtk_widget_set_sensitive( GTK_WIDGET(GLADE_GET_OBJECT("button_import_img_web")), *pochetxt_get_ptr_entry_img_web() == '\0' ? FALSE : TRUE );
gtk_widget_set_sensitive( GTK_WIDGET(GLADE_GET_OBJECT("combobox_choice_get_cd")), (NULL != view.Buffer_none && NULL != Image) ? TRUE : FALSE );
gtk_widget_set_sensitive( GTK_WIDGET(GLADE_GET_OBJECT("frame_texte_poche")), (NULL != Image) ? TRUE : FALSE );
gtk_widget_set_sensitive( GTK_WIDGET(GLADE_GET_OBJECT("button_import_title_cd")), (NULL != view.Buffer_none) ? TRUE : FALSE );
if( NULL != Image ) {
gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON(GLADE_GET_OBJECT("togglebutton_font_bold")), Image->BoolFontBold );
gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON(GLADE_GET_OBJECT("togglebutton_font_italic")), Image->BoolFontItalic );
}
else {
gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON(GLADE_GET_OBJECT("togglebutton_font_bold")), FALSE );
gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON(GLADE_GET_OBJECT("togglebutton_font_italic")), FALSE );
}
}
//
//
void poche_print_zoom_changed( gdouble p_zoom_scale )
{
gchar *Str = NULL;
Str = g_strdup_printf( " %3.0f%% ", 100.0 * p_zoom_scale );
gtk_label_set_text( GTK_LABEL(GLADE_GET_OBJECT("label_percent")), Str );
// g_print( "scale = %f %3.0f%% \n", view.scale, 100.0 * view.scale );
g_free( Str );
Str = NULL;
}
//
//
void poche_set_size_request( void )
{
gtk_widget_set_size_request( view.AdrDrawingarea, (gint)((gdouble)view.image_width * view.scale), (gint)((gdouble)view.image_height * view.scale) );
}
//
//
gboolean on_drawingareamain_expose_event( GtkWidget *widget, GdkEventExpose *event, gpointer user_data )
{
pochedraw_paint( NULL );
poche_set_flag_buttons();
return( FALSE );
}
//
//
IMAGE *poche_get_is_move( gdouble x, gdouble y )
{
cairo_t *cr;
GdkRectangle zone;
GdkRegion *region = NULL;
IMAGE *Image = NULL;
GList *List = NULL;
gboolean BoolInZone = FALSE;
cr = gdk_cairo_create( view.AdrDrawingarea->window );
cairo_scale (cr, view.scale, view.scale);
cairo_translate (cr, view.x0, view.y0);
List = g_list_last( view.ListImage );
while( List ) {
if( NULL != (Image = (IMAGE *)List->data ) && FALSE == Image->BoolStructRemove ) {
BoolInZone = FALSE;
// IMG_MOVE
zone.x = Image->x0;
zone.y = Image->y0;
zone.width = Image->image_width;
zone.height = Image->image_height;
region = gdk_region_rectangle (&zone);
if( gdk_region_point_in( region, x, y )) {
BoolInZone = TRUE;
Image->XPointer = x;
Image->YPointer = y;
}
gdk_region_destroy (region);
if( TRUE == BoolInZone ) {
cairo_destroy( cr );
return( Image );
}
}
List = g_list_previous( List );
}
cairo_destroy( cr );
return( NULL );
}
//
//
IMAGE *poche_get( gdouble x, gdouble y )
{
cairo_t *cr;
GdkRegion *region = NULL;
IMAGE *Image = NULL;
GList *List = NULL;
gboolean BoolInZone = FALSE;
gint CptImgCorner;
cr = gdk_cairo_create( view.AdrDrawingarea->window );
cairo_scale (cr, view.scale, view.scale);
cairo_translate (cr, view.x0, view.y0);
List = g_list_last( view.ListImage );
while( List ) {
if( NULL != (Image = (IMAGE *)List->data ) && FALSE == Image->BoolStructRemove ) {
if( TRUE != Image->BoolIsSelected ) {
List = g_list_previous( List );
continue;
}
BoolInZone = FALSE;
pochedraw_get_handle_move( Image, TRUE );
for( CptImgCorner = 0; CptImgCorner < IMG_SIZE; CptImgCorner ++ ) {
region = gdk_region_rectangle( &view.HandleMove.zone [ CptImgCorner ] );
if( gdk_region_point_in( region, x, y )) {
BoolInZone = TRUE;
Image->XPointer = x;
Image->YPointer = y;
}
gdk_region_destroy (region);
if( TRUE == BoolInZone ) {
cairo_destroy( cr );
view.ImgCorner = CptImgCorner;
switch( CptImgCorner ) {
case IMG_HAUT_GAUCHE : cursor_set_haut_gauche(); break;
case IMG_HAUT : cursor_set_haut(); break;
case IMG_HAUT_DROIT : cursor_set_haut_droit(); break;
case IMG_DROIT : cursor_set_droit(); break;
case IMG_BAS_DROIT : cursor_set_bas_droit(); break;
case IMG_BAS : cursor_set_bas(); break;
case IMG_BAS_GAUCHE : cursor_set_bas_gauche(); break;
case IMG_GAUCHE : cursor_set_gauche(); break;
case IMG_MOVE : cursor_set_move(); break;
case IMG_SIZE :
case IMG_NONE :
cursor_set_old();
break;
}
return( Image );
}
}
}
List = g_list_previous( List );
}
cursor_set_old();
view.ImgCorner = IMG_NONE;
cairo_destroy( cr );
return( NULL );
}
//
// Image[ n ] image en dessous / image below
// Image[ n +1 ]
// Image[ n +2 ]
// Image[ n +3 ]
// Image[ n +4 ] image au dessus / image above
//
void poche_set_selected_first_image( IMAGE *p_Image )
{
GList *List = NULL;
IMAGE *Image = NULL;
GList *ListLast = NULL;
IMAGE *ImageLast = NULL;
// GET List OF p_Image
List = g_list_first( view.ListImage );
while( List ) {
if( NULL != (Image = (IMAGE *)List->data ) && FALSE == Image->BoolStructRemove ) {
if( p_Image == Image ) {
break;
}
}
List = g_list_next( List );
}
// GET ListLast for image above ( image au dessus )
ListLast = g_list_last( view.ListImage );
while( ListLast ) {
if( NULL != (ImageLast = (IMAGE *)ListLast->data ) && FALSE == Image->BoolStructRemove ) {
break;
}
ListLast = g_list_previous( ListLast );
}
// CHANGE List <-> ListLast
if( NULL != List && NULL != ListLast ) {
ListLast->data = Image;
List->data = ImageLast;
gtk_widget_queue_draw( view.AdrDrawingarea );
}
}
void poche_set_selected_up_image( IMAGE *p_Image )
{
GList *List = NULL;
IMAGE *Image = NULL;
GList *ListLast = NULL;
IMAGE *ImageLast = NULL;
if( g_list_length( view.ListImage ) <= 1 ) return;
// GET List OF p_Image
List = g_list_first( view.ListImage );
while( List ) {
if( NULL != (Image = (IMAGE *)List->data ) && FALSE == Image->BoolStructRemove ) {
if( p_Image == Image ) {
if( NULL != (ListLast = g_list_next( List ))) {
if( NULL != (ImageLast = (IMAGE *)ListLast->data ) && FALSE == ImageLast->BoolStructRemove ) {
// CHANGE List <-> ListLast
if( NULL != List && NULL != ListLast ) {
ListLast->data = Image;
List->data = ImageLast;
gtk_widget_queue_draw( view.AdrDrawingarea );
}
}
}
break;
}
}
List = g_list_next( List );
}
}
void poche_set_selected_down_image( IMAGE *p_Image )
{
GList *List = NULL;
IMAGE *Image = NULL;
GList *ListLast = NULL;
IMAGE *ImageLast = NULL;
if( g_list_length( view.ListImage ) <= 1 ) return;
// GET List OF p_Image
List = g_list_first( view.ListImage );
while( List ) {
if( NULL != (Image = (IMAGE *)List->data ) && FALSE == Image->BoolStructRemove ) {
if( p_Image == Image ) {
if( NULL != (ListLast = g_list_previous( List ))) {
if( NULL != (ImageLast = (IMAGE *)ListLast->data ) && FALSE == ImageLast->BoolStructRemove ) {
// CHANGE List <-> ListLast
if( NULL != List && NULL != ListLast ) {
ListLast->data = Image;
List->data = ImageLast;
gtk_widget_queue_draw( view.AdrDrawingarea );
}
}
}
break;
}
}
List = g_list_next( List );
}
}
//
// La derniere image doit etre en haut de la liste
//
void poche_set_selected_last_image( IMAGE *p_Image )
{
GList *List = NULL;
IMAGE *Image = NULL;
GList *ListFisrt = NULL;
IMAGE *ImageLast = NULL;
// GET List OF p_Image
List = g_list_first( view.ListImage );
while( List ) {
if( NULL != (Image = (IMAGE *)List->data ) && FALSE == Image->BoolStructRemove ) {
if( p_Image == Image ) {
break;
}
}
List = g_list_next( List );
}
// GET ListFisrt for image above ( image au dessus )
ListFisrt = g_list_first( view.ListImage );
while( ListFisrt ) {
if( NULL != (ImageLast = (IMAGE *)ListFisrt->data ) && FALSE == Image->BoolStructRemove ) {
break;
}
ListFisrt = g_list_next( ListFisrt );
}
// CHANGE List <-> ListFisrt
if( NULL != List && NULL != ListFisrt ) {
ListFisrt->data = Image;
List->data = ImageLast;
gtk_widget_queue_draw( view.AdrDrawingarea );
}
}
//
//
gboolean on_drawingareamain_button_press_event( GtkWidget *widget, GdkEventButton *event, gpointer user_data )
{
cairo_t *cr;
gdouble x, y;
guint state;
IMAGE *Image = NULL;
IMAGE *ListImage = NULL;
GList *List = NULL;
gboolean bool_click_droit = (event->button == 3);
cr = gdk_cairo_create( view.AdrDrawingarea->window );
cairo_scale (cr, view.scale, view.scale);
cairo_translate (cr, view.x0, view.y0);
x = event->x;
y = event->y;
cairo_device_to_user (cr, &x, &y);
if( TRUE == bool_click_droit ) {
if( NULL != (Image = (IMAGE *)poche_get_is_move( x, y ))) {
cairo_destroy( cr );
if( TRUE == Image->BoolIsSelected ) {
popup_flip( Image );
}
return( FALSE );
}
}
state = event->state;
// IMAGE A DESSUS AVEC: CTRL + click
if( state & GDK_CONTROL_MASK ) {
if( IMG_NONE == view.ImgCorner || IMG_MOVE == view.ImgCorner ) {
if( NULL != (Image = (IMAGE *)poche_get_is_move( x, y ))) {
poche_set_selected_first_image( Image );
}
}
}
// NOUVELLE SELECTION D IMAGE
if( IMG_NONE == view.ImgCorner || IMG_MOVE == view.ImgCorner ) {
if( NULL != (Image = (IMAGE *)poche_get_is_move( x, y ))) {
if( FALSE == Image->BoolIsSelected ) {
List = g_list_first( view.ListImage );
while( List ) {
if( NULL != (ListImage = (IMAGE *)List->data ) && FALSE == Image->BoolStructRemove ) {
ListImage->BoolIsSelected = FALSE;
}
List = g_list_next( List );
}
Image->BoolIsSelected = TRUE;
cursor_set_move();
view.ImgCorner = IMG_MOVE;
view.GetImage = Image;
cairo_destroy( cr );
gtk_widget_queue_draw( view.AdrDrawingarea );
view.BoolEventButtonPress = TRUE;
pochetxt_set_text_to_textview( Image );
poche_set_flag_buttons();
return( FALSE );
}
}
}
// DESELECTION
if( IMG_NONE == view.ImgCorner && NULL == Image ) {
List = g_list_first( view.ListImage );
while( List ) {
if( NULL != (Image = (IMAGE *)List->data ) && FALSE == Image->BoolStructRemove ) {
Image->BoolIsSelected = FALSE;
}
List = g_list_next( List );
}
cursor_set_old();
cairo_destroy( cr );
gtk_widget_queue_draw( view.AdrDrawingarea );
view.BoolEventButtonPress = TRUE;
return( FALSE );
}
cairo_destroy( cr );
view.BoolEventButtonPress = TRUE;
return( FALSE );
}
//
//
gboolean on_drawingareamain_button_release_event( GtkWidget *widget, GdkEventButton *event, gpointer user_data )
{
cairo_t *cr;
gdouble x, y;
cr = gdk_cairo_create( view.AdrDrawingarea->window );
cairo_scale (cr, view.scale, view.scale);
cairo_translate (cr, view.x0, view.y0);
x = event->x;
y = event->y;
cairo_device_to_user (cr, &x, &y);
view.BoolEventButtonPress = FALSE;
view.GetImage = NULL;
cairo_destroy( cr );
return( FALSE );
}
//
//
gboolean on_drawingareamain_motion_notify_event( GtkWidget *widget, GdkEventMotion *event, gpointer user_data )
{
cairo_t *cr;
gdouble x, y;
gboolean BoolRedraw = FALSE;
cr = gdk_cairo_create( view.AdrDrawingarea->window );
cairo_scale (cr, view.scale, view.scale);
cairo_translate (cr, view.x0, view.y0);
x = event->x;
y = event->y;
cairo_device_to_user (cr, &x, &y);
if (oldX == -1.0 || oldY == -1.0) {
oldX = x;
oldY = y;
}
if( FALSE == view.BoolEventButtonPress ) {
view.GetImage = (IMAGE *)poche_get( x, y );
}
if( TRUE == view.BoolEventButtonPress ) {
if( NULL != view.GetImage ) {
if( IMG_MOVE == view.ImgCorner ) {
view.GetImage->x0 += (x - view.GetImage->XPointer);
view.GetImage->y0 += (y - view.GetImage->YPointer);
view.GetImage->XPointer = x;
view.GetImage->YPointer = y;
BoolRedraw = TRUE;
}
else if( IMG_DROIT == view.ImgCorner ) {
if( x > oldX ) {
gint add = x - (view.GetImage->x0 + view.GetImage->image_width);
view.GetImage->image_width += add;
}
else if( x < oldX ) {
gint add = (view.GetImage->x0 + view.GetImage->image_width) - x;
view.GetImage->image_width -= add;
}
if( x != oldX ) {
// VERIFICATION DIMENSION DROIT
if( view.GetImage->image_width < MIN_SIZE_IMAGE ) view.GetImage->image_width = MIN_SIZE_IMAGE;
BoolRedraw = TRUE;
}
}
else if( IMG_GAUCHE == view.ImgCorner ) {
if( x > oldX ) {
gint add = x - view.GetImage->x0;
view.GetImage->x0 += add;
view.GetImage->image_width -= add;
}
else if( x < oldX ) {
gint add = view.GetImage->x0 - x;
view.GetImage->x0 -= add;
view.GetImage->image_width += add;
}
if( x != oldX ) {
// VERIFICATION DIMENSION GAUCHE
while( view.GetImage->image_width < MIN_SIZE_IMAGE ) {
view.GetImage->x0 --;
view.GetImage->image_width ++;
}
BoolRedraw = TRUE;
}
}
else if( IMG_HAUT == view.ImgCorner ) {
if( y > oldY ) {
gint add = y - view.GetImage->y0;
view.GetImage->y0 += add;
view.GetImage->image_height -= add;
}
else if( y < oldY ) {
gint add = view.GetImage->y0 - y;
view.GetImage->y0 -= add;
view.GetImage->image_height += add;
}
if( y != oldY ) {
// VERIFICATION DIMENSION HAUT
while( view.GetImage->image_height < MIN_SIZE_IMAGE ) {
view.GetImage->y0 --;
view.GetImage->image_height ++;
}
BoolRedraw = TRUE;
}
}
else if( IMG_BAS == view.ImgCorner ) {
if( y > oldY ) {
gint add = y - (view.GetImage->y0 + view.GetImage->image_height);
view.GetImage->image_height += add;
}
else if( y < oldY ) {
gint add = (view.GetImage->y0 + view.GetImage->image_height) - y;
view.GetImage->image_height -= add;
}
if( y != oldY ) {
// VERIFICATION DIMENSION BAS
if( view.GetImage->image_height < MIN_SIZE_IMAGE ) view.GetImage->image_height = MIN_SIZE_IMAGE;
BoolRedraw = TRUE;
}
}
else if( IMG_HAUT_GAUCHE == view.ImgCorner ) {
// HAUT
if( y > oldY ) {
gint add = y - view.GetImage->y0;
view.GetImage->y0 += add;
view.GetImage->image_height -= add;
}
else if( y < oldY ) {
gint add = view.GetImage->y0 - y;
view.GetImage->y0 -= add;
view.GetImage->image_height += add;
}
// VERIFICATION DIMENSION HAUT
while( view.GetImage->image_height < MIN_SIZE_IMAGE ) {
view.GetImage->y0 --;
view.GetImage->image_height ++;
}
// GAUCHE
if( x > oldX ) {
gint add = x - view.GetImage->x0;
view.GetImage->x0 += add;
view.GetImage->image_width -= add;
}
else if( x < oldX ) {
gint add = view.GetImage->x0 - x;
view.GetImage->x0 -= add;
view.GetImage->image_width += add;
}
// VERIFICATION DIMENSION GAUCHE
while( view.GetImage->image_width < MIN_SIZE_IMAGE ) {
view.GetImage->x0 --;
view.GetImage->image_width ++;
}
if( x != oldX || y != oldY ) {
BoolRedraw = TRUE;
}
}
else if( IMG_HAUT_DROIT == view.ImgCorner ) {
// HAUT
if( y > oldY ) {
gint add = y - view.GetImage->y0;
view.GetImage->y0 += add;
view.GetImage->image_height -= add;
}
else if( y < oldY ) {
gint add = view.GetImage->y0 - y;
view.GetImage->y0 -= add;
view.GetImage->image_height += add;
}
// VERIFICATION DIMENSION HAUT
while( view.GetImage->image_height < MIN_SIZE_IMAGE ) {
view.GetImage->y0 --;
view.GetImage->image_height ++;
}
// DROIT
if( x > oldX ) {
gint add = x - (view.GetImage->x0 + view.GetImage->image_width);
view.GetImage->image_width += add;
}
else if( x < oldX ) {
gint add = (view.GetImage->x0 + view.GetImage->image_width) - x;
view.GetImage->image_width -= add;
}
// VERIFICATION DIMENSION DROIT
if( view.GetImage->image_width < MIN_SIZE_IMAGE ) view.GetImage->image_width = MIN_SIZE_IMAGE;
if( x != oldX || y != oldY ) {
BoolRedraw = TRUE;
}
}
else if( IMG_BAS_DROIT == view.ImgCorner ) {
// BAS
if( y > oldY ) {
gint add = y - (view.GetImage->y0 + view.GetImage->image_height);
view.GetImage->image_height += add;
}
else if( y < oldY ) {
gint add = (view.GetImage->y0 + view.GetImage->image_height) - y;
view.GetImage->image_height -= add;
}
// VERIFICATION DIMENSION BAS
if( view.GetImage->image_height < MIN_SIZE_IMAGE ) view.GetImage->image_height = MIN_SIZE_IMAGE;
// DROIT
if( x > oldX ) {
gint add = x - (view.GetImage->x0 + view.GetImage->image_width);
view.GetImage->image_width += add;
}
else if( x < oldX ) {
gint add = (view.GetImage->x0 + view.GetImage->image_width) - x;
view.GetImage->image_width -= add;
}
// VERIFICATION DIMENSION DROIT
if( view.GetImage->image_width < MIN_SIZE_IMAGE ) view.GetImage->image_width = MIN_SIZE_IMAGE;
if( x != oldX || y != oldY ) {
BoolRedraw = TRUE;
}
}
else if( IMG_BAS_GAUCHE == view.ImgCorner ) {
// BAS
if( y > oldY ) {
gint add = y - (view.GetImage->y0 + view.GetImage->image_height);
view.GetImage->image_height += add;
}
else if( y < oldY ) {
gint add = (view.GetImage->y0 + view.GetImage->image_height) - y;
view.GetImage->image_height -= add;
}
// VERIFICATION DIMENSION BAS
if( view.GetImage->image_height < MIN_SIZE_IMAGE ) view.GetImage->image_height = MIN_SIZE_IMAGE;
// GAUCHE
if( x > oldX ) {
gint add = x - view.GetImage->x0;
view.GetImage->x0 += add;
view.GetImage->image_width -= add;
}
else if( x < oldX ) {
gint add = view.GetImage->x0 - x;
view.GetImage->x0 -= add;
view.GetImage->image_width += add;
}
// VERIFICATION DIMENSION GAUCHE
while( view.GetImage->image_width < MIN_SIZE_IMAGE ) {
view.GetImage->x0 --;
view.GetImage->image_width ++;
}
if( x != oldX || y != oldY ) {
BoolRedraw = TRUE;
}
}
}
}
oldX = x;
oldY = y;
cairo_destroy( cr );
if( TRUE == BoolRedraw ) gtk_widget_queue_draw( view.AdrDrawingarea );
return( FALSE );
}
//
//
void on_button_moins_clicked( GtkButton *button, gpointer user_data )
{
view.BoolScaleAdjust = FALSE;
view.scale -= 0.4;
if( view.scale < 0.4 ) view.scale = 0.4;
poche_set_size_request();
gtk_widget_queue_draw( view.AdrDrawingarea );
}
//
//
void on_button_normal_clicked( GtkButton *button, gpointer user_data )
{
view.BoolScaleAdjust = FALSE;
view.scale = 1.0;
poche_set_size_request();
gtk_widget_queue_draw( view.AdrDrawingarea );
}
//
//
void on_button_plus_clicked( GtkButton *button, gpointer user_data )
{
view.BoolScaleAdjust = FALSE;
view.scale += 0.4;
if( view.scale > 6.0 ) view.scale = 6.0;
poche_set_size_request();
gtk_widget_queue_draw( view.AdrDrawingarea );
}
//
//
void on_button_ajuster_clicked( GtkButton *button, gpointer user_data )
{
view.BoolScaleAdjust = TRUE;
gtk_widget_queue_draw( view.AdrDrawingarea );
}
//
//
IMAGE *poche_add_to_glist( gchar *PathNameFile, gdouble x, gdouble y, gboolean p_BoolScale, TYPE_IMAGE p_TypeImage )
{
IMAGE *New = (IMAGE *)g_malloc0( sizeof(IMAGE) );
New->TypeImage = p_TypeImage;
// _TYPE_TEXT_
// _TYPE_TEXT_TITLE_
New->Texte = NULL;
New->FontName = NULL;
New->SizeFontName = 8;
New->BoolFontBold = FALSE;
New->BoolFontItalic = FALSE;
New->PosCombobox = 0;
// _TYPE_IMAGE_
New->Pixbuf = NULL;
New->PixbufOriginal = NULL;
// VALUES
New->x0 = 0.0;
New->y0 = 0.0;
New->image_width = 0;
New->image_height = 0;
New->XPointer = 0.0;
New->YPointer = 0.0;
New->BoolIsSelected = FALSE;
New->BoolStructRemove = FALSE;
New->BoolFlipVertical = FALSE;
New->BoolFlipHorizontal = FALSE;
if( p_TypeImage == _TYPE_IMAGE_ ) {
New->PixbufOriginal = gdk_pixbuf_new_from_file( PathNameFile, NULL );
if( TRUE == p_BoolScale )
New->Pixbuf = gdk_pixbuf_scale_simple( New->PixbufOriginal, SIZE_IMAGE_ADD, SIZE_IMAGE_ADD, 2 ); // GDK_INTERP_NEAREST
else New->Pixbuf = NULL;
// New->image_width = cairo_image_surface_get_width( New->image );
// New->image_height = cairo_image_surface_get_height( New->image );
if( NULL != New->Pixbuf ) {
New->image_width = gdk_pixbuf_get_width( New->Pixbuf );
New->image_height = gdk_pixbuf_get_height( New->Pixbuf );
}
else {
New->image_width = gdk_pixbuf_get_width( New->PixbufOriginal );
New->image_height = gdk_pixbuf_get_height( New->PixbufOriginal );
}
New->x0 = x - (New->image_width / 2);
New->y0 = y - (New->image_height / 2);
New->BoolIsSelected = FALSE;
New->BoolStructRemove = FALSE;
New->BoolFlipVertical = FALSE;
New->BoolFlipHorizontal = FALSE;
}
else if( p_TypeImage == _TYPE_TEXT_ ) {
// _TYPE_TEXT_TITLE_
// _TYPE_TEXT_
New->Texte = g_strdup_printf( "\n Write text %d", g_list_length( view.ListImage ));
New->FontName = g_strdup( "Sans" );
New->SizeFontName = 8;
New->BoolFontBold = FALSE;
New->BoolFontItalic = FALSE;
New->PosCombobox = 0;
// _TYPE_IMAGE_
New->Pixbuf = NULL;
New->PixbufOriginal = NULL;
New->BoolFontBold = FALSE;
New->BoolFontItalic = FALSE;
// VALUES
New->x0 = x - 50;
New->y0 = y - 50;
New->image_width = 100;
New->image_height = 50;
New->XPointer = 0.0;
New->YPointer = 0.0;
New->BoolIsSelected = FALSE;
New->BoolStructRemove = FALSE;
New->BoolFlipVertical = FALSE;
New->BoolFlipHorizontal = FALSE;
}
else if( p_TypeImage == _TYPE_TEXT_TITLE_ ) {
// _TYPE_TEXT_TITLE_
// _TYPE_TEXT_
New->Texte = NULL;
New->FontName = g_strdup( "Sans" );
New->SizeFontName = 8;
New->PosCombobox = 0;
// _TYPE_IMAGE_
New->Pixbuf = NULL;
New->PixbufOriginal = NULL;
// VALUES
New->x0 = 0;
New->y0 = 0;
New->image_width = 100;
New->image_height = 50;
New->XPointer = 0.0;
New->YPointer = 0.0;
New->BoolIsSelected = FALSE;
New->BoolStructRemove = FALSE;
New->BoolFlipVertical = FALSE;
New->BoolFlipHorizontal = FALSE;
}
view.ListImage = g_list_append( view.ListImage, New );
return( New );
}
//
// AJOUT D UNE STRUCTURE _TYPE_TEXT_TITLE_ SI ELLE N EXISTE PAS
// INSERTION DE LA CHANE p_str DANS LA STRUCTURE
//
void poche_set_texte_title( gchar *p_str )
{
GList *List = NULL;
IMAGE *Image = NULL;
gboolean BoolExist = FALSE;
List = g_list_first( view.ListImage );
while( List ) {
if( NULL != (Image = (IMAGE *)List->data ) && _TYPE_TEXT_TITLE_ == Image->TypeImage ) {
BoolExist = TRUE;
break;
}
List = g_list_next( List );
}
if( FALSE == BoolExist ) {
Image = poche_add_to_glist( NULL, 0.0, 0.0, FALSE, _TYPE_TEXT_TITLE_ );
Image->Texte = g_strdup( p_str );
}
else {
if( NULL != Image->Texte ) {
g_free( Image->Texte );
Image->Texte = NULL;
}
Image->Texte = g_strdup( p_str );
}
gtk_widget_queue_draw( view.AdrDrawingarea );
}
//
//
static void poche_drag_data_received (GtkWidget *widget,
GdkDragContext *drag_context,
gint x,
gint y,
GtkSelectionData *data,
guint info,
guint time)
{
// PRINT("DND FROM DESKTOP TO DRAWING");
// Une copie ne peut aller vers elle meme !!!
if (gtk_drag_get_source_widget(drag_context) != widget) {
dragndrop_list_drag_data (widget, (gchar *)data->data);
}
}
//
//
void on_drawingareamain_realize( GtkWidget *widget, gpointer user_data )
{
view.AdrDrawingarea = widget;
view.BoolScaleAdjust = TRUE;
view.scale = SCALE_MIN;
view.BoolSaveToFile = FALSE;
view.image = cairo_image_surface_create(
CAIRO_FORMAT_ARGB32,
372,
527
);
view.image_width = cairo_image_surface_get_width( view.image );
view.image_height = cairo_image_surface_get_height( view.image );
poche_set_size_request();
// Drag and drop support
// SIGNAL : 'drag-data-received'
gtk_drag_dest_set (GTK_WIDGET (widget),
GTK_DEST_DEFAULT_MOTION | GTK_DEST_DEFAULT_DROP | GTK_DEST_DEFAULT_HIGHLIGHT,
drag_types,
n_drag_types,
GDK_ACTION_MOVE | GDK_ACTION_COPY | GDK_ACTION_DEFAULT
);
g_signal_connect(G_OBJECT(widget), "drag-data-received", G_CALLBACK(poche_drag_data_received), NULL);
gtk_button_set_label( GTK_BUTTON(GLADE_GET_OBJECT("button_stock_img")), Config.PathSaveImg );
// EMPLACEMENT DE STOCKAGE DES IMAGES CHARGEES DEPUIS LE WEB
// Config.PathPochette = libutils_create_temporary_rep( "/tmp", "zoomc" );
Config.PathPochette = libutils_create_temporary_rep( Config.PathnameTMP, PATH_SAVE_POCHETTE_IMG );
}
//
//
void poche_gestion_images (gchar *path)
{
if( NULL != Config.PathLoadImg ) {
g_free( Config.PathLoadImg );
Config.PathLoadImg = NULL;
}
Config.PathLoadImg = g_strdup( path );
}
//
//
void on_button_load_file_clicked (GtkButton *button, gpointer user_data)
{
fileselect_create( _PATH_IMPORT_IMAGES_, Config.PathLoadImg, poche_gestion_images );
}
//
//
void poche_remove_image( void )
{
GList *List = NULL;
IMAGE *Image = NULL;
List = g_list_first( view.ListImage );
while( List ) {
if( NULL != (Image = (IMAGE *)List->data ) && FALSE == Image->BoolStructRemove ) {
if( TRUE == Image->BoolIsSelected ) {
Image->BoolStructRemove = TRUE;
if( _TYPE_TEXT_ == Image->TypeImage && NULL != Image->Texte ) {
g_free( Image->Texte );
Image->Texte = NULL;
pochetxt_set_text_to_textview( Image );
}
gtk_widget_queue_draw( view.AdrDrawingarea );
poche_set_flag_buttons();
// DEBUG CDDB_CURL
pochetxt_set_combobox_choice( 0 );
break;
}
}
List = g_list_next( List );
}
}
//
// Cette fonction suppose un flag de (non) validite d'une structure IMAGE: BoolStructRemove
//
void on_button_erase_clicked (GtkButton *button, gpointer user_data)
{
poche_remove_image();
}
//
//
static void poche_drag_data_received_file (GtkWidget *widget,
GdkDragContext *drag_context,
gint x,
gint y,
GtkSelectionData *data,
guint info,
guint time)
{
dragndrop_list_drag_data (widget, (gchar *)data->data);
}
//
//
void poche_table_add_images_init (void)
{
if( NULL != view.Adr_table ) {
gtk_widget_destroy( view.Adr_table );
view.Adr_table = NULL;
}
view.Adr_table = gtk_table_new (4, 5, TRUE);
gtk_container_add (GTK_CONTAINER (view.Adr_viewport_image_preview), view.Adr_table);
gtk_widget_show_all (view.Adr_table);
}
//
//
void on_viewport_stock_realize (GtkWidget *widget, gpointer user_data)
{
view.Adr_viewport_image_preview = widget;
view.Adr_table = NULL;
poche_table_add_images_init ();
// Drag and drop support
// SIGNAL : 'drag-data-received'
//
gtk_drag_dest_set (GTK_WIDGET (widget),
GTK_DEST_DEFAULT_MOTION |
GTK_DEST_DEFAULT_DROP,
drag_types, n_drag_types,
GDK_ACTION_COPY| GDK_ACTION_MOVE );
g_signal_connect(G_OBJECT(widget),
"drag-data-received",
G_CALLBACK(poche_drag_data_received_file),
NULL);
}
//
//
void poche_set_selected_flag_image( IMAGE *p_Image )
{
GList *List = NULL;
IMAGE *Image = NULL;
// GET List OF p_Image to FALSE
List = g_list_first( view.ListImage );
while( List ) {
if( NULL != (Image = (IMAGE *)List->data ) && FALSE == Image->BoolStructRemove ) {
Image->BoolIsSelected = FALSE;
}
List = g_list_next( List );
}
// SET p_Image to TRUE
p_Image->BoolIsSelected = TRUE;
}
//
//
void poche_add_img_file_to_Drawingarea( GSList *p_list )
{
GSList *gs_List = p_list;
gchar *Ptr = NULL;
IMAGE *Image = NULL;
gdouble x, y;
gint X, Y;
GdkModifierType state;
cairo_t *cr;
PRINT_FUNC_LF();
gdk_window_get_pointer( view.AdrDrawingarea->window, &X, &Y, &state );
cr = gdk_cairo_create( view.AdrDrawingarea->window );
cairo_scale (cr, view.scale, view.scale);
cairo_translate (cr, view.x0, view.y0);
x = X;
y = Y;
cairo_device_to_user (cr, &x, &y);
cairo_destroy( cr );
while (gs_List) {
if ((Ptr = (gchar *)gs_List->data) != NULL) {
// PRENDRE UNIQUEMENT LA PREMIERE IMAGE VALIDE DANS LA LISTE
if( TRUE == FileIs_image( Ptr )) {
Image = poche_add_to_glist( Ptr, x, y, TRUE, _TYPE_IMAGE_ );
poche_set_selected_flag_image( Image );
gtk_widget_queue_draw( view.AdrDrawingarea );
return;
}
}
gs_List = g_slist_next (gs_List);
}
if(NULL != Ptr && FALSE == FileIs_image( Ptr )) {
PRINT("BAD FILE");
g_print( "\t%s\n", Ptr );
}
}
//
//
IMAGE *poche_get_struct_selected_is_txt( void )
{
IMAGE *Image = NULL;
GList *List = NULL;
List = g_list_first( view.ListImage );
while( List ) {
if( NULL != (Image = (IMAGE *)List->data ) && TRUE == Image->BoolIsSelected && _TYPE_TEXT_ == Image->TypeImage && FALSE == Image->BoolStructRemove ) {
return( Image );
}
List = g_list_next( List );
}
return( NULL );
}
xcfa-4.3.6/src/win_reader.c 0000644 0001750 0001750 00000014363 12122563465 012455 0000000 0000000 /*
* file : win_reader.c
* project : xcfa
* with : Gtk-2
*
* copyright : (C) 2003 - 2013 by Claude Bulin
*
* xcfa - GTK+ implementation of the GNU shell command
* GNU General Public License
*
* This file is part of XCFA.
*
* XCFA is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* at your option) any later version.
*
* XCFA is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with XCFA. If not, see .
*/
#ifdef HAVE_CONFIG_H
#include "../config.h"
#endif
#include
#include
#include
#ifdef ENABLE_STATIC_LIBRARY
#include "../lib/lib.h"
#endif
#include "global.h"
#include "mplayer.h"
#include "win_reader.h"
typedef struct {
GtkWidget *AdrWin;
GtkWidget *AdrScale;
GtkObject *AdrAdjust;
GtkWidget *AdrHscale;
gboolean IsShow;
gboolean BoolValueChange;
} VAR_WINDREADER;
VAR_WINDREADER VarWindReader = {
NULL,
NULL,
NULL,
NULL,
FALSE,
FALSE
};
void WinReader_set_value (gdouble p_value)
{
if (TRUE == VarWindReader.IsShow) {
gtk_adjustment_set_value (GTK_ADJUSTMENT (VarWindReader.AdrAdjust), p_value);
}
}
// HSCALE VALUR-CHANGE
//
gboolean WinReader_value_change (GtkRange *range, GtkScrollType scroll, gdouble value, gpointer user_data)
{
if (value < 0.0) value = 0.0;
if (value > 100.0) value = 100.0;
if (GDK_BUTTON_RELEASE == VarMplayer.Button) {
mplayer_fifo_seek_with_hundr (value);
VarMplayer.Button = -1;
}
VarMplayer.PercentTempsActuel = value;
VarWindReader.BoolValueChange = TRUE;
WinReader_set_value (value);
return FALSE;
}
// HSCALE EVENT
//
gboolean WinReader_event (GtkWidget *treeview, GdkEvent *event, gpointer user_data)
{
if (GDK_BUTTON_PRESS == event->type) {
VarMplayer.Button = GDK_BUTTON_PRESS;
}
if (GDK_BUTTON_RELEASE == event->type) {
VarMplayer.Button = GDK_BUTTON_RELEASE;
}
return (FALSE);
}
// HSCALE REALISE
//
void on_hbox_WindReader_realize (GtkWidget *widget, gpointer user_data)
{
VarWindReader.AdrAdjust = gtk_adjustment_new (0, 0, 100.0, 0.001, 1, 0);
VarWindReader.AdrHscale = gtk_hscale_new (GTK_ADJUSTMENT (VarWindReader.AdrAdjust));
gtk_widget_show (VarWindReader.AdrHscale);
gtk_scale_set_draw_value (GTK_SCALE (VarWindReader.AdrHscale), FALSE);
gtk_box_pack_start (GTK_BOX (widget), VarWindReader.AdrHscale, TRUE, TRUE, 0);
GTK_WIDGET_UNSET_FLAGS (widget, GTK_CAN_FOCUS);
gtk_scale_set_value_pos (GTK_SCALE (VarWindReader.AdrHscale), GTK_POS_LEFT);
g_signal_connect ((gpointer) VarWindReader.AdrHscale, "change_value", G_CALLBACK (WinReader_value_change), NULL);
g_signal_connect ((gpointer) VarWindReader.AdrHscale, "event",G_CALLBACK (WinReader_event), NULL);
}
// DELETE EVENT
//
gboolean on_WindReader_delete_event (GtkWidget *widget, GdkEvent *event, gpointer user_data)
{
mplayer_fifo_quit ();
VarWindReader.IsShow = FALSE;
gtk_widget_hide (VarWindReader.AdrWin);
return TRUE;
}
// DESTROY EVENT
//
gboolean on_WindReader_destroy_event (GtkWidget *widget, GdkEvent *event, gpointer user_data)
{
mplayer_fifo_quit ();
VarWindReader.IsShow = FALSE;
gtk_widget_hide (VarWindReader.AdrWin);
return TRUE;
}
// PAUSE
//
void on_button_pause_WindReader_clicked (GtkButton *button, gpointer user_data)
{
mplayer_fifo_pause ();
WinReader_set_lecture ();
}
// LECTURE
//
void on_button_lecture_WindReader_clicked (GtkButton *button, gpointer user_data)
{
if (TRUE == VarWindReader.BoolValueChange) {
VarMplayer.Button = -1;
VarWindReader.BoolValueChange = FALSE;
mplayer_fifo_seek_with_hundr (VarMplayer.PercentTempsActuel);
}
else {
mplayer_fifo_seek (VarMplayer.PercentTempsActuel);
}
WinReader_set_pause ();
}
// QUITTER
//
void on_button_quitter_WindReader_clicked (GtkButton *button, gpointer user_data)
{
VarMplayer.BoolIsPause = FALSE;
mplayer_fifo_seek (VarMplayer.PercentTempsActuel);
mplayer_fifo_quit ();
VarWindReader.IsShow = FALSE;
gtk_widget_hide (VarWindReader.AdrWin);
}
// WIN-READER OPEN
//
void WinReader_open (gchar *title)
{
if (TRUE == VarWindReader.IsShow) {
gdk_window_raise (VarWindReader.AdrWin->window);
}
else {
if (NULL == VarWindReader.AdrWin) {
VarWindReader.AdrWin = GTK_WIDGET (GLADE_GET_OBJECT("WindReader"));
gtk_builder_connect_signals (GtkXcfaProjet, NULL);
}
gtk_window_set_transient_for (GTK_WINDOW(VarWindReader.AdrWin), GTK_WINDOW(WindMain));
gtk_window_set_modal (GTK_WINDOW (VarWindReader.AdrWin), TRUE);
libutils_set_default_icone_to_win (VarWindReader.AdrWin);
gtk_widget_show (VarWindReader.AdrWin);
}
VarWindReader.IsShow = TRUE;
VarWindReader.BoolValueChange = FALSE;
if (NULL != title) gtk_window_set_title (GTK_WINDOW (VarWindReader.AdrWin), title);
if (LIST_MPLAYER_FROM_DVD == VarMplayer.ListPlayFrom) {
gtk_widget_hide (GTK_WIDGET (GLADE_GET_OBJECT("hbox_WindReader")));
}
else {
gtk_widget_show (GTK_WIDGET (GLADE_GET_OBJECT("hbox_WindReader")));
}
}
// WIN-READER SET-TITLE
//
void WinReader_set_title (gchar *title)
{
if (TRUE == VarWindReader.IsShow && NULL != title) gtk_window_set_title (GTK_WINDOW (VarWindReader.AdrWin), title);
}
// WIN-READER SHOW-PAUSE & HIDE-LECTURE
//
void WinReader_set_pause (void)
{
if (TRUE == VarWindReader.IsShow) {
gtk_widget_hide (GTK_WIDGET (GLADE_GET_OBJECT("button_lecture_WindReader")));
gtk_widget_show (GTK_WIDGET (GLADE_GET_OBJECT("button_pause_WindReader")));
}
}
// WIN-READER HIDE-PAUSE & SHOW-LECTURE
//
void WinReader_set_lecture (void)
{
if (TRUE == VarWindReader.IsShow) {
gtk_widget_hide (GTK_WIDGET (GLADE_GET_OBJECT("button_pause_WindReader")));
gtk_widget_show (GTK_WIDGET (GLADE_GET_OBJECT("button_lecture_WindReader")));
}
}
// WIN-READER CLOSE
//
void WinReader_close (void)
{
if (TRUE == VarWindReader.IsShow) {
WinReader_set_lecture ();
VarWindReader.IsShow = FALSE;
gtk_widget_hide (VarWindReader.AdrWin);
}
}
// WIN-READER IS OK
//
gboolean WinReader_is_close (void)
{
return (VarWindReader.IsShow ? FALSE : TRUE);
}
xcfa-4.3.6/src/scan.c 0000644 0001750 0001750 00000027633 12122563465 011266 0000000 0000000 /*
* file : scan_cd.c
* project : xcfa
* with : Gtk-2
*
* copyright : (C) 2003 - 2013 by Claude Bulin
*
* xcfa - GTK+ implementation of the GNU shell command
* GNU General Public License
*
* This file is part of XCFA.
*
* XCFA is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* at your option) any later version.
*
* XCFA is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with XCFA. If not, see .
*/
#ifdef HAVE_CONFIG_H
#include "../config.h"
#endif
#include
#include
#include
#include
#include
#ifdef ENABLE_STATIC_LIBRARY
#include "../lib/lib.h"
#endif
#include "global.h"
#include "cd_audio.h"
#include "configuser.h"
#include "proc.h"
#include "dvd.h"
#include "get_info.h"
#include "win_info.h"
#include "scan.h"
/*
*---------------------------------------------------------------------------
* VARIABLES
*---------------------------------------------------------------------------
*/
typedef struct {
GList *Media_List; // NULL
gint TotalReadersDetected; // 0
gboolean bool_scan_cd_dvd; // TRUE
} VAR_SCANCD;
VAR_SCANCD var_scancd = {NULL, 0, TRUE};
/* Idee de code reprise depuis : graveman-0.3.12-4
* 2005 - 11 - 11
*/
typedef enum { _NONE_, IDE, SCSI } TP;
typedef struct {
TP tp;
gchar *detectline;
gchar *useline;
gchar *info;
gboolean tst;
} Tsearchdrive;
// definition de tous les type de bus
//
Tsearchdrive listesearchdrives[] = {
/*
* 10 - LINUX_IDE : pure ide devices with linux
*/
{ IDE, "dev=/dev/hda", "/dev/hda", "hda", FALSE },
{ IDE, "dev=/dev/hdb", "/dev/hdb", "hdb", FALSE },
{ IDE, "dev=/dev/hdc", "/dev/hdc", "hdc", FALSE },
{ IDE, "dev=/dev/hdd", "/dev/hdd", "hdd", FALSE },
{ IDE, "dev=/dev/hde", "/dev/hde", "hde", FALSE },
{ IDE, "dev=/dev/hdf", "/dev/hdf", "hdf", FALSE },
{ IDE, "dev=/dev/hdg", "/dev/hdg", "hdg", FALSE },
{ IDE, "dev=/dev/hdh", "/dev/hdh", "hdh", FALSE },
{ IDE, "dev=/dev/hdi", "/dev/hdi", "hdi", FALSE },
{ IDE, "dev=/dev/hdj", "/dev/hdj", "hdj", FALSE },
/*
* 28 - LINUX_SCSI : SCSI alias with linux
*/
{ SCSI, "dev=/dev/scd0", "/dev/scd0", "scd0", FALSE },
{ SCSI, "dev=/dev/scd1", "/dev/scd1", "scd1", FALSE },
{ SCSI, "dev=/dev/scd2", "/dev/scd2", "scd2", FALSE },
{ SCSI, "dev=/dev/scd3", "/dev/scd3", "scd3", FALSE },
{ SCSI, "dev=/dev/scd4", "/dev/scd4", "scd4", FALSE },
{ SCSI, "dev=/dev/scd5", "/dev/scd5", "scd5", FALSE },
{ SCSI, "dev=/dev/scd6", "/dev/scd6", "scd6", FALSE },
{ SCSI, "dev=/dev/sr0", "/dev/sr0", "sr0", FALSE },
{ SCSI, "dev=/dev/sr1", "/dev/sr1", "sr1", FALSE },
{ SCSI, "dev=/dev/sr2", "/dev/sr2", "sr2", FALSE },
{ SCSI, "dev=/dev/sr3", "/dev/sr3", "sr3", FALSE },
{ SCSI, "dev=/dev/sr4", "/dev/sr4", "sr4", FALSE },
{ SCSI, "dev=/dev/sr5", "/dev/sr5", "sr5", FALSE },
{ SCSI, "dev=/dev/sr6", "/dev/sr6", "sr6", FALSE },
{ SCSI, "dev=/dev/sg0", "/dev/sg0", "sg0", FALSE },
{ SCSI, "dev=/dev/sg1", "/dev/sg1", "sg1", FALSE },
{ SCSI, "dev=/dev/sg2", "/dev/sg2", "sg2", FALSE },
{ SCSI, "dev=/dev/sg3", "/dev/sg3", "sg3", FALSE },
{ SCSI, "dev=/dev/sg4", "/dev/sg4", "sg4", FALSE },
{ SCSI, "dev=/dev/sg5", "/dev/sg5", "sg5", FALSE },
{ SCSI, "dev=/dev/sg6", "/dev/sg6", "sg6", FALSE },
{ SCSI, "dev=/dev/sga", "/dev/sga", "sga", FALSE },
{ SCSI, "dev=/dev/sgb", "/dev/sgb", "sgb", FALSE },
{ SCSI, "dev=/dev/sgc", "/dev/sgc", "sgc", FALSE },
{ SCSI, "dev=/dev/sgd", "/dev/sgd", "sgd", FALSE },
{ SCSI, "dev=/dev/sge", "/dev/sge", "sge", FALSE },
{ SCSI, "dev=/dev/sgf", "/dev/sgf", "sgf", FALSE },
{ SCSI, "dev=/dev/sgg", "/dev/sgg", "sgg", FALSE },
/*
* The end of list
*/
{ _NONE_, NULL, NULL, NULL, FALSE}
};
/*
*---------------------------------------------------------------------------
* FUNCTIONS
*---------------------------------------------------------------------------
*/
void scan_set_bool_scan (gboolean p_flag)
{
var_scancd.bool_scan_cd_dvd = p_flag;
}
/*
** Return total readers in computer
*/
gint scan_get_nbr_readers_detected (void)
{
/* PRINT_FUNC_LF(); */
return (var_scancd.TotalReadersDetected);
}
/*
** Renvoie le numero du lecteur en selection
*/
gint scan_get_num_config_cd_is_selected (void)
{
/* PRINT_FUNC_LF(); */
return (0);
}
/*
** Ouverture du lecteur en selection
*/
void scan_open_peri_cd (void)
{
/* PRINT_FUNC_LF(); */
}
/*
** Fermeture du lecteur en selection
*/
void scan_close_peri_cd (void)
{
/* PRINT_FUNC_LF(); */
}
/*
** Nouvelle selection de lecteur CD ou DVD
*/
void scan_set_sel_reader_cd (gint column, gint row)
{
/* PRINT_FUNC_LF(); */
}
/*
** Affiche 'NameDevice' et 'NameLink' dans 'Adr_ClistConfigCD'
*/
void scan_print_name_cdrom (gchar *NameDevice, gchar *NameLink)
{
/* PRINT_FUNC_LF(); */
if( TRUE == OptionsCommandLine.BoolVerboseMode )
g_print ("\tNameDevice=%s NameLink=%s\n", NameDevice, NameLink);
}
/* Detruit la GList MEDIA
*/
void scan_remove_glist_media (void)
{
GList *list = NULL;
MEDIA *Media = NULL;
gint NbList = 0;
/* PRINT_FUNC_LF(); */
list = g_list_first (var_scancd.Media_List);
while (list) {
if (NULL != (Media = (MEDIA *)list->data)) {
g_free (Media->Full_Name);
g_free (Media->Device);
g_free (Media);
Media = NULL;
list->data = NULL;
NbList ++;
}
list = g_list_next (list);
}
g_list_free (var_scancd.Media_List);
var_scancd.Media_List = NULL;
if( TRUE == OptionsCommandLine.BoolVerboseMode )
g_print ("\tRemove: %d\n", NbList);
}
//
//
GList *scan_scan_drives_cd_dvd (void)
{
GString *gstr = NULL;
gchar *Lout = NULL;
Tsearchdrive *Lcurentry;
gchar *Ptr = NULL;
MEDIA *Media = NULL;
GList *List = NULL;
GList *cd_list = NULL;
gchar str [256];
gint i;
gint pass;
// PRINT_FUNC_LF();
if (var_scancd.bool_scan_cd_dvd == FALSE) {
g_print ("En activant cette option [xcfa --no_cd_dvd] en ligne de commande, vous activez la non reconnaissance des lecteurs cd - dvd\n\n");
return ((GList *)NULL);
}
/* test is 'dvd+rw-tools package' present ? */
if (libutils_find_file ("dvd+rw-mediainfo") == FALSE) {
wininfo_create (
WindMain,
_("PACKAGE dvd+rw-tools ABSENT"),
_("Le package 'dvd+rw-tools' est absent"),
"\n",
_("de votre systeme !"),
"\n\n",
_("Veuillez l'installer car j'ai besoin de"),
"\n",
_("'dvd+rw-mediainfo' pour identifier le(s)"),
"\n",
_("lecteur(s) de cd / dvd."),
"");
return (NULL);
}
/* Init a FALSE */
for (Lcurentry = listesearchdrives; Lcurentry->detectline; Lcurentry++)
Lcurentry->tst = FALSE;
/* Prend dans tous les cd.dvd installes de l'ordi et
* active la variable de recherche dans 'Lcurentry'
*/
List = proc_get_proc_init_cdrominfo ();
if (List) {
cd_list = g_list_first (List);
while (cd_list) {
if ((gchar *)cd_list->data) {
if( TRUE == OptionsCommandLine.BoolVerboseMode )
g_print ("%s\n", (gchar *)cd_list->data);
for (Lcurentry = listesearchdrives; Lcurentry->detectline; Lcurentry++) {
/*Lcurentry->tst = FALSE;*/
if (0 == strncmp((gchar *)cd_list->data, Lcurentry->info, strlen((gchar *)cd_list->data))) {
Lcurentry->tst = TRUE;
break;
}
}
}
cd_list = g_list_next(cd_list);
}
}
else {
/* Le fichier n'existe pas: toutes
* les entrees 'Lcurentry->useline' seront testees
*/
for (Lcurentry = listesearchdrives; Lcurentry->detectline; Lcurentry++)
Lcurentry->tst = TRUE;
}
List = proc_remove_glist_cdrominfo (List);
/* l'analyse des medias commence ici */
var_scancd.TotalReadersDetected = 0;
if( TRUE == OptionsCommandLine.BoolVerboseMode ) {
g_print ("\nAnalyse devices in : ");
g_print ("%s::%s(line=%d) \n", __FILE__, __FUNCTION__, __LINE__);
}
if( TRUE == libutils_test_dir_exist( "/dev" )) {
for (pass = 0, Lcurentry = listesearchdrives; Lcurentry->detectline; pass++, Lcurentry++) {
/* Entree en test ? */
if (Lcurentry->tst == FALSE) continue;
if( FALSE == libutils_access_mode( Lcurentry->useline )) continue;
/* TODO
* TODO : 'dvd+rw-mediainfo' FONCTIONNE T-IL AUSSI AVEC LES LECTEURS DE CD ?
* TODO : IL FAUDRAIT AUSSI FAIRE UN TEST AVEC DES LECTEURS / GRAVEURS DE CD
* TODO
*/
gstr = GetInfo_mediainfo( Lcurentry->useline );
Lout = gstr->str;
if (*Lout) {
if ((Ptr = strstr (Lout, "INQUIRY:"))) {
/* sur mon ordi :
INQUIRY: [_NEC ][DVD_RW ND-3520A ][1.04]
INQUIRY: [_NEC ][DVD_RW ND-3520A ][3.05] -- Apres un flash bios
INQUIRY: [_NEC ][DVD_RW ND-3520A ][3.06] -- Apres un flash bios
INQUIRY: [DVDRW ][IDE 16X ][A07R]
INQUIRY: [DVDRW ][IDE 16X ][A190] -- Apres un flash bios
*/
/* remplacer tous les '[' et les ']' par ' ' */
if (strchr (Ptr, '[') && strchr (Ptr, ']')) {
Ptr = strchr (Ptr, '[');
i = 0;
while (*Ptr != '\n') str [ i++ ] = *Ptr++;
str [ i ] = '\0';
while ((Ptr = strchr (str, '['))) *Ptr = ' ';
while ((Ptr = strchr (str, ']'))) *Ptr = ' ';
/* supprimer les espaces de debut */
Ptr = str;
while (*Ptr == ' ') Ptr ++;
strcpy (str, Ptr);
/* supprimer les espaces de fin */
Ptr = str;
while (*Ptr) Ptr ++;
Ptr --;
while (*Ptr == ' ') Ptr --;
Ptr ++;
*Ptr = '\0';
/* supprimer les doubles espaces */
Ptr = str;
while (*Ptr) {
if ((*Ptr==' ') && (*(Ptr+1)==' ')) {
strcpy (Ptr, Ptr+1);
Ptr = str;
continue;
}
Ptr ++;
}
if( TRUE == OptionsCommandLine.BoolVerboseMode ) {
g_print ("\tline[ %d ] %s ", pass, Lcurentry->tp == IDE ? "IDE" : "SCSI");
g_print ("%s\t'%s'\n", Lcurentry->useline, str);
}
if ((Media = (MEDIA *)g_malloc0 (sizeof (MEDIA)))) {
Media->Full_Name = g_strdup (str);
Media->Device = g_strdup (Lcurentry->useline);
Media->Num = var_scancd.TotalReadersDetected;
var_scancd.TotalReadersDetected ++;
Media->line = pass;
Media->type = Lcurentry->tp == IDE ? 0 : 1;
List = g_list_append (List, Media);
}
}
else {
PRINT_FUNC_LF();
if( TRUE == OptionsCommandLine.BoolVerboseMode )
g_print ("La ligne renvoyee par: dvd+rw-mediainfo est inconnue\n");
}
}
}
g_string_free (gstr, TRUE);
Lout = NULL;
}
}
g_print ("\n");
return (List);
}
// Retourne un pointeur sur le media actif
//
gchar *scan_get_text_combo_cd (TYPE_READER type_reader)
{
gint Nmr_Combo_Actif = -1;
GList *List = NULL;
MEDIA *Media = NULL;
/* PRINT_FUNC_LF(); */
if (type_reader == _CD_) {
Nmr_Combo_Actif = gtk_combo_box_get_active (var_cd.Adr_Combo_Box);
}
else if (type_reader == _DVD_) {
Nmr_Combo_Actif = gtk_combo_box_get_active (var_dvd.Adr_ComboBox_Reader);
if( dvd_bool_read_dvd_from_directory () == TRUE ) {
return( (gchar *)var_dvd.from.path );
}
}
List = g_list_first (var_scancd.Media_List);
while (List) {
if ((Media = (MEDIA *)List->data)) {
if (Media->Num == Nmr_Combo_Actif) return ((gchar *)Media->Device);
}
List = g_list_next(List);
}
return ((gchar *)NULL);
}
//
//
GList *scan_get_glist (void)
{
if (var_scancd.Media_List == NULL)
var_scancd.Media_List = scan_scan_drives_cd_dvd ();
return ( (GList *)var_scancd.Media_List);
}
//
//
void scan_eject_media (TYPE_READER TypeReadder)
{
GetInfo_eject ( scan_get_text_combo_cd (TypeReadder));
}
xcfa-4.3.6/src/cd_audio_toc.c 0000644 0001750 0001750 00000016022 12122563465 012744 0000000 0000000 /*
* file : cd_audio_toc.h
* project : xcfa
* with : Gtk-2
*
* copyright : (C) 2003 - 2013 by Claude Bulin
*
* xcfa - GTK+ implementation of the GNU shell command
* GNU General Public License
*
* This file is part of XCFA.
*
* XCFA is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* at your option) any later version.
*
* XCFA is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with XCFA. If not, see .
*/
#ifdef HAVE_CONFIG_H
#include "../config.h"
#endif
#include
#include
#include
#include
#include
#ifdef ENABLE_STATIC_LIBRARY
#include "../lib/lib.h"
#endif
#include "global.h"
#include "file.h"
#include "cd_audio_extract.h"
#include "configuser.h"
#include "scan.h"
#include "cd_cue.h"
#include "win_info.h"
#include "win_scan.h"
#include "cd_audio.h"
#include "cd_curl.h"
#include "statusbar.h"
#include "prg_init.h"
#include "cd_curl.h"
#include "options.h"
/*
*---------------------------------------------------------------------------
* VARIABLES
*---------------------------------------------------------------------------
*/
/* Activation du thread de lecture du catalogue du cd-audio et
* des datas WEB si l'utilisateur est connecte
* --
* entree : -
* retour : -
*/
void *cdaudiotoc_thread_do_read_toc_cd (void *data)
{
var_cd.bool_thread_read_toc_cd = TRUE;
EnteteCD.Bool_Read_Infos_cd = CdCurl_get_info_cd();
var_cd.bool_thread_read_toc_cd = FALSE;
pthread_exit (0);
}
/* Mise a jour des informations du cd-audio
* --
* entree :
* gpointer data :
* retour :
* TRUE
*/
static gint cdaudiotoc_timeout_do_read_toc_cd (gpointer data)
{
if (var_cd.bool_thread_read_toc_cd == FALSE) {
// FIN du timeout Update_cdaudio_do_read_toc_cd
gtk_timeout_remove (var_cd.handler_timeout_read_toc_cd);
cdaudio_put_label_duree ("");
cdaudio_put_label_titre ("");
if (EnteteCD.Bool_Read_Infos_cd == TRUE) {
if (EnteteCD.GList_Audio_cd != NULL) {
cdaudio_affiche_glist_audio ();
cdaudio_set_flag_buttons ();
cdaudio_put_label_duree (EnteteCD.StrDureeCd);
cdaudio_put_label_titre (EnteteCD.TitleCD != NULL ? EnteteCD.TitleCD : "");
OptionsCd_set_entry_and_label();
/* TO DEBUG : A VERIFIER DES QUE CONNECTION WEB EST OK
g_print ("\n");
g_print ("EnteteCD.TitleCD : %s\n", EnteteCD.TitleCD);
g_print ("EnteteCD.Title : %s\n", EnteteCD.Title);
g_print ("EnteteCD.Artiste : %s\n", EnteteCD.Artiste);
g_print ("EnteteCD.StrDureeCd : %s\n", EnteteCD.StrDureeCd);
g_print ("EnteteCD.Num_ID_CD : %lu\n",EnteteCD.Num_ID_CD);
g_print ("EnteteCD.Str_ID_CD : %s\n", EnteteCD.Str_ID_CD);
g_print ("EnteteCD.TotalTracks : %d\n", EnteteCD.TotalTracks);
g_print ("EnteteCD.NumGenre : %d\n", EnteteCD.NumGenre);
g_print ("EnteteCD.StrGenre : %s\n", EnteteCD.StrGenre);
g_print ("GENRE : %s\n", cddb_disc_db_genre(EnteteCD.NumGenre));
g_print ("EnteteCD.NumYear : %d\n", EnteteCD.NumYear);
g_print ("EnteteCD.StrYear : %s\n", EnteteCD.StrYear);
g_print ("EnteteCD.Bool_Read_Infos_cd : %s\n", EnteteCD.Bool_Read_Infos_cd ? "TRUE" : "FALSE");
g_print ("EnteteCD.Message : %s\n", EnteteCD.Message);
*/
}
}
CdCurl_set_list_discid();
StatusBar_set_mess( NOTEBOOK_CD_AUDIO, _STATUSBAR_SIMPLE_, EnteteCD.Message);
StatusBar_puts();
var_cd.bool_timeout_read_toc_cd = FALSE;
cd_audio_bool_access_discid( TRUE );
WindScan_close ();
}
return (TRUE);
}
/* Lecture du catalogue du cd-audio
* --
* entree : -
* retour : -
*/
void cdaudiotoc_reffresh_list_cd (void)
{
pthread_t nmr_tid;
if (var_cd.Adr_Combo_Box == NULL) return;
if( FALSE == PrgInit.bool_cdda2wav ) {
PRINT_FUNC_LF();
if( FALSE == libutils_find_file( "icedax" ) && FALSE == libutils_find_file( "cdda2wav" )) {
wininfo_create (
WindMain,
_("cdda2wav and icedax NOT FOUND"),
_("Please, install packages [ icedax, cdda2wav ]"),
"");
}
else if( FALSE == libutils_find_file( "icedax" )) {
wininfo_create (
WindMain,
_("icedax NOT FOUND"),
_("Please, install package [ icedax ]"),
"");
}
else if( FALSE == libutils_find_file( "cdda2wav" )) {
wininfo_create (
WindMain,
_("cdda2wav NOT FOUND"),
_("Please, install package [ cdda2wav ]"),
"");
}
return;
}
if( FALSE == PrgInit.bool_cdparanoia ) {
PRINT_FUNC_LF();
wininfo_create (
WindMain,
_("cdparanoia NOT FOUND"),
_("Please, install package [ cdparanoia ]"),
"");
return;
}
if( FALSE == PrgInit.bool_cd_discid ) {
wininfo_create (
WindMain,
_("cd-discid NOT FOUND"),
_("Please, install packages [ cd-discid ]"),
"");
return;
}
if( SERVER_PROXY_PARAM == Config.ServeurCddb ) {
gboolean BoolAccess = TRUE;
if( '\0' == *Config.entry_proxy_server ) BoolAccess = FALSE;
if( '\0' == *Config.entry_proxy_port ) BoolAccess = FALSE;
if( FALSE == BoolAccess ) {
wininfo_create (
WindMain,
_("ERREUR datas proxy"),
_("Veuillez renseigner les champs du proxy"),
"");
return;
}
}
WindScan_open ("Scan CD", WINDSCAN_PULSE);
WindScan_show_cancel( FALSE );
WindScan_set_label ("Scanning CD ...");
WindScan_set_pulse ();
EnteteCD.NameCD_Device = scan_get_text_combo_cd (_CD_);
cdaudio_deallocate_glist_context ();
cdaudio_deallocate_glist ();
cdcue_remove_base_ioctl ();
gtk_list_store_clear (var_cd.Adr_List_Store);
cdaudio_set_flag_buttons ();
// ACTIVATION de l'update qui attends la fin du thread cd audio
var_cd.bool_thread_read_toc_cd = TRUE;
var_cd.bool_timeout_read_toc_cd = TRUE;
var_cd.handler_timeout_read_toc_cd = gtk_timeout_add (50, cdaudiotoc_timeout_do_read_toc_cd, 0);
pthread_create (&nmr_tid, NULL ,(void *)cdaudiotoc_thread_do_read_toc_cd, (void *)NULL);
}
//
//
void cdaudiotoc_button_eject_cd_clicked (void)
{
if (FALSE == libutils_find_file ("eject")) {
PRINT_FUNC_LF();
wininfo_create (
WindMain,
"eject NOT FOUND !",
"Please, install package [ eject ]",
"");
return;
}
cdaudio_deallocate_glist_context ();
cdaudio_deallocate_glist ();
cdcue_remove_base_ioctl ();
gtk_list_store_clear (var_cd.Adr_List_Store);
cdaudio_set_flag_buttons ();
scan_eject_media (_CD_);
libcombo_remove_options( GTK_COMBO_BOX(var_cd.Adr_combobox_discid_cd));
gtk_combo_box_set_active( GTK_COMBO_BOX(var_cd.Adr_combobox_discid_cd), 0 );
while (gtk_events_pending()) gtk_main_iteration();
gtk_widget_hide( GTK_WIDGET (GLADE_GET_OBJECT("frame_discid")));
while (gtk_events_pending()) gtk_main_iteration();
}
xcfa-4.3.6/src/poche_save.c 0000644 0001750 0001750 00000011436 12122563465 012450 0000000 0000000 /*
* file : poche_save.c
* project : xcfa
* with : Gtk-2
*
* copyright : (C) 2003 - 2013 by Claude Bulin
*
* xcfa - GTK+ implementation of the GNU shell command
* GNU General Public License
*
* This file is part of XCFA.
*
* XCFA is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* at your option) any later version.
*
* XCFA is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with XCFA. If not, see .
*/
#ifdef HAVE_CONFIG_H
#include "../config.h"
#endif
#include
#include
#include
#include
#include
#include
#include
#include
#include // M_PI
#include
#include
#include
#include
#include
#ifdef ENABLE_STATIC_LIBRARY
#include "../lib/lib.h"
#endif
#include "global.h"
#include "win_info.h"
#include "configuser.h"
#include "statusbar.h"
#include "poche.h"
// SEE:
// http://en.literateprograms.org/Hello_World_%28C,_Cairo%29
//
void pochesave_write_png( gchar *fname, gint width, gint height )
{
cairo_surface_t *cs;
cs = cairo_image_surface_create( CAIRO_FORMAT_ARGB32, width, height );
pochedraw_paint( cs );
cairo_surface_write_to_png( cs, fname );
cairo_surface_destroy( cs );
}
// SEE:
// http://en.literateprograms.org/Hello_World_%28C,_Cairo%29
//
void pochesave_write_pdf( gchar *fname, gint width, gint height )
{
cairo_surface_t *cs;
cs = cairo_pdf_surface_create( fname, width, height );
pochedraw_paint( cs );
cairo_surface_destroy( cs );
}
// SEE:
// http://en.literateprograms.org/Hello_World_%28C,_Cairo%29
//
void pochesave_write_ps( gchar *fname, gint width, gint height )
{
cairo_surface_t *cs;
cs = cairo_ps_surface_create( fname, width, height );
pochedraw_paint( cs );
cairo_surface_destroy( cs );
}
//
// PRINT WITH GIMP IS OK
// PRINT PS and PDF IS OK
//
void on_button_save_clicked( GtkButton *button, gpointer user_data )
{
gint width;
gint height;
gdouble OldScale = view.scale;
gboolean BoolScaleAdjust = view.BoolScaleAdjust;
gchar *PathNameSaveFile = NULL;
gchar *NameSaveFile = pochetxt_get_ptr_entry_name_file_to_save();
if( NULL == NameSaveFile || '\0' == *NameSaveFile ) {
wininfo_create (
WindMain,
_("Nom de fichier absent !!"),
_("Pour resoudre ce probleme:"),
"\n",
"-----------------------------------\n",
_("Saisissez un nom de fichier sans extention"),
"");
return;
}
view.BoolScaleAdjust = FALSE;
//
// PDF POSTSCRIPT
//
// StatusBar_puts( _("Sauvegarde aux formats PDF et PostScript") );
StatusBar_set_mess( NOTEBOOK_POCHETTE, _STATUSBAR_SIMPLE_, _("Sauvegarde aux formats PDF et PostScript") );
view.scale = 1.55;
poche_set_size_request();
gtk_widget_queue_draw( view.AdrDrawingarea );
while (gtk_events_pending()) gtk_main_iteration();
width = view.AdrDrawingarea->allocation.width;
height = view.AdrDrawingarea->allocation.height;
PathNameSaveFile = g_strdup_printf( "%s/%s.pdf", Config.PathSaveImg, NameSaveFile );
// REDIRECTION VERS PDF ET POSTSCRIPT
view.BoolSaveToFile = TRUE;
pochesave_write_pdf( PathNameSaveFile, width, height );
g_free( PathNameSaveFile );
PathNameSaveFile = NULL;
PathNameSaveFile = g_strdup_printf( "%s/%s.ps", Config.PathSaveImg, NameSaveFile );
pochesave_write_ps( PathNameSaveFile, width, height );
g_free( PathNameSaveFile );
PathNameSaveFile = NULL;
view.BoolSaveToFile = FALSE;
//
// PNG
//
// StatusBar_puts( _("Sauvegarde au format PNG") );
StatusBar_set_mess( NOTEBOOK_POCHETTE, _STATUSBAR_SIMPLE_, _("Sauvegarde au format PNG") );
view.scale = 2.0;
poche_set_size_request();
gtk_widget_queue_draw( view.AdrDrawingarea );
while (gtk_events_pending()) gtk_main_iteration();
width = view.AdrDrawingarea->allocation.width;
height = view.AdrDrawingarea->allocation.height;
PathNameSaveFile = g_strdup_printf( "%s/%s.png", Config.PathSaveImg, NameSaveFile );
// REDIRECTION VERS PNG
view.BoolSaveToFile = TRUE;
pochesave_write_png( PathNameSaveFile, width, height );
g_free( PathNameSaveFile );
PathNameSaveFile = NULL;
view.BoolSaveToFile = FALSE;
view.scale = OldScale;
view.BoolScaleAdjust = BoolScaleAdjust;
poche_set_size_request();
gtk_widget_queue_draw( view.AdrDrawingarea );
// StatusBar_puts( "" );
StatusBar_set_mess( NOTEBOOK_POCHETTE, _STATUSBAR_SIMPLE_, "" );
}
xcfa-4.3.6/src/popup.c 0000644 0001750 0001750 00000143724 12122563465 011505 0000000 0000000 /*
* file : popup.c
* project : xcfa
* with : Gtk-2
*
* copyright :( C) 2003 - 2013 by Claude Bulin
*
* xcfa - GTK+ implementation of the GNU shell command
* GNU General Public License
*
* This file is part of XCFA.
*
* XCFA is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* at your option) any later version.
*
* XCFA is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with XCFA. If not, see .
*/
#ifdef HAVE_CONFIG_H
#include "../config.h"
#endif
#include
#include
#include
#include
#ifdef ENABLE_STATIC_LIBRARY
#include "../lib/lib.h"
#endif
#include "global.h"
#include "poche.h"
#include "cd_audio.h"
#include "dvd.h"
#include "split.h"
#include "popup.h"
typedef struct {
DETAIL *detail;
CD_AUDIO *Audio;
TYPE_FILE_IS type_file_is;
} VAR_POPUP;
VAR_POPUP VarPopup;
typedef struct {
gboolean Show;
gint Type;
gint Val;
gint Call;
} MENU_VAL;
typedef struct {
GtkWidget *Widget;
gchar *Title;
MENU_VAL Op;
} POP_MENU;
#define CASE_POP_MENU_FICHERS 0
#define MAX_POP_MENU_FICHERS 9
POP_MENU PopMenuFichiers [ MAX_POP_MENU_FICHERS ] = {
/*
WIDGET TITLE OP
SHOW TYPE VAL CALL
*/
{NULL, gettext_noop(" Deselection globale"), {TRUE, 0, 0, CASE_POP_MENU_FICHERS}},
{NULL, gettext_noop(" Deselection verticale"), {TRUE, 0, 0, CASE_POP_MENU_FICHERS +1}},
{NULL, gettext_noop(" Deselection horizontale"), {TRUE, 0, 0, CASE_POP_MENU_FICHERS +2}},
{NULL, gettext_noop(" ---"), {FALSE, -1, 0, -1}},
{NULL, gettext_noop(" Selection verticale"), {TRUE, 0, 0, CASE_POP_MENU_FICHERS +3}},
{NULL, gettext_noop(" Selection Expert verticale"), {TRUE, 0, 0, CASE_POP_MENU_FICHERS +4}},
{NULL, gettext_noop(" ---"), {FALSE, -1, 0, -1}},
{NULL, gettext_noop(" Selection horizontale"), {TRUE, 0, 0, CASE_POP_MENU_FICHERS +5}},
{NULL, gettext_noop(" Selection Expert horizontale "), {TRUE, 0, 0, CASE_POP_MENU_FICHERS +6}}
};
#define CASE_POP_MENU_CD 10
#define MAX_POP_MENU_CD 9
POP_MENU PopMenuCD [ MAX_POP_MENU_CD ] = {
/*
WIDGET TITLE OP
SHOW TYPE VAL CALL
*/
{NULL, gettext_noop(" Deselection globale"), {TRUE, 0, 0, CASE_POP_MENU_CD}},
{NULL, gettext_noop(" Deselection verticale"), {TRUE, 0, 0, CASE_POP_MENU_CD +1}},
{NULL, gettext_noop(" Deselection horizontale"), {TRUE, 0, 0, CASE_POP_MENU_CD +2}},
{NULL, gettext_noop(" ---"), {FALSE, -1, 0, -1}},
{NULL, gettext_noop(" Selection verticale"), {TRUE, 0, 0, CASE_POP_MENU_CD +3}},
{NULL, gettext_noop(" Selection Expert verticale"), {TRUE, 0, 0, CASE_POP_MENU_CD +4}},
{NULL, gettext_noop(" ---"), {FALSE, -1, 0, -1}},
{NULL, gettext_noop(" Selection horizontale"), {TRUE, 0, 0, CASE_POP_MENU_CD +5}},
{NULL, gettext_noop(" Selection Expert horizontale "), {TRUE, 0, 0, CASE_POP_MENU_CD +6}}
};
#define CASE_POP_MENU_NORMALISE_CD 200
#define MAX_POP_MENU_NORMALISE_CD 3
POP_MENU PopMenuNormaliseCD [ MAX_POP_MENU_NORMALISE_CD ] = {
/*
WIDGET TITLE OP
SHOW TYPE VAL CALL
*/
{NULL, gettext_noop(" Deselection verticale "), {TRUE, 0, 0, CASE_POP_MENU_NORMALISE_CD +0}},
{NULL, gettext_noop(" ---"), {FALSE, -1, 0, -1}},
{NULL, gettext_noop(" Selection verticale "), {TRUE, 0, 0, CASE_POP_MENU_NORMALISE_CD +1}}
};
#define CASE_POP_MENU_NORMALISE_DVD 300
#define MAX_POP_MENU_NORMALISE_DVD 3
POP_MENU PopMenuNormaliseDVD [ MAX_POP_MENU_NORMALISE_DVD ] = {
/*
WIDGET TITLE OP
SHOW TYPE VAL CALL
*/
{NULL, gettext_noop(" Deselection verticale "), {TRUE, 0, 0, CASE_POP_MENU_NORMALISE_DVD +0}},
{NULL, gettext_noop(" ---"), {FALSE, -1, 0, -1}},
{NULL, gettext_noop(" Selection verticale "), {TRUE, 0, 0, CASE_POP_MENU_NORMALISE_DVD +1}}
};
#define CASE_POP_MENU_REPLAYGAIN 30
#define MAX_POP_MENU_REPLAYGAIN 6
POP_MENU PopMenuReplayGain[ MAX_POP_MENU_REPLAYGAIN ] = {
/*
WIDGET TITLE OP
SHOW TYPE VAL CALL
*/
{NULL, gettext_noop("---SELECTION VERTICALE-----"), {FALSE, -2, 0, -1}},
{NULL, gettext_noop(" Deselection verticale "), {TRUE, 0, 0, CASE_POP_MENU_REPLAYGAIN +0}},
{NULL, gettext_noop(" ---"), {FALSE, -1, 0, -1}},
{NULL, gettext_noop(" Selection PISTE "), {TRUE, 0, 0, CASE_POP_MENU_REPLAYGAIN +1}},
{NULL, gettext_noop(" Selection ALBUM "), {TRUE, 0, 0, CASE_POP_MENU_REPLAYGAIN +2}},
{NULL, gettext_noop(" Selection NETTOYER "), {TRUE, 0, 0, CASE_POP_MENU_REPLAYGAIN +3}}
};
#define CASE_POP_MENU_TRASH 40
#define MAX_POP_MENU_TRASH 3
POP_MENU PopMenuTrash[ MAX_POP_MENU_TRASH ] = {
/*
WIDGET TITLE OP
SHOW TYPE VAL CALL
*/
{NULL, gettext_noop("---MENU TRASH--------------"), {FALSE, -2, 0, -1}},
{NULL, gettext_noop(" Deselection verticale"), {TRUE, 0, 0, CASE_POP_MENU_TRASH}},
{NULL, gettext_noop(" Selection verticale "), {TRUE, 0, 0, CASE_POP_MENU_TRASH +1}}
};
//
//
void popup_callback( GtkMenuItem *menuitem, gpointer user_data )
{
MENU_VAL *Op =( MENU_VAL *)user_data;
if( -1 == Op->Call) return;
// g_print("Op->Call = %d\n",Op->Call );
switch( Op->Call ) {
// Deselection globale
case CASE_POP_MENU_FICHERS :
file_from_popup( FILE_CONV_DESELECT_ALL, VarPopup.detail, VarPopup.type_file_is );
break;
// Deselection verticale
case CASE_POP_MENU_FICHERS +1 :
file_from_popup( FILE_CONV_DESELECT_V, VarPopup.detail, VarPopup.type_file_is );
break;
// Deselection horizontale
case CASE_POP_MENU_FICHERS +2 :
file_from_popup( FILE_CONV_DESELECT_H, VarPopup.detail, VarPopup.type_file_is );
break;
// Selection verticale
case CASE_POP_MENU_FICHERS +3 :
file_from_popup( FILE_CONV_SELECT_V, VarPopup.detail, VarPopup.type_file_is );
break;
// Selection Expert verticale
case CASE_POP_MENU_FICHERS +4 :
file_from_popup( FILE_CONV_SELECT_EXPERT_V, VarPopup.detail, VarPopup.type_file_is );
break;
// Selection horizontale
case CASE_POP_MENU_FICHERS +5 :
file_from_popup( FILE_CONV_SELECT_H, VarPopup.detail, VarPopup.type_file_is );
break;
// Selection Expert horizontale
case CASE_POP_MENU_FICHERS +6 :
file_from_popup( FILE_CONV_SELECT_EXPERT_H, VarPopup.detail, VarPopup.type_file_is );
break;
// Deselection globale
case CASE_POP_MENU_CD +0 :
cdaudio_from_popup( CD_CONV_DESELECT_ALL, VarPopup.Audio, VarPopup.type_file_is );
break;
// Deselection verticale
case CASE_POP_MENU_CD +1 :
cdaudio_from_popup( CD_CONV_DESELECT_V, VarPopup.Audio, VarPopup.type_file_is );
break;
// Deselection horizontale
case CASE_POP_MENU_CD +2 :
cdaudio_from_popup( CD_CONV_DESELECT_H, VarPopup.Audio, VarPopup.type_file_is );
break;
// Selection verticale
case CASE_POP_MENU_CD +3 :
cdaudio_from_popup( CD_CONV_SELECT_V, VarPopup.Audio, VarPopup.type_file_is );
break;
// Selection Expert verticale
case CASE_POP_MENU_CD +4 :
cdaudio_from_popup( CD_CONV_SELECT_EXPERT_V, VarPopup.Audio, VarPopup.type_file_is );
break;
// Selection horizontale
case CASE_POP_MENU_CD +5 :
cdaudio_from_popup( CD_CONV_SELECT_H, VarPopup.Audio, VarPopup.type_file_is );
break;
// Selection Expert horizontale
case CASE_POP_MENU_CD +6 :
cdaudio_from_popup( CD_CONV_SELECT_EXPERT_H, VarPopup.Audio, VarPopup.type_file_is );
break;
// Deselection verticale
case CASE_POP_MENU_NORMALISE_CD +0:
cdaudio_from_popup( CD_REPLAYGAIN_SELECT_V, VarPopup.Audio, VarPopup.type_file_is );
break;
// Selection verticale
case CASE_POP_MENU_NORMALISE_CD +1:
cdaudio_from_popup( CD_REPLAYGAIN_DESELECT_V, VarPopup.Audio, VarPopup.type_file_is );
break;
// Deselection verticale
case CASE_POP_MENU_NORMALISE_DVD +0:
dvd_from_popup( CD_NORMALISE_SELECT_V , FALSE );
break;
// Selection verticale
case CASE_POP_MENU_NORMALISE_DVD +1:
dvd_from_popup( CD_NORMALISE_DESELECT_V, TRUE );
break;
// Deselection verticale
case CASE_POP_MENU_REPLAYGAIN +0 :
file_from_popup( FILE_REPLAYGAIN_DESELECT_V, VarPopup.detail, VarPopup.type_file_is );
break;
// Selection PISTE
case CASE_POP_MENU_REPLAYGAIN +1 :
file_from_popup( FILE_REPLAYGAIN_SELECT_PISTE, VarPopup.detail, VarPopup.type_file_is );
break;
// Selection ALBUM
case CASE_POP_MENU_REPLAYGAIN +2 :
file_from_popup( FILE_REPLAYGAIN_SELECT_ALBUM, VarPopup.detail, VarPopup.type_file_is );
break;
// Selection NETTOYER
case CASE_POP_MENU_REPLAYGAIN +3 :
file_from_popup( FILE_REPLAYGAIN_SELECT_NETTOYER, VarPopup.detail, VarPopup.type_file_is );
break;
// Deselection verticale
case CASE_POP_MENU_TRASH :
file_from_popup( FILE_TRASH_DESELECT_V, VarPopup.detail, VarPopup.type_file_is );
break;
// Selection verticale
case CASE_POP_MENU_TRASH +1 :
file_from_popup( FILE_TRASH_SELECT_V, VarPopup.detail, VarPopup.type_file_is );
break;
}
}
//
//
void popup_make_popup( POP_MENU *p_popup, gint nbr_op )
{
GtkWidget *menu = NULL;
GtkWidget *SubMenu = NULL;
gint cpt = 0;
gint val = 0;
if( VarPopup.detail != NULL ) {
if( VarPopup.detail->type_infosong_file_is == FILE_IS_WAV ) {
INFO_WAV *info =( INFO_WAV *)VarPopup.detail->info;
val = info->LevelDbfs.level;
}
else if( VarPopup.detail->type_infosong_file_is == FILE_IS_OGG ) {
INFO_OGG *info =( INFO_OGG *)VarPopup.detail->info;
val = info->LevelDbfs.level;
}
else if( VarPopup.detail->type_infosong_file_is == FILE_IS_MP3 ) {
INFO_MP3 *info =( INFO_MP3 *)VarPopup.detail->info;
val = info->LevelDbfs.level;
}
val = val;
}
menu = gtk_menu_new( );
gtk_widget_set_extension_events( menu, GDK_EXTENSION_EVENTS_ALL );
for( cpt = 0; cpt < nbr_op; cpt ++ ) {
if( p_popup[ cpt ].Op.Type > -1 ) {
p_popup[ cpt ].Widget = gtk_menu_item_new_with_mnemonic( gettext(p_popup[ cpt ].Title) );
gtk_widget_show( p_popup[ cpt ].Widget );
gtk_container_add( GTK_CONTAINER( menu), p_popup[ cpt ].Widget );
}
else if( p_popup[ cpt ].Op.Type == -1 ) {
p_popup[ cpt ].Widget = gtk_separator_menu_item_new( );
gtk_widget_show( p_popup[ cpt ].Widget );
gtk_container_add( GTK_CONTAINER( menu), p_popup[ cpt ].Widget );
}
else if( p_popup[ cpt ].Op.Type == -2 ) {
p_popup[ cpt ].Widget = gtk_menu_item_new_with_mnemonic( gettext(p_popup[ cpt ].Title) );
gtk_widget_show( p_popup[ cpt ].Widget );
gtk_container_add( GTK_CONTAINER( menu), p_popup[ cpt ].Widget );
}
else if( p_popup[ cpt ].Op.Type == -3 ) {
p_popup[ cpt ].Widget = gtk_menu_item_new_with_mnemonic( gettext(p_popup[ cpt ].Title) );
gtk_widget_show( p_popup[ cpt ].Widget );
gtk_container_add( GTK_CONTAINER( menu), p_popup[ cpt ].Widget );
SubMenu = gtk_menu_new( );
gtk_menu_item_set_submenu( GTK_MENU_ITEM( p_popup[ cpt ].Widget), SubMenu );
}
else if( p_popup[ cpt ].Op.Type == -10 ) {
p_popup[ cpt ].Widget = gtk_image_menu_item_new_with_mnemonic( gettext(p_popup[ cpt ].Title) );
gtk_widget_show( p_popup[ cpt ].Widget );
gtk_container_add( GTK_CONTAINER( SubMenu), p_popup[ cpt ].Widget );
}
gtk_widget_set_sensitive( p_popup[ cpt ].Widget, p_popup[ cpt ].Op.Show );
}
for( cpt = 0; cpt < nbr_op; cpt ++ ) {
g_signal_connect( (gpointer) p_popup[ cpt ].Widget, "activate",
G_CALLBACK( popup_callback),
(gpointer)&p_popup[ cpt ].Op );
}
GLADE_HOOKUP_OBJECT_NO_REF( menu, menu, "menu" );
for( cpt = 0; cpt < nbr_op; cpt ++ ) {
GLADE_HOOKUP_OBJECT( menu, p_popup[ cpt ].Widget, p_popup[ cpt ].Title );
}
gtk_menu_popup( GTK_MENU( menu), NULL, NULL, NULL, NULL, 3, 0 );
}
//
//
// POPUP CD
//
//
void popup_cd( CD_AUDIO *Audio, TYPE_FILE_IS TypeFileIs )
{
VarPopup.detail = (DETAIL *)NULL;
VarPopup.type_file_is = TypeFileIs;
VarPopup.Audio = (CD_AUDIO *)Audio;
popup_make_popup( PopMenuCD, MAX_POP_MENU_CD );
}
//
//
// POPUP FILE
//
//
void popup_file( DETAIL *detail, TYPE_FILE_IS TypeFileIs )
{
VarPopup.Audio = (CD_AUDIO *)NULL;
VarPopup.detail = (DETAIL *)detail;
VarPopup.type_file_is = TypeFileIs;
popup_make_popup( PopMenuFichiers, MAX_POP_MENU_FICHERS );
}
//
//
// POPUP FILE REPLAYGAIN
//
//
void popup_file_ReplayGain( DETAIL *detail )
{
VarPopup.detail = (DETAIL *)detail;
VarPopup.Audio = (CD_AUDIO *)NULL;
PopMenuReplayGain[ 3 ].Op.Show = TRUE;
if( VarPopup.detail->type_infosong_file_is == FILE_IS_FLAC ) {
PopMenuReplayGain[ 3 ].Op.Show = FALSE;
}
popup_make_popup( PopMenuReplayGain, MAX_POP_MENU_REPLAYGAIN );
}
//
//
// POPUP NORMALISE DVD
//
//
void popup_normalise_dvd( void )
{
VarPopup.detail = (DETAIL *)NULL;
VarPopup.Audio = (CD_AUDIO *)NULL;
popup_make_popup( PopMenuNormaliseDVD, MAX_POP_MENU_NORMALISE_DVD );
}
//
//
// POPUP NORMALISE CD
//
//
void popup_normalise_cd( void )
{
VarPopup.detail = (DETAIL *)NULL;
VarPopup.Audio = (CD_AUDIO *)NULL;
popup_make_popup( PopMenuNormaliseCD, MAX_POP_MENU_NORMALISE_CD );
}
//
//
// POPUP TRASH
//
//
void popup_trash( void )
{
VarPopup.detail = (DETAIL *)NULL;
VarPopup.Audio = (CD_AUDIO *)NULL;
popup_make_popup( PopMenuTrash, MAX_POP_MENU_TRASH );
}
//
//
// POPUP FILE WAV PISTE
//
//
void on_CellTrack1_activate( GtkMenuItem *menuitem, gpointer user_data )
{
DETAIL *detail = ( DETAIL *)user_data;
FileWav_from_popup( FILEWAV_TRACK_CELL, detail, -2, 1, -2 );
}
void on_CellTrack2_activate( GtkMenuItem *menuitem, gpointer user_data )
{
DETAIL *detail = ( DETAIL *)user_data;
FileWav_from_popup( FILEWAV_TRACK_CELL, detail, -2, 2, -2 );
}
void on_CellTrack4_activate( GtkMenuItem *menuitem, gpointer user_data )
{
DETAIL *detail = ( DETAIL *)user_data;
FileWav_from_popup( FILEWAV_TRACK_CELL, detail, -2, 4, -2 );
}
void on_CellTrack6_activate( GtkMenuItem *menuitem, gpointer user_data )
{
DETAIL *detail = ( DETAIL *)user_data;
FileWav_from_popup( FILEWAV_TRACK_CELL, detail, -2, 6, -2 );
}
void on_CellTrackOriginal_activate( GtkMenuItem *menuitem, gpointer user_data )
{
DETAIL *detail = ( DETAIL *)user_data;
FileWav_from_popup( FILEWAV_TRACK_CELL, detail, -2, -1, -2 );
}
void popup_file_wav_piste( DETAIL *detail)
{
GtkWidget *Menu;
GtkWidget *CellTrack1;
GtkWidget *CellTrack2;
GtkWidget *CellTrack4;
GtkWidget *CellTrack6;
GtkWidget *CellSeparate;
GtkWidget *CellTrackOriginal;
Menu = gtk_menu_new( );
CellTrack1 = gtk_menu_item_new_with_mnemonic( _("1 piste") );
gtk_widget_show( CellTrack1 );
gtk_container_add( GTK_CONTAINER( Menu), CellTrack1 );
CellTrack2 = gtk_menu_item_new_with_mnemonic( _("2 pistes") );
gtk_widget_show( CellTrack2 );
gtk_container_add( GTK_CONTAINER( Menu), CellTrack2 );
CellTrack4 = gtk_menu_item_new_with_mnemonic( _("4 pistes") );
gtk_widget_show( CellTrack4 );
gtk_container_add( GTK_CONTAINER( Menu), CellTrack4 );
CellTrack6 = gtk_menu_item_new_with_mnemonic( _("6 pistes") );
gtk_widget_show( CellTrack6 );
gtk_container_add( GTK_CONTAINER( Menu), CellTrack6 );
CellSeparate = gtk_separator_menu_item_new( );
gtk_widget_show( CellSeparate );
gtk_container_add( GTK_CONTAINER( Menu), CellSeparate );
CellTrackOriginal = gtk_menu_item_new_with_mnemonic( _("Valeur d'origine") );
gtk_widget_show( CellTrackOriginal );
gtk_container_add( GTK_CONTAINER( Menu), CellTrackOriginal );
g_signal_connect(( gpointer) CellTrack1, "activate", G_CALLBACK( on_CellTrack1_activate), detail );
g_signal_connect(( gpointer) CellTrack2, "activate", G_CALLBACK( on_CellTrack2_activate), detail );
g_signal_connect(( gpointer) CellTrack4, "activate", G_CALLBACK( on_CellTrack4_activate), detail );
g_signal_connect(( gpointer) CellTrack6, "activate", G_CALLBACK( on_CellTrack6_activate), detail );
g_signal_connect(( gpointer) CellTrackOriginal, "activate", G_CALLBACK( on_CellTrackOriginal_activate), detail );
GLADE_HOOKUP_OBJECT_NO_REF( Menu, Menu, "Menu" );
GLADE_HOOKUP_OBJECT( Menu, CellTrack1, "CellTrack1" );
GLADE_HOOKUP_OBJECT( Menu, CellTrack2, "CellTrack2" );
GLADE_HOOKUP_OBJECT( Menu, CellTrack4, "CellTrack4" );
GLADE_HOOKUP_OBJECT( Menu, CellTrack6, "CellTrack6" );
GLADE_HOOKUP_OBJECT( Menu, CellSeparate, "CellSeparate" );
GLADE_HOOKUP_OBJECT( Menu, CellTrackOriginal, "CellTrackOriginal" );
gtk_menu_popup( GTK_MENU( Menu), NULL, NULL, NULL, NULL, 3, 0 );
}
//
//
// POPUP FILE WAV FREQUENCE
//
//
void on_CellHertz8000_activate( GtkMenuItem *menuitem, gpointer user_data )
{
DETAIL *detail = ( DETAIL *)user_data;
FileWav_from_popup( FILEWAV_FREQUENCY_CELL_HERTZ, detail, 8000, -2, -2 );
}
void on_CellHertz22000_activate( GtkMenuItem *menuitem, gpointer user_data )
{
DETAIL *detail = ( DETAIL *)user_data;
FileWav_from_popup( FILEWAV_FREQUENCY_CELL_HERTZ, detail, 22000, -2, -2 );
}
void on_CellHertz32000_activate( GtkMenuItem *menuitem, gpointer user_data )
{
DETAIL *detail = ( DETAIL *)user_data;
FileWav_from_popup( FILEWAV_FREQUENCY_CELL_HERTZ, detail, 32000, -2, -2 );
}
void on_CellHertz44056_activate( GtkMenuItem *menuitem, gpointer user_data )
{
DETAIL *detail = ( DETAIL *)user_data;
FileWav_from_popup( FILEWAV_FREQUENCY_CELL_HERTZ, detail, 44056, -2, -2 );
}
void on_CellHertz44100_activate( GtkMenuItem *menuitem, gpointer user_data )
{
DETAIL *detail = ( DETAIL *)user_data;
FileWav_from_popup( FILEWAV_FREQUENCY_CELL_HERTZ, detail, 44100, -2, -2 );
}
void on_CellHertz48000_activate( GtkMenuItem *menuitem, gpointer user_data )
{
DETAIL *detail = ( DETAIL *)user_data;
FileWav_from_popup( FILEWAV_FREQUENCY_CELL_HERTZ, detail, 48000, -2, -2 );
}
void on_CellHertz88200_activate( GtkMenuItem *menuitem, gpointer user_data )
{
DETAIL *detail = ( DETAIL *)user_data;
FileWav_from_popup( FILEWAV_FREQUENCY_CELL_HERTZ, detail, 88200, -2, -2 );
}
void on_CellHertz96000_activate( GtkMenuItem *menuitem, gpointer user_data )
{
DETAIL *detail = ( DETAIL *)user_data;
FileWav_from_popup( FILEWAV_FREQUENCY_CELL_HERTZ, detail, 96000, -2, -2 );
}
void on_CellHertzOriginal_activate( GtkMenuItem *menuitem, gpointer user_data )
{
DETAIL *detail = ( DETAIL *)user_data;
FileWav_from_popup( FILEWAV_FREQUENCY_CELL_HERTZ, detail, -1, -2, -2 );
}
void popup_file_wav_frequence( DETAIL *detail)
{
GtkWidget *Menu;
GtkWidget *CellHertz8000;
GtkWidget *CellHertz22000;
GtkWidget *CellHertz32000;
GtkWidget *CellHertz44056;
GtkWidget *CellHertz44100;
GtkWidget *CellHertz48000;
GtkWidget *CellHertz88200;
GtkWidget *CellHertz96000;
GtkWidget *CellSeparate;
GtkWidget *CellHertzOriginal;
Menu = gtk_menu_new( );
gtk_widget_set_extension_events( Menu, GDK_EXTENSION_EVENTS_ALL );
CellHertz8000 = gtk_menu_item_new_with_mnemonic( _(" 8000 Hertz") );
gtk_widget_show( CellHertz8000 );
gtk_container_add( GTK_CONTAINER( Menu), CellHertz8000 );
CellHertz22000 = gtk_menu_item_new_with_mnemonic( _("22000 Hertz") );
gtk_widget_show( CellHertz22000 );
gtk_container_add( GTK_CONTAINER( Menu), CellHertz22000 );
CellHertz32000 = gtk_menu_item_new_with_mnemonic( _("32000 Hertz") );
gtk_widget_show( CellHertz32000 );
gtk_container_add( GTK_CONTAINER( Menu), CellHertz32000 );
CellHertz44056 = gtk_menu_item_new_with_mnemonic( _("44056 Hertz") );
gtk_widget_show( CellHertz44056 );
gtk_container_add( GTK_CONTAINER( Menu), CellHertz44056 );
CellHertz44100 = gtk_menu_item_new_with_mnemonic( _("44100 Hertz") );
gtk_widget_show( CellHertz44100 );
gtk_container_add( GTK_CONTAINER( Menu), CellHertz44100 );
CellHertz48000 = gtk_menu_item_new_with_mnemonic( _("48000 Hertz") );
gtk_widget_show( CellHertz48000 );
gtk_container_add( GTK_CONTAINER( Menu), CellHertz48000 );
CellHertz88200 = gtk_menu_item_new_with_mnemonic( _("88200 Hertz") );
gtk_widget_show( CellHertz88200 );
gtk_container_add( GTK_CONTAINER( Menu), CellHertz88200 );
CellHertz96000 = gtk_menu_item_new_with_mnemonic( _("96000 Hertz") );
gtk_widget_show( CellHertz96000 );
gtk_container_add( GTK_CONTAINER( Menu), CellHertz96000 );
CellSeparate = gtk_separator_menu_item_new( );
gtk_widget_show( CellSeparate );
gtk_container_add( GTK_CONTAINER( Menu), CellSeparate );
CellHertzOriginal = gtk_menu_item_new_with_mnemonic( _("Valeur d'origine") );
gtk_widget_show( CellHertzOriginal );
gtk_container_add( GTK_CONTAINER( Menu), CellHertzOriginal );
g_signal_connect(( gpointer) CellHertz8000, "activate", G_CALLBACK( on_CellHertz8000_activate), detail );
g_signal_connect(( gpointer) CellHertz22000, "activate", G_CALLBACK( on_CellHertz22000_activate), detail );
g_signal_connect(( gpointer) CellHertz32000, "activate", G_CALLBACK( on_CellHertz32000_activate), detail );
g_signal_connect(( gpointer) CellHertz44056, "activate", G_CALLBACK( on_CellHertz44056_activate), detail );
g_signal_connect(( gpointer) CellHertz44100, "activate", G_CALLBACK( on_CellHertz44100_activate), detail );
g_signal_connect(( gpointer) CellHertz48000, "activate", G_CALLBACK( on_CellHertz48000_activate), detail );
g_signal_connect(( gpointer) CellHertz88200, "activate", G_CALLBACK( on_CellHertz88200_activate), detail );
g_signal_connect(( gpointer) CellHertz96000, "activate", G_CALLBACK( on_CellHertz96000_activate), detail );
g_signal_connect(( gpointer) CellHertzOriginal, "activate", G_CALLBACK( on_CellHertzOriginal_activate), detail );
GLADE_HOOKUP_OBJECT_NO_REF( Menu, Menu, "Menu" );
GLADE_HOOKUP_OBJECT( Menu, Menu, "Menu" );
GLADE_HOOKUP_OBJECT( Menu, CellHertz8000, "CellHertz8000" );
GLADE_HOOKUP_OBJECT( Menu, CellHertz22000, "CellHertz22000" );
GLADE_HOOKUP_OBJECT( Menu, CellHertz32000, "CellHertz32000" );
GLADE_HOOKUP_OBJECT( Menu, CellHertz44056, "CellHertz44056" );
GLADE_HOOKUP_OBJECT( Menu, CellHertz44100, "CellHertz44100" );
GLADE_HOOKUP_OBJECT( Menu, CellHertz48000, "CellHertz48000" );
GLADE_HOOKUP_OBJECT( Menu, CellHertz88200, "CellHertz88200" );
GLADE_HOOKUP_OBJECT( Menu, CellHertz96000, "CellHertz96000" );
GLADE_HOOKUP_OBJECT( Menu, CellSeparate, "CellSeparate" );
GLADE_HOOKUP_OBJECT( Menu, CellHertzOriginal, "CellHertzOriginal" );
gtk_menu_popup( GTK_MENU( Menu), NULL, NULL, NULL, NULL, 3, 0 );
}
//
//
// POPUP FILE WAV QUANTIFICATION
//
//
void on_CellWav8_activate( GtkMenuItem *menuitem, gpointer user_data )
{
DETAIL *detail = ( DETAIL *)user_data;
FileWav_from_popup( FILEWAV_QUANTIFICATION_CELL, detail, -2, -2, 8 );
}
void on_CellWav16_activate( GtkMenuItem *menuitem, gpointer user_data )
{
DETAIL *detail = ( DETAIL *)user_data;
FileWav_from_popup( FILEWAV_QUANTIFICATION_CELL, detail, -2, -2, 16 );
}
void on_CellWav24_activate( GtkMenuItem *menuitem, gpointer user_data )
{
DETAIL *detail = ( DETAIL *)user_data;
FileWav_from_popup( FILEWAV_QUANTIFICATION_CELL, detail, -2, -2, 24 );
}
void on_CellWav32_activate( GtkMenuItem *menuitem, gpointer user_data )
{
DETAIL *detail = ( DETAIL *)user_data;
FileWav_from_popup( FILEWAV_QUANTIFICATION_CELL, detail, -2, -2, 32 );
}
void on_CellWav64_activate( GtkMenuItem *menuitem, gpointer user_data )
{
DETAIL *detail = ( DETAIL *)user_data;
FileWav_from_popup( FILEWAV_QUANTIFICATION_CELL, detail, -2, -2, 64 );
}
void on_CellOriginal_activate( GtkMenuItem *menuitem, gpointer user_data )
{
DETAIL *detail = ( DETAIL *)user_data;
FileWav_from_popup( FILEWAV_QUANTIFICATION_CELL, detail, -2, -2, -1 );
}
void popup_file_wav_quantification( DETAIL *detail)
{
GtkWidget *Menu;
GtkWidget *CellWav8;
GtkWidget *CellWav16;
GtkWidget *CellWav24;
GtkWidget *CellWav32;
GtkWidget *CellWav64;
GtkWidget *CellSeparate;
GtkWidget *CellOriginal;
Menu = gtk_menu_new( );
gtk_widget_set_extension_events( Menu, GDK_EXTENSION_EVENTS_ALL );
CellWav8 = gtk_menu_item_new_with_mnemonic( _(" 8 bits") );
gtk_widget_show( CellWav8 );
gtk_container_add( GTK_CONTAINER( Menu), CellWav8 );
CellWav16 = gtk_menu_item_new_with_mnemonic( _("16 bits") );
gtk_widget_show( CellWav16 );
gtk_container_add( GTK_CONTAINER( Menu), CellWav16 );
CellWav24 = gtk_menu_item_new_with_mnemonic( _("24 bits") );
gtk_widget_show( CellWav24 );
gtk_container_add( GTK_CONTAINER( Menu), CellWav24 );
CellWav32 = gtk_menu_item_new_with_mnemonic( _("32 bits") );
gtk_widget_show( CellWav32 );
gtk_container_add( GTK_CONTAINER( Menu), CellWav32 );
CellWav64 = gtk_menu_item_new_with_mnemonic( _("64 bits") );
gtk_widget_show( CellWav64 );
gtk_container_add( GTK_CONTAINER( Menu), CellWav64 );
CellSeparate = gtk_separator_menu_item_new( );
gtk_widget_show( CellSeparate );
gtk_container_add( GTK_CONTAINER( Menu), CellSeparate );
CellOriginal = gtk_menu_item_new_with_mnemonic( _("Valeur d'origine") );
gtk_widget_show( CellOriginal );
gtk_container_add( GTK_CONTAINER( Menu), CellOriginal );
g_signal_connect(( gpointer) CellWav8, "activate", G_CALLBACK( on_CellWav8_activate), detail );
g_signal_connect(( gpointer) CellWav16, "activate", G_CALLBACK( on_CellWav16_activate), detail );
g_signal_connect(( gpointer) CellWav24, "activate", G_CALLBACK( on_CellWav24_activate), detail );
g_signal_connect(( gpointer) CellWav32, "activate", G_CALLBACK( on_CellWav32_activate), detail );
g_signal_connect(( gpointer) CellWav64, "activate", G_CALLBACK( on_CellWav64_activate), detail );
g_signal_connect(( gpointer) CellOriginal, "activate", G_CALLBACK( on_CellOriginal_activate), detail );
GLADE_HOOKUP_OBJECT_NO_REF( Menu, Menu, "Menu" );
GLADE_HOOKUP_OBJECT( Menu, CellWav8, "CellWav8" );
GLADE_HOOKUP_OBJECT( Menu, CellWav16, "CellWav16" );
GLADE_HOOKUP_OBJECT( Menu, CellWav24, "CellWav24" );
GLADE_HOOKUP_OBJECT( Menu, CellWav32, "CellWav32" );
GLADE_HOOKUP_OBJECT( Menu, CellWav64, "CellWav64" );
GLADE_HOOKUP_OBJECT( Menu, CellWav64, "CellSeparate" );
GLADE_HOOKUP_OBJECT( Menu, CellOriginal, "CellOriginal" );
gtk_menu_popup( GTK_MENU( Menu), NULL, NULL, NULL, NULL, 3, 0 );
}
//
//
// POPUP SPLIT
//
//
void on_SplitNext_activate( GtkMenuItem *menuitem, gpointer user_data )
{
split_from_popup( 0 );
}
void on_SplitPrevious_activate( GtkMenuItem *menuitem, gpointer user_data )
{
split_from_popup( 1 );
}
void on_SplitRemove_activate( GtkMenuItem *menuitem, gpointer user_data )
{
split_from_popup( 2 );
}
void popup_file_Split( void )
{
GtkWidget *Menu;
GtkWidget *SplitNext;
GtkWidget *SplitPrevious;
GtkWidget *Separate;
GtkWidget *SplitRemove;
Menu = gtk_menu_new( );
gtk_widget_set_extension_events( Menu, GDK_EXTENSION_EVENTS_ALL );
SplitNext = gtk_menu_item_new_with_mnemonic( _("Selecteur suivant") );
gtk_widget_show( SplitNext );
gtk_container_add( GTK_CONTAINER( Menu), SplitNext );
SplitPrevious = gtk_menu_item_new_with_mnemonic( _("Selecteur precedant") );
gtk_widget_show( SplitPrevious );
gtk_container_add( GTK_CONTAINER( Menu), SplitPrevious );
Separate = gtk_separator_menu_item_new( );
gtk_widget_show( Separate );
gtk_container_add( GTK_CONTAINER( Menu), Separate );
SplitRemove = gtk_menu_item_new_with_mnemonic( _("Supprimer la plage active") );
gtk_widget_show( SplitRemove );
gtk_container_add( GTK_CONTAINER( Menu), SplitRemove );
g_signal_connect(( gpointer) SplitNext, "activate", G_CALLBACK( on_SplitNext_activate), NULL );
g_signal_connect(( gpointer) SplitPrevious, "activate", G_CALLBACK( on_SplitPrevious_activate), NULL );
g_signal_connect(( gpointer) SplitRemove, "activate", G_CALLBACK( on_SplitRemove_activate), NULL );
GLADE_HOOKUP_OBJECT_NO_REF( Menu, Menu, "Menu" );
GLADE_HOOKUP_OBJECT( Menu, SplitNext, "SplitNext" );
GLADE_HOOKUP_OBJECT( Menu, SplitPrevious, "SplitPrevious" );
GLADE_HOOKUP_OBJECT( Menu, SplitRemove, "SplitRemove" );
gtk_menu_popup( GTK_MENU( Menu), NULL, NULL, NULL, NULL, 3, 0 );
}
//
//
// POPUP FLIP
//
//
void on_FlipHorizontal_activate( GtkMenuItem *menuitem, gpointer user_data )
{
IMAGE *Image = ( IMAGE *)user_data;
Image->BoolFlipHorizontal =( TRUE == Image->BoolFlipHorizontal ) ? FALSE : TRUE;
gtk_widget_queue_draw( view.AdrDrawingarea );
}
void on_FlipVertical_activate( GtkMenuItem *menuitem, gpointer user_data )
{
IMAGE *Image = ( IMAGE *)user_data;
Image->BoolFlipVertical =( TRUE == Image->BoolFlipVertical ) ? FALSE : TRUE;
gtk_widget_queue_draw( view.AdrDrawingarea );
}
void on_RemoveImage_activate( GtkMenuItem *menuitem, gpointer user_data )
{
// IMAGE *Image =( IMAGE *)user_data;
poche_remove_image( );
}
void on_ImageFisrt_activate( GtkMenuItem *menuitem, gpointer user_data )
{
IMAGE *Image = ( IMAGE *)user_data;
poche_set_selected_first_image( Image );
}
void on_ImageUp_activate( GtkMenuItem *menuitem, gpointer user_data )
{
IMAGE *Image = ( IMAGE *)user_data;
poche_set_selected_up_image( Image );
}
void on_ImageDown_activate( GtkMenuItem *menuitem, gpointer user_data )
{
IMAGE *Image = ( IMAGE *)user_data;
poche_set_selected_down_image( Image );
}
void on_ImageLast_activate( GtkMenuItem *menuitem, gpointer user_data )
{
IMAGE *Image = ( IMAGE *)user_data;
poche_set_selected_last_image( Image );
}
void popup_flip( IMAGE *p_Image )
{
GtkWidget *Menu;
GtkWidget *FlipHorizontal;
GtkWidget *FlipVertical;
GtkWidget *Separate;
GtkWidget *RemoveImage;
GtkWidget *ImageFisrt;
GtkWidget *ImageUp;
GtkWidget *ImageDown;
GtkWidget *ImageLast;
Menu = gtk_menu_new( );
gtk_widget_set_extension_events( Menu, GDK_EXTENSION_EVENTS_ALL );
FlipHorizontal = gtk_menu_item_new_with_mnemonic( _("Retourner horizontalement") );
gtk_widget_show( FlipHorizontal );
gtk_container_add( GTK_CONTAINER( Menu), FlipHorizontal );
FlipVertical = gtk_menu_item_new_with_mnemonic( _("Retourner verticalement") );
gtk_widget_show( FlipVertical );
gtk_container_add( GTK_CONTAINER( Menu), FlipVertical );
Separate = gtk_separator_menu_item_new( );
gtk_widget_show( Separate );
gtk_container_add( GTK_CONTAINER( Menu), Separate );
ImageFisrt = gtk_menu_item_new_with_mnemonic( _("Image au premier plan") );
gtk_widget_show( ImageFisrt );
gtk_container_add( GTK_CONTAINER( Menu), ImageFisrt );
ImageUp = gtk_menu_item_new_with_mnemonic( _("Image au dessus") );
gtk_widget_show( ImageUp );
gtk_container_add( GTK_CONTAINER( Menu), ImageUp );
ImageDown = gtk_menu_item_new_with_mnemonic( _("Image en dessous") );
gtk_widget_show( ImageDown );
gtk_container_add( GTK_CONTAINER( Menu), ImageDown );
ImageLast = gtk_menu_item_new_with_mnemonic( _("Image au dernier plan") );
gtk_widget_show( ImageLast );
gtk_container_add( GTK_CONTAINER( Menu), ImageLast );
Separate = gtk_separator_menu_item_new( );
gtk_widget_show( Separate );
gtk_container_add( GTK_CONTAINER( Menu), Separate );
RemoveImage = gtk_menu_item_new_with_mnemonic( _("Effacer l'image") );
gtk_widget_show( RemoveImage );
gtk_container_add( GTK_CONTAINER( Menu), RemoveImage );
g_signal_connect( (gpointer) FlipHorizontal, "activate", G_CALLBACK( on_FlipHorizontal_activate), p_Image );
g_signal_connect( (gpointer) FlipVertical, "activate", G_CALLBACK( on_FlipVertical_activate), p_Image );
g_signal_connect( (gpointer) ImageFisrt, "activate", G_CALLBACK( on_ImageFisrt_activate), p_Image );
g_signal_connect( (gpointer) ImageUp, "activate", G_CALLBACK( on_ImageUp_activate), p_Image );
g_signal_connect( (gpointer) ImageDown, "activate", G_CALLBACK( on_ImageDown_activate), p_Image );
g_signal_connect( (gpointer) ImageLast, "activate", G_CALLBACK( on_ImageLast_activate), p_Image );
g_signal_connect( (gpointer) RemoveImage, "activate", G_CALLBACK( on_RemoveImage_activate), p_Image );
GLADE_HOOKUP_OBJECT_NO_REF( Menu, Menu, "Menu" );
GLADE_HOOKUP_OBJECT( Menu, FlipHorizontal, "FlipHorizontal" );
GLADE_HOOKUP_OBJECT( Menu, FlipVertical, "FlipVertical" );
GLADE_HOOKUP_OBJECT( Menu, RemoveImage, "RemoveImage" );
gtk_menu_popup( GTK_MENU( Menu), NULL, NULL, NULL, NULL, 3, 0 );
}
//
//
// POPUP REMOVE IMAGE IN VIEWPORT
//
//
void on_viewport_remove_activate( GtkMenuItem *menuitem, gpointer user_data )
{
GLIST_POCHETTE *gl = ( GLIST_POCHETTE *)user_data;
gl->BoolStructRemove = TRUE;
pochedir_destroy_image( gl );
}
void popup_viewport( GLIST_POCHETTE *gl )
{
GtkWidget *Menu;
GtkWidget *RemoveImage;
Menu = gtk_menu_new( );
gtk_widget_set_extension_events( Menu, GDK_EXTENSION_EVENTS_ALL );
RemoveImage = gtk_menu_item_new_with_mnemonic( _("Supprimer l'image de la liste") );
gtk_widget_show( RemoveImage );
gtk_container_add( GTK_CONTAINER( Menu), RemoveImage );
g_signal_connect(( gpointer) RemoveImage, "activate", G_CALLBACK( on_viewport_remove_activate), gl );
GLADE_HOOKUP_OBJECT_NO_REF( Menu, Menu, "Menu" );
GLADE_HOOKUP_OBJECT( Menu, RemoveImage, "RemoveImage" );
gtk_menu_popup( GTK_MENU( Menu), NULL, NULL, NULL, NULL, 3, 0 );
}
//
//
// POPUP TAG CD
//
//
/*
typedef struct {
gboolean BoolFromPopup;
gint num;
gchar *name;
} CD_POPUP_GENRE;
*/
CD_POPUP_GENRE CdPopupGenre = { FALSE, -1, NULL };
void on_menu_popup_num_activate( GtkMenuItem *menuitem, gpointer user_data )
{
gint Choice = GPOINTER_TO_INT(user_data);
CdPopupGenre.num = Choice;
CdPopupGenre.BoolFromPopup = TRUE;
PRINT_FUNC_LF();
if( TRUE == OptionsCommandLine.BoolVerboseMode ) {
g_print( "\tPtrEntry = %s\n", CdPopupGenre.name );
g_print( "\tNumEntry = %d\n", Choice);
}
gtk_entry_set_text( GTK_ENTRY(GLADE_GET_OBJECT("entry_tag_genre")), CdPopupGenre.name );
cd_expander_set_genre( CdPopupGenre.num, CdPopupGenre.name );
CdPopupGenre.BoolFromPopup = FALSE;
}
void on_menu_popup_txt_activate( GtkMenuItem *menuitem, gpointer user_data )
{
gchar *Ptr = (gchar *)user_data;
if( NULL != CdPopupGenre.name ) {
g_free( CdPopupGenre.name );
CdPopupGenre.name = NULL;
}
CdPopupGenre.name = g_strdup( Ptr );
}
void popup_menu_cd( void )
{
GtkWidget *Menu;
GtkWidget *RemoveImage;
gint Choice;
Menu = gtk_menu_new( );
gtk_widget_set_extension_events( Menu, GDK_EXTENSION_EVENTS_ALL );
for( Choice = 0; -1 != StructTagsFileMp3[ Choice ].num; Choice ++ ) {
// StructTagsFileMp3[ i ].name
// StructTagsFileMp3[ i ].num
RemoveImage = gtk_menu_item_new_with_mnemonic( StructTagsFileMp3[ Choice ].name );
gtk_widget_show( RemoveImage );
gtk_container_add( GTK_CONTAINER( Menu), RemoveImage );
g_signal_connect(( gpointer) RemoveImage, "activate", G_CALLBACK(on_menu_popup_txt_activate), (gpointer)StructTagsFileMp3[ Choice ].name );
g_signal_connect(( gpointer) RemoveImage, "activate", G_CALLBACK(on_menu_popup_num_activate), GINT_TO_POINTER(StructTagsFileMp3[ Choice ].num));
GLADE_HOOKUP_OBJECT( Menu, RemoveImage, "RemoveImage" );
}
GLADE_HOOKUP_OBJECT_NO_REF( Menu, Menu, "Menu" );
gtk_menu_popup( GTK_MENU( Menu), NULL, NULL, NULL, NULL, 3, 0 );
}
//
// POPUP MP3 FILES
//
/*
TYPE: ABR
DEBIT: 32 40 48 56 64 80 96 112 128 160 192 224 320
MODE: Defaut / Stereo / Join Stereo / Forced Join Stereo / Duo Channels / Mono
TYPE: CBR
DEBIT: 32 40 48 56 64 80 96 112 128 160 192 224 320
MODE: Defaut / Stereo / Join Stereo / Forced Join Stereo / Duo Channels / Mono
TYPE: VBR
DEBIT: preset medium / preset standard / preset extreme / preset fast standard / preset fast extreme / V0 V1 V2 V3 V4 V5 V6 V7 V8 V9
MODE: Defaut / Stereo / Join Stereo / Forced Join Stereo / Duo Channels / Mono
TYPE: VBR-NEW
DEBIT: NONE / preset medium / preset standard / preset extreme / preset fast standard / preset fast extreme / V0 V1 V2 V3 V4 V5 V6 V7 V8 V9
MODE: Defaut / Stereo / Join Stereo / Forced Join Stereo / Duo Channels / Mono
*/
DETAIL *Detail_VarOptionsFileOggMp3 = NULL;
gchar *VarOptionsFileMp3[] = {
// ABR
// 0 .. 13
" 32", " 40", " 48", " 56", " 64", " 80", " 96", "112", "128", "160", "192", "224", "256", "320",
// CBR
// 14 .. 28
" 32", " 40", " 48", " 56", " 64", " 80", " 96", "112", "128", "160", "192", "224", "256", "320", "preset insane",
// VBR
// 29 .. 43
"preset medium", "preset standard", "preset extreme", "preset fast standard", "preset fast extreme", gettext_noop("V0 [ meilleure qualite ]"), "V1", "V2", "V3", gettext_noop("V4 [ defaut ]"), "V5", "V6", "V7", "V8", gettext_noop("V9 [ moins bonne qualite ]"),
// VBR-NEW
// 44 .. 59
"NONE", "preset medium", "preset standard", "preset extreme", "preset fast standard", "preset fast extreme", "V0", "V1", "V2", "V3", gettext_noop("V4 [ defaut ]"), "V5", "V6", "V7", "V8", "V9",
// MODE
// 60 .. 65
"Default", "Stereo", "Join Stereo", "Forced Join Stereo", "Duo Channels", "Mono"
};
//
//
void on_type_file_mp3_activate( GtkMenuItem *menuitem, gpointer user_data )
{
gint Choice = GPOINTER_TO_INT(user_data);
gint Debit = Detail_VarOptionsFileOggMp3->Mp3_Debit;
gint Mode = Detail_VarOptionsFileOggMp3->Mp3_Mode;
if( -1 == Choice ) {
// g_print( "REMOVE\n");
Debit = Detail_VarOptionsFileOggMp3->Mp3_Debit = -1; // SET DEBIT
Mode = Detail_VarOptionsFileOggMp3->Mp3_Mode = -1; // SET MODE
FileMp3Ogg_update_newbitrate( FILE_IS_MP3, Debit, Mode, -1 );
return;
}
// MP3: DEBIT MODE
if( Choice <= 59 )
Debit = Detail_VarOptionsFileOggMp3->Mp3_Debit = Choice; // SET DEBIT
else Mode = Detail_VarOptionsFileOggMp3->Mp3_Mode = Choice; // SET MODE
// SELECTIONS DES DEUX OPTIONS OBLIGATOIRE
if( -1 == Detail_VarOptionsFileOggMp3->Mp3_Debit ) Debit = Detail_VarOptionsFileOggMp3->Mp3_Debit = 0;
if( -1 == Detail_VarOptionsFileOggMp3->Mp3_Mode ) Mode = Detail_VarOptionsFileOggMp3->Mp3_Mode = 60;
Detail_VarOptionsFileOggMp3->BoolChanged = ( -1 != Detail_VarOptionsFileOggMp3->Mp3_Debit || -1 != Detail_VarOptionsFileOggMp3->Mp3_Mode );
FileMp3Ogg_update_newbitrate( FILE_IS_MP3, Debit, Mode, -1 );
}
//
//
void popup_file_mp3_type( DETAIL *detail, gint p_debit, gint p_mode )
{
GtkWidget *Menu;
GtkWidget *Type;
GtkWidget *SubMenu;
GtkWidget *Debit;
GtkWidget *Separate;
gint Cpt;
gchar *Str = NULL;
Detail_VarOptionsFileOggMp3 = detail;
Menu = gtk_menu_new( );
gtk_widget_set_extension_events( Menu, GDK_EXTENSION_EVENTS_ALL );
// ABR
Type = gtk_menu_item_new_with_mnemonic( "Abr" );
gtk_widget_show( Type );
gtk_container_add( GTK_CONTAINER( Menu), Type );
// SUBMENU ABR
SubMenu = gtk_menu_new();
gtk_menu_item_set_submenu( GTK_MENU_ITEM(Type), SubMenu );
for( Cpt = 0; Cpt <= 13; Cpt ++ ) {
if( p_debit == Cpt )
Str = g_strdup_printf( ">%s", VarOptionsFileMp3[ Cpt ] );
else Str = g_strdup_printf( " %s", VarOptionsFileMp3[ Cpt ] );
Debit = gtk_menu_item_new_with_mnemonic( Str );
g_free( Str );
Str = NULL;
gtk_widget_show( Debit );
gtk_container_add( GTK_CONTAINER(SubMenu), Debit );
g_signal_connect( (gpointer)Debit, "activate", G_CALLBACK(on_type_file_mp3_activate), GINT_TO_POINTER(Cpt));
}
// CBR
Type = gtk_menu_item_new_with_mnemonic( "Cbr" );
gtk_widget_show( Type );
gtk_container_add( GTK_CONTAINER( Menu), Type );
// SUBMENU CBR
SubMenu = gtk_menu_new();
gtk_menu_item_set_submenu( GTK_MENU_ITEM(Type), SubMenu );
for( Cpt = 14; Cpt <= 28; Cpt ++ ) {
if( p_debit == Cpt )
Str = g_strdup_printf( ">%s", VarOptionsFileMp3[ Cpt ] );
else Str = g_strdup_printf( " %s", VarOptionsFileMp3[ Cpt ] );
Debit = gtk_menu_item_new_with_mnemonic( Str );
g_free( Str );
Str = NULL;
gtk_widget_show( Debit );
gtk_container_add( GTK_CONTAINER(SubMenu), Debit );
g_signal_connect( (gpointer)Debit, "activate", G_CALLBACK(on_type_file_mp3_activate), GINT_TO_POINTER(Cpt));
}
// VBR
Type = gtk_menu_item_new_with_mnemonic( "Vbr" );
gtk_widget_show( Type );
gtk_container_add( GTK_CONTAINER( Menu), Type );
// SUBMENU VBR
SubMenu = gtk_menu_new();
gtk_menu_item_set_submenu( GTK_MENU_ITEM(Type), SubMenu );
for( Cpt = 29; Cpt <= 43; Cpt ++ ) {
if( p_debit == Cpt )
Str = g_strdup_printf( ">%s", VarOptionsFileMp3[ Cpt ] );
else Str = g_strdup_printf( " %s", VarOptionsFileMp3[ Cpt ] );
Debit = gtk_menu_item_new_with_mnemonic( Str );
g_free( Str );
Str = NULL;
gtk_widget_show( Debit );
gtk_container_add( GTK_CONTAINER(SubMenu), Debit );
g_signal_connect( (gpointer)Debit, "activate", G_CALLBACK(on_type_file_mp3_activate), GINT_TO_POINTER(Cpt));
}
// VBR-NEW
Type = gtk_menu_item_new_with_mnemonic( "Vbr New" );
gtk_widget_show( Type );
gtk_container_add( GTK_CONTAINER( Menu), Type );
// SUBMENU VBR-NEW
SubMenu = gtk_menu_new();
gtk_menu_item_set_submenu( GTK_MENU_ITEM(Type), SubMenu );
for( Cpt = 44; Cpt <= 59; Cpt ++ ) {
if( p_debit == Cpt )
Str = g_strdup_printf( ">%s", VarOptionsFileMp3[ Cpt ] );
else Str = g_strdup_printf( " %s", VarOptionsFileMp3[ Cpt ] );
Debit = gtk_menu_item_new_with_mnemonic( Str );
g_free( Str );
Str = NULL;
gtk_widget_show( Debit );
gtk_container_add( GTK_CONTAINER(SubMenu), Debit );
g_signal_connect( (gpointer)Debit, "activate", G_CALLBACK(on_type_file_mp3_activate), GINT_TO_POINTER(Cpt));
}
// MODE
Type = gtk_menu_item_new_with_mnemonic( "Mode" );
gtk_widget_show( Type );
gtk_container_add( GTK_CONTAINER( Menu), Type );
// SUBMENU MODE
SubMenu = gtk_menu_new();
gtk_menu_item_set_submenu( GTK_MENU_ITEM(Type), SubMenu );
for( Cpt = 60; Cpt <= 65; Cpt ++ ) {
if( p_mode == Cpt )
Str = g_strdup_printf( "> %s", VarOptionsFileMp3[ Cpt ] );
else Str = g_strdup_printf( " %s", VarOptionsFileMp3[ Cpt ] );
Debit = gtk_menu_item_new_with_mnemonic( Str );
g_free( Str );
Str = NULL;
gtk_widget_show( Debit );
gtk_container_add( GTK_CONTAINER(SubMenu), Debit );
g_signal_connect( (gpointer)Debit, "activate", G_CALLBACK(on_type_file_mp3_activate), GINT_TO_POINTER(Cpt));
}
// REMOVE ENTRY
if( p_debit > -1 ) {
Separate = gtk_separator_menu_item_new( );
gtk_widget_show( Separate );
gtk_container_add( GTK_CONTAINER( Menu), Separate );
Separate = gtk_menu_item_new_with_mnemonic( "Effacer la saisie" );
gtk_widget_show( Separate );
gtk_container_add( GTK_CONTAINER(Menu), Separate );
g_signal_connect( (gpointer)Separate, "activate", G_CALLBACK(on_type_file_mp3_activate), GINT_TO_POINTER(-1));
}
GLADE_HOOKUP_OBJECT_NO_REF( Menu, Menu, "Menu" );
gtk_menu_popup( GTK_MENU(Menu), NULL, NULL, NULL, NULL, 3, 0 );
}
//
// POPUP OGG FILES
//
/*
DEBIT: 45 kbit/s / 64 kbit/s / 80 kbit/s / 96 kbit/s / 112 kbit/s / 128 kbit/s / 160 kbit/s / 192 kbit/s / 224 kbit/s / 256 kbit/s / 320 kbit/s /
Qualite -1 -Moins bonne qualite / Qualite 0 / Qualite 1 / Qualite 2 / Qualite 3 -Defaut / Qualite 4 / Qualite 5 / Qualite 6 / Qualite 7 / Qualite 8 / Qualite 9 / Qualite 10 -Meilleure qualite
MANAGED: Oui / Non
DOWNMIX: Mono force / Stereo
*/
gchar *VarOptionsFileOgg[] = {
// 0 .. 22
" 45 kbit/s", " 64 kbit/s", " 80 kbit/s", " 96 kbit/s", "112 kbit/s", "128 kbit/s", "160 kbit/", "192 kbit/s", "224 kbit/s", "256 kbit/s", "320 kbit/s",
gettext_noop("Qualite -1 [ Moins bonne qualite ]"), gettext_noop("Qualite 0"), gettext_noop("Qualite 1"), gettext_noop("Qualite 2"),
gettext_noop("Qualite 3 [ Defaut ]"), gettext_noop("Qualite 4"), gettext_noop("Qualite 5"), gettext_noop("Qualite 6"), gettext_noop("Qualite 7"),
gettext_noop("Qualite 8"), gettext_noop("Qualite 9"), gettext_noop("Qualite 10 [ Meilleure qualite ]"),
// 23 .. 24
gettext_noop("Oui"), gettext_noop("Non"),
// 25 .. 26
"Mono force", "Stereo"
};
//
//
void on_type_file_ogg_activate( GtkMenuItem *menuitem, gpointer user_data )
{
gint Choice = GPOINTER_TO_INT(user_data);
gint Debit = Detail_VarOptionsFileOggMp3->Ogg_Debit;
gint Managed = Detail_VarOptionsFileOggMp3->Ogg_Managed;
gint Downmix = Detail_VarOptionsFileOggMp3->Ogg_Downmix;
if( -1 == Choice ) {
// g_print( "REMOVE\n");
Debit = Detail_VarOptionsFileOggMp3->Ogg_Debit = -1; // SET DEBIT
Managed = Detail_VarOptionsFileOggMp3->Ogg_Managed = -1; // SET MANAGED
Downmix = Detail_VarOptionsFileOggMp3->Ogg_Downmix = -1; // SET DOWNMIX
FileMp3Ogg_update_newbitrate( FILE_IS_OGG, Debit, Managed, Downmix );
return;
}
// OGG: DEBIT MANAGED DOWNMIX
if( Choice <= 22 )
Debit = Detail_VarOptionsFileOggMp3->Ogg_Debit = Choice; // SET DEBIT
else if( Choice <= 24)
Managed = Detail_VarOptionsFileOggMp3->Ogg_Managed = Choice; // SET MANAGED
else
Downmix = Detail_VarOptionsFileOggMp3->Ogg_Downmix = Choice; // SET DOWNMIX
// SELECTIONS DES DEUX OPTIONS OBLIGATOIRE
if( -1 == Detail_VarOptionsFileOggMp3->Ogg_Debit ) Debit = Detail_VarOptionsFileOggMp3->Ogg_Debit = 0;
if( -1 == Detail_VarOptionsFileOggMp3->Ogg_Managed ) Managed = Detail_VarOptionsFileOggMp3->Ogg_Managed = 23;
if( -1 == Detail_VarOptionsFileOggMp3->Ogg_Downmix ) Downmix = Detail_VarOptionsFileOggMp3->Ogg_Downmix = 25;
if( Detail_VarOptionsFileOggMp3->Ogg_Debit >= 11 ) Managed = Detail_VarOptionsFileOggMp3->Ogg_Managed = -1;
if( Detail_VarOptionsFileOggMp3->Ogg_Debit >= 9 ) Downmix = Detail_VarOptionsFileOggMp3->Ogg_Downmix = -1;
Detail_VarOptionsFileOggMp3->BoolChanged = ( -1 != Detail_VarOptionsFileOggMp3->Ogg_Debit || -1 != Detail_VarOptionsFileOggMp3->Ogg_Managed || -1 != Detail_VarOptionsFileOggMp3->Ogg_Downmix );
FileMp3Ogg_update_newbitrate( FILE_IS_OGG, Debit, Managed, Downmix );
}
//
//
void popup_file_ogg_type( DETAIL *detail, gint p_debit, gint p_managed, gint p_downmix )
{
GtkWidget *Menu;
GtkWidget *Debit;
GtkWidget *SubMenu;
GtkWidget *Separate;
gint Cpt;
gchar *Str = NULL;
Detail_VarOptionsFileOggMp3 = detail;
Menu = gtk_menu_new( );
gtk_widget_set_extension_events( Menu, GDK_EXTENSION_EVENTS_ALL );
// DEBIT
Debit = gtk_menu_item_new_with_mnemonic( "Debit" );
gtk_widget_show( Debit );
gtk_container_add( GTK_CONTAINER( Menu), Debit );
// SUBMENU DEBIT
SubMenu = gtk_menu_new();
gtk_menu_item_set_submenu( GTK_MENU_ITEM(Debit), SubMenu );
for( Cpt = 0; Cpt <= 22; Cpt ++ ) {
if( p_debit == Cpt )
Str = g_strdup_printf( ">%s", VarOptionsFileOgg[ Cpt ] );
else Str = g_strdup_printf( " %s", VarOptionsFileOgg[ Cpt ] );
Debit = gtk_menu_item_new_with_mnemonic( Str );
g_free( Str );
Str = NULL;
gtk_widget_show( Debit );
gtk_container_add( GTK_CONTAINER(SubMenu), Debit );
g_signal_connect( (gpointer)Debit, "activate", G_CALLBACK(on_type_file_ogg_activate), GINT_TO_POINTER(Cpt));
}
// MANAGED
if( p_debit < 11 ) {
Debit = gtk_menu_item_new_with_mnemonic( "Managed" );
gtk_widget_show( Debit );
gtk_container_add( GTK_CONTAINER( Menu), Debit );
// SUBMENU MANAGED
SubMenu = gtk_menu_new();
gtk_menu_item_set_submenu( GTK_MENU_ITEM(Debit), SubMenu );
for( Cpt = 23; Cpt <= 24; Cpt ++ ) {
if( p_managed == Cpt )
Str = g_strdup_printf( ">%s", VarOptionsFileOgg[ Cpt ] );
else Str = g_strdup_printf( " %s", VarOptionsFileOgg[ Cpt ] );
Debit = gtk_menu_item_new_with_mnemonic( Str );
g_free( Str );
Str = NULL;
gtk_widget_show( Debit );
gtk_container_add( GTK_CONTAINER(SubMenu), Debit );
g_signal_connect( (gpointer)Debit, "activate", G_CALLBACK(on_type_file_ogg_activate), GINT_TO_POINTER(Cpt));
}
}
// DOWNMIX
if( p_debit < 9 ) {
Debit = gtk_menu_item_new_with_mnemonic( "Downmix" );
gtk_widget_show( Debit );
gtk_container_add( GTK_CONTAINER( Menu), Debit );
// SUBMENU DOWNMIX
SubMenu = gtk_menu_new();
gtk_menu_item_set_submenu( GTK_MENU_ITEM(Debit), SubMenu );
for( Cpt = 25; Cpt <= 26; Cpt ++ ) {
if( p_downmix == Cpt )
Str = g_strdup_printf( ">%s", VarOptionsFileOgg[ Cpt ] );
else Str = g_strdup_printf( " %s", VarOptionsFileOgg[ Cpt ] );
Debit = gtk_menu_item_new_with_mnemonic( Str );
g_free( Str );
Str = NULL;
gtk_widget_show( Debit );
gtk_container_add( GTK_CONTAINER(SubMenu), Debit );
g_signal_connect( (gpointer)Debit, "activate", G_CALLBACK(on_type_file_ogg_activate), GINT_TO_POINTER(Cpt));
}
}
// REMOVE ENTRY
if( p_debit > -1 ) {
Separate = gtk_separator_menu_item_new( );
gtk_widget_show( Separate );
gtk_container_add( GTK_CONTAINER( Menu), Separate );
Separate = gtk_menu_item_new_with_mnemonic( "Effacer la saisie" );
gtk_widget_show( Separate );
gtk_container_add( GTK_CONTAINER(Menu), Separate );
g_signal_connect( (gpointer)Separate, "activate", G_CALLBACK(on_type_file_ogg_activate), GINT_TO_POINTER(-1));
}
GLADE_HOOKUP_OBJECT_NO_REF( Menu, Menu, "Menu" );
gtk_menu_popup( GTK_MENU(Menu), NULL, NULL, NULL, NULL, 3, 0 );
}
//
//
gchar *popup_get_param_ogg( gint p_debit, gint p_managed, gint p_downmix )
{
gchar *val_bitrate_ogg[] = {
"--bitrate=45",
"--bitrate=64",
"--bitrate=80",
"--bitrate=96",
"--bitrate=112",
"--bitrate=128",
"--bitrate=160",
"--bitrate=192",
"--bitrate=224",
"--bitrate=256",
"--bitrate=320",
"--quality=-1",
"--quality=0",
"--quality=1",
"--quality=2",
"--quality=3",
"--quality=4",
"--quality=5",
"--quality=6",
"--quality=7",
"--quality=8",
"--quality=9",
"--quality=10"
};
gchar *StrRet = NULL;
if( p_debit > -1 ) {
StrRet = g_strdup_printf( "%s%s%s",
val_bitrate_ogg[ p_debit ],
( p_debit < 11 && p_managed == 23 ) ? " --managed" : "",
( p_debit < 9 && p_downmix == 25 ) ? " --downmix" : ""
);
}
return( (gchar *)StrRet );
}
//
//
gchar *popup_get_param_mp3( gint p_debit, gint p_mode )
{
static gchar *str_param_mp3 [] = {
// ABR
// 0 .. 13
"-b 32",
"-b 40",
"-b 48",
"-b 56",
"-b 64",
"-b 80",
"-b 96",
"-b 112",
"-b 128",
"-b 160",
"-b 192",
"-b 224",
"-b 256",
"-b 320",
// CBR
// 14 .. 28
"-b 32",
"-b 40",
"-b 48",
"-b 56",
"-b 64",
"-b 80",
"-b 96",
"-b 112",
"-b 128",
"-b 160",
"-b 192",
"-b 224",
"-b 256",
"-b 320",
"--preset insane",
// VBR
// 29 .. 43
"--preset medium",
"--preset standard",
"--preset extreme",
"--preset fast standard",
"--preset fast extreme",
"-V0",
"-V1",
"-V2",
"-V3",
"-V4",
"-V5",
"-V6",
"-V7",
"-V8",
"-V9",
// VBR-NEW
// 44 .. 59
"--vbr-new",
"--vbr-new --preset medium",
"--vbr-new --preset standard",
"--vbr-new --preset extreme",
"--vbr-new --preset fast standard",
"--vbr-new --preset fast extreme",
"--vbr-new -V0",
"--vbr-new -V1",
"--vbr-new -V2",
"--vbr-new -V3",
"--vbr-new -V4",
"--vbr-new -V5",
"--vbr-new -V6",
"--vbr-new -V7",
"--vbr-new -V8",
"--vbr-new -V9",
// MODE
// 60 .. 65
"", // Defaut
"-m s", // Stereo
"-m j", // Join Stereo
"-m f", // Forced Join Stereo
"-m d", // Duo Channels
"-m m" // Mono
};
gchar *StrRet = NULL;
if( p_debit > -1) {
StrRet = g_strdup_printf( "%s%s%s",
str_param_mp3[ p_debit ],
( p_mode == 60 ) ? "" : " ",
( p_mode > 60 ) ? str_param_mp3[ p_mode ] : ""
);
}
return( (gchar *)StrRet );
}
xcfa-4.3.6/src/prg_init.c 0000644 0001750 0001750 00000050366 12164063153 012147 0000000 0000000 /*
* file : prg_init.c
* project : xcfa
* with : Gtk-2
*
* copyright : (C) 2003 - 2013 by Claude Bulin
*
* xcfa - GTK+ implementation of the GNU shell command
* GNU General Public License
*
* This file is part of XCFA.
*
* XCFA is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* at your option) any later version.
*
* XCFA is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with XCFA. If not, see .
*/
#ifdef HAVE_CONFIG_H
#include "../config.h"
#endif
#include
#include
#ifdef ENABLE_STATIC_LIBRARY
#include "../lib/lib.h"
#endif
#include "global.h"
#include "options.h"
#include "cd_audio.h"
#include "prg_init.h"
/*
*---------------------------------------------------------------------------
* VARIABLES
*---------------------------------------------------------------------------
*/
enum
{
NUM_TREE_Nom = 0,
NUM_TREE_Status,
NUM_TREE_Action,
NUM_TREE_ALL_COLUMN
};
enum
{
PRGEXT_NAME = 0,
PRGEXT_STATUS,
PRGEXT_PAQUAGE,
PRGEXT_COMMENT,
PRGEXT_NUM_COLUMN,
PRGEXT_TOTAL_COLUMN
};
VAR_PRGEXTERN var_prgextern;
PRGINIT PrgInit;
TABLEAU_PRG_EXTERN TableauPrgExtern [ NMR_MAX_TABLEAU ] = {
{"a52dec", // PACKAGEDEBIAN_64
"a52dec", // PACKAGEDEBIAN_32
"a52dec", // NAME1
"", // NAME2
"", // NAME3
&PrgInit.bool_a52dec, // FOUND
NULL, // NAME TREE-VIEW
NULL, // PIXBUF TREE-VIEW
" liba52-0.7.4-dev", // PAQUAGE
gettext_noop(" Decode ATSC A/52 audio streams")}, // DESCRIPTION
{"aacplusenc", // PACKAGEDEBIAN_64
"aacplusenc", // PACKAGEDEBIAN_32
"aacplusenc", // NAME1
"", // NAME2
"", // NAME3
&PrgInit.bool_aacplusenc, // FOUND
NULL, // NAME TREE-VIEW
NULL, // PIXBUF TREE-VIEW
" aacplusenc", // PAQUAGE
gettext_noop(" AAC+ encoder")}, // DESCRIPTION
{"cdparanoia", // PACKAGEDEBIAN_64
"cdparanoia", // PACKAGEDEBIAN_32
"cdparanoia", // NAME1
"", // NAME2
"", // NAME3
&PrgInit.bool_cdparanoia, // FOUND
NULL, // NAME TREE-VIEW
NULL, // PIXBUF TREE-VIEW
" cdparanoia", // PAQUAGE
gettext_noop(" Extracteur cd audio")}, // DESCRIPTION
{"cd-discid", // PACKAGEDEBIAN_64
"cd-discid", // PACKAGEDEBIAN_32
"cd-discid", // NAME1
"", // NAME2
"", // NAME3
&PrgInit.bool_cd_discid, // FOUND
NULL, // NAME TREE-VIEW
NULL, // PIXBUF TREE-VIEW
" cd-discid", // PAQUAGE
gettext_noop(" Read CD and get CDDB discid information")}, // DESCRIPTION
{"checkmp3", // PACKAGEDEBIAN_64
"checkmp3", // PACKAGEDEBIAN_32
"mp3check", // NAME1
"checkmp3", // NAME2
"mp3_check", // NAME3
&PrgInit.bool_checkmp3, // FOUND
NULL, // NAME TREE-VIEW
NULL, // PIXBUF TREE-VIEW
" checkmp3", // PAQUAGE
gettext_noop(" Cherche des renseignements sur les formats mp3")}, // DESCRIPTION
{"faac", // PACKAGEDEBIAN_64
"faac", // PACKAGEDEBIAN_32
"faac", // NAME1
"", // NAME2
"", // NAME3
&PrgInit.bool_faac, // FOUND
NULL, // NAME TREE-VIEW
NULL, // PIXBUF TREE-VIEW
" faac", // PAQUAGE
gettext_noop(" Audio Codeur freeware")}, // DESCRIPTION
{"faad", // PACKAGEDEBIAN_64
"faad", // PACKAGEDEBIAN_32
"faad", // NAME1
"faad2", // NAME2
"", // NAME3
&PrgInit.bool_faad, // FOUND
NULL, // NAME TREE-VIEW
NULL, // PIXBUF TREE-VIEW
" faad", // PAQUAGE
gettext_noop(" MPEG-4 AAC decodeur")}, // DESCRIPTION
{"flac", // PACKAGEDEBIAN_64
"flac", // PACKAGEDEBIAN_32
"flac", // NAME1
"", // NAME2
"", // NAME3
&PrgInit.bool_flac, // FOUND
NULL, // NAME TREE-VIEW
NULL, // PIXBUF TREE-VIEW
" flac", // PAQUAGE
gettext_noop(" Conversion wav : flac")}, // DESCRIPTION
{"icedax", // PACKAGEDEBIAN_64
"icedax", // PACKAGEDEBIAN_32
"icedax", // NAME1
"cdda2wav", // NAME2
"", // NAME3
&PrgInit.bool_cdda2wav, // FOUND
NULL, // NAME TREE-VIEW
NULL, // PIXBUF TREE-VIEW
" icedax", // PAQUAGE
gettext_noop(" Extracteur cd audio")}, // DESCRIPTION
{"lame", // PACKAGEDEBIAN_64
"lame", // PACKAGEDEBIAN_32
"lame", // NAME1
"", // NAME2
"", // NAME3
&PrgInit.bool_lame, // FOUND
NULL, // NAME TREE-VIEW
NULL, // PIXBUF TREE-VIEW
" lame", // PAQUAGE
gettext_noop(" Conversion wav : mp3")}, // DESCRIPTION
{"lsdvd", // PACKAGEDEBIAN_64
"lsdvd", // PACKAGEDEBIAN_32
"lsdvd", // NAME1
"", // NAME2
"", // NAME3
&PrgInit.bool_lsdvd, // FOUND
NULL, // NAME TREE-VIEW
NULL, // PIXBUF TREE-VIEW
" lsdvd", // PAQUAGE
gettext_noop(" Cherche les informations d'un dvd")}, // DESCRIPTION
// ADD
{"monkeys-audio", // PACKAGEDEBIAN_64
"monkeys-audio", // PACKAGEDEBIAN_32
"mac", // NAME1
"", // NAME2
"", // NAME3
&PrgInit.bool_ape, // FOUND
NULL, // NAME TREE-VIEW
NULL, // PIXBUF TREE-VIEW
" monkeys-audio", // PAQUAGE
gettext_noop(" Monkey's Audio Console Front End : APE")}, // DESCRIPTION
// ADD TO amd64 and i386
{"musepack-tools", // PACKAGEDEBIAN_64
"musepack-tools", // PACKAGEDEBIAN_32
"mpcdec", // NAME1
"mppdec", // NAME2
"mpc123", // NAME3
&PrgInit.bool_mpc123_mppdec, // FOUND
NULL, // NAME TREE-VIEW
NULL, // PIXBUF TREE-VIEW
" musepack-tools", // PAQUAGE
gettext_noop(" MusePack commandline utilities")}, // DESCRIPTION
{"musepack-tools", // PACKAGEDEBIAN_64
"musepack-tools", // PACKAGEDEBIAN_32
"mpcenc", // NAME1
"mppenc", // NAME2
"", // NAME3
&PrgInit.bool_mppenc, // FOUND
NULL, // NAME TREE-VIEW
NULL, // PIXBUF TREE-VIEW
" musepack-tools", // PAQUAGE
gettext_noop(" MusePack commandline utilities")}, // DESCRIPTION
{"mplayer", // PACKAGEDEBIAN_64
"mplayer", // PACKAGEDEBIAN_32
"mplayer", // NAME1
"", // NAME2
"", // NAME3
&PrgInit.bool_mplayer, // FOUND
NULL, // NAME TREE-VIEW
NULL, // PIXBUF TREE-VIEW
" mplayer", // PAQUAGE
gettext_noop(" Lecteur et extracteur")}, // DESCRIPTION
{"mp3gain", // PACKAGEDEBIAN_64
"mp3gain", // PACKAGEDEBIAN_32
"mp3gain", // NAME1
"", // NAME2
"", // NAME3
&PrgInit.bool_mp3gain, // FOUND
NULL, // NAME TREE-VIEW
NULL, // PIXBUF TREE-VIEW
" mp3gain", // PAQUAGE
gettext_noop(" Normaliseur de fichier mp3")}, // DESCRIPTION
{"normalize-audio", // PACKAGEDEBIAN_64
"normalize-audio", // PACKAGEDEBIAN_32
"normalize-audio", // NAME1
"normalize", // NAME2
"", // NAME3
&PrgInit.bool_normalize, // FOUND
NULL, // NAME TREE-VIEW
NULL, // PIXBUF TREE-VIEW
" normalize-audio", // PAQUAGE
gettext_noop(" Normaliseur de fichier wav")}, // DESCRIPTION
{"libnotify-bin", // PACKAGEDEBIAN_64
"libnotify-bin", // PACKAGEDEBIAN_32
"libnotify-bin", // NAME1
"notify-send", // NAME2
"", // NAME3
&PrgInit.bool_notify_send, // FOUND
NULL, // NAME TREE-VIEW
NULL, // PIXBUF TREE-VIEW
" libnotify-bin", // PAQUAGE
gettext_noop(" A program to send desktop notifications")}, // DESCRIPTION
{"shorten", // PACKAGEDEBIAN_64
"shorten", // PACKAGEDEBIAN_32
"shorten", // NAME1
"", // NAME2
"", // NAME3
&PrgInit.bool_shorten, // FOUND
NULL, // NAME TREE-VIEW
NULL, // PIXBUF TREE-VIEW
" shorten", // PAQUAGE
gettext_noop(" Forte compression au format wave")}, // DESCRIPTION
{"shntool", // PACKAGEDEBIAN_64
"shntool", // PACKAGEDEBIAN_32
"shntool", // NAME1
"", // NAME2
"", // NAME3
&PrgInit.bool_shntool, // FOUND
NULL, // NAME TREE-VIEW
NULL, // PIXBUF TREE-VIEW
" shntool", // PAQUAGE
gettext_noop(" Decoupage de fichiers sans decodage")}, // DESCRIPTION
{"sox", // PACKAGEDEBIAN_64
"sox", // PACKAGEDEBIAN_32
"sox", // NAME1
"", // NAME2
"", // NAME3
&PrgInit.bool_sox, // FOUND
NULL, // NAME TREE-VIEW
NULL, // PIXBUF TREE-VIEW
" sox", // PAQUAGE
gettext_noop(" Transformation universelle de fichiers son")}, // DESCRIPTION
{"vorbis-tools", // PACKAGEDEBIAN_64
"vorbis-tools", // PACKAGEDEBIAN_32
"oggenc", // NAME1
"", // NAME2
"", // NAME3
&PrgInit.bool_oggenc, // FOUND
NULL, // NAME TREE-VIEW
NULL, // PIXBUF TREE-VIEW
" Vorbis-tools", // PAQUAGE
gettext_noop(" Conversion wav : ogg")}, // DESCRIPTION
{"vorbisgain", // PACKAGEDEBIAN_64
"vorbisgain", // PACKAGEDEBIAN_32
"vorbisgain", // NAME1
"", // NAME2
"", // NAME3
&PrgInit.bool_vorbisgain, // FOUND
NULL, // NAME TREE-VIEW
NULL, // PIXBUF TREE-VIEW
" vorbisgain", // PAQUAGE
gettext_noop(" Normaliseur de fichier ogg")}, // DESCRIPTION
{"wavpack", // PACKAGEDEBIAN_64
"wavpack", // PACKAGEDEBIAN_32
"wavpack", // NAME1
"", // NAME2
"", // NAME3
&PrgInit.bool_wavpack, // FOUND
NULL, // NAME TREE-VIEW
NULL, // PIXBUF TREE-VIEW
" wavpack", // PAQUAGE
gettext_noop(" WAVPACK Hybrid Lossless Audio Compressor")} // DESCRIPTION
};
//
// CHERCHE LA DISTRIBUTION EN RAPPORT AVEC LE PROGRAMME D' INSTALLATION
//
void on_label_type_package_realize (GtkWidget *widget, gpointer user_data)
{
gchar *New_Str = NULL;
var_options.Adr_label_type_paquege = widget;
if (libutils_find_file ("apt-get") == TRUE || libutils_find_file ("aptitude") == TRUE) {
if (widget != NULL) {
New_Str = g_strdup_printf (_(" ... les paquets: deb "));
}
var_options.Type_Package = _DEBIAN_;
}
else if (libutils_find_file ("slackpkg") == TRUE || libutils_find_file ("installpkg") == TRUE) {
if (widget != NULL) {
New_Str = g_strdup_printf (_(" ... les paquets: tgz "));
}
var_options.Type_Package = _TGZ_;
}
else if (libutils_find_file ("pacman-g2") == TRUE) {
if (widget != NULL) {
New_Str = g_strdup_printf (_(" ... les paquets: fpm "));
}
var_options.Type_Package = _FPM_;
}
else if (libutils_find_file ("rpm") == TRUE || libutils_find_file ("urpmi") == TRUE || libutils_find_file ("zypper") == TRUE || libutils_find_file ("yum") == TRUE) {
if (widget != NULL) {
New_Str = g_strdup_printf (_(" ... les paquets: rpm "));
}
var_options.Type_Package = _RPM_;
}
else if (libutils_find_file ("yaourt") == TRUE || libutils_find_file ("pacman") == TRUE) {
if (widget != NULL) {
New_Str = g_strdup_printf (_(" ... les paquets: pkg.tar.xz "));
}
var_options.Type_Package = _ARCHLINUX_;
}
else {
if (widget != NULL) {
New_Str = g_strdup_printf (_(" ... les paquets: ? "));
}
var_options.Type_Package = _PACKAGE_NOT_FOUND_;
}
if (widget != NULL && New_Str != NULL) {
gtk_label_set_markup (GTK_LABEL (var_options.Adr_label_type_paquege), New_Str);
g_free (New_Str);
New_Str = NULL;
}
}
// GET INFOS FROM STRUCT
//
gchar *prginit_get_name (TYPE_PROGINIT TypeEnum)
{
return ((gchar *)TableauPrgExtern [ TypeEnum ] . PtrName);
}
//
//
GdkPixbuf *prginit_get_pixbuf (TYPE_PROGINIT TypeEnum)
{
return ((GdkPixbuf *)TableauPrgExtern [ TypeEnum ] . Pixbuf);
}
//
//
gchar *prginit_get_Paquage (TYPE_PROGINIT TypeEnum)
{
return ((gchar *)TableauPrgExtern [ TypeEnum ] . Paquage);
}
//
//
gchar *prginit_get_Description (TYPE_PROGINIT TypeEnum)
{
return (gettext((gchar *)TableauPrgExtern [ TypeEnum ] . Description));
}
//
//
gboolean prginit_elem_is_present (TYPE_PROGINIT TypeEnum)
{
return ((gboolean)*TableauPrgExtern [ TypeEnum ] . BoolFound);
}
//
//
void prginit_affiche_glist (void)
{
gchar *Name;
gchar *Paquage;
GtkAdjustment *Adj = NULL;
gdouble AdjValue;
GtkTreeIter iter;
gint index;
// EFFACER LE CONTENU DU TREEVIEW
gtk_list_store_clear (GTK_LIST_STORE (var_prgextern.Adr_List_Store));
// AJUSTEMENT DE LA LISTE
Adj = gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (var_prgextern.Adr_scroll));
AdjValue = gtk_adjustment_get_value (Adj);
gtk_adjustment_set_value (Adj, AdjValue);
gtk_scrolled_window_set_vadjustment (GTK_SCROLLED_WINDOW (var_prgextern.Adr_scroll), Adj);
for (index = 0; index < NMR_MAX_TABLEAU; index ++) {
gtk_list_store_append (var_prgextern.Adr_List_Store, &iter);
if (prginit_elem_is_present (index) == TRUE) {
Name = g_strdup_printf ("%s", prginit_get_name (index));
Paquage = g_strdup_printf ("%s", prginit_get_Paquage (index));
}
else {
Name = g_strdup_printf ("%s", prginit_get_name (index));
Paquage = g_strdup_printf ("%s", prginit_get_Paquage (index));
}
gtk_list_store_set (var_prgextern.Adr_List_Store, &iter,
PRGEXT_NAME, Name,
PRGEXT_STATUS, prginit_get_pixbuf (index),
PRGEXT_PAQUAGE, Paquage,
PRGEXT_COMMENT, prginit_get_Description (index),
PRGEXT_NUM_COLUMN, index,
-1);
g_free (Name); Name = NULL;
g_free (Paquage); Paquage = NULL;
}
}
//
//
void prginit_print_info (void)
{
PRINT_FUNC_LF();
if( TRUE == OptionsCommandLine.BoolVerboseMode ) {
gint index;
g_print ("!------------------------------\n");
g_print ("! INSTALL NAME\n");
g_print ("!------------------------------\n");
for (index = 0; index < NMR_MAX_TABLEAU; index ++)
g_print("! %s %s\n", (*TableauPrgExtern [ index ] . BoolFound == TRUE) ? "Yes " : " NO --> ", TableauPrgExtern [ index ] . PtrName);
g_print ("!------------------------------\n\n");
}
}
//
//
void prginit_scan (void)
{
gint index;
for (index = 0; index < NMR_MAX_TABLEAU; index ++) {
// INIT VAR
*TableauPrgExtern [ index ] . BoolFound = FALSE;
TableauPrgExtern [ index ] . PtrName = NULL;
// CHERCHE LE NOM APPROPRIE SUIVANT LA DISTRIBUTION UTILISEE
*TableauPrgExtern [ index ] . BoolFound = libutils_find_file (TableauPrgExtern [ index ] . Name1);
TableauPrgExtern [ index ] . PtrName = TableauPrgExtern [ index ] .Name1;
if (*TableauPrgExtern [ index ] . BoolFound == FALSE) {
if (*TableauPrgExtern [ index ] . Name2 != '\0') {
if ((*TableauPrgExtern [ index ] . BoolFound = libutils_find_file (TableauPrgExtern [ index ] . Name2)) == TRUE) {
TableauPrgExtern [ index ] . PtrName = TableauPrgExtern [ index ] .Name2;
}
}
}
if (*TableauPrgExtern [ index ] . BoolFound == FALSE) {
if (*TableauPrgExtern [ index ] . Name3 != '\0') {
if ((*TableauPrgExtern [ index ] . BoolFound = libutils_find_file (TableauPrgExtern [ index ] . Name3)) == TRUE) {
TableauPrgExtern [ index ] . PtrName = TableauPrgExtern [ index ] .Name3;
}
}
}
// FIXER LE PIXBUF SI PAS EN SELECTION
if (*TableauPrgExtern [ index ] . BoolFound == TRUE)
TableauPrgExtern [ index ] . Pixbuf = var_prgextern.Pixbuf_Ok;
else TableauPrgExtern [ index ] . Pixbuf = var_prgextern.Pixbuf_Not_Ok;
}
prginit_affiche_glist ();
}
//
//
gboolean prginit_get_etat (void)
{
prginit_scan ();
var_prgextern.Bool_Goto_Page_Options =
PrgInit.bool_a52dec &
PrgInit.bool_cdparanoia &
PrgInit.bool_cdda2wav &
PrgInit.bool_flac &
PrgInit.bool_lame &
PrgInit.bool_oggenc &
PrgInit.bool_sox &
PrgInit.bool_normalize &
PrgInit.bool_checkmp3 &
PrgInit.bool_faad &
PrgInit.bool_faac &
PrgInit.bool_mplayer &
PrgInit.bool_shorten &
PrgInit.bool_wavpack &
PrgInit.bool_ape &
PrgInit.bool_lsdvd &
PrgInit.bool_vorbisgain &
PrgInit.bool_mp3gain &
PrgInit.bool_shntool &
PrgInit.bool_aacplusenc;
return (var_prgextern.Bool_Goto_Page_Options);
}
// UPDATE DU TREEVIEW
//
void on_button_scan_without_deb_clicked (GtkButton *button, gpointer user_data)
{
if (var_prgextern.Adr_Tree_Model == NULL) return;
prginit_scan ();
prginit_affiche_glist ();
//
cdaudio_update_glist ();
cdaudio_affiche_glist_audio ();
cdaudio_set_flag_buttons ();
//
file_pixbuf_update_glist ();
file_affiche_glist ();
file_set_flag_buttons ();
}
//
//
gboolean prginit_key_press_event (GtkWidget *widget, GdkEventKey *event, gpointer user_data)
{
return (TRUE);
}
// CREAATION DU SCROLLWINDOW ET DES EVENEMENTS ASSOCIES
//
static void prginit_add_columns (GtkTreeView *treeview)
{
GtkCellRenderer *renderer;
GtkTreeViewColumn *column;
GtkTreeModel *model = gtk_tree_view_get_model (treeview);
// SIGNAL 'key-press-event'
g_signal_connect(G_OBJECT(treeview),
"key-press-event",
(GCallback) prginit_key_press_event,
model);
// SIGNAL 'changed'
var_prgextern.Adr_Line_Selected = gtk_tree_view_get_selection(GTK_TREE_VIEW(treeview));
gtk_tree_selection_set_mode (var_prgextern.Adr_Line_Selected, GTK_SELECTION_BROWSE);
// PRGEXT_NAME
renderer = gtk_cell_renderer_text_new ();
g_object_set (renderer, "xalign", 0.0, NULL);
column = gtk_tree_view_column_new_with_attributes (_("Nom"),
renderer,
"markup", PRGEXT_NAME,
NULL);
// gtk_tree_view_column_set_sizing (GTK_TREE_VIEW_COLUMN (column),
// GTK_TREE_VIEW_COLUMN_FIXED);
// gtk_tree_view_column_set_fixed_width (GTK_TREE_VIEW_COLUMN (column), 130);
gtk_tree_view_column_set_alignment (GTK_TREE_VIEW_COLUMN (column), 0.5);
gtk_tree_view_append_column (treeview, column);
// PRGEXT_STATUS
renderer = gtk_cell_renderer_pixbuf_new ();
g_object_set (renderer, "xalign", 0.5, NULL);
column = gtk_tree_view_column_new_with_attributes (
_("Status"),
renderer,
"pixbuf", PRGEXT_STATUS,
NULL);
gtk_tree_view_column_set_sizing (GTK_TREE_VIEW_COLUMN (column),
GTK_TREE_VIEW_COLUMN_FIXED);
gtk_tree_view_column_set_fixed_width (GTK_TREE_VIEW_COLUMN (column), 50);
gtk_tree_view_column_set_alignment (GTK_TREE_VIEW_COLUMN (column), 0.5);
gtk_tree_view_append_column (treeview, column);
// PRGEXT_PAQUAGE
renderer = gtk_cell_renderer_text_new ();
g_object_set (renderer, "xalign", 0.0, NULL);
column = gtk_tree_view_column_new_with_attributes (
_("Paquet"),
renderer,
"markup", PRGEXT_PAQUAGE,
NULL);
gtk_tree_view_column_set_sizing (GTK_TREE_VIEW_COLUMN (column),
GTK_TREE_VIEW_COLUMN_FIXED);
gtk_tree_view_column_set_fixed_width (GTK_TREE_VIEW_COLUMN (column), 140);
gtk_tree_view_column_set_alignment (GTK_TREE_VIEW_COLUMN (column), 0.5);
gtk_tree_view_append_column (treeview, column);
// PRGEXT_COMMENT
renderer = gtk_cell_renderer_text_new ();
g_object_set (renderer, "xalign", 0.0, NULL);
column = gtk_tree_view_column_new_with_attributes (
_("Action"),
renderer,
"markup", PRGEXT_COMMENT,
NULL);
gtk_tree_view_column_set_sizing (GTK_TREE_VIEW_COLUMN (column),
GTK_TREE_VIEW_COLUMN_FIXED);
gtk_tree_view_column_set_fixed_width (GTK_TREE_VIEW_COLUMN (column), 160);
gtk_tree_view_column_set_alignment (GTK_TREE_VIEW_COLUMN (column), 0.5);
gtk_tree_view_append_column (treeview, column);
}
// INITIALISATION DU SCROLLWINDOW
//
void on_scrolledwindow_applications_externes_realize (GtkWidget *widget, gpointer user_data)
{
GtkTreeModel *model;
GtkWidget *treeview;
GtkListStore *store;
var_prgextern.Pixbuf_Ok = libutils_init_pixbufs ("prg-ok.png");
var_prgextern.Pixbuf_Not_Ok = libutils_init_pixbufs ("dbfs-no.png");
var_prgextern.Adr_scroll = widget;
var_prgextern.Adr_List_Store =
store = gtk_list_store_new (PRGEXT_TOTAL_COLUMN, // Nombre total de colonnes
G_TYPE_STRING, // Name
GDK_TYPE_PIXBUF, // Status
G_TYPE_STRING, // Paquage
G_TYPE_STRING, // Commentaire
G_TYPE_INT
);
var_prgextern.Adr_Tree_Model = model = GTK_TREE_MODEL (store);
treeview = gtk_tree_view_new_with_model (model);
gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (treeview), TRUE);
g_object_unref (model);
gtk_container_add (GTK_CONTAINER (widget), treeview);
prginit_add_columns (GTK_TREE_VIEW (treeview));
prginit_scan ();
prginit_print_info ();
gtk_widget_show_all (widget);
}
xcfa-4.3.6/src/alsa_audio.h 0000644 0001750 0001750 00000004535 12122563437 012443 0000000 0000000 /*
* file : alsa_audio.h
* project : xcfa
* with : Gtk-2
*
* copyright : (C) 2003 - 2013 by Claude Bulin
*
* xcfa - GTK+ implementation of the GNU shell command
* GNU General Public License
*
* This file is part of XCFA.
*
* XCFA is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* at your option) any later version.
*
* XCFA is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with XCFA. If not, see .
*
* ---
*
* Code de lecture audio pour fichiers de type WAV reprit et retravaille
* depuis:
* Analyse code depuis: wavbreaker
* par Timothy Robinson et Thomas Perl
* http://wavbreaker.sourceforge.net/
*
*/
#ifndef alsa_audio_h
#define alsa_audio_h 1
#include
#include
typedef struct {
snd_pcm_t *playback_handle; // Handle
guint bytesPerFrame; // 8, 16, 24, 32, 64 ...
guint channels; // 1, 2, 4 ...
gint SampleRate; // Frequence: 44100 ...
gint TotalChunckSize; //
guchar *buffer; // Pointeur de buffer
guint SizeBuffer; // Taille requise du buffer
gint Sec; // Duree total en secondes
gdouble Percent; // Poucentage en retour sur la duree total
gdouble PercentSel; // Poucentage en retour depuis la selection
gdouble PercentBegin; //
gdouble PercentEnd; //
gboolean BoolThreadEnd; //
guint HandlerTimeout; //
gboolean StopPlay; //
gboolean PauseAlsa; //
void (*FuncSetValueTime) (gdouble p_value); //
void (*FuncIconeStop) (void); //
FILE *pFile; // Handler du fichier ouvert
} VAR_ALSA;
extern VAR_ALSA VarAlsa;
void AlsaAudio_close_device (void);
gboolean AlsaAudio_open_device (const gchar *audio_dev, // default
gint p_bitsPerSample, // 8, 16, 24, ...
gint p_channels, // 1, 2, 4, ...
guint p_samplesPerSec, // 44100, ...
guint *p_bufferSize); // Taille buffer retournee
gboolean AlsaAudio_write (gint size);
#endif
xcfa-4.3.6/src/extra.c 0000644 0001750 0001750 00000014373 12141321465 011453 0000000 0000000 /*
* file : extra.c
* project : xcfa
* with : Gtk-2
*
* copyright : (C) 2003 - 2013 by Claude Bulin
*
* xcfa - GTK+ implementation of the GNU shell command
* GNU General Public License
*
* This file is part of XCFA.
*
* XCFA is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* at your option) any later version.
*
* XCFA is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with XCFA. If not, see .
*/
#ifdef HAVE_CONFIG_H
#include "../config.h"
#endif
#include
#ifdef ENABLE_STATIC_LIBRARY
#include "../lib/lib.h"
#endif
#include "global.h"
#include "configuser.h"
#include "extra.h"
typedef struct {
GtkWidget *Adr_entry_navigateur;
GtkWidget *Adr_entry_param_navigateur;
GtkWidget *Adr_entry_audio;
GtkWidget *Adr_entry_param_audio;
gboolean BoolNavigateurOk;
gboolean BoolAudioOk;
} VAR_EXTRA;
VAR_EXTRA VarExtra;
// ENTRY: NAVIGATEUR
//
void on_entry_navigateur_extra_realize (GtkWidget *widget, gpointer user_data)
{
VarExtra.Adr_entry_navigateur = widget;
if (NULL == Config.StringNameNavigateur) {
Config.StringNameNavigateur = g_strdup ("iceweasel");
}
else if ('\0' == *Config.StringNameNavigateur) {
g_free (Config.StringNameNavigateur);
Config.StringNameNavigateur = NULL;
Config.StringNameNavigateur = g_strdup ("iceweasel");
}
gtk_entry_set_text (GTK_ENTRY (VarExtra.Adr_entry_navigateur), Config.StringNameNavigateur);
}
//
//
void on_entry_navigateur_extra_changed (GtkEditable *editable, gpointer user_data)
{
if (NULL != VarExtra.Adr_entry_navigateur) {
gchar *Ptr = (gchar *)gtk_entry_get_text (GTK_ENTRY (VarExtra.Adr_entry_navigateur));
if (TRUE == libutils_find_file (Ptr)) {
gtk_label_set_markup (GTK_LABEL (GLADE_GET_OBJECT("label_navigateur_extra")), "Found");
VarExtra.BoolNavigateurOk = TRUE;
}
else {
gtk_label_set_markup (GTK_LABEL (GLADE_GET_OBJECT("label_navigateur_extra")), "NOT Found");
VarExtra.BoolNavigateurOk = FALSE;
}
if (NULL != Config.StringNameNavigateur) {
g_free (Config.StringNameNavigateur);
Config.StringNameNavigateur = NULL;
}
Config.StringNameNavigateur = g_strdup (Ptr);
}
}
//
//
void on_entry_param_navigateur_extra_realize (GtkWidget *widget, gpointer user_data)
{
VarExtra.Adr_entry_param_navigateur = widget;
if (NULL == Config.StringParamNameNavigateur) {
Config.StringParamNameNavigateur = g_strdup ("");
}
gtk_entry_set_text (GTK_ENTRY (VarExtra.Adr_entry_param_navigateur),Config.StringParamNameNavigateur);
}
//
//
void on_entry_param_navigateur_extra_changed (GtkEditable *editable, gpointer user_data)
{
if (NULL != VarExtra.Adr_entry_param_navigateur) {
if (NULL != Config.StringParamNameNavigateur) {
g_free (Config.StringParamNameNavigateur);
Config.StringParamNameNavigateur = NULL;
}
Config.StringParamNameNavigateur = g_strdup ((gchar *)gtk_entry_get_text (GTK_ENTRY (VarExtra.Adr_entry_param_navigateur)));
}
}
//
//
gchar *extra_get_name_navigateur (void)
{
return ((gchar *)gtk_entry_get_text (GTK_ENTRY (VarExtra.Adr_entry_navigateur)));
}
//
//
gboolean extra_get_navigateur_is_ok (void)
{
return (VarExtra.BoolNavigateurOk);
}
// ENTRY: LECTEUR AUDIO
//
void on_entry_lecteur_audio_extra_realize (GtkWidget *widget, gpointer user_data)
{
VarExtra.Adr_entry_audio = widget;
if (NULL == Config.StringNameLecteurAudio) {
Config.StringNameLecteurAudio = g_strdup ("totem");
}
else if ('\0' == *Config.StringNameLecteurAudio) {
g_free (Config.StringNameLecteurAudio);
Config.StringNameLecteurAudio = NULL;
Config.StringNameLecteurAudio = g_strdup ("totem");
}
gtk_entry_set_text (GTK_ENTRY (VarExtra.Adr_entry_audio),Config.StringNameLecteurAudio);
}
//
//
void on_entry_lecteur_audio_extra_changed (GtkEditable *editable, gpointer user_data)
{
if (NULL != VarExtra.Adr_entry_audio) {
gchar *Ptr = (gchar *)gtk_entry_get_text (GTK_ENTRY (VarExtra.Adr_entry_audio));
if (TRUE == libutils_find_file (Ptr)) {
gtk_label_set_markup (GTK_LABEL (GLADE_GET_OBJECT("label_lecteur_audio_extra")), "Found");
VarExtra.BoolAudioOk = TRUE;
}
else {
gtk_label_set_markup (GTK_LABEL (GLADE_GET_OBJECT("label_lecteur_audio_extra")), "NOT Found");
VarExtra.BoolAudioOk = FALSE;
}
if (NULL != Config.StringNameLecteurAudio) {
g_free (Config.StringNameLecteurAudio);
Config.StringNameLecteurAudio = NULL;
}
Config.StringNameLecteurAudio = g_strdup (Ptr);
}
}
//
//
void on_entry_param_lecteur_audio_extra_realize (GtkWidget *widget, gpointer user_data)
{
VarExtra.Adr_entry_param_audio = widget;
if (NULL == Config.StringParamNameLecteurAudio) {
Config.StringParamNameLecteurAudio = g_strdup ("");
}
gtk_entry_set_text (GTK_ENTRY (VarExtra.Adr_entry_param_audio),Config.StringParamNameLecteurAudio);
}
//
//
void on_entry_param_lecteur_audio_extra_changed (GtkEditable *editable, gpointer user_data)
{
if (NULL != VarExtra.Adr_entry_param_audio) {
if (NULL != Config.StringParamNameLecteurAudio) {
g_free (Config.StringParamNameLecteurAudio);
Config.StringParamNameLecteurAudio = NULL;
}
Config.StringParamNameLecteurAudio = g_strdup ((gchar *)gtk_entry_get_text (GTK_ENTRY (VarExtra.Adr_entry_param_audio)));
}
}
//
//
gchar *extra_get_name_lecteur_audio (void)
{
return ((gchar *)gtk_entry_get_text (GTK_ENTRY (VarExtra.Adr_entry_audio)));
}
//
//
gchar *extra_get_param_name_lecteur_audio (void)
{
return ((gchar *)gtk_entry_get_text (GTK_ENTRY (VarExtra.Adr_entry_param_audio)));
}
//
//
gboolean extra_get_param_name_lecteur_audio_is_ok (void)
{
gchar *Ptr = (gchar *)gtk_entry_get_text (GTK_ENTRY (VarExtra.Adr_entry_param_audio));
return (('\0' == *Ptr) ? FALSE : TRUE);
}
//
//
gboolean extra_get_lecteur_audio_is_ok (void)
{
return (VarExtra.BoolAudioOk);
}
xcfa-4.3.6/src/get_info.c 0000644 0001750 0001750 00000071036 12122563465 012130 0000000 0000000 /*
* file : get_info.c
* project : xcfa
* with : Gtk-2
*
* copyright : (C) 2003 - 2013 by Claude Bulin
*
* xcfa - GTK+ implementation of the GNU shell command
* GNU General Public License
*
* This file is part of XCFA.
*
* XCFA is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* at your option) any later version.
*
* XCFA is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with XCFA. If not, see .
*/
#ifdef HAVE_CONFIG_H
#include "../config.h"
#endif
#include
#include
#include
#include
#include
#include
#include