use now the autoconf config.h

This commit is contained in:
Markus Gans 2015-08-22 18:53:52 +02:00
parent adfcd29ee2
commit fa6666f368
27 changed files with 773 additions and 100 deletions

1
.gitignore vendored
View File

@ -8,6 +8,7 @@
*.gcov *.gcov
*.gcno *.gcno
*.gcda *.gcda
_configs.sed
config.* config.*
Makefile Makefile
libtool libtool

View File

@ -84,9 +84,9 @@ build_triplet = @build@
host_triplet = @host@ host_triplet = @host@
subdir = . subdir = .
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(top_srcdir)/configure $(am__configure_deps) AUTHORS COPYING \ $(top_srcdir)/configure $(am__configure_deps) \
ChangeLog config.guess config.sub depcomp install-sh missing \ $(srcdir)/config.h.in AUTHORS COPYING ChangeLog config.guess \
ltmain.sh config.sub depcomp install-sh missing ltmain.sh
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
@ -97,6 +97,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno config.status.lineno configure.lineno config.status.lineno
mkinstalldirs = $(install_sh) -d mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES = CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES = CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@) AM_V_P = $(am__v_P_@AM_V@)
@ -163,7 +164,8 @@ am__recursive_targets = \
$(am__extra_recursive_targets) $(am__extra_recursive_targets)
AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
cscope distdir dist dist-all distcheck cscope distdir dist dist-all distcheck
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \
$(LISP)config.h.in
# Read a list of newline-separated strings from the standard input, # Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates. Input order is # and print each of them once, without duplicates. Input order is
# *not* preserved. # *not* preserved.
@ -351,7 +353,8 @@ AUTOMAKE_OPTIONS = foreign
ACLOCAL_AMFLAGS = -I m4 ACLOCAL_AMFLAGS = -I m4
SUBDIRS = src doc test SUBDIRS = src doc test
doc_DATA = AUTHORS COPYING ChangeLog doc_DATA = AUTHORS COPYING ChangeLog
all: all-recursive all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
.SUFFIXES: .SUFFIXES:
am--refresh: Makefile am--refresh: Makefile
@ -389,6 +392,21 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps)
$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
$(am__aclocal_m4_deps): $(am__aclocal_m4_deps):
config.h: stamp-h1
@if test ! -f $@; then rm -f stamp-h1; else :; fi
@if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
@rm -f stamp-h1
cd $(top_builddir) && $(SHELL) ./config.status config.h
$(srcdir)/config.h.in: $(am__configure_deps)
($(am__cd) $(top_srcdir) && $(AUTOHEADER))
rm -f stamp-h1
touch $@
distclean-hdr:
-rm -f config.h stamp-h1
mostlyclean-libtool: mostlyclean-libtool:
-rm -f *.lo -rm -f *.lo
@ -708,7 +726,7 @@ distcleancheck: distclean
exit 1; } >&2 exit 1; } >&2
check-am: all-am check-am: all-am
check: check-recursive check: check-recursive
all-am: Makefile $(DATA) all-am: Makefile $(DATA) config.h
installdirs: installdirs-recursive installdirs: installdirs-recursive
installdirs-am: installdirs-am:
for dir in "$(DESTDIR)$(docdir)"; do \ for dir in "$(DESTDIR)$(docdir)"; do \
@ -751,8 +769,8 @@ clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-recursive distclean: distclean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -f Makefile -rm -f Makefile
distclean-am: clean-am distclean-generic distclean-libtool \ distclean-am: clean-am distclean-generic distclean-hdr \
distclean-tags distclean-libtool distclean-tags
dvi: dvi-recursive dvi: dvi-recursive
@ -814,16 +832,16 @@ ps-am:
uninstall-am: uninstall-docDATA uninstall-am: uninstall-docDATA
.MAKE: $(am__recursive_targets) install-am install-strip .MAKE: $(am__recursive_targets) all install-am install-strip
.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
am--refresh check check-am clean clean-cscope clean-generic \ am--refresh check check-am clean clean-cscope clean-generic \
clean-libtool cscope cscopelist-am ctags ctags-am dist \ clean-libtool cscope cscopelist-am ctags ctags-am dist \
dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \ dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \
dist-xz dist-zip distcheck distclean distclean-generic \ dist-xz dist-zip distcheck distclean distclean-generic \
distclean-libtool distclean-tags distcleancheck distdir \ distclean-hdr distclean-libtool distclean-tags distcleancheck \
distuninstallcheck dvi dvi-am html html-am info info-am \ distdir distuninstallcheck dvi dvi-am html html-am info \
install install-am install-data install-data-am \ info-am install install-am install-data install-data-am \
install-docDATA install-dvi install-dvi-am install-exec \ install-docDATA install-dvi install-dvi-am install-exec \
install-exec-am install-html install-html-am install-info \ install-exec-am install-html install-html-am install-info \
install-info-am install-man install-pdf install-pdf-am \ install-info-am install-man install-pdf install-pdf-am \

210
aclocal.m4 vendored
View File

@ -20,6 +20,216 @@ You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely. If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically 'autoreconf'.])]) To do so, use the procedure documented by the package, typically 'autoreconf'.])])
# ===========================================================================
# http://www.gnu.org/software/autoconf-archive/ax_prefix_config_h.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_PREFIX_CONFIG_H [(OUTPUT-HEADER [,PREFIX [,ORIG-HEADER]])]
#
# DESCRIPTION
#
# This is a new variant from ac_prefix_config_ this one will use a
# lowercase-prefix if the config-define was starting with a
# lowercase-char, e.g. "#define const", "#define restrict", or "#define
# off_t", (and this one can live in another directory, e.g.
# testpkg/config.h therefore I decided to move the output-header to be the
# first arg)
#
# takes the usual config.h generated header file; looks for each of the
# generated "#define SOMEDEF" lines, and prefixes the defined name (ie.
# makes it "#define PREFIX_SOMEDEF". The result is written to the output
# config.header file. The PREFIX is converted to uppercase for the
# conversions.
#
# Defaults:
#
# OUTPUT-HEADER = $PACKAGE-config.h
# PREFIX = $PACKAGE
# ORIG-HEADER, from AM_CONFIG_HEADER(config.h)
#
# Your configure.ac script should contain both macros in this order, and
# unlike the earlier variations of this prefix-macro it is okay to place
# the AX_PREFIX_CONFIG_H call before the AC_OUTPUT invokation.
#
# Example:
#
# AC_INIT(config.h.in) # config.h.in as created by "autoheader"
# AM_INIT_AUTOMAKE(testpkg, 0.1.1) # makes #undef VERSION and PACKAGE
# AM_CONFIG_HEADER(config.h) # prep config.h from config.h.in
# AX_PREFIX_CONFIG_H(mylib/_config.h) # prep mylib/_config.h from it..
# AC_MEMORY_H # makes "#undef NEED_MEMORY_H"
# AC_C_CONST_H # makes "#undef const"
# AC_OUTPUT(Makefile) # creates the "config.h" now
# # and also mylib/_config.h
#
# if the argument to AX_PREFIX_CONFIG_H would have been omitted then the
# default outputfile would have been called simply "testpkg-config.h", but
# even under the name "mylib/_config.h" it contains prefix-defines like
#
# #ifndef TESTPKG_VERSION
# #define TESTPKG_VERSION "0.1.1"
# #endif
# #ifndef TESTPKG_NEED_MEMORY_H
# #define TESTPKG_NEED_MEMORY_H 1
# #endif
# #ifndef _testpkg_const
# #define _testpkg_const _const
# #endif
#
# and this "mylib/_config.h" can be installed along with other
# header-files, which is most convenient when creating a shared library
# (that has some headers) where some functionality is dependent on the
# OS-features detected at compile-time. No need to invent some
# "mylib-confdefs.h.in" manually. :-)
#
# Note that some AC_DEFINEs that end up in the config.h file are actually
# self-referential - e.g. AC_C_INLINE, AC_C_CONST, and the AC_TYPE_OFF_T
# say that they "will define inline|const|off_t if the system does not do
# it by itself". You might want to clean up about these - consider an
# extra mylib/conf.h that reads something like:
#
# #include <mylib/_config.h>
# #ifndef _testpkg_const
# #define _testpkg_const const
# #endif
#
# and then start using _testpkg_const in the header files. That is also a
# good thing to differentiate whether some library-user has starting to
# take up with a different compiler, so perhaps it could read something
# like this:
#
# #ifdef _MSC_VER
# #include <mylib/_msvc.h>
# #else
# #include <mylib/_config.h>
# #endif
# #ifndef _testpkg_const
# #define _testpkg_const const
# #endif
#
# LICENSE
#
# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
# Copyright (c) 2008 Marten Svantesson
# Copyright (c) 2008 Gerald Point <Gerald.Point@labri.fr>
#
# 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 3 of the License, 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, see <http://www.gnu.org/licenses/>.
#
# As a special exception, the respective Autoconf Macro's copyright owner
# gives unlimited permission to copy, distribute and modify the configure
# scripts that are the output of Autoconf when processing the Macro. You
# need not follow the terms of the GNU General Public License when using
# or distributing such scripts, even though portions of the text of the
# Macro appear in them. The GNU General Public License (GPL) does govern
# all other use of the material that constitutes the Autoconf Macro.
#
# This special exception to the GPL applies to versions of the Autoconf
# Macro released by the Autoconf Archive. When you make and distribute a
# modified version of the Autoconf Macro, you may extend this special
# exception to the GPL to apply to your modified version as well.
#serial 11
AC_DEFUN([AX_PREFIX_CONFIG_H],[dnl
AC_PREREQ([2.62])
AC_BEFORE([AC_CONFIG_HEADERS],[$0])dnl
AC_CONFIG_COMMANDS([ifelse($1,,$PACKAGE-config.h,$1)],[dnl
AS_VAR_PUSHDEF([_OUT],[ac_prefix_conf_OUT])dnl
AS_VAR_PUSHDEF([_DEF],[ac_prefix_conf_DEF])dnl
AS_VAR_PUSHDEF([_PKG],[ac_prefix_conf_PKG])dnl
AS_VAR_PUSHDEF([_LOW],[ac_prefix_conf_LOW])dnl
AS_VAR_PUSHDEF([_UPP],[ac_prefix_conf_UPP])dnl
AS_VAR_PUSHDEF([_INP],[ac_prefix_conf_INP])dnl
m4_pushdef([_script],[conftest.prefix])dnl
m4_pushdef([_symbol],[m4_cr_Letters[]m4_cr_digits[]_])dnl
_OUT=`echo ifelse($1, , $PACKAGE-config.h, $1)`
_DEF=`echo _$_OUT | sed -e "y:m4_cr_letters:m4_cr_LETTERS[]:" -e "s/@<:@^m4_cr_Letters@:>@/_/g"`
_PKG=`echo ifelse($2, , $PACKAGE, $2)`
_LOW=`echo _$_PKG | sed -e "y:m4_cr_LETTERS-:m4_cr_letters[]_:"`
_UPP=`echo $_PKG | sed -e "y:m4_cr_letters-:m4_cr_LETTERS[]_:" -e "/^@<:@m4_cr_digits@:>@/s/^/_/"`
_INP=`echo "ifelse($3,,,$3)" | sed -e 's/ *//'`
if test ".$_INP" = "."; then
for ac_file in : $CONFIG_HEADERS; do test "_$ac_file" = _: && continue
case "$ac_file" in
*.h) _INP=$ac_file ;;
*)
esac
test ".$_INP" != "." && break
done
fi
if test ".$_INP" = "."; then
case "$_OUT" in
*/*) _INP=`basename "$_OUT"`
;;
*-*) _INP=`echo "$_OUT" | sed -e "s/@<:@_symbol@:>@*-//"`
;;
*) _INP=config.h
;;
esac
fi
if test -z "$_PKG" ; then
AC_MSG_ERROR([no prefix for _PREFIX_PKG_CONFIG_H])
else
if test ! -f "$_INP" ; then if test -f "$srcdir/$_INP" ; then
_INP="$srcdir/$_INP"
fi fi
AC_MSG_NOTICE(creating $_OUT - prefix $_UPP for $_INP defines)
if test -f $_INP ; then
AS_ECHO(["s/^@%:@undef *\\(@<:@m4_cr_LETTERS[]_@:>@\\)/@%:@undef $_UPP""_\\1/"]) > _script
AS_ECHO(["s/^@%:@undef *\\(@<:@m4_cr_letters@:>@\\)/@%:@undef $_LOW""_\\1/"]) >> _script
AS_ECHO(["s/^@%:@def[]ine *\\(@<:@m4_cr_LETTERS[]_@:>@@<:@_symbol@:>@*\\)\\(.*\\)/@%:@ifndef $_UPP""_\\1\\"]) >> _script
AS_ECHO(["@%:@def[]ine $_UPP""_\\1\\2\\"]) >> _script
AS_ECHO(["@%:@endif/"]) >> _script
AS_ECHO(["s/^@%:@def[]ine *\\(@<:@m4_cr_letters@:>@@<:@_symbol@:>@*\\)\\(.*\\)/@%:@ifndef $_LOW""_\\1\\"]) >> _script
AS_ECHO(["@%:@define $_LOW""_\\1\\2\\"]) >> _script
AS_ECHO(["@%:@endif/"]) >> _script
# now executing _script on _DEF input to create _OUT output file
echo "@%:@ifndef $_DEF" >$tmp/pconfig.h
echo "@%:@def[]ine $_DEF 1" >>$tmp/pconfig.h
echo ' ' >>$tmp/pconfig.h
echo /'*' $_OUT. Generated automatically at end of configure. '*'/ >>$tmp/pconfig.h
sed -f _script $_INP >>$tmp/pconfig.h
echo ' ' >>$tmp/pconfig.h
echo '/* once:' $_DEF '*/' >>$tmp/pconfig.h
echo "@%:@endif" >>$tmp/pconfig.h
if cmp -s $_OUT $tmp/pconfig.h 2>/dev/null; then
AC_MSG_NOTICE([$_OUT is unchanged])
else
ac_dir=`AS_DIRNAME(["$_OUT"])`
AS_MKDIR_P(["$ac_dir"])
rm -f "$_OUT"
mv $tmp/pconfig.h "$_OUT"
fi
cp _script _configs.sed
else
AC_MSG_ERROR([input file $_INP does not exist - skip generating $_OUT])
fi
rm -f conftest.*
fi
m4_popdef([_symbol])dnl
m4_popdef([_script])dnl
AS_VAR_POPDEF([_INP])dnl
AS_VAR_POPDEF([_UPP])dnl
AS_VAR_POPDEF([_LOW])dnl
AS_VAR_POPDEF([_PKG])dnl
AS_VAR_POPDEF([_DEF])dnl
AS_VAR_POPDEF([_OUT])dnl
],[PACKAGE="$PACKAGE"])])
# Copyright (C) 2002-2013 Free Software Foundation, Inc. # Copyright (C) 2002-2013 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation

View File

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
$PREFIX="/usr" PREFIX="/usr"
case "$1" in case "$1" in
"--help"|"help") "--help"|"help")

334
configure vendored
View File

@ -2334,6 +2334,11 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_config_headers="$ac_config_headers config.h"
ac_config_commands="$ac_config_commands src/fconfig.h"
am__api_version='1.13' am__api_version='1.13'
@ -16893,10 +16898,12 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gpm_main" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gpm_main" >&5
$as_echo "$ac_cv_lib_gpm_main" >&6; } $as_echo "$ac_cv_lib_gpm_main" >&6; }
if test "x$ac_cv_lib_gpm_main" = xyes; then : if test "x$ac_cv_lib_gpm_main" = xyes; then :
$as_echo "#define HAVE_LIBGPM 1" >>confdefs.h LIBS="$LIBS -lgpm"
LIBS="$LIBS -lgpm"
fi fi
$as_echo "#define HAVE_LIBGPM 1" >>confdefs.h
fi fi
cat >confcache <<\_ACEOF cat >confcache <<\_ACEOF
@ -16989,43 +16996,7 @@ test "x$prefix" = xNONE && prefix=$ac_default_prefix
# Let make expand exec_prefix. # Let make expand exec_prefix.
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
# Transform confdefs.h into DEFS. DEFS=-DHAVE_CONFIG_H
# Protect against shell expansion while executing Makefile rules.
# Protect against Makefile macro expansion.
#
# If the first sed substitution is executed (which looks for macros that
# take arguments), then branch to the quote section. Otherwise,
# look for a macro that doesn't take arguments.
ac_script='
:mline
/\\$/{
N
s,\\\n,,
b mline
}
t clear
:clear
s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g
t quote
s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g
t quote
b any
:quote
s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g
s/\[/\\&/g
s/\]/\\&/g
s/\$/$$/g
H
:any
${
g
s/^\n//
s/\n/ /g
p
}
'
DEFS=`sed -n "$ac_script" confdefs.h`
ac_libobjs= ac_libobjs=
ac_ltlibobjs= ac_ltlibobjs=
@ -17487,11 +17458,15 @@ case $ac_config_files in *"
"*) set x $ac_config_files; shift; ac_config_files=$*;; "*) set x $ac_config_files; shift; ac_config_files=$*;;
esac esac
case $ac_config_headers in *"
"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
esac
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for. # Files that config.status was made for.
config_files="$ac_config_files" config_files="$ac_config_files"
config_headers="$ac_config_headers"
config_commands="$ac_config_commands" config_commands="$ac_config_commands"
_ACEOF _ACEOF
@ -17513,10 +17488,15 @@ Usage: $0 [OPTION]... [TAG]...
--recheck update $as_me by reconfiguring in the same conditions --recheck update $as_me by reconfiguring in the same conditions
--file=FILE[:TEMPLATE] --file=FILE[:TEMPLATE]
instantiate the configuration file FILE instantiate the configuration file FILE
--header=FILE[:TEMPLATE]
instantiate the configuration header FILE
Configuration files: Configuration files:
$config_files $config_files
Configuration headers:
$config_headers
Configuration commands: Configuration commands:
$config_commands $config_commands
@ -17583,7 +17563,18 @@ do
esac esac
as_fn_append CONFIG_FILES " '$ac_optarg'" as_fn_append CONFIG_FILES " '$ac_optarg'"
ac_need_defaults=false;; ac_need_defaults=false;;
--he | --h | --help | --hel | -h ) --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 ;; $as_echo "$ac_cs_usage"; exit ;;
-q | -quiet | --quiet | --quie | --qui | --qu | --q \ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil | --si | --s) | -silent | --silent | --silen | --sile | --sil | --si | --s)
@ -17634,6 +17625,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# #
# INIT-COMMANDS # INIT-COMMANDS
# #
PACKAGE="$PACKAGE"
AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
@ -18020,6 +18012,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
for ac_config_target in $ac_config_targets for ac_config_target in $ac_config_targets
do do
case $ac_config_target in case $ac_config_target in
"config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
"src/fconfig.h") CONFIG_COMMANDS="$CONFIG_COMMANDS src/fconfig.h" ;;
"depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
"libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
@ -18039,6 +18033,7 @@ done
# bizarre bug on SunOS 4.1.3. # bizarre bug on SunOS 4.1.3.
if $ac_need_defaults; then if $ac_need_defaults; then
test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files 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 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
fi fi
@ -18227,8 +18222,116 @@ fi
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
fi # test -n "$CONFIG_FILES" 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 >"$ac_tmp/defines.awk" <<\_ACAWK ||
BEGIN {
_ACEOF
eval set X " :F $CONFIG_FILES :C $CONFIG_COMMANDS" # 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_tt=`sed -n "/$ac_delim/p" confdefs.h`
if test -z "$ac_tt"; 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
' <confdefs.h | sed '
s/'"$ac_delim"'/"\\\
"/g' >>$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 shift
for ac_tag for ac_tag
do do
@ -18447,7 +18550,64 @@ which seems to be undefined. Please make sure it is defined" >&2;}
esac \ esac \
|| as_fn_error $? "could not create $ac_file" "$LINENO" 5 || 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 "$ac_tmp/defines.awk"' "$ac_file_inputs"
} >"$ac_tmp/config.h" \
|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
if diff "$ac_file" "$ac_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 "$ac_tmp/config.h" "$ac_file" \
|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
fi
else
$as_echo "/* $configure_input */" \
&& eval '$AWK -f "$ac_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 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
$as_echo "$as_me: executing $ac_file commands" >&6;} $as_echo "$as_me: executing $ac_file commands" >&6;}
@ -18456,6 +18616,96 @@ $as_echo "$as_me: executing $ac_file commands" >&6;}
case $ac_file$ac_mode in case $ac_file$ac_mode in
"src/fconfig.h":C) ac_prefix_conf_OUT=`echo src/fconfig.h`
ac_prefix_conf_DEF=`echo _$ac_prefix_conf_OUT | sed -e "y:abcdefghijklmnopqrstuvwxyz:ABCDEFGHIJKLMNOPQRSTUVWXYZ:" -e "s/[^abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g"`
ac_prefix_conf_PKG=`echo F`
ac_prefix_conf_LOW=`echo _$ac_prefix_conf_PKG | sed -e "y:ABCDEFGHIJKLMNOPQRSTUVWXYZ-:abcdefghijklmnopqrstuvwxyz_:"`
ac_prefix_conf_UPP=`echo $ac_prefix_conf_PKG | sed -e "y:abcdefghijklmnopqrstuvwxyz-:ABCDEFGHIJKLMNOPQRSTUVWXYZ_:" -e "/^[0123456789]/s/^/_/"`
ac_prefix_conf_INP=`echo "" | sed -e 's/ *//'`
if test ".$ac_prefix_conf_INP" = "."; then
for ac_file in : $CONFIG_HEADERS; do test "_$ac_file" = _: && continue
case "$ac_file" in
*.h) ac_prefix_conf_INP=$ac_file ;;
*)
esac
test ".$ac_prefix_conf_INP" != "." && break
done
fi
if test ".$ac_prefix_conf_INP" = "."; then
case "$ac_prefix_conf_OUT" in
*/*) ac_prefix_conf_INP=`basename "$ac_prefix_conf_OUT"`
;;
*-*) ac_prefix_conf_INP=`echo "$ac_prefix_conf_OUT" | sed -e "s/[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_]*-//"`
;;
*) ac_prefix_conf_INP=config.h
;;
esac
fi
if test -z "$ac_prefix_conf_PKG" ; then
as_fn_error $? "no prefix for _PREFIX_PKG_CONFIG_H" "$LINENO" 5
else
if test ! -f "$ac_prefix_conf_INP" ; then if test -f "$srcdir/$ac_prefix_conf_INP" ; then
ac_prefix_conf_INP="$srcdir/$ac_prefix_conf_INP"
fi fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_prefix_conf_OUT - prefix $ac_prefix_conf_UPP for $ac_prefix_conf_INP defines" >&5
$as_echo "$as_me: creating $ac_prefix_conf_OUT - prefix $ac_prefix_conf_UPP for $ac_prefix_conf_INP defines" >&6;}
if test -f $ac_prefix_conf_INP ; then
$as_echo "s/^#undef *\\([ABCDEFGHIJKLMNOPQRSTUVWXYZ_]\\)/#undef $ac_prefix_conf_UPP""_\\1/" > conftest.prefix
$as_echo "s/^#undef *\\([abcdefghijklmnopqrstuvwxyz]\\)/#undef $ac_prefix_conf_LOW""_\\1/" >> conftest.prefix
$as_echo "s/^#define *\\([ABCDEFGHIJKLMNOPQRSTUVWXYZ_][abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_]*\\)\\(.*\\)/#ifndef $ac_prefix_conf_UPP""_\\1\\" >> conftest.prefix
$as_echo "#define $ac_prefix_conf_UPP""_\\1\\2\\" >> conftest.prefix
$as_echo "#endif/" >> conftest.prefix
$as_echo "s/^#define *\\([abcdefghijklmnopqrstuvwxyz][abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_]*\\)\\(.*\\)/#ifndef $ac_prefix_conf_LOW""_\\1\\" >> conftest.prefix
$as_echo "#define $ac_prefix_conf_LOW""_\\1\\2\\" >> conftest.prefix
$as_echo "#endif/" >> conftest.prefix
# now executing _script on _DEF input to create _OUT output file
echo "#ifndef $ac_prefix_conf_DEF" >$tmp/pconfig.h
echo "#define $ac_prefix_conf_DEF 1" >>$tmp/pconfig.h
echo ' ' >>$tmp/pconfig.h
echo /'*' $ac_prefix_conf_OUT. Generated automatically at end of configure. '*'/ >>$tmp/pconfig.h
sed -f conftest.prefix $ac_prefix_conf_INP >>$tmp/pconfig.h
echo ' ' >>$tmp/pconfig.h
echo '/* once:' $ac_prefix_conf_DEF '*/' >>$tmp/pconfig.h
echo "#endif" >>$tmp/pconfig.h
if cmp -s $ac_prefix_conf_OUT $tmp/pconfig.h 2>/dev/null; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: $ac_prefix_conf_OUT is unchanged" >&5
$as_echo "$as_me: $ac_prefix_conf_OUT is unchanged" >&6;}
else
ac_dir=`$as_dirname -- "$ac_prefix_conf_OUT" ||
$as_expr X"$ac_prefix_conf_OUT" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$ac_prefix_conf_OUT" : 'X\(//\)[^/]' \| \
X"$ac_prefix_conf_OUT" : 'X\(//\)$' \| \
X"$ac_prefix_conf_OUT" : 'X\(/\)' \| . 2>/dev/null ||
$as_echo X"$ac_prefix_conf_OUT" |
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
rm -f "$ac_prefix_conf_OUT"
mv $tmp/pconfig.h "$ac_prefix_conf_OUT"
fi
cp conftest.prefix _configs.sed
else
as_fn_error $? "input file $ac_prefix_conf_INP does not exist - skip generating $ac_prefix_conf_OUT" "$LINENO" 5
fi
rm -f conftest.*
fi
;;
"depfiles":C) test x"$AMDEP_TRUE" != x"" || { "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
# Older Autoconf quotes --file arguments for eval, but not when files # Older Autoconf quotes --file arguments for eval, but not when files
# are listed without --file. Let's play safe and only enable the eval # are listed without --file. Let's play safe and only enable the eval

View File

@ -5,6 +5,8 @@
# Process this file with autoconf to produce a configure script. # Process this file with autoconf to produce a configure script.
AC_INIT([finalcut], [0.1.1]) AC_INIT([finalcut], [0.1.1])
AC_CONFIG_HEADER([config.h])
AX_PREFIX_CONFIG_H([src/fconfig.h], [F])
AC_CONFIG_SRCDIR([src/fobject.cpp]) AC_CONFIG_SRCDIR([src/fobject.cpp])
AM_INIT_AUTOMAKE AM_INIT_AUTOMAKE
AC_PROG_CC AC_PROG_CC
@ -63,7 +65,8 @@ if test "x$with_gpm" != "xno"
then then
AC_CHECK_LIB([gpm], AC_CHECK_LIB([gpm],
[main], [main],
[AC_DEFINE(HAVE_LIBGPM) LIBS="$LIBS -lgpm"]) [LIBS="$LIBS -lgpm"])
AC_DEFINE([HAVE_LIBGPM], 1, [Define to 1 if GPM mouse is enabled])
fi fi
AC_OUTPUT AC_OUTPUT

View File

@ -92,6 +92,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4) $(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES = CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES = CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@) AM_V_P = $(am__v_P_@AM_V@)

View File

@ -50,6 +50,7 @@ finalcutinclude_HEADERS = \
fbuttongroup.h \ fbuttongroup.h \
fcharmap.h \ fcharmap.h \
fcheckbox.h \ fcheckbox.h \
fconfig.h \
fswitch.h \ fswitch.h \
fdialog.h \ fdialog.h \
fenum.h \ fenum.h \

View File

@ -37,11 +37,12 @@ INCLUDE_HEADERS = fapp.h \
# compiler parameter # compiler parameter
CXX = clang++ CXX = clang++
CCXFLAGS = $(OPTIMIZE) $(PROFILE) $(DEBUG) $(GPM) -march=x86-64 -frtti -fexceptions CCXFLAGS = $(OPTIMIZE) $(PROFILE) $(DEBUG) $(VER) $(GPM) -march=x86-64 -frtti -fexceptions
MAKEFILE = -f Makefile.clang MAKEFILE = -f Makefile.clang
LDFLAGS = $(TERMCAP) -lgpm LDFLAGS = $(TERMCAP) -lgpm
INCLUDES = -I./ INCLUDES = -I./
GPM = -D HAVE_LIBGPM GPM = -D F_HAVE_LIBGPM
VER = -D F_VERSION=$(VERSION)
RM = rm -f RM = rm -f
LIB = libfinal.so LIB = libfinal.so
OBJS = fstring.o \ OBJS = fstring.o \

View File

@ -37,11 +37,12 @@ INCLUDE_HEADERS = fapp.h \
# compiler parameter # compiler parameter
CXX = g++ CXX = g++
CCXFLAGS = $(OPTIMIZE) $(PROFILE) $(DEBUG) $(GPM) -march=x86-64 -frtti -fexceptions CCXFLAGS = $(OPTIMIZE) $(PROFILE) $(DEBUG) $(VER) $(GPM) -march=x86-64 -frtti -fexceptions
MAKEFILE = -f Makefile.gcc MAKEFILE = -f Makefile.gcc
LDFLAGS = $(TERMCAP) -lgpm LDFLAGS = $(TERMCAP) -lgpm
INCLUDES = -I./ INCLUDES = -I./
GPM = -D HAVE_LIBGPM GPM = -D F_HAVE_LIBGPM
VER = -D F_VERSION=$(VERSION)
RM = rm -f RM = rm -f
LIB = libfinal.so LIB = libfinal.so
OBJS = fstring.o \ OBJS = fstring.o \

View File

@ -94,6 +94,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4) $(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES = CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES = CONFIG_CLEAN_VPATH_FILES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
@ -154,7 +155,7 @@ AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @ am__v_at_0 = @
am__v_at_1 = am__v_at_1 =
DEFAULT_INCLUDES = -I.@am__isrc@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles am__depfiles_maybe = depfiles
am__mv = mv -f am__mv = mv -f
@ -410,6 +411,7 @@ finalcutinclude_HEADERS = \
fbuttongroup.h \ fbuttongroup.h \
fcharmap.h \ fcharmap.h \
fcheckbox.h \ fcheckbox.h \
fconfig.h \
fswitch.h \ fswitch.h \
fdialog.h \ fdialog.h \
fenum.h \ fenum.h \

View File

@ -74,7 +74,7 @@ void FApplication::init (int argc, char* argv[])
fifo_in_use = false; fifo_in_use = false;
fifo_buf_size = sizeof(fifo_buf); fifo_buf_size = sizeof(fifo_buf);
x11_button_state = 0x23; x11_button_state = 0x23;
#ifdef HAVE_LIBGPM #ifdef F_HAVE_LIBGPM
gpmMouseEvent = false; gpmMouseEvent = false;
gpm_ev.x = -1; gpm_ev.x = -1;
#endif #endif
@ -133,7 +133,7 @@ void FApplication::cmd_options ()
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#ifdef HAVE_LIBGPM #ifdef F_HAVE_LIBGPM
inline int FApplication::gpmEvent(void) inline int FApplication::gpmEvent(void)
{ {
register int result; register int result;
@ -159,7 +159,7 @@ inline int FApplication::gpmEvent(void)
else else
return no_event; return no_event;
} }
#endif // HAVE_LIBGPM #endif // F_HAVE_LIBGPM
//---------------------------------------------------------------------- //----------------------------------------------------------------------
inline bool FApplication::KeyPressed() inline bool FApplication::KeyPressed()
@ -212,7 +212,7 @@ void FApplication::processKeyboardEvent()
fifo_in_use = false; fifo_in_use = false;
} }
#ifdef HAVE_LIBGPM #ifdef F_HAVE_LIBGPM
if ( gpm_mouse_enabled ) if ( gpm_mouse_enabled )
{ {
gpmMouseEvent = false; gpmMouseEvent = false;
@ -230,7 +230,7 @@ void FApplication::processKeyboardEvent()
isKeyPressed = KeyPressed(); isKeyPressed = KeyPressed();
#else // without gpm #else // without gpm
isKeyPressed = KeyPressed(); isKeyPressed = KeyPressed();
#endif // HAVE_LIBGPM #endif // F_HAVE_LIBGPM
if ( isKeyPressed ) if ( isKeyPressed )
{ {
@ -812,7 +812,7 @@ bool FApplication::parseUrxvtMouse()
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#ifdef HAVE_LIBGPM #ifdef F_HAVE_LIBGPM
bool FApplication::processGpmEvent() bool FApplication::processGpmEvent()
{ {
memset(&b_state, 0x00, sizeof(b_state)); memset(&b_state, 0x00, sizeof(b_state));
@ -872,14 +872,14 @@ bool FApplication::processGpmEvent()
} }
return false; return false;
} }
#endif // HAVE_LIBGPM #endif // F_HAVE_LIBGPM
//---------------------------------------------------------------------- //----------------------------------------------------------------------
void FApplication::processMouseEvent() void FApplication::processMouseEvent()
{ {
bool event = false; bool event = false;
#ifdef HAVE_LIBGPM #ifdef F_HAVE_LIBGPM
if ( ! gpmMouseEvent if ( ! gpmMouseEvent
&& x11_mouse[0] == '\0' && x11_mouse[0] == '\0'
&& sgr_mouse[0] == '\0' && sgr_mouse[0] == '\0'
@ -896,7 +896,7 @@ void FApplication::processMouseEvent()
} }
#endif #endif
#ifdef HAVE_LIBGPM #ifdef F_HAVE_LIBGPM
if ( gpmMouseEvent ) if ( gpmMouseEvent )
event = processGpmEvent(); event = processGpmEvent();
#endif #endif
@ -1065,7 +1065,7 @@ void FApplication::processMouseEvent()
} }
flush_out(); flush_out();
#ifdef HAVE_LIBGPM #ifdef F_HAVE_LIBGPM
if ( gpm_mouse_enabled && gpm_ev.x != -1 ) if ( gpm_mouse_enabled && gpm_ev.x != -1 )
GPM_DRAWPOINTER(&gpm_ev); GPM_DRAWPOINTER(&gpm_ev);
#endif #endif

View File

@ -40,7 +40,7 @@ class FApplication : public FWidget
char sgr_mouse[13]; char sgr_mouse[13];
char urxvt_mouse[13]; char urxvt_mouse[13];
#ifdef HAVE_LIBGPM #ifdef F_HAVE_LIBGPM
Gpm_Event gpm_ev; Gpm_Event gpm_ev;
bool gpmMouseEvent; bool gpmMouseEvent;
enum gpmEventType enum gpmEventType
@ -99,7 +99,7 @@ class FApplication : public FWidget
bool parseSGRMouse(); bool parseSGRMouse();
bool parseUrxvtMouse(); bool parseUrxvtMouse();
#ifdef HAVE_LIBGPM #ifdef F_HAVE_LIBGPM
int gpmEvent(); int gpmEvent();
bool processGpmEvent(); bool processGpmEvent();
#endif #endif

176
src/fconfig.h Normal file
View File

@ -0,0 +1,176 @@
#ifndef _SRC_FCONFIG_H
#define _SRC_FCONFIG_H 1
/* src/fconfig.h. Generated automatically at end of configure. */
/* config.h. Generated from config.h.in by configure. */
/* config.h.in. Generated from configure.ac by autoheader. */
/* Define to 1 if you have the <cmath> header file. */
/* #undef HAVE_CMATH */
/* Define to 1 if you have the <csignal> header file. */
/* #undef HAVE_CSIGNAL */
/* Define to 1 if you have the <cstdlib> header file. */
/* #undef HAVE_CSTDLIB */
/* Define to 1 if you have the <dlfcn.h> header file. */
#ifndef F_HAVE_DLFCN_H
#define F_HAVE_DLFCN_H 1
#endif
/* Define to 1 if you have the <fcntl.h> header file. */
#ifndef F_HAVE_FCNTL_H
#define F_HAVE_FCNTL_H 1
#endif
/* Define to 1 if you have the <inttypes.h> header file. */
#ifndef F_HAVE_INTTYPES_H
#define F_HAVE_INTTYPES_H 1
#endif
/* Define to 1 if you have the <langinfo.h> header file. */
#ifndef F_HAVE_LANGINFO_H
#define F_HAVE_LANGINFO_H 1
#endif
/* Define to 1 if GPM mouse is enabled */
#ifndef F_HAVE_LIBGPM
#define F_HAVE_LIBGPM 1
#endif
/* Define to 1 if you have the <linux/fb.h> header file. */
#ifndef F_HAVE_LINUX_FB_H
#define F_HAVE_LINUX_FB_H 1
#endif
/* Define to 1 if you have the <list> header file. */
/* #undef HAVE_LIST */
/* Define to 1 if you have the <map> header file. */
/* #undef HAVE_MAP */
/* Define to 1 if you have the <memory.h> header file. */
#ifndef F_HAVE_MEMORY_H
#define F_HAVE_MEMORY_H 1
#endif
/* Define to 1 if you have the <queue> header file. */
/* #undef HAVE_QUEUE */
/* Define to 1 if you have the <stdint.h> header file. */
#ifndef F_HAVE_STDINT_H
#define F_HAVE_STDINT_H 1
#endif
/* Define to 1 if you have the <stdlib.h> header file. */
#ifndef F_HAVE_STDLIB_H
#define F_HAVE_STDLIB_H 1
#endif
/* Define to 1 if you have the <strings.h> header file. */
#ifndef F_HAVE_STRINGS_H
#define F_HAVE_STRINGS_H 1
#endif
/* Define to 1 if you have the <string.h> header file. */
#ifndef F_HAVE_STRING_H
#define F_HAVE_STRING_H 1
#endif
/* Define to 1 if you have the <sys/io.h> header file. */
#ifndef F_HAVE_SYS_IO_H
#define F_HAVE_SYS_IO_H 1
#endif
/* Define to 1 if you have the <sys/kd.h> header file. */
#ifndef F_HAVE_SYS_KD_H
#define F_HAVE_SYS_KD_H 1
#endif
/* Define to 1 if you have the <sys/stat.h> header file. */
#ifndef F_HAVE_SYS_STAT_H
#define F_HAVE_SYS_STAT_H 1
#endif
/* Define to 1 if you have the <sys/time.h> header file. */
#ifndef F_HAVE_SYS_TIME_H
#define F_HAVE_SYS_TIME_H 1
#endif
/* Define to 1 if you have the <sys/types.h> header file. */
#ifndef F_HAVE_SYS_TYPES_H
#define F_HAVE_SYS_TYPES_H 1
#endif
/* Define to 1 if you have the <termios.h> header file. */
#ifndef F_HAVE_TERMIOS_H
#define F_HAVE_TERMIOS_H 1
#endif
/* Define to 1 if you have the <term.h> header file. */
#ifndef F_HAVE_TERM_H
#define F_HAVE_TERM_H 1
#endif
/* Define to 1 if you have the <unistd.h> header file. */
#ifndef F_HAVE_UNISTD_H
#define F_HAVE_UNISTD_H 1
#endif
/* Define to 1 if you have the <vector> header file. */
/* #undef HAVE_VECTOR */
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#ifndef F_LT_OBJDIR
#define F_LT_OBJDIR ".libs/"
#endif
/* Name of package */
#ifndef F_PACKAGE
#define F_PACKAGE "finalcut"
#endif
/* Define to the address where bug reports for this package should be sent. */
#ifndef F_PACKAGE_BUGREPORT
#define F_PACKAGE_BUGREPORT ""
#endif
/* Define to the full name of this package. */
#ifndef F_PACKAGE_NAME
#define F_PACKAGE_NAME "finalcut"
#endif
/* Define to the full name and version of this package. */
#ifndef F_PACKAGE_STRING
#define F_PACKAGE_STRING "finalcut 0.1.1"
#endif
/* Define to the one symbol short name of this package. */
#ifndef F_PACKAGE_TARNAME
#define F_PACKAGE_TARNAME "finalcut"
#endif
/* Define to the home page for this package. */
#ifndef F_PACKAGE_URL
#define F_PACKAGE_URL ""
#endif
/* Define to the version of this package. */
#ifndef F_PACKAGE_VERSION
#define F_PACKAGE_VERSION "0.1.1"
#endif
/* Define to 1 if you have the ANSI C header files. */
#ifndef F_STDC_HEADERS
#define F_STDC_HEADERS 1
#endif
/* Version number of package */
#ifndef F_VERSION
#define F_VERSION "0.1.1"
#endif
/* once: _SRC_FCONFIG_H */
#endif

View File

@ -219,12 +219,6 @@ void FMenuBar::adjustSize()
FWidget::adjustSize(); FWidget::adjustSize();
} }
//----------------------------------------------------------------------
void FMenuBar::processActivate()
{
emitCallback("activate");
}
// public methods of FMenuBar // public methods of FMenuBar
//---------------------------------------------------------------------- //----------------------------------------------------------------------
void FMenuBar::onMouseDown (FMouseEvent* event) void FMenuBar::onMouseDown (FMouseEvent* event)
@ -321,6 +315,10 @@ void FMenuBar::onMouseUp (FMouseEvent* event)
int mouse_y = event->getY(); int mouse_y = event->getY();
if ( mouse_x < x1 || mouse_x > x2 || mouse_y != 1 ) if ( mouse_x < x1 || mouse_x > x2 || mouse_y != 1 )
(*iter)->unsetSelected(); (*iter)->unsetSelected();
else
{
(*iter)->processClicked();
}
this->redraw(); this->redraw();
} }
X = x2 + 1; X = x2 + 1;

View File

@ -29,7 +29,6 @@ class FMenuBar : public FWindow, public FMenuList
void draw(); void draw();
void drawItems(); void drawItems();
void adjustSize(); void adjustSize();
void processActivate();
public: public:
explicit FMenuBar (FWidget* parent=0); // constructor explicit FMenuBar (FWidget* parent=0); // constructor

View File

@ -107,14 +107,18 @@ void FMenuItem::setSuperMenu (FMenuList* smenu)
super_menu = smenu; super_menu = smenu;
} }
// protected methods of FMenuItem
//---------------------------------------------------------------------- //----------------------------------------------------------------------
void FMenuItem::processActivate() void FMenuItem::processActivate()
{ {
emitCallback("activate"); emitCallback("activate");
} }
//----------------------------------------------------------------------
void FMenuItem::processClicked()
{
emitCallback("clicked");
}
// public methods of FMenuItem // public methods of FMenuItem
//---------------------------------------------------------------------- //----------------------------------------------------------------------
void FMenuItem::onAccel (FAccelEvent* event) void FMenuItem::onAccel (FAccelEvent* event)
@ -132,8 +136,11 @@ void FMenuItem::onAccel (FAccelEvent* event)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
void FMenuItem::setSelected() void FMenuItem::setSelected()
{ {
this->selected = true; if ( isActivated() )
processActivate(); {
this->selected = true;
processActivate();
}
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------

View File

@ -38,6 +38,7 @@ class FMenuItem : public FWidget
FMenuList* superMenu() const; FMenuList* superMenu() const;
void setSuperMenu (FMenuList*); void setSuperMenu (FMenuList*);
void processActivate(); void processActivate();
void processClicked();
public: public:
explicit FMenuItem (FWidget* parent=0); explicit FMenuItem (FWidget* parent=0);
@ -69,6 +70,7 @@ class FMenuItem : public FWidget
private: private:
friend class FMenuList; friend class FMenuList;
friend class FMenuBar;
}; };
#pragma pack(pop) #pragma pack(pop)

View File

@ -8,6 +8,7 @@
#include <cstdlib> #include <cstdlib>
#include <list> #include <list>
#include <vector> #include <vector>
#include "fevent.h" #include "fevent.h"
#define null NULL #define null NULL

View File

@ -91,6 +91,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4) $(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES = CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES = CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@) AM_V_P = $(am__v_P_@AM_V@)

View File

@ -15,7 +15,6 @@
#include <cstdlib> #include <cstdlib>
#include <cstring> #include <cstring>
// value for a long capability waiting time // value for a long capability waiting time
#define LONG_DURATION 9999999 #define LONG_DURATION 9999999

View File

@ -25,7 +25,6 @@
#include <string> #include <string>
#include <vector> #include <vector>
#define FWDBUFFER 15 #define FWDBUFFER 15
#define INPBUFFER 200 #define INPBUFFER 200
#define CHAR_SIZE (sizeof(wchar_t)) // bytes per character #define CHAR_SIZE (sizeof(wchar_t)) // bytes per character

View File

@ -1299,7 +1299,7 @@ void FTerm::init()
Fputchar = &FTerm::putchar_VT100; // function pointer Fputchar = &FTerm::putchar_VT100; // function pointer
} }
#ifdef HAVE_LIBGPM #ifdef F_HAVE_LIBGPM
// Enable the linux general purpose mouse (gpm) server // Enable the linux general purpose mouse (gpm) server
gpm_mouse_enabled = enableGpmMouse(); gpm_mouse_enabled = enableGpmMouse();
#endif #endif
@ -1475,7 +1475,7 @@ void FTerm::finish()
if ( mouse_support ) if ( mouse_support )
disableXTermMouse(); disableXTermMouse();
#ifdef HAVE_LIBGPM #ifdef F_HAVE_LIBGPM
if ( gpm_mouse_enabled ) if ( gpm_mouse_enabled )
disableGpmMouse(); // Disable gpm server disableGpmMouse(); // Disable gpm server
#endif #endif
@ -2921,7 +2921,7 @@ void FTerm::xtermMouse (bool on)
} }
#ifdef HAVE_LIBGPM #ifdef F_HAVE_LIBGPM
//---------------------------------------------------------------------- //----------------------------------------------------------------------
bool FTerm::gpmMouse (bool on) bool FTerm::gpmMouse (bool on)
{ {
@ -2959,7 +2959,7 @@ bool FTerm::gpmMouse (bool on)
} }
return on; return on;
} }
#endif // HAVE_LIBGPM #endif // F_HAVE_LIBGPM
//---------------------------------------------------------------------- //----------------------------------------------------------------------
void FTerm::setTermXY (register int x, register int y) void FTerm::setTermXY (register int x, register int y)

View File

@ -4,7 +4,9 @@
#ifndef _FTERM_H #ifndef _FTERM_H
#define _FTERM_H #define _FTERM_H
#ifdef HAVE_LIBGPM #include <fconfig.h>
#ifdef F_HAVE_LIBGPM
#include <gpm.h> #include <gpm.h>
#endif #endif
@ -34,7 +36,7 @@
#include "fstring.h" #include "fstring.h"
#ifdef HAVE_LIBGPM #ifdef F_HAVE_LIBGPM
#undef buttons // from term.h #undef buttons // from term.h
#endif #endif
@ -298,11 +300,11 @@ class FTerm
static void enableXTermMouse(); static void enableXTermMouse();
static void disableXTermMouse(); static void disableXTermMouse();
#ifdef HAVE_LIBGPM #ifdef F_HAVE_LIBGPM
static bool gpmMouse (bool); static bool gpmMouse (bool);
static bool enableGpmMouse(); static bool enableGpmMouse();
static bool disableGpmMouse(); static bool disableGpmMouse();
#endif // HAVE_LIBGPM #endif // F_HAVE_LIBGPM
static void setTermXY (register int, register int); static void setTermXY (register int, register int);
static void setBeep(int, int); static void setBeep(int, int);
@ -466,7 +468,7 @@ inline void FTerm::disableXTermMouse()
{ xtermMouse(false); } { xtermMouse(false); }
#ifdef HAVE_LIBGPM #ifdef F_HAVE_LIBGPM
//---------------------------------------------------------------------- //----------------------------------------------------------------------
inline bool FTerm::enableGpmMouse() inline bool FTerm::enableGpmMouse()
{ return gpmMouse(true); } { return gpmMouse(true); }
@ -475,7 +477,7 @@ inline bool FTerm::enableGpmMouse()
inline bool FTerm::disableGpmMouse() inline bool FTerm::disableGpmMouse()
{ return gpmMouse(false); } { return gpmMouse(false); }
#endif // HAVE_LIBGPM #endif // F_HAVE_LIBGPM
//---------------------------------------------------------------------- //----------------------------------------------------------------------
inline bool FTerm::hideCursor() inline bool FTerm::hideCursor()

View File

@ -9,7 +9,7 @@ BINDIR = /usr/local/bin
CXX = clang++ CXX = clang++
SRCS = $(wildcard *.cpp) SRCS = $(wildcard *.cpp)
OBJS = $(SRCS:%.cpp=%) OBJS = $(SRCS:%.cpp=%)
CCXFLAGS = $(OPTIMIZE) $(PROFILE) $(DEBUG) -march=x86-64 -frtti -fexceptions CCXFLAGS = $(OPTIMIZE) $(PROFILE) $(DEBUG)
MAKEFILE = -f Makefile.clang MAKEFILE = -f Makefile.clang
LDFLAGS = -L../src -lfinal LDFLAGS = -L../src -lfinal
INCLUDES = -I../src INCLUDES = -I../src

View File

@ -9,7 +9,7 @@ BINDIR = /usr/local/bin
CXX = g++ CXX = g++
SRCS = $(wildcard *.cpp) SRCS = $(wildcard *.cpp)
OBJS = $(SRCS:%.cpp=%) OBJS = $(SRCS:%.cpp=%)
CCXFLAGS = $(OPTIMIZE) $(PROFILE) $(DEBUG) -march=x86-64 -frtti -fexceptions CCXFLAGS = $(OPTIMIZE) $(PROFILE) $(DEBUG)
MAKEFILE = -f Makefile.gcc MAKEFILE = -f Makefile.gcc
LDFLAGS = -L../src -lfinal LDFLAGS = -L../src -lfinal
INCLUDES = -I../src INCLUDES = -I../src

View File

@ -96,6 +96,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4) $(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES = CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES = CONFIG_CLEAN_VPATH_FILES =
PROGRAMS = $(noinst_PROGRAMS) PROGRAMS = $(noinst_PROGRAMS)
@ -142,7 +143,7 @@ AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @ am__v_at_0 = @
am__v_at_1 = am__v_at_1 =
DEFAULT_INCLUDES = -I.@am__isrc@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles am__depfiles_maybe = depfiles
am__mv = mv -f am__mv = mv -f