gmysqlcc-0.3.0/0000777000175000017500000000000010760516433010346 500000000000000gmysqlcc-0.3.0/missing0000755000175000017500000002557710755301563011701 00000000000000#! /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: gmysqlcc-0.3.0/config.sub0000755000175000017500000007763110755301562012262 00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, # Inc. timestamp='2007-01-18' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file 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 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, 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. # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray) os= basic_machine=$1 ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | mcore | mep \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64vr | mips64vrel \ | mips64orion | mips64orionel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | mt \ | msp430 \ | nios | nios2 \ | ns16k | ns32k \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | score \ | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64vr-* | mips64vrel-* \ | mips64orion-* | mips64orionel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ | xstormy16-* | xtensa-* \ | ymp-* \ | z8k-*) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; c90) basic_machine=c90-cray os=-unicos ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16c) basic_machine=cr16c-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; mvs) basic_machine=i370-ibm os=-mvs ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; tic55x | c55x*) basic_machine=tic55x-unknown os=-coff ;; tic6x | c6x*) basic_machine=tic6x-unknown os=-coff ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -kaos*) os=-kaos ;; -zvmoe) os=-zvmoe ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: gmysqlcc-0.3.0/configure0000755000175000017500000063071210757562670012214 00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.61. # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006 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=: # Zsh 3.x and 4.x performs 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 # PATH needs CR # 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 # 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 # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false 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.) as_nl=' ' 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 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. 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 # Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # CDPATH. $as_unset CDPATH if test "x$CONFIG_SHELL" = x; then if (eval ":") 2>/dev/null; then as_have_required=yes else as_have_required=no fi if test $as_have_required = yes && (eval ": (as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=\$LINENO as_lineno_2=\$LINENO test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } ") 2> /dev/null; then : else as_candidate_shells= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. case $as_dir in /*) for as_base in sh bash ksh sh5; do as_candidate_shells="$as_candidate_shells $as_dir/$as_base" done;; esac done IFS=$as_save_IFS for as_shell in $as_candidate_shells $SHELL; do # Try only shells that exist, to save several forks. if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { ("$as_shell") 2> /dev/null <<\_ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs 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 : _ASEOF }; then CONFIG_SHELL=$as_shell as_have_required=yes if { "$as_shell" 2> /dev/null <<\_ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs 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_func_return () { (exit $1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = "$1" ); then : else exitcode=1 echo positional parameters were not saved. fi test $exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } _ASEOF }; then break fi fi done if test "x$CONFIG_SHELL" != x; then for as_var in BASH_ENV ENV do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done export CONFIG_SHELL exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi if test $as_have_required = no; then echo This script requires a shell more modern than all the echo shells that I found on your system. Please install a echo modern shell, or manually run the script under such a echo shell if you do have one. { (exit 1); exit 1; } fi fi fi (eval "as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0") || { echo No shell found that supports shell functions. echo Please tell autoconf@gnu.org about your system, echo including any error possibly output before this echo message } as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, and appends # trailing '-' during substitution so that $LINENO is not a special # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # scripts with optimization help from Paolo Bonzini. 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" || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); 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 } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi 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 fi echo >conf$$.file 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 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=: 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 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, 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= SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME= PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= ac_unique_file="configure.in" # 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='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir localstatedir includedir oldincludedir docdir infodir htmldir dvidir pdfdir psdir libdir localedir mandir DEFS ECHO_C ECHO_N ECHO_T LIBS build_alias host_alias target_alias INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA am__isrc CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar CFLAGS CC LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP GREP EGREP PKG_CONFIG GTK_CFLAGS GTK_LIBS MYSQLCFG MySQLc_CFLAGS MySQLc_LIBS GTKSourceView_CFLAGS GTKSourceView_LIBS GETTEXT_PACKAGE build build_cpu build_vendor build_os host host_cpu host_vendor host_os USE_NLS MSGFMT MSGFMT_OPTS GMSGFMT XGETTEXT CATALOGS CATOBJEXT DATADIRNAME GMOFILES INSTOBJEXT INTLLIBS PO_IN_DATADIR_TRUE PO_IN_DATADIR_FALSE POFILES POSUB MKINSTALLDIRS LIBOBJS LTLIBOBJS' ac_subst_files='' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP PKG_CONFIG GTK_CFLAGS GTK_LIBS GTKSourceView_CFLAGS GTKSourceView_LIBS' # Initialize some variables set by options. ac_init_help= ac_init_version=false # 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}' 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=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_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` eval enable_$ac_feature=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_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` eval enable_$ac_feature=\$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_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/[-.]/_/g'` eval with_$ac_package=\$ac_optarg ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/[-.]/_/g'` eval with_$ac_package=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 ;; -*) { echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && 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'` { echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi # Be sure to have absolute directory names. 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 case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; } 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 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 .` || { echo "$as_me: error: Working directory cannot be determined" >&2 { (exit 1); exit 1; }; } test "X$ac_ls_di" = "X$ac_pwd_ls_di" || { echo "$as_me: error: pwd does not report name of working directory" >&2 { (exit 1); exit 1; }; } # 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 -- "$0" || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X"$0" | 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 .." { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 { (exit 1); exit 1; }; } 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 this package 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/PACKAGE] --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 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 cat <<\_ACEOF Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --disable-debug Remove debug infos in application Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-gtksourceview Activate Gtk+ Source View 2.0 editor Some influential environment variables: CC C compiler command CFLAGS 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 C/C++/Objective C preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor PKG_CONFIG path to pkg-config utility GTK_CFLAGS C compiler flags for GTK, overriding pkg-config GTK_LIBS linker flags for GTK, overriding pkg-config GTKSourceView_CFLAGS C compiler flags for GTKSourceView, overriding pkg-config GTKSourceView_LIBS linker flags for GTKSourceView, 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. _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" || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`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 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 configure generated by GNU Autoconf 2.61 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 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 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 $as_me, which was generated by GNU Autoconf 2.61. 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=. 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=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) ac_configure_args1="$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 ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac done done $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export 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 cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX 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_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( *) $as_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 cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------------- ## ## File substitutions. ## ## ------------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo cat confdefs.h echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" 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'; { (exit 1); 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 # 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 # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. if test -n "$CONFIG_SITE"; then set x "$CONFIG_SITE" elif test "x$prefix" != xNONE; then set x "$prefix/share/config.site" "$prefix/etc/config.site" else set x "$ac_default_prefix/share/config.site" \ "$ac_default_prefix/etc/config.site" fi shift for ac_site_file do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" 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. if test -f "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { echo "$as_me:$LINENO: creating cache $cache_file" >&5 echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # 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,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 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 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} ac_cache_corrupted=: fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`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. *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } 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 am__api_version='1.10' 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 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} { (exit 1); exit 1; }; } 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. { echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac done IFS=$as_save_IFS 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 { echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$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' { echo "$as_me:$LINENO: checking whether build environment is sane" >&5 echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; } # Just in case sleep 1 echo timestamp > conftest.file # 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". { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&5 echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&2;} { (exit 1); exit 1; }; } fi test "$2" = conftest.file ) then # Ok. : else { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! Check your system clock" >&5 echo "$as_me: error: newly created file is older than distributed files! Check your system clock" >&2;} { (exit 1); exit 1; }; } fi { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}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 $. echo might interpret backslashes. # By default was `s,x,x', remove it if useless. cat <<\_ACEOF >conftest.sed s/[\\$]/&&/g;s/;s,x,x,$// _ACEOF program_transform_name=`echo $program_transform_name | sed -f conftest.sed` rm -f conftest.sed # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi { echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; } if test -z "$MKDIR_P"; then if test "${ac_cv_path_mkdir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 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. test -d ./--version && rmdir ./--version MKDIR_P="$ac_install_sh -d" fi fi { echo "$as_me:$LINENO: result: $MKDIR_P" >&5 echo "${ECHO_T}$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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_AWK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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" echo "$as_me:$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 { echo "$as_me:$LINENO: result: $AWK" >&5 echo "${ECHO_T}$AWK" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$AWK" && break done { echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; } set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&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 { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } SET_MAKE= else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}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 { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} { (exit 1); exit 1; }; } 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=gmysqlcc VERSION=0.3.0 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"} install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} # 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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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" echo "$as_me:$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 { echo "$as_me:$LINENO: result: $STRIP" >&5 echo "${ECHO_T}$STRIP" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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" echo "$as_me:$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 { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 echo "${ECHO_T}$ac_ct_STRIP" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&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" # 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" CFLAGS="" 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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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" echo "$as_me:$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 { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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" echo "$as_me:$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 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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" echo "$as_me:$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 { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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" echo "$as_me:$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 { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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" echo "$as_me:$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 { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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" echo "$as_me:$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 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}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:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. echo "$as_me:$LINENO: checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out 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. { echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # # List of possible output files, starting from the most likely. # The algorithm is not robust to junk in `.', hence go to wildcards (a.*) # only as a last resort. b.out is created by i960 compilers. ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' # # The IRIX 6 linker writes into existing files which may not be # executable, retaining their permissions. Remove them first so a # subsequent execution test works. ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link_default") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; 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 | *.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 { echo "$as_me:$LINENO: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6; } if test -z "$ac_file"; then echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: C compiler cannot create executables See \`config.log' for more details." >&5 echo "$as_me: error: C compiler cannot create executables See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { echo "$as_me:$LINENO: checking whether the C compiler works" >&5 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { echo "$as_me:$LINENO: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi fi fi { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } { echo "$as_me:$LINENO: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6; } { echo "$as_me:$LINENO: checking for suffix of executables" >&5 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; 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 | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest$ac_cv_exeext { echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 echo "${ECHO_T}$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT { echo "$as_me:$LINENO: checking for suffix of object files" >&5 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; 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 ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 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 { echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CFLAGS="" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 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 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$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 { echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* 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" 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_c89=$ac_arg else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 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) { echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6; } ;; xno) { echo "$as_me:$LINENO: result: unsupported" >&5 echo "${ECHO_T}unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; esac 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 done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi { echo "$as_me:$LINENO: result: $_am_result" >&5 echo "${ECHO_T}$_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="$CC" am_compiler_list= { echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 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 case $depmode in 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 ;; none) break ;; esac # 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. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} 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 sub/conftest.${OBJEXT-o} 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 { echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 echo "${ECHO_T}$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 { echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&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 echo $ECHO_N "(cached) $ECHO_C" >&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 >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f 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 { echo "$as_me:$LINENO: result: $CPP" >&5 echo "${ECHO_T}$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 >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } 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 { echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } if test "${ac_cv_path_GREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Extract the first word of "grep ggrep" to use in msg output if test -z "$GREP"; then set dummy grep ggrep; ac_prog_name=$2 if test "${ac_cv_path_GREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else 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 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" 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 ac_count=`expr $ac_count + 1` 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 fi GREP="$ac_cv_path_GREP" if test -z "$GREP"; then { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_GREP=$GREP fi fi { echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 echo "${ECHO_T}$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { echo "$as_me:$LINENO: checking for egrep" >&5 echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } if test "${ac_cv_path_EGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else # Extract the first word of "egrep" to use in msg output if test -z "$EGREP"; then set dummy egrep; ac_prog_name=$2 if test "${ac_cv_path_EGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else 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 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" 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 ac_count=`expr $ac_count + 1` 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 fi EGREP="$ac_cv_path_EGREP" if test -z "$EGREP"; then { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_EGREP=$EGREP fi fi fi { echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 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 >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* 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 >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* 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 >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* 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 rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi { echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi CFLAGS="-ggdb" # Check whether --enable-debug was given. if test "${enable_debug+set}" = set; then enableval=$enable_debug; CFLAGS="" fi 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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_PKG_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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" echo "$as_me:$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 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 echo "${ECHO_T}$PKG_CONFIG" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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" echo "$as_me:$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 { echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&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 { echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5 echo $ECHO_N "checking pkg-config is at least version $_pkg_min_version... $ECHO_C" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } PKG_CONFIG="" fi fi pkg_failed=no { echo "$as_me:$LINENO: checking for GTK" >&5 echo $ECHO_N "checking for GTK... $ECHO_C" >&6; } if test -n "$PKG_CONFIG"; then if test -n "$GTK_CFLAGS"; then pkg_cv_GTK_CFLAGS="$GTK_CFLAGS" else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0 >= 2.8.0\"") >&5 ($PKG_CONFIG --exists --print-errors "gtk+-2.0 >= 2.8.0") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_GTK_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0 >= 2.8.0" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$GTK_LIBS"; then pkg_cv_GTK_LIBS="$GTK_LIBS" else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0 >= 2.8.0\"") >&5 ($PKG_CONFIG --exists --print-errors "gtk+-2.0 >= 2.8.0") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_GTK_LIBS=`$PKG_CONFIG --libs "gtk+-2.0 >= 2.8.0" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test $pkg_failed = yes; then 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 GTK_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gtk+-2.0 >= 2.8.0"` else GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gtk+-2.0 >= 2.8.0"` fi # Put the nasty error message in config.log where it belongs echo "$GTK_PKG_ERRORS" >&5 { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } exit elif test $pkg_failed = untried; then exit else GTK_CFLAGS=$pkg_cv_GTK_CFLAGS GTK_LIBS=$pkg_cv_GTK_LIBS { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } : fi # Extract the first word of "mysql_config", so it can be a program name with args. set dummy mysql_config; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_MYSQLCFG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $MYSQLCFG in [\\/]* | ?:[\\/]*) ac_cv_path_MYSQLCFG="$MYSQLCFG" # 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_MYSQLCFG="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_MYSQLCFG" && ac_cv_path_MYSQLCFG="no" ;; esac fi MYSQLCFG=$ac_cv_path_MYSQLCFG if test -n "$MYSQLCFG"; then { echo "$as_me:$LINENO: result: $MYSQLCFG" >&5 echo "${ECHO_T}$MYSQLCFG" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "$MYSQLCFG" = "no"; then { { echo "$as_me:$LINENO: error: Sorry, can't found MySQL client library" >&5 echo "$as_me: error: Sorry, can't found MySQL client library" >&2;} { (exit 1); exit 1; }; } fi MySQLc_CFLAGS=`$MYSQLCFG --cflags` MySQLc_LIBS=`$MYSQLCFG --libs` # Check whether --with-gtksourceview was given. if test "${with_gtksourceview+set}" = set; then withval=$with_gtksourceview; USE_GTKSOURCEVIEW="1" fi if test "x${USE_GTKSOURCEVIEW}" = "x1"; then pkg_failed=no { echo "$as_me:$LINENO: checking for GTKSourceView" >&5 echo $ECHO_N "checking for GTKSourceView... $ECHO_C" >&6; } if test -n "$PKG_CONFIG"; then if test -n "$GTKSourceView_CFLAGS"; then pkg_cv_GTKSourceView_CFLAGS="$GTKSourceView_CFLAGS" else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gtksourceview-2.0\"") >&5 ($PKG_CONFIG --exists --print-errors "gtksourceview-2.0") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_GTKSourceView_CFLAGS=`$PKG_CONFIG --cflags "gtksourceview-2.0" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$GTKSourceView_LIBS"; then pkg_cv_GTKSourceView_LIBS="$GTKSourceView_LIBS" else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gtksourceview-2.0\"") >&5 ($PKG_CONFIG --exists --print-errors "gtksourceview-2.0") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_GTKSourceView_LIBS=`$PKG_CONFIG --libs "gtksourceview-2.0" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test $pkg_failed = yes; then 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 GTKSourceView_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gtksourceview-2.0"` else GTKSourceView_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gtksourceview-2.0"` fi # Put the nasty error message in config.log where it belongs echo "$GTKSourceView_PKG_ERRORS" >&5 { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } exit elif test $pkg_failed = untried; then exit else GTKSourceView_CFLAGS=$pkg_cv_GTKSourceView_CFLAGS GTKSourceView_LIBS=$pkg_cv_GTKSourceView_LIBS { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } : fi cat >>confdefs.h <<\_ACEOF #define USE_GTKSOURCEVIEW "1" _ACEOF fi GETTEXT_PACKAGE=gmysqlcc cat >>confdefs.h <<_ACEOF #define GETTEXT_PACKAGE "$GETTEXT_PACKAGE" _ACEOF ALL_LINGUAS="uk fr es" # 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=`echo "ac_cv_header_$ac_header" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} { (exit 1); exit 1; }; } { echo "$as_me:$LINENO: checking build system type" >&5 echo $ECHO_N "checking build system type... $ECHO_C" >&6; } if test "${ac_cv_build+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 && { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 echo "$as_me: error: cannot guess build type; you must specify one" >&2;} { (exit 1); exit 1; }; } ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} { (exit 1); exit 1; }; } fi { echo "$as_me:$LINENO: result: $ac_cv_build" >&5 echo "${ECHO_T}$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 echo "$as_me: error: invalid value of canonical build" >&2;} { (exit 1); exit 1; }; };; 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 { echo "$as_me:$LINENO: checking host system type" >&5 echo $ECHO_N "checking host system type... $ECHO_C" >&6; } if test "${ac_cv_host+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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` || { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} { (exit 1); exit 1; }; } fi fi { echo "$as_me:$LINENO: result: $ac_cv_host" >&5 echo "${ECHO_T}$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 echo "$as_me: error: invalid value of canonical host" >&2;} { (exit 1); exit 1; }; };; 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 for ac_header in locale.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done if test $ac_cv_header_locale_h = yes; then { echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5 echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6; } if test "${am_cv_val_LC_MESSAGES+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { return LC_MESSAGES ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then am_cv_val_LC_MESSAGES=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 am_cv_val_LC_MESSAGES=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5 echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6; } if test $am_cv_val_LC_MESSAGES = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_LC_MESSAGES 1 _ACEOF fi fi USE_NLS=yes gt_cv_have_gettext=no CATOBJEXT=NONE XGETTEXT=: INTLLIBS= if test "${ac_cv_header_libintl_h+set}" = set; then { echo "$as_me:$LINENO: checking for libintl.h" >&5 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6; } if test "${ac_cv_header_libintl_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi { echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking libintl.h usability" >&5 echo $ECHO_N "checking libintl.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking libintl.h presence" >&5 echo $ECHO_N "checking libintl.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: libintl.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5 echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: libintl.h: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: libintl.h: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: libintl.h: see the Autoconf documentation" >&5 echo "$as_me: WARNING: libintl.h: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: libintl.h: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: libintl.h: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: libintl.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: libintl.h: in the future, the compiler will take precedence" >&2;} ;; esac { echo "$as_me:$LINENO: checking for libintl.h" >&5 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6; } if test "${ac_cv_header_libintl_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_libintl_h=$ac_header_preproc fi { echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6; } fi if test $ac_cv_header_libintl_h = yes; then gt_cv_func_dgettext_libintl="no" libintl_extra_libs="" # # First check in libc # { echo "$as_me:$LINENO: checking for ngettext in libc" >&5 echo $ECHO_N "checking for ngettext in libc... $ECHO_C" >&6; } if test "${gt_cv_func_ngettext_libc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { return !ngettext ("","", 1) ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then gt_cv_func_ngettext_libc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gt_cv_func_ngettext_libc=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $gt_cv_func_ngettext_libc" >&5 echo "${ECHO_T}$gt_cv_func_ngettext_libc" >&6; } if test "$gt_cv_func_ngettext_libc" = "yes" ; then { echo "$as_me:$LINENO: checking for dgettext in libc" >&5 echo $ECHO_N "checking for dgettext in libc... $ECHO_C" >&6; } if test "${gt_cv_func_dgettext_libc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { return !dgettext ("","") ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then gt_cv_func_dgettext_libc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gt_cv_func_dgettext_libc=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $gt_cv_func_dgettext_libc" >&5 echo "${ECHO_T}$gt_cv_func_dgettext_libc" >&6; } fi if test "$gt_cv_func_ngettext_libc" = "yes" ; then for ac_func in bind_textdomain_codeset do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* 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 $ac_func (); /* 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_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done fi # # If we don't have everything we want, check in libintl # if test "$gt_cv_func_dgettext_libc" != "yes" \ || test "$gt_cv_func_ngettext_libc" != "yes" \ || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then { echo "$as_me:$LINENO: checking for bindtextdomain in -lintl" >&5 echo $ECHO_N "checking for bindtextdomain in -lintl... $ECHO_C" >&6; } if test "${ac_cv_lib_intl_bindtextdomain+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* 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 bindtextdomain (); int main () { return bindtextdomain (); ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_intl_bindtextdomain=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_intl_bindtextdomain=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_intl_bindtextdomain" >&5 echo "${ECHO_T}$ac_cv_lib_intl_bindtextdomain" >&6; } if test $ac_cv_lib_intl_bindtextdomain = yes; then { echo "$as_me:$LINENO: checking for ngettext in -lintl" >&5 echo $ECHO_N "checking for ngettext in -lintl... $ECHO_C" >&6; } if test "${ac_cv_lib_intl_ngettext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* 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 ngettext (); int main () { return ngettext (); ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_intl_ngettext=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_intl_ngettext=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_intl_ngettext" >&5 echo "${ECHO_T}$ac_cv_lib_intl_ngettext" >&6; } if test $ac_cv_lib_intl_ngettext = yes; then { echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5 echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6; } if test "${ac_cv_lib_intl_dgettext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* 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 dgettext (); int main () { return dgettext (); ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_intl_dgettext=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_intl_dgettext=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5 echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6; } if test $ac_cv_lib_intl_dgettext = yes; then gt_cv_func_dgettext_libintl=yes fi fi fi if test "$gt_cv_func_dgettext_libintl" != "yes" ; then { echo "$as_me:$LINENO: checking if -liconv is needed to use gettext" >&5 echo $ECHO_N "checking if -liconv is needed to use gettext... $ECHO_C" >&6; } { echo "$as_me:$LINENO: result: " >&5 echo "${ECHO_T}" >&6; } { echo "$as_me:$LINENO: checking for ngettext in -lintl" >&5 echo $ECHO_N "checking for ngettext in -lintl... $ECHO_C" >&6; } if test "${ac_cv_lib_intl_ngettext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl -liconv $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* 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 ngettext (); int main () { return ngettext (); ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_intl_ngettext=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_intl_ngettext=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_intl_ngettext" >&5 echo "${ECHO_T}$ac_cv_lib_intl_ngettext" >&6; } if test $ac_cv_lib_intl_ngettext = yes; then { echo "$as_me:$LINENO: checking for dcgettext in -lintl" >&5 echo $ECHO_N "checking for dcgettext in -lintl... $ECHO_C" >&6; } if test "${ac_cv_lib_intl_dcgettext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl -liconv $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* 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 dcgettext (); int main () { return dcgettext (); ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_intl_dcgettext=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_intl_dcgettext=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dcgettext" >&5 echo "${ECHO_T}$ac_cv_lib_intl_dcgettext" >&6; } if test $ac_cv_lib_intl_dcgettext = yes; then gt_cv_func_dgettext_libintl=yes libintl_extra_libs=-liconv else : fi else : fi fi # # If we found libintl, then check in it for bind_textdomain_codeset(); # we'll prefer libc if neither have bind_textdomain_codeset(), # and both have dgettext and ngettext # if test "$gt_cv_func_dgettext_libintl" = "yes" ; then glib_save_LIBS="$LIBS" LIBS="$LIBS -lintl $libintl_extra_libs" unset ac_cv_func_bind_textdomain_codeset for ac_func in bind_textdomain_codeset do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* 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 $ac_func (); /* 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_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done LIBS="$glib_save_LIBS" if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then gt_cv_func_dgettext_libc=no else if test "$gt_cv_func_dgettext_libc" = "yes" \ && test "$gt_cv_func_ngettext_libc" = "yes"; then gt_cv_func_dgettext_libintl=no fi fi fi fi if test "$gt_cv_func_dgettext_libc" = "yes" \ || test "$gt_cv_func_dgettext_libintl" = "yes"; then gt_cv_have_gettext=yes fi if test "$gt_cv_func_dgettext_libintl" = "yes"; then INTLLIBS="-lintl $libintl_extra_libs" fi if test "$gt_cv_have_gettext" = "yes"; then cat >>confdefs.h <<\_ACEOF #define HAVE_GETTEXT 1 _ACEOF # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_MSGFMT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case "$MSGFMT" in /*) ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then ac_cv_path_MSGFMT="$ac_dir/$ac_word" break fi fi done IFS="$ac_save_ifs" test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no" ;; esac fi MSGFMT="$ac_cv_path_MSGFMT" if test "$MSGFMT" != "no"; then { echo "$as_me:$LINENO: result: $MSGFMT" >&5 echo "${ECHO_T}$MSGFMT" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "$MSGFMT" != "no"; then glib_save_LIBS="$LIBS" LIBS="$LIBS $INTLLIBS" for ac_func in dcgettext do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* 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 $ac_func (); /* 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_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done MSGFMT_OPTS= { echo "$as_me:$LINENO: checking if msgfmt accepts -c" >&5 echo $ECHO_N "checking if msgfmt accepts -c... $ECHO_C" >&6; } cat >conftest.foo <<_ACEOF msgid "" msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Project-Id-Version: test 1.0\n" "PO-Revision-Date: 2007-02-15 12:01+0100\n" "Last-Translator: test \n" "Language-Team: C \n" "MIME-Version: 1.0\n" "Content-Transfer-Encoding: 8bit\n" _ACEOF if { (echo "$as_me:$LINENO: \$MSGFMT -c -o /dev/null conftest.foo") >&5 ($MSGFMT -c -o /dev/null conftest.foo) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then MSGFMT_OPTS=-c; { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } echo "$as_me: failed input was:" >&5 sed 's/^/| /' conftest.foo >&5 fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_GMSGFMT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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" echo "$as_me:$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 { echo "$as_me:$LINENO: result: $GMSGFMT" >&5 echo "${ECHO_T}$GMSGFMT" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_XGETTEXT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case "$XGETTEXT" in /*) ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then ac_cv_path_XGETTEXT="$ac_dir/$ac_word" break fi fi 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 { echo "$as_me:$LINENO: result: $XGETTEXT" >&5 echo "${ECHO_T}$XGETTEXT" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { extern int _nl_msg_cat_cntr; return _nl_msg_cat_cntr ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then CATOBJEXT=.gmo DATADIRNAME=share else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 case $host in *-*-solaris*) { echo "$as_me:$LINENO: checking for bind_textdomain_codeset" >&5 echo $ECHO_N "checking for bind_textdomain_codeset... $ECHO_C" >&6; } if test "${ac_cv_func_bind_textdomain_codeset+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define bind_textdomain_codeset to an innocuous variant, in case declares bind_textdomain_codeset. For example, HP-UX 11i declares gettimeofday. */ #define bind_textdomain_codeset innocuous_bind_textdomain_codeset /* System header to define __stub macros and hopefully few prototypes, which can conflict with char bind_textdomain_codeset (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef bind_textdomain_codeset /* 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 bind_textdomain_codeset (); /* 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_bind_textdomain_codeset || defined __stub___bind_textdomain_codeset choke me #endif int main () { return bind_textdomain_codeset (); ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_func_bind_textdomain_codeset=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_bind_textdomain_codeset=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_bind_textdomain_codeset" >&5 echo "${ECHO_T}$ac_cv_func_bind_textdomain_codeset" >&6; } if test $ac_cv_func_bind_textdomain_codeset = yes; then CATOBJEXT=.gmo DATADIRNAME=share else CATOBJEXT=.mo DATADIRNAME=lib fi ;; *) CATOBJEXT=.mo DATADIRNAME=lib ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS="$glib_save_LIBS" INSTOBJEXT=.mo else gt_cv_have_gettext=no fi fi fi if test "$gt_cv_have_gettext" = "yes" ; then cat >>confdefs.h <<\_ACEOF #define ENABLE_NLS 1 _ACEOF fi if test "$XGETTEXT" != ":"; then if $XGETTEXT --omit-header /dev/null 2> /dev/null; then : ; else { echo "$as_me:$LINENO: result: found xgettext program is not GNU xgettext; ignore it" >&5 echo "${ECHO_T}found xgettext program is not GNU xgettext; ignore it" >&6; } XGETTEXT=":" fi fi # We need to process the po/ directory. POSUB=po ac_config_commands="$ac_config_commands default-1" for lang in $ALL_LINGUAS; do GMOFILES="$GMOFILES $lang.gmo" POFILES="$POFILES $lang.po" done if test "$gt_cv_have_gettext" = "yes"; then if test "x$ALL_LINGUAS" = "x"; then LINGUAS= else { echo "$as_me:$LINENO: checking for catalogs to be installed" >&5 echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6; } NEW_LINGUAS= for presentlang in $ALL_LINGUAS; do useit=no if test "%UNSET%" != "${LINGUAS-%UNSET%}"; 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 NEW_LINGUAS="$NEW_LINGUAS $presentlang" fi done LINGUAS=$NEW_LINGUAS { echo "$as_me:$LINENO: result: $LINGUAS" >&5 echo "${ECHO_T}$LINGUAS" >&6; } fi if test -n "$LINGUAS"; then for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done fi fi MKINSTALLDIRS= if test -n "$ac_aux_dir"; then MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" fi if test -z "$MKINSTALLDIRS"; then MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" fi test -d po || mkdir po if test "x$srcdir" != "x."; then if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then posrcprefix="$srcdir/" else posrcprefix="../$srcdir/" fi else posrcprefix="../" fi rm -f po/POTFILES sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ < $srcdir/po/POTFILES.in > po/POTFILES if test "x${prefix}" = "xNONE"; then cat >>confdefs.h <<_ACEOF #define PACKAGE_LOCALE_DIR "${ac_default_prefix}/${DATADIRNAME}/locale" _ACEOF else cat >>confdefs.h <<_ACEOF #define PACKAGE_LOCALE_DIR "${prefix}/${DATADIRNAME}/locale" _ACEOF fi packagesrcdir=`cd $srcdir && pwd` cat >>confdefs.h <<_ACEOF #define PACKAGE_SOURCE_DIR "${packagesrcdir}" _ACEOF ac_config_files="$ac_config_files Makefile data/Makefile po/Makefile.in src/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_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( *) $as_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" && { echo "$as_me:$LINENO: updating cache $cache_file" >&5 echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 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= 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=`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. ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $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} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ## --------------------- ## ## 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=: # Zsh 3.x and 4.x performs 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 # PATH needs CR # 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 # 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 # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false 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.) as_nl=' ' 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 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. 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 # Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # CDPATH. $as_unset CDPATH as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, and appends # trailing '-' during substitution so that $LINENO is not a special # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # scripts with optimization help from Paolo Bonzini. 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" || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); 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 } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi 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 fi echo >conf$$.file 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 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=: 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 # 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 $as_me, which was generated by GNU Autoconf 2.61. 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 cat >>$CONFIG_STATUS <<_ACEOF # 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_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --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 ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ config.status configured by $0, generated by GNU Autoconf 2.61, with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2006 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' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If no file are specified by the user, then we need to provide default # value. By we need to know if files were specified by the user. 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=$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 ) echo "$ac_cs_version"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header { echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; };; --help | --hel | -h ) 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. -*) { echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *) ac_config_targets="$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 if \$ac_cs_recheck; then echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 CONFIG_SHELL=$SHELL export CONFIG_SHELL exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # 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" ;; "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "data/Makefile") CONFIG_FILES="$CONFIG_FILES data/Makefile" ;; "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; 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 '{ (exit 1); 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") } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } # # Set up the sed scripts for CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h if test -n "$CONFIG_FILES"; then _ACEOF ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF SHELL!$SHELL$ac_delim PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim PACKAGE_NAME!$PACKAGE_NAME$ac_delim PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim PACKAGE_STRING!$PACKAGE_STRING$ac_delim PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim exec_prefix!$exec_prefix$ac_delim prefix!$prefix$ac_delim program_transform_name!$program_transform_name$ac_delim bindir!$bindir$ac_delim sbindir!$sbindir$ac_delim libexecdir!$libexecdir$ac_delim datarootdir!$datarootdir$ac_delim datadir!$datadir$ac_delim sysconfdir!$sysconfdir$ac_delim sharedstatedir!$sharedstatedir$ac_delim localstatedir!$localstatedir$ac_delim includedir!$includedir$ac_delim oldincludedir!$oldincludedir$ac_delim docdir!$docdir$ac_delim infodir!$infodir$ac_delim htmldir!$htmldir$ac_delim dvidir!$dvidir$ac_delim pdfdir!$pdfdir$ac_delim psdir!$psdir$ac_delim libdir!$libdir$ac_delim localedir!$localedir$ac_delim mandir!$mandir$ac_delim DEFS!$DEFS$ac_delim ECHO_C!$ECHO_C$ac_delim ECHO_N!$ECHO_N$ac_delim ECHO_T!$ECHO_T$ac_delim LIBS!$LIBS$ac_delim build_alias!$build_alias$ac_delim host_alias!$host_alias$ac_delim target_alias!$target_alias$ac_delim INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim INSTALL_DATA!$INSTALL_DATA$ac_delim am__isrc!$am__isrc$ac_delim CYGPATH_W!$CYGPATH_W$ac_delim PACKAGE!$PACKAGE$ac_delim VERSION!$VERSION$ac_delim ACLOCAL!$ACLOCAL$ac_delim AUTOCONF!$AUTOCONF$ac_delim AUTOMAKE!$AUTOMAKE$ac_delim AUTOHEADER!$AUTOHEADER$ac_delim MAKEINFO!$MAKEINFO$ac_delim install_sh!$install_sh$ac_delim STRIP!$STRIP$ac_delim INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim mkdir_p!$mkdir_p$ac_delim AWK!$AWK$ac_delim SET_MAKE!$SET_MAKE$ac_delim am__leading_dot!$am__leading_dot$ac_delim AMTAR!$AMTAR$ac_delim am__tar!$am__tar$ac_delim am__untar!$am__untar$ac_delim CFLAGS!$CFLAGS$ac_delim CC!$CC$ac_delim LDFLAGS!$LDFLAGS$ac_delim CPPFLAGS!$CPPFLAGS$ac_delim ac_ct_CC!$ac_ct_CC$ac_delim EXEEXT!$EXEEXT$ac_delim OBJEXT!$OBJEXT$ac_delim DEPDIR!$DEPDIR$ac_delim am__include!$am__include$ac_delim am__quote!$am__quote$ac_delim AMDEP_TRUE!$AMDEP_TRUE$ac_delim AMDEP_FALSE!$AMDEP_FALSE$ac_delim AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim CCDEPMODE!$CCDEPMODE$ac_delim am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim CPP!$CPP$ac_delim GREP!$GREP$ac_delim EGREP!$EGREP$ac_delim PKG_CONFIG!$PKG_CONFIG$ac_delim GTK_CFLAGS!$GTK_CFLAGS$ac_delim GTK_LIBS!$GTK_LIBS$ac_delim MYSQLCFG!$MYSQLCFG$ac_delim MySQLc_CFLAGS!$MySQLc_CFLAGS$ac_delim MySQLc_LIBS!$MySQLc_LIBS$ac_delim GTKSourceView_CFLAGS!$GTKSourceView_CFLAGS$ac_delim GTKSourceView_LIBS!$GTKSourceView_LIBS$ac_delim GETTEXT_PACKAGE!$GETTEXT_PACKAGE$ac_delim build!$build$ac_delim build_cpu!$build_cpu$ac_delim build_vendor!$build_vendor$ac_delim build_os!$build_os$ac_delim host!$host$ac_delim host_cpu!$host_cpu$ac_delim host_vendor!$host_vendor$ac_delim host_os!$host_os$ac_delim USE_NLS!$USE_NLS$ac_delim MSGFMT!$MSGFMT$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` if test -n "$ac_eof"; then ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` ac_eof=`expr $ac_eof + 1` fi cat >>$CONFIG_STATUS <<_ACEOF cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof /@[a-zA-Z_][a-zA-Z_0-9]*@/!b _ACEOF sed ' s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g s/^/s,@/; s/!/@,|#_!!_#|/ :n t n s/'"$ac_delim"'$/,g/; t s/$/\\/; p N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n ' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF CEOF$ac_eof _ACEOF ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF MSGFMT_OPTS!$MSGFMT_OPTS$ac_delim GMSGFMT!$GMSGFMT$ac_delim XGETTEXT!$XGETTEXT$ac_delim CATALOGS!$CATALOGS$ac_delim CATOBJEXT!$CATOBJEXT$ac_delim DATADIRNAME!$DATADIRNAME$ac_delim GMOFILES!$GMOFILES$ac_delim INSTOBJEXT!$INSTOBJEXT$ac_delim INTLLIBS!$INTLLIBS$ac_delim PO_IN_DATADIR_TRUE!$PO_IN_DATADIR_TRUE$ac_delim PO_IN_DATADIR_FALSE!$PO_IN_DATADIR_FALSE$ac_delim POFILES!$POFILES$ac_delim POSUB!$POSUB$ac_delim MKINSTALLDIRS!$MKINSTALLDIRS$ac_delim LIBOBJS!$LIBOBJS$ac_delim LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 16; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` if test -n "$ac_eof"; then ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` ac_eof=`expr $ac_eof + 1` fi cat >>$CONFIG_STATUS <<_ACEOF cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof /@[a-zA-Z_][a-zA-Z_0-9]*@/!b end _ACEOF sed ' s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g s/^/s,@/; s/!/@,|#_!!_#|/ :n t n s/'"$ac_delim"'$/,g/; t s/$/\\/; p N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n ' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF :end s/|#_!!_#|//g CEOF$ac_eof _ACEOF # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ 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[ ]*=/{ s/:*\$(srcdir):*/:/ s/:*\${srcdir}:*/:/ s/:*@srcdir@:*/:/ s/^\([^=]*=[ ]*\):*/\1/ s/:*$// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF fi # test -n "$CONFIG_FILES" for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 echo "$as_me: error: Invalid tag $ac_tag." >&2;} { (exit 1); exit 1; }; };; :[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 || { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 echo "$as_me: error: cannot find input file: $ac_f" >&2;} { (exit 1); exit 1; }; };; esac ac_file_inputs="$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 "`IFS=: echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} fi case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin";; 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 || 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" case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`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 || 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" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`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 # 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= case `sed -n '/datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p ' $ac_file_inputs` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF 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 sed "$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s&@configure_input@&$configure_input&;t t s&@top_builddir@&$ac_top_builddir_sub&;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 " $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out 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"; } && { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&5 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 ;; :H) # # CONFIG_HEADER # _ACEOF # Transform confdefs.h into a sed script `conftest.defines', that # substitutes the proper values into config.h.in to produce config.h. rm -f conftest.defines conftest.tail # First, append a space to every undef/define line, to ease matching. echo 's/$/ /' >conftest.defines # Then, protect against being on the right side of a sed subst, or in # an unquoted here document, in config.status. If some macros were # called several times there might be several #defines for the same # symbol, which is useless. But do not sort them, since the last # AC_DEFINE must be honored. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* # These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where # NAME is the cpp macro being defined, VALUE is the value it is being given. # PARAMS is the parameter list in the macro definition--in most cases, it's # just an empty string. ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*' ac_dB='\\)[ (].*,\\1define\\2' ac_dC=' ' ac_dD=' ,' uniq confdefs.h | sed -n ' t rset :rset s/^[ ]*#[ ]*define[ ][ ]*// t ok d :ok s/[\\&,]/\\&/g s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p ' >>conftest.defines # Remove the space that was appended to ease matching. # Then 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. # (The regexp can be short, since the line contains either #define or #undef.) echo 's/ $// s,^[ #]*u.*,/* & */,' >>conftest.defines # Break up conftest.defines: ac_max_sed_lines=50 # First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1" # Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2" # Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1" # et cetera. ac_in='$ac_file_inputs' ac_out='"$tmp/out1"' ac_nxt='"$tmp/out2"' while : do # Write a here document: cat >>$CONFIG_STATUS <<_ACEOF # First, check the format of the line: cat >"\$tmp/defines.sed" <<\\CEOF /^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def /^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def b :def _ACEOF sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS echo 'CEOF sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail grep . conftest.tail >/dev/null || break rm -f conftest.defines mv conftest.tail conftest.defines done rm -f conftest.defines conftest.tail echo "ac_result=$ac_in" >>$CONFIG_STATUS cat >>$CONFIG_STATUS <<\_ACEOF if test x"$ac_file" != x-; then echo "/* $configure_input */" >"$tmp/config.h" cat "$ac_result" >>"$tmp/config.h" if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else rm -f $ac_file mv "$tmp/config.h" $ac_file fi else echo "/* $configure_input */" cat "$ac_result" fi rm -f "$tmp/out12" # 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 || 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) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; 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 || 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 || 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 case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`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 || 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" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ;; "default-1":C) case "$CONFIG_FILES" in *po/Makefile.in*) sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile esac ;; esac done # for ac_tag { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save # 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 || { (exit 1); exit 1; } fi gmysqlcc-0.3.0/AUTHORS0000644000175000017500000000010610755301562011326 00000000000000Copyright 2003-2007 Didier Prolhac 'Thepozer' gmysqlcc-0.3.0/COPYING0000644000175000017500000004311010755301562011313 00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 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 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, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. gmysqlcc-0.3.0/aclocal.m40000644000175000017500000014461710757562666012156 00000000000000# generated automatically by aclocal 1.10.1 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This file 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. m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(AC_AUTOCONF_VERSION, [2.61],, [m4_warning([this file was generated for autoconf 2.61. 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. To do so, use the procedure documented by the package, typically `autoreconf'.])]) # Copyright (C) 1995-2002 Free Software Foundation, Inc. # Copyright (C) 2001-2003,2004 Red Hat, Inc. # # This file is free software, distributed under the terms of the GNU # General Public License. As a special exception to the GNU General # Public License, this file may be distributed as part of a program # that contains a configuration script generated by Autoconf, under # the same distribution terms as the rest of that program. # # This file can be copied and used freely without restrictions. It can # be used in projects which are not available under the GNU Public License # but which still want to provide support for the GNU gettext functionality. # # Macro to add for using GNU gettext. # Ulrich Drepper , 1995, 1996 # # Modified to never use included libintl. # Owen Taylor , 12/15/1998 # # Major rework to remove unused code # Owen Taylor , 12/11/2002 # # Added better handling of ALL_LINGUAS from GNU gettext version # written by Bruno Haible, Owen Taylor 5/30/3002 # # Modified to require ngettext # Matthias Clasen 08/06/2004 # # We need this here as well, since someone might use autoconf-2.5x # to configure GLib then an older version to configure a package # using AM_GLIB_GNU_GETTEXT AC_PREREQ(2.53) dnl dnl We go to great lengths to make sure that aclocal won't dnl try to pull in the installed version of these macros dnl when running aclocal in the glib directory. dnl m4_copy([AC_DEFUN],[glib_DEFUN]) m4_copy([AC_REQUIRE],[glib_REQUIRE]) dnl dnl At the end, if we're not within glib, we'll define the public dnl definitions in terms of our private definitions. dnl # GLIB_LC_MESSAGES #-------------------- glib_DEFUN([GLIB_LC_MESSAGES], [AC_CHECK_HEADERS([locale.h]) if test $ac_cv_header_locale_h = yes; then AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, [AC_TRY_LINK([#include ], [return LC_MESSAGES], am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) if test $am_cv_val_LC_MESSAGES = yes; then AC_DEFINE(HAVE_LC_MESSAGES, 1, [Define if your file defines LC_MESSAGES.]) fi fi]) # GLIB_PATH_PROG_WITH_TEST #---------------------------- dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) glib_DEFUN([GLIB_PATH_PROG_WITH_TEST], [# Extract the first word of "$2", so it can be a program name with args. set dummy $2; ac_word=[$]2 AC_MSG_CHECKING([for $ac_word]) AC_CACHE_VAL(ac_cv_path_$1, [case "[$]$1" in /*) ac_cv_path_$1="[$]$1" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in ifelse([$5], , $PATH, [$5]); do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if [$3]; then ac_cv_path_$1="$ac_dir/$ac_word" break fi fi done IFS="$ac_save_ifs" dnl If no 4th arg is given, leave the cache variable unset, dnl so AC_PATH_PROGS will keep looking. ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" ])dnl ;; esac])dnl $1="$ac_cv_path_$1" if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then AC_MSG_RESULT([$]$1) else AC_MSG_RESULT(no) fi AC_SUBST($1)dnl ]) # GLIB_WITH_NLS #----------------- glib_DEFUN([GLIB_WITH_NLS], dnl NLS is obligatory [AC_REQUIRE([AC_CANONICAL_HOST])dnl USE_NLS=yes AC_SUBST(USE_NLS) gt_cv_have_gettext=no CATOBJEXT=NONE XGETTEXT=: INTLLIBS= AC_CHECK_HEADER(libintl.h, [gt_cv_func_dgettext_libintl="no" libintl_extra_libs="" # # First check in libc # AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc, [AC_TRY_LINK([ #include ], [return !ngettext ("","", 1)], gt_cv_func_ngettext_libc=yes, gt_cv_func_ngettext_libc=no) ]) if test "$gt_cv_func_ngettext_libc" = "yes" ; then AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc, [AC_TRY_LINK([ #include ], [return !dgettext ("","")], gt_cv_func_dgettext_libc=yes, gt_cv_func_dgettext_libc=no) ]) fi if test "$gt_cv_func_ngettext_libc" = "yes" ; then AC_CHECK_FUNCS(bind_textdomain_codeset) fi # # If we don't have everything we want, check in libintl # if test "$gt_cv_func_dgettext_libc" != "yes" \ || test "$gt_cv_func_ngettext_libc" != "yes" \ || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then AC_CHECK_LIB(intl, bindtextdomain, [AC_CHECK_LIB(intl, ngettext, [AC_CHECK_LIB(intl, dgettext, gt_cv_func_dgettext_libintl=yes)])]) if test "$gt_cv_func_dgettext_libintl" != "yes" ; then AC_MSG_CHECKING([if -liconv is needed to use gettext]) AC_MSG_RESULT([]) AC_CHECK_LIB(intl, ngettext, [AC_CHECK_LIB(intl, dcgettext, [gt_cv_func_dgettext_libintl=yes libintl_extra_libs=-liconv], :,-liconv)], :,-liconv) fi # # If we found libintl, then check in it for bind_textdomain_codeset(); # we'll prefer libc if neither have bind_textdomain_codeset(), # and both have dgettext and ngettext # if test "$gt_cv_func_dgettext_libintl" = "yes" ; then glib_save_LIBS="$LIBS" LIBS="$LIBS -lintl $libintl_extra_libs" unset ac_cv_func_bind_textdomain_codeset AC_CHECK_FUNCS(bind_textdomain_codeset) LIBS="$glib_save_LIBS" if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then gt_cv_func_dgettext_libc=no else if test "$gt_cv_func_dgettext_libc" = "yes" \ && test "$gt_cv_func_ngettext_libc" = "yes"; then gt_cv_func_dgettext_libintl=no fi fi fi fi if test "$gt_cv_func_dgettext_libc" = "yes" \ || test "$gt_cv_func_dgettext_libintl" = "yes"; then gt_cv_have_gettext=yes fi if test "$gt_cv_func_dgettext_libintl" = "yes"; then INTLLIBS="-lintl $libintl_extra_libs" fi if test "$gt_cv_have_gettext" = "yes"; then AC_DEFINE(HAVE_GETTEXT,1, [Define if the GNU gettext() function is already present or preinstalled.]) GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl if test "$MSGFMT" != "no"; then glib_save_LIBS="$LIBS" LIBS="$LIBS $INTLLIBS" AC_CHECK_FUNCS(dcgettext) MSGFMT_OPTS= AC_MSG_CHECKING([if msgfmt accepts -c]) GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[ msgid "" msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Project-Id-Version: test 1.0\n" "PO-Revision-Date: 2007-02-15 12:01+0100\n" "Last-Translator: test \n" "Language-Team: C \n" "MIME-Version: 1.0\n" "Content-Transfer-Encoding: 8bit\n" ], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])]) AC_SUBST(MSGFMT_OPTS) AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) AC_TRY_LINK(, [extern int _nl_msg_cat_cntr; return _nl_msg_cat_cntr], [CATOBJEXT=.gmo DATADIRNAME=share], [case $host in *-*-solaris*) dnl On Solaris, if bind_textdomain_codeset is in libc, dnl GNU format message catalog is always supported, dnl since both are added to the libc all together. dnl Hence, we'd like to go with DATADIRNAME=share and dnl and CATOBJEXT=.gmo in this case. AC_CHECK_FUNC(bind_textdomain_codeset, [CATOBJEXT=.gmo DATADIRNAME=share], [CATOBJEXT=.mo DATADIRNAME=lib]) ;; *) CATOBJEXT=.mo DATADIRNAME=lib ;; esac]) LIBS="$glib_save_LIBS" INSTOBJEXT=.mo else gt_cv_have_gettext=no fi fi ]) if test "$gt_cv_have_gettext" = "yes" ; then AC_DEFINE(ENABLE_NLS, 1, [always defined to indicate that i18n is enabled]) fi dnl Test whether we really found GNU xgettext. if test "$XGETTEXT" != ":"; then dnl If it is not GNU xgettext we define it as : so that the dnl Makefiles still can work. if $XGETTEXT --omit-header /dev/null 2> /dev/null; then : ; else AC_MSG_RESULT( [found xgettext program is not GNU xgettext; ignore it]) XGETTEXT=":" fi fi # We need to process the po/ directory. POSUB=po AC_OUTPUT_COMMANDS( [case "$CONFIG_FILES" in *po/Makefile.in*) sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile esac]) dnl These rules are solely for the distribution goal. While doing this dnl we only have to keep exactly one list of the available catalogs dnl in configure.in. for lang in $ALL_LINGUAS; do GMOFILES="$GMOFILES $lang.gmo" POFILES="$POFILES $lang.po" done dnl Make all variables we use known to autoconf. AC_SUBST(CATALOGS) AC_SUBST(CATOBJEXT) AC_SUBST(DATADIRNAME) AC_SUBST(GMOFILES) AC_SUBST(INSTOBJEXT) AC_SUBST(INTLLIBS) AC_SUBST(PO_IN_DATADIR_TRUE) AC_SUBST(PO_IN_DATADIR_FALSE) AC_SUBST(POFILES) AC_SUBST(POSUB) ]) # AM_GLIB_GNU_GETTEXT # ------------------- # Do checks necessary for use of gettext. If a suitable implementation # of gettext is found in either in libintl or in the C library, # it will set INTLLIBS to the libraries needed for use of gettext # and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable # gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST() # on various variables needed by the Makefile.in.in installed by # glib-gettextize. dnl glib_DEFUN([GLIB_GNU_GETTEXT], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_HEADER_STDC])dnl GLIB_LC_MESSAGES GLIB_WITH_NLS if test "$gt_cv_have_gettext" = "yes"; then if test "x$ALL_LINGUAS" = "x"; then LINGUAS= else AC_MSG_CHECKING(for catalogs to be installed) NEW_LINGUAS= for presentlang in $ALL_LINGUAS; do useit=no if test "%UNSET%" != "${LINGUAS-%UNSET%}"; 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 NEW_LINGUAS="$NEW_LINGUAS $presentlang" fi done LINGUAS=$NEW_LINGUAS AC_MSG_RESULT($LINGUAS) fi dnl Construct list of names of catalog files to be constructed. if test -n "$LINGUAS"; then for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done fi fi dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly dnl find the mkinstalldirs script in another subdir but ($top_srcdir). dnl Try to locate is. MKINSTALLDIRS= if test -n "$ac_aux_dir"; then MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" fi if test -z "$MKINSTALLDIRS"; then MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" fi AC_SUBST(MKINSTALLDIRS) dnl Generate list of files to be processed by xgettext which will dnl be included in po/Makefile. test -d po || mkdir po if test "x$srcdir" != "x."; then if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then posrcprefix="$srcdir/" else posrcprefix="../$srcdir/" fi else posrcprefix="../" fi rm -f po/POTFILES sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ < $srcdir/po/POTFILES.in > po/POTFILES ]) # AM_GLIB_DEFINE_LOCALEDIR(VARIABLE) # ------------------------------- # Define VARIABLE to the location where catalog files will # be installed by po/Makefile. glib_DEFUN([GLIB_DEFINE_LOCALEDIR], [glib_REQUIRE([GLIB_GNU_GETTEXT])dnl glib_save_prefix="$prefix" glib_save_exec_prefix="$exec_prefix" glib_save_datarootdir="$datarootdir" test "x$prefix" = xNONE && prefix=$ac_default_prefix test "x$exec_prefix" = xNONE && exec_prefix=$prefix datarootdir=`eval echo "${datarootdir}"` if test "x$CATOBJEXT" = "x.mo" ; then localedir=`eval echo "${libdir}/locale"` else localedir=`eval echo "${datadir}/locale"` fi prefix="$glib_save_prefix" exec_prefix="$glib_save_exec_prefix" datarootdir="$glib_save_datarootdir" AC_DEFINE_UNQUOTED($1, "$localedir", [Define the location where the catalogs will be installed]) ]) dnl dnl Now the definitions that aclocal will find dnl ifdef(glib_configure_in,[],[ AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)]) AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)]) ])dnl # GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL]) # # Create a temporary file with TEST-FILE as its contents and pass the # file name to PROGRAM. Perform ACTION-IF-PASS if PROGRAM exits with # 0 and perform ACTION-IF-FAIL for any other exit status. AC_DEFUN([GLIB_RUN_PROG], [cat >conftest.foo <<_ACEOF $2 _ACEOF if AC_RUN_LOG([$1 conftest.foo]); then m4_ifval([$3], [$3], [:]) m4_ifvaln([$4], [else $4])dnl echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD fi]) # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # # Copyright © 2004 Scott James Remnant . # # 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 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, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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. # PKG_PROG_PKG_CONFIG([MIN-VERSION]) # ---------------------------------- AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi if test -n "$PKG_CONFIG"; then _pkg_min_version=m4_default([$1], [0.9.0]) AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) PKG_CONFIG="" fi fi[]dnl ])# PKG_PROG_PKG_CONFIG # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # # Check to see whether a particular set of modules exists. Similar # to PKG_CHECK_MODULES(), but does not set variables or print errors. # # # Similar to PKG_CHECK_MODULES, make sure that the first instance of # this or PKG_CHECK_MODULES is called, or make sure to call # PKG_CHECK_EXISTS manually # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then m4_ifval([$2], [$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- m4_define([_PKG_CONFIG], [if test -n "$PKG_CONFIG"; then if test -n "$$1"; then pkg_cv_[]$1="$$1" else PKG_CHECK_EXISTS([$3], [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], [pkg_failed=yes]) fi else pkg_failed=untried fi[]dnl ])# _PKG_CONFIG # _PKG_SHORT_ERRORS_SUPPORTED # ----------------------------- AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi[]dnl ])# _PKG_SHORT_ERRORS_SUPPORTED # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], # [ACTION-IF-NOT-FOUND]) # # # Note that if there is a possibility the first call to # PKG_CHECK_MODULES might not happen, you should be sure to include an # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac # # # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no AC_MSG_CHECKING([for $1]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` else $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD ifelse([$4], , [AC_MSG_ERROR(dnl [Package requirements ($2) were not met: $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. _PKG_TEXT ])], [AC_MSG_RESULT([no]) $4]) elif test $pkg_failed = untried; then ifelse([$4], , [AC_MSG_FAILURE(dnl [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. _PKG_TEXT To get pkg-config, see .])], [$4]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) ifelse([$3], , :, [$3]) fi[]dnl ])# PKG_CHECK_MODULES # Copyright (C) 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc. # # This file 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. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.10' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.10.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.10.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(AC_AUTOCONF_VERSION)]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file 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. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006 # Free Software Foundation, Inc. # # This file 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. # serial 8 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 # Free Software Foundation, Inc. # # This file 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. # serial 9 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], UPC, [depcc="$UPC" am_compiler_list=], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [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_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi 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 case $depmode in 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 ;; none) break ;; esac # 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. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} 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 sub/conftest.${OBJEXT-o} 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_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file 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. #serial 3 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [for mf in $CONFIG_FILES; 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")` 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_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file 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. # serial 8 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2008 Free Software Foundation, Inc. # # This file 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. # serial 13 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.60])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 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 AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AM_PROG_INSTALL_SH AM_PROG_INSTALL_STRIP AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES(OBJC)], [define([AC_PROG_OBJC], defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) ]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _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"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file 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. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. # # This file 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. # serial 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [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 AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. # # This file 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. # serial 3 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file 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. # serial 5 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # # This file 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. # AM_PROG_MKDIR_P # --------------- # Check for `mkdir -p'. AC_DEFUN([AM_PROG_MKDIR_P], [AC_PREREQ([2.60])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, dnl while keeping a definition of mkdir_p for backward compatibility. dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of dnl Makefile.ins that do not define MKDIR_P, so we do our own dnl adjustment using top_builddir (which is defined more often than dnl MKDIR_P). AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl case $mkdir_p in [[\\/$]]* | ?:[[\\/]]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. # # This file 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. # serial 3 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file 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. # serial 4 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # 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". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file 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. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # 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. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006 Free Software Foundation, Inc. # # This file 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. # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005 Free Software Foundation, Inc. # # This file 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. # serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. AM_MISSING_PROG([AMTAR], [tar]) m4_if([$1], [v7], [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([acinclude.m4]) gmysqlcc-0.3.0/Makefile.in0000644000175000017500000005207510757562667012360 00000000000000# Makefile.in generated by automake 1.10.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 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@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@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 = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(top_srcdir)/configure ABOUT-NLS AUTHORS COPYING ChangeLog \ INSTALL NEWS TODO config.guess config.sub depcomp install-sh \ ltmain.sh missing mkinstalldirs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive 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 = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(gmysqlccdocdir)" gmysqlccdocDATA_INSTALL = $(INSTALL_DATA) DATA = $(gmysqlccdoc_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ { test ! -d $(distdir) \ || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -fr $(distdir); }; } DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GTKSourceView_CFLAGS = @GTKSourceView_CFLAGS@ GTKSourceView_LIBS = @GTKSourceView_LIBS@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MYSQLCFG = @MYSQLCFG@ MySQLc_CFLAGS = @MySQLc_CFLAGS@ MySQLc_LIBS = @MySQLc_LIBS@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ 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@ 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_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = data po src gmysqlccdocdir = ${prefix}/doc/gmysqlcc gmysqlccdoc_DATA = \ README\ COPYING\ AUTHORS\ ChangeLog\ INSTALL\ NEWS\ TODO\ ABOUT-NLS EXTRA_DIST = $(gmysqlccdoc_DATA) all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: am--refresh: @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \ cd $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) cd $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) config.h: stamp-h1 @if test ! -f $@; then \ rm -f stamp-h1; \ $(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) cd $(top_srcdir) && $(AUTOHEADER) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 install-gmysqlccdocDATA: $(gmysqlccdoc_DATA) @$(NORMAL_INSTALL) test -z "$(gmysqlccdocdir)" || $(MKDIR_P) "$(DESTDIR)$(gmysqlccdocdir)" @list='$(gmysqlccdoc_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(gmysqlccdocDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(gmysqlccdocdir)/$$f'"; \ $(gmysqlccdocDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(gmysqlccdocdir)/$$f"; \ done uninstall-gmysqlccdocDATA: @$(NORMAL_UNINSTALL) @list='$(gmysqlccdoc_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(gmysqlccdocdir)/$$f'"; \ rm -f "$(DESTDIR)$(gmysqlccdocdir)/$$f"; \ done # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) test -d $(distdir) || mkdir $(distdir) @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 $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ am__remove_distdir=: \ am__skip_length_check=: \ distdir) \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r $(distdir) dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-lzma: distdir tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma $(am__remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && cd $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @cd $(distuninstallcheck_dir) \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile $(DATA) config.h installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(gmysqlccdocdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive 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) 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-recursive clean-am: clean-generic mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-hdr distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-gmysqlccdocDATA install-dvi: install-dvi-recursive install-exec-am: install-html: install-html-recursive install-info: install-info-recursive install-man: install-pdf: install-pdf-recursive install-ps: install-ps-recursive installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-gmysqlccdocDATA .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ install-strip .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am am--refresh check check-am clean clean-generic \ ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \ dist-hook dist-lzma dist-shar dist-tarZ dist-zip distcheck \ distclean distclean-generic distclean-hdr distclean-tags \ distcleancheck distdir distuninstallcheck 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-gmysqlccdocDATA 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 \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \ tags-recursive uninstall uninstall-am \ uninstall-gmysqlccdocDATA # Copy all the spec files. Of cource, only one is actually used. dist-hook: for specfile in *.spec; do \ if test -f $$specfile; then \ cp -p $$specfile $(distdir); \ fi \ done # 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: gmysqlcc-0.3.0/acinclude.m40000644000175000017500000000004710755301563012454 00000000000000AC_DEFUN([AM_GNU_GETTEXT_VERSION], []) gmysqlcc-0.3.0/config.h.in0000644000175000017500000000414710757562674012331 00000000000000/* config.h.in. Generated from configure.in by autoheader. */ /* always defined to indicate that i18n is enabled */ #undef ENABLE_NLS /* Package name for gettext */ #undef GETTEXT_PACKAGE /* Define to 1 if you have the `bind_textdomain_codeset' function. */ #undef HAVE_BIND_TEXTDOMAIN_CODESET /* Define to 1 if you have the `dcgettext' function. */ #undef HAVE_DCGETTEXT /* Define if the GNU gettext() function is already present or preinstalled. */ #undef HAVE_GETTEXT /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define if your file defines LC_MESSAGES. */ #undef HAVE_LC_MESSAGES /* Define to 1 if you have the header file. */ #undef HAVE_LOCALE_H /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Set PACKAGE_LOCALE_DIR in config.h */ #undef PACKAGE_LOCALE_DIR /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Set PACKAGE SOURCE DIR in config.h */ #undef PACKAGE_SOURCE_DIR /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Activate Gtk+ Source View 2.0 editor */ #undef USE_GTKSOURCEVIEW /* Version number of package */ #undef VERSION gmysqlcc-0.3.0/data/0000777000175000017500000000000010760516432011256 500000000000000gmysqlcc-0.3.0/data/Makefile.in0000644000175000017500000002542210757562667013265 00000000000000# Makefile.in generated by automake 1.10.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 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@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@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 = data DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = 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 = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(desktopdir)" "$(DESTDIR)$(icondir)" desktopDATA_INSTALL = $(INSTALL_DATA) iconDATA_INSTALL = $(INSTALL_DATA) DATA = $(desktop_DATA) $(icon_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GTKSourceView_CFLAGS = @GTKSourceView_CFLAGS@ GTKSourceView_LIBS = @GTKSourceView_LIBS@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MYSQLCFG = @MYSQLCFG@ MySQLc_CFLAGS = @MySQLc_CFLAGS@ MySQLc_LIBS = @MySQLc_LIBS@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ 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@ 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_builddir = @top_builddir@ top_srcdir = @top_srcdir@ icondir = $(datadir)/pixmaps icon_DATA = \ gmysqlcc-16.png \ gmysqlcc-32.png \ gmysqlcc-48.png \ gmysqlcc-64.png desktopdir = $(datadir)/applications desktop_DATA = gmysqlcc.desktop EXTRA_DIST = \ $(desktop_DATA) \ $(icon_DATA) 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 \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu data/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu data/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 install-desktopDATA: $(desktop_DATA) @$(NORMAL_INSTALL) test -z "$(desktopdir)" || $(MKDIR_P) "$(DESTDIR)$(desktopdir)" @list='$(desktop_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(desktopDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(desktopdir)/$$f'"; \ $(desktopDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(desktopdir)/$$f"; \ done uninstall-desktopDATA: @$(NORMAL_UNINSTALL) @list='$(desktop_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(desktopdir)/$$f'"; \ rm -f "$(DESTDIR)$(desktopdir)/$$f"; \ done install-iconDATA: $(icon_DATA) @$(NORMAL_INSTALL) test -z "$(icondir)" || $(MKDIR_P) "$(DESTDIR)$(icondir)" @list='$(icon_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(iconDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(icondir)/$$f'"; \ $(iconDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(icondir)/$$f"; \ done uninstall-iconDATA: @$(NORMAL_UNINSTALL) @list='$(icon_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(icondir)/$$f'"; \ rm -f "$(DESTDIR)$(icondir)/$$f"; \ done 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 $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$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)$(desktopdir)" "$(DESTDIR)$(icondir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-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) 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 info: info-am info-am: install-data-am: install-desktopDATA install-iconDATA install-dvi: install-dvi-am install-exec-am: install-html: install-html-am install-info: install-info-am install-man: install-pdf: install-pdf-am install-ps: 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-desktopDATA uninstall-iconDATA .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-desktopDATA install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-iconDATA \ 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-desktopDATA \ uninstall-iconDATA # 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: gmysqlcc-0.3.0/data/Makefile.am0000644000175000017500000000035610755301562013232 00000000000000 icondir = $(datadir)/pixmaps icon_DATA = \ gmysqlcc-16.png \ gmysqlcc-32.png \ gmysqlcc-48.png \ gmysqlcc-64.png desktopdir = $(datadir)/applications desktop_DATA = gmysqlcc.desktop EXTRA_DIST = \ $(desktop_DATA) \ $(icon_DATA) gmysqlcc-0.3.0/data/gmysqlcc.desktop0000644000175000017500000000031210755301562014403 00000000000000[Desktop Entry] Encoding=UTF-8 Name=GMySQLcc Comment=Gtk+ MySQL Control Center Icon=gmysqlcc-32.png Exec=gmysqlcc StartupNotify=false Terminal=false Type=Application Categories=GTK;Development;Database gmysqlcc-0.3.0/data/gmysqlcc-64.png0000644000175000017500000001006210755301562013750 00000000000000PNG  IHDR@@iqbKGD pHYs B4tIME 7o%tEXtCommentCreated with The GIMPd%nIDATx{pTU?t<1dH0K(-)q@c"A2Z("2S bH蛤I۹GwBt:tjpW{N> 3:rg?/0޴e,ZϡhڅC!|>O<&fοwxp~F7Fi'O .ZU%m:F!ZLxa%&=Uj>@| o*3 شg_@xK5]HtwOrm\7AJ*ߠHUeRd^ɯnOr}͊uTBv݉ ~&;{? }{/~2,\Hsv '& 1e| ujIʩkq!$` .k6m٬%N? "DtL@ɚ0e_i^ eFxΦZ2Yjo{eE{]ϑ#@@#"MKz/ɞ ͇q"3iHXcl&d7#RhsÛi[㶙kׇ:vIgܾz5!'[d>Nz0A7>tR!PR 0܄2k1F#Ho?>kXX ߭HUyEc'=e6In$m1>ތN7^9@x8l.GJ95 /{R/$B'4^jd? ,~jtF^|s #!gsɞ_JmU+3Y2\u%k7$!. h>*`~x5HoOO`$ֈsY[A7@." l9}y*@BBV@]\uU]24. ޛ̌+YGܘBIx!yɐjdO]9R3yױf{??u^;삈L۱|uԈapy04W54a_TJB 1Ʀ!P5FNҷ0-$s-5c(_Eat#Bzm~ilFphD|2q;u;H͹B?0W{Scp: TMشwo֩ ƒ}XT\C(?x;DC뷜J!:<( QQɴ8V'a҉YA>Q _j!"6 o0&)Ip؀iEyH3̄fښ8<%@TxliܿS"샚p5E񚰐K@_"D"뫰@ñ]߃H4 % D2խ%5-kd1 &#"+Y5.m7=+5 &K!N00y2WKTdG-}ۆEDlYʈ'q gZqִm85|Ag[P[y#o\hG@#8ˉ?>j?GyݤLXaHΟ>L1ƻ ͒iy 6W`h?= *?L#.xnsGPux Y(yP|G$ RkRHMɠ(z"R9Gwn 0SY2c3/%9FF9/&z\!)} /UWtrz-IdT:.%}մ4.Lqy}r4Rk"&h?B|z|m/ BuDsD4~=w&o>JX&A\w $0?d"T vHKc|đ[@ƒ%lsgp%(gκ_F'sd\=PK˙? 몡;tBD޸xk+fFL@?_$H  ;/Y&VVty &"ކG ")rz5$ڵVRx==Ъ :HHbn7VfPD,ZVQ6&V+V!xt9=+124>ծ"RZ^M-BҼU!% 7z}?~0SD˜c`F*qHɣyVLf7.ڊ] &B&'< e#p V #T:XZnvC=㡫Rgl`4dbšI^}jIZ:#Wj =^/* %S`kA&S_'BBfwޥJȵ%.zq|Hw{PBW$H5džk;. b2b@@Qxo@Yɡ!(#_cǏa8>4DhЪIA{u-tuֻy3"hOŁ@f-ӴZdBH [@C|݅-󍩡-DT,B &w Xf򁀋zڻVD]@B{@E2%Mь1 jC$2^4V# &'D#D/_v$V1v}h@K7muf,!62GjESHܚjObpE)ą"zg[%yF%3 Q9#y _>] w %A\ZhXx $L($I[}h5[c~el|;H`# +hDc}qU]cgjoBLwDJHd{Uu:#s^@9 Zp<$&UJ`1jE_-75:vz](.}GeIM΢&\IENDB`gmysqlcc-0.3.0/data/gmysqlcc-32.png0000644000175000017500000000355210755301562013751 00000000000000PNG  IHDR szzbKGD pHYs B4tIME 3*/JtEXtCommentCreated with The GIMPd%nIDATXý{pT?{sfGyy$8bDjy(ԩZT)!A0hVJb):f""Ph HxQB Aٽ$&șs9&Ƕ}IS2<ƤXoylaqĐ!y"&!WU"gV&;{}oo:jēOz/U>.;Bd3$g#7㣟qWѵd UP)8R ϚJ}>Lj?b?A԰> haIȎ1 ~Y v$Л fWd2B$d*dz:Cl)G-g"*.IƯ$IWR`JdVYM HWU`jVg%1Z.Znb36bU V+02@chӍnM0YQXWHs)N귬ϷcW#[HDta kFfVzy@ X1QiA$I&IVAltWOק%uen=_m@h;$==Y AI>Ʌ^B ]TM&qV5WCsK1Z(^=|'3}oU~8^T$TU=N3Z3v ;.ȪȽ@U p;CYq߽s|ms{_+ZnP)ԉIENDB`gmysqlcc-0.3.0/data/gmysqlcc-16.png0000644000175000017500000000144410755301562013751 00000000000000PNG  IHDRabKGD pHYs B4tIME k\7tEXtCommentCreated with The GIMPd%nIDAT8˕SMLA}M)[U@?AQ8(F@`x1$h$ "Rl+bdޛ7}#W+[;;#o:! ؇ZIh_IچMgw[/4y'Joj]07%iL;U N!H ~|vL>죈Kː*Z={Հ Q%`0*K3֎PV/cNMN:ACrqL9`jT'ZT=! ! cfD~/]*C BP I4NCy;mPaJAY)Yc aQ%()9fH@!P"J){`YUgzuD @o/,/npliߓכ!S@CijM2 4+7g݁ZbyWBRy*M[eHu%""IENDB`gmysqlcc-0.3.0/data/gmysqlcc-48.png0000644000175000017500000000700010755301562013750 00000000000000PNG  IHDR00WbKGD pHYs B4tIME otEXtCommentCreated with The GIMPd%n dIDAThՙytu?mHi4Z-kdYEŽ D^8BOܖ@R8$7־Yp&ߙ{{J| }ά~tF>?[heׯN՟siܲ<.n0ti,{3ݻ}믽`4$0D`դX04;gGk[|KKvv7G:Z o`%WY8o:=Ƕм>.jw=W'O_g@oEI雊'w&$eMGuxduDA>Z 8^Mw]oU_ wo-ݾeͯX28|d| /Xq w=xS.Es{xo]?R/[7W}i^ټ):MOJr;‹NCvlH ,SGH"@ #% _EM:Gs M{BNp*{k)5 T:}}ï~C(j(^Iyh)JBPnUŖ,@J|^h1ڏloy_E!Ky5ldnA^sMoܩԱn:?- i. yR)+eTI$[ p+ŸSO7o=NLR4eȆ 1Єӓ$ɧͭ8FK#{?oo`q?ѮCv4w2;@-Nw#3V@X:vh.z=5NIV6]`v aa$X~?O6Bw!)1nD1c]$;pg,'H8DF6̌z7zH[@ U5>e'aYq?aSu+^TI̫O3Žab(i98SU} {l'^v ,ҐO;!0l~7 U pYl5MtE 8($m:84Pb\%9xghd?vzrxjh}I̘*X![PTFˀ@[;c$;3AxTt'Q::A&:a KQ,$MӘ凳(x0 /b:mN5oB@Wݲ, a&I;aO@SGԜϞrDwd:R}H .lT:azbjf `2ΒF`% Ba^/&Sb`YY= BG6eOphq.TYBC4cۃ/Ѷ=JS`cR:!@)zS=s=1T,> I,c3x %O,&)ϨTLSma5md o!%ȡu ֬'8. N,b5DC(`QH`d"K2†s<@"n ԟ-)Ԉ ѭrdQ@) ,A DO%IټܾQhŬkŤ=H]Dm{e~$&l&`X` $b$6:"R'b$ݗA4fhmY=7" :zZ ϲ=#+0|8% A !S}п-B#}Xi,VdTy=#3zkg k;;im-F"xq*v:llnƎʏ9`AD';y;R***|Ͽ7_CC_tY|g{Gvrr> !`\W}3BLM"=׍i$wo9>YmikOw+Zd5 G7a4;-Umxvh.,؉f2'%E$6+wG:ӟ+$uZcGl"߈ҨHyM7T9kV3>dN'NI QuDzn~+P Y׬Ё'>&2 exit 1;; esac continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -s) stripcmd=$stripprog shift continue;; -t) dstarg=$2 shift shift continue;; -T) no_target_directory=true shift continue;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac done if test $# -ne 0 && test -z "$dir_arg$dstarg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dstarg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dstarg" shift # fnord fi shift # arg dstarg=$arg done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call `install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then trap '(exit $?); exit' 1 2 13 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names starting with `-'. case $src in -*) src=./$src ;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dstarg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dstarg # Protect names starting with `-'. case $dst in -*) dst=./$dst ;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dstarg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writeable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix=/ ;; -*) prefix=./ ;; *) prefix= ;; esac case $posix_glob in '') if (set -f) 2>/dev/null; then posix_glob=true else posix_glob=false fi ;; esac oIFS=$IFS IFS=/ $posix_glob && set -f set fnord $dstdir shift $posix_glob && set +f IFS=$oIFS prefixes= for d do test -z "$d" && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # Now rename the file to the real destination. { $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null \ || { # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { if test -f "$dst"; then $doit $rmcmd -f "$dst" 2>/dev/null \ || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null \ && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }; }\ || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } else : fi } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } } || exit 1 trap '' 0 fi done # 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: gmysqlcc-0.3.0/TODO0000644000175000017500000000121210755301563010746 00000000000000Features Working features * Use gtk+ only (doesn't need Gnome) * Manage a mysql server list (Store in a XML file) * SQL Query window (with query duplication capabilities) * Edit value directly in the result's table * Multi-window system ... not all request in the same window * Dump SQL table|database|serveur|request into SQL, XML and CSV files Planned features * Optimize multiple queries for big SQL file * Delete row directly in the result's table * Edit table structure in a windows * Tools to manage MySQL user * Tools to manage MySQL server vars * Tools to manage MySQL functions (MySQL 5) gmysqlcc-0.3.0/config.guess0000755000175000017500000012703510755301563012612 00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, # Inc. timestamp='2007-03-06' # This file 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 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, 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. # Originally written by Per Bothner . # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # The plan is that this can be called by configure scripts if you # don't specify an explicit build system type. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep __ELF__ >/dev/null then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm:riscos:*:*|arm:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[45]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep __LP64__ >/dev/null then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) case ${UNAME_MACHINE} in pc98) echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:[3456]*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; EM64T | authenticamd) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; arm*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit ;; crisv32:Linux:*:*) echo crisv32-axis-linux-gnu exit ;; frv:Linux:*:*) echo frv-unknown-linux-gnu exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; mips:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips #undef mipsel #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mipsel #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips #else CPU= #endif #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^CPU/{ s: ::g p }'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips64 #undef mips64el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mips64el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips64 #else CPU= #endif #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^CPU/{ s: ::g p }'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) echo or32-unknown-linux-gnu exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit ;; xtensa:Linux:*:*) echo xtensa-unknown-linux-gnu exit ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. # Set LC_ALL=C to ensure ld outputs messages in English. ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g s/.*supported targets: *// s/ .*// p'` case "$ld_supported_targets" in elf32-i386) TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ;; a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" exit ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" exit ;; "") # Either a pre-BFD a.out linker (linux-gnuoldld) or # one that does not give us useful --help. echo "${UNAME_MACHINE}-pc-linux-gnuoldld" exit ;; esac # Determine whether the default compiler is a.out or elf eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include #ifdef __ELF__ # ifdef __GLIBC__ # if __GLIBC__ >= 2 LIBC=gnu # else LIBC=gnulibc1 # endif # else LIBC=gnulibc1 # endif #else #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) LIBC=gnu #else LIBC=gnuaout #endif #endif #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^LIBC/{ s: ::g p }'`" test x"${LIBC}" != x && { echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit } test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i386. echo i386-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; c34*) echo c34-convex-bsd exit ;; c38*) echo c38-convex-bsd exit ;; c4*) echo c4-convex-bsd exit ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp 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` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: gmysqlcc-0.3.0/ABOUT-NLS0000644000175000017500000004464410755301563011525 00000000000000Notes on the Free Translation Project ************************************* Free software is going international! The Free Translation Project is a way to get maintainers of free software, translators, and users all together, so that will gradually become able to speak many languages. A few packages already provide translations for their messages. If you found this `ABOUT-NLS' file inside a distribution, you may assume that the distributed package does use GNU `gettext' internally, itself available at your nearest GNU archive site. But you do _not_ need to install GNU `gettext' prior to configuring, installing or using this package with messages translated. Installers will find here some useful hints. These notes also explain how users should proceed for getting the programs to use the available translations. They tell how people wanting to contribute and work at translations should contact the appropriate team. When reporting bugs in the `intl/' directory or bugs which may be related to internationalization, you should tell about the version of `gettext' which is used. The information can be found in the `intl/VERSION' file, in internationalized packages. Quick configuration advice ========================== If you want to exploit the full power of internationalization, you should configure it using ./configure --with-included-gettext to force usage of internationalizing routines provided within this package, despite the existence of internationalizing capabilities in the operating system where this package is being installed. So far, only the `gettext' implementation in the GNU C library version 2 provides as many features (such as locale alias, message inheritance, automatic charset conversion or plural form handling) as the implementation here. It is also not possible to offer this additional functionality on top of a `catgets' implementation. Future versions of GNU `gettext' will very likely convey even more functionality. So it might be a good idea to change to GNU `gettext' as soon as possible. So you need _not_ provide this option if you are using GNU libc 2 or you have installed a recent copy of the GNU gettext package with the included `libintl'. INSTALL Matters =============== Some packages are "localizable" when properly installed; the programs they contain can be made to speak your own native language. Most such packages use GNU `gettext'. Other packages have their own ways to internationalization, predating GNU `gettext'. By default, this package will be installed to allow translation of messages. It will automatically detect whether the system already provides the GNU `gettext' functions. If not, the GNU `gettext' own library will be used. This library is wholly contained within this package, usually in the `intl/' subdirectory, so prior installation of the GNU `gettext' package is _not_ required. Installers may use special options at configuration time for changing the default behaviour. The commands: ./configure --with-included-gettext ./configure --disable-nls will respectively bypass any pre-existing `gettext' to use the internationalizing routines provided within this package, or else, _totally_ disable translation of messages. When you already have GNU `gettext' installed on your system and run configure without an option for your new package, `configure' will probably detect the previously built and installed `libintl.a' file and will decide to use this. This might be not what is desirable. You should use the more recent version of the GNU `gettext' library. I.e. if the file `intl/VERSION' shows that the library which comes with this package is more recent, you should use ./configure --with-included-gettext to prevent auto-detection. The configuration process will not test for the `catgets' function and therefore it will not be used. The reason is that even an emulation of `gettext' on top of `catgets' could not provide all the extensions of the GNU `gettext' library. Internationalized packages have usually many `po/LL.po' files, where LL gives an ISO 639 two-letter code identifying the language. Unless translations have been forbidden at `configure' time by using the `--disable-nls' switch, all available translations are installed together with the package. However, the environment variable `LINGUAS' may be set, prior to configuration, to limit the installed set. `LINGUAS' should then contain a space separated list of two-letter codes, stating which languages are allowed. Using This Package ================== As a user, if your language has been installed for this package, you only have to set the `LANG' environment variable to the appropriate `LL_CC' combination. Here `LL' is an ISO 639 two-letter language code, and `CC' is an ISO 3166 two-letter country code. For example, let's suppose that you speak German and live in Germany. At the shell prompt, merely execute `setenv LANG de_DE' (in `csh'), `export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash'). This can be done from your `.login' or `.profile' file, once and for all. You might think that the country code specification is redundant. But in fact, some languages have dialects in different countries. For example, `de_AT' is used for Austria, and `pt_BR' for Brazil. The country code serves to distinguish the dialects. Not all programs have translations for all languages. By default, an English message is shown in place of a nonexistent translation. If you understand other languages, you can set up a priority list of languages. This is done through a different environment variable, called `LANGUAGE'. GNU `gettext' gives preference to `LANGUAGE' over `LANG' for the purpose of message handling, but you still need to have `LANG' set to the primary language; this is required by other parts of the system libraries. For example, some Swedish users who would rather read translations in German than English for when Swedish is not available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'. In the `LANGUAGE' environment variable, but not in the `LANG' environment variable, `LL_CC' combinations can be abbreviated as `LL' to denote the language's main dialect. For example, `de' is equivalent to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT' (Portuguese as spoken in Portugal) in this context. Translating Teams ================= For the Free Translation Project to be a success, we need interested people who like their own language and write it well, and who are also able to synergize with other translators speaking the same language. Each translation team has its own mailing list. The up-to-date list of teams can be found at the Free Translation Project's homepage, `http://www.iro.umontreal.ca/contrib/po/HTML/', in the "National teams" area. If you'd like to volunteer to _work_ at translating messages, you should become a member of the translating team for your own language. The subscribing address is _not_ the same as the list itself, it has `-request' appended. For example, speakers of Swedish can send a message to `sv-request@li.org', having this message body: subscribe Keep in mind that team members are expected to participate _actively_ in translations, or at solving translational difficulties, rather than merely lurking around. If your team does not exist yet and you want to start one, or if you are unsure about what to do or how to get started, please write to `translation@iro.umontreal.ca' to reach the coordinator for all translator teams. The English team is special. It works at improving and uniformizing the terminology in use. Proven linguistic skill are praised more than programming skill, here. Available Packages ================== Languages are not equally supported in all packages. The following matrix shows the current state of internationalization, as of September 2001. The matrix shows, in regard of each package, for which languages PO files have been submitted to translation coordination, with a translation percentage of at least 50%. Ready PO files bg cs da de el en eo es et fi fr gl he hr id it ja +----------------------------------------------------+ a2ps | [] [] [] | bash | [] [] [] [] | bfd | | binutils | [] | bison | [] [] [] [] [] | clisp | [] [] [] [] | cpio | [] [] [] [] [] | diffutils | [] [] [] [] [] [] [] | enscript | [] [] | error | [] [] | fetchmail | | fileutils | [] [] [] [] [] [] [] [] | findutils | [] [] [] [] [] [] [] [] | flex | [] [] [] | freetype | | gas | | gawk | [] [] | gcal | | gcc | | gettext | [] [] [] [] [] [] [] [] [] [] | gnupg | [] [] [] [] [] [] [] | gprof | | grep | [] [] [] [] [] [] [] [] | hello | [] [] [] [] [] [] [] [] [] [] [] | id-utils | [] [] [] | indent | [] [] [] [] [] | jpilot | [] | kbd | | ld | [] | libc | [] [] [] [] [] [] [] [] | lilypond | [] | lynx | [] [] [] [] | m4 | [] [] [] [] [] [] [] [] | make | [] [] [] [] [] [] | mysecretdiary | [] | nano | [] [] [] | opcodes | | parted | [] [] [] | ptx | [] [] [] [] [] [] [] | python | | recode | [] [] [] [] [] [] [] [] [] | sed | [] [] [] [] [] [] [] [] [] [] [] [] | sh-utils | [] [] [] [] [] [] [] [] [] [] | sharutils | [] [] [] [] [] [] [] [] | sketch | | soundtracker | [] [] [] | sp | | tar | [] [] [] [] [] [] [] [] | texinfo | [] [] [] [] [] [] | textutils | [] [] [] [] [] [] [] [] | util-linux | [] [] | wdiff | [] [] [] | wget | [] [] [] [] [] [] [] [] [] [] | +----------------------------------------------------+ bg cs da de el en eo es et fi fr gl he hr id it ja 0 14 24 32 11 1 8 23 13 1 33 22 4 0 7 9 18 ko lv nb nl nn no pl pt pt_BR ru sk sl sv tr uk zh +----------------------------------------------------+ a2ps | [] [] [] | 6 bash | | 4 bfd | | 0 binutils | | 1 bison | [] | 6 clisp | [] | 5 cpio | [] [] [] [] [] | 10 diffutils | [] [] [] [] | 11 enscript | [] [] [] | 5 error | [] [] | 4 fetchmail | | 0 fileutils | [] [] [] [] [] [] [] [] [] | 17 findutils | [] [] [] [] [] [] [] [] | 16 flex | [] [] [] | 6 freetype | | 0 gas | | 0 gawk | [] | 3 gcal | | 0 gcc | | 0 gettext | [] [] [] [] [] [] [] [] | 18 gnupg | [] [] [] | 10 gprof | | 0 grep | [] [] [] [] | 12 hello | [] [] [] [] [] [] [] [] [] [] [] | 22 id-utils | [] [] [] | 6 indent | [] [] [] [] [] [] [] | 12 jpilot | | 1 kbd | [] | 1 ld | | 1 libc | [] [] [] [] [] [] [] [] | 16 lilypond | [] [] | 3 lynx | [] [] [] [] | 8 m4 | [] [] [] [] | 12 make | [] [] [] [] [] [] | 12 mysecretdiary | | 1 nano | [] | 4 opcodes | [] | 1 parted | [] [] | 5 ptx | [] [] [] [] [] [] [] [] | 15 python | | 0 recode | [] [] [] [] | 13 sed | [] [] [] [] [] [] [] | 19 sh-utils | [] [] [] [] [] [] [] [] [] [] [] | 21 sharutils | [] [] [] | 11 sketch | | 0 soundtracker | | 3 sp | | 0 tar | [] [] [] [] [] [] [] | 15 texinfo | [] | 7 textutils | [] [] [] [] [] [] [] [] | 16 util-linux | [] [] | 4 wdiff | [] [] [] [] | 7 wget | [] [] [] [] [] [] [] | 17 +----------------------------------------------------+ 33 teams ko lv nb nl nn no pl pt pt_BR ru sk sl sv tr uk zh 53 domains 9 1 6 20 0 6 17 1 13 25 10 11 23 21 2 2 387 Some counters in the preceding matrix are higher than the number of visible blocks let us expect. This is because a few extra PO files are used for implementing regional variants of languages, or language dialects. For a PO file in the matrix above to be effective, the package to which it applies should also have been internationalized and distributed as such by its maintainer. There might be an observable lag between the mere existence a PO file and its wide availability in a distribution. If September 2001 seems to be old, you may fetch a more recent copy of this `ABOUT-NLS' file on most GNU archive sites. The most up-to-date matrix with full percentage details can be found at `http://www.iro.umontreal.ca/contrib/po/HTML/matrix.html'. Using `gettext' in new packages =============================== If you are writing a freely available program and want to internationalize it you are welcome to use GNU `gettext' in your package. Of course you have to respect the GNU Library General Public License which covers the use of the GNU `gettext' library. This means in particular that even non-free programs can use `libintl' as a shared library, whereas only free software can use `libintl' as a static library or use modified versions of `libintl'. Once the sources are changed appropriately and the setup can handle to use of `gettext' the only thing missing are the translations. The Free Translation Project is also available for packages which are not developed inside the GNU project. Therefore the information given above applies also for every other Free Software Project. Contact `translation@iro.umontreal.ca' to make the `.pot' files available to the translation teams. gmysqlcc-0.3.0/Makefile.am0000644000175000017500000000110610755301562012313 00000000000000## Process this file with automake to produce Makefile.in ## Created by Anjuta - will be overwritten ## If you don't want it to overwrite it, ## Please disable it in the Anjuta project configuration SUBDIRS = data po src gmysqlccdocdir = ${prefix}/doc/gmysqlcc gmysqlccdoc_DATA = \ README\ COPYING\ AUTHORS\ ChangeLog\ INSTALL\ NEWS\ TODO\ ABOUT-NLS EXTRA_DIST = $(gmysqlccdoc_DATA) # Copy all the spec files. Of cource, only one is actually used. dist-hook: for specfile in *.spec; do \ if test -f $$specfile; then \ cp -p $$specfile $(distdir); \ fi \ done gmysqlcc-0.3.0/README0000644000175000017500000000061510755301563011144 00000000000000It is a GUI client for mysql databases. It use only GTK+. You don't need GNOME to use it. With gmysqlcc, you can : * manage your server list * Execute all SQL queries you want * dump queries, tables, databases and servers ... * ... Look to the features in TODO file To simplify, do do all what you want on your mysql database server. To know how to install, look INSTALL file. gmysqlcc-0.3.0/configure.in0000644000175000017500000000360410755301563012576 00000000000000dnl Process this file with autoconf to produce a configure script. AC_INIT(configure.in) AM_INIT_AUTOMAKE(gmysqlcc, 0.3.0) AM_CONFIG_HEADER(config.h) dnl AC_ISC_POSIX CFLAGS="" AC_SUBST(CFLAGS) AC_PROG_CC AC_HEADER_STDC dnl Manage debug infos CFLAGS="-ggdb" AC_ARG_ENABLE(debug, [ --disable-debug Remove debug infos in application], CFLAGS="" ) AC_SUBST(CFLAGS) dnl Check gtk+ Libraries PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.8.0,,exit) AC_SUBST(GTK_LIBS) AC_SUBST(GTK_CFLAGS) AC_PATH_PROG(MYSQLCFG, mysql_config, [no]) if test "$MYSQLCFG" = "no"; then AC_MSG_ERROR([Sorry, can't found MySQL client library]) fi MySQLc_CFLAGS=`$MYSQLCFG --cflags` MySQLc_LIBS=`$MYSQLCFG --libs` AC_SUBST([MySQLc_CFLAGS]) AC_SUBST([MySQLc_LIBS]) dnl Check Gtk+ Source view control AC_ARG_WITH(gtksourceview, [ --with-gtksourceview Activate Gtk+ Source View 2.0 editor], USE_GTKSOURCEVIEW="1" ) if test "x${USE_GTKSOURCEVIEW}" = "x1"; then PKG_CHECK_MODULES(GTKSourceView, gtksourceview-2.0, , exit) AC_DEFINE(USE_GTKSOURCEVIEW, "1", [Activate Gtk+ Source View 2.0 editor]) AC_SUBST(GTKSourceView_LIBS) AC_SUBST(GTKSourceView_CFLAGS) fi dnl Gettext part GETTEXT_PACKAGE=gmysqlcc AC_SUBST(GETTEXT_PACKAGE) AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Package name for gettext]) ALL_LINGUAS="uk fr es" AM_GLIB_GNU_GETTEXT dnl Set PACKAGE_LOCALE_DIR in config.h. if test "x${prefix}" = "xNONE"; then AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "${ac_default_prefix}/${DATADIRNAME}/locale", [Set PACKAGE_LOCALE_DIR in config.h]) else AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "${prefix}/${DATADIRNAME}/locale", [Set PACKAGE_LOCALE_DIR in config.h]) fi dnl Set PACKAGE SOURCE DIR in config.h. packagesrcdir=`cd $srcdir && pwd` AC_DEFINE_UNQUOTED(PACKAGE_SOURCE_DIR, "${packagesrcdir}", [Set PACKAGE SOURCE DIR in config.h]) dnl Output files AC_OUTPUT([Makefile data/Makefile po/Makefile.in src/Makefile ]) gmysqlcc-0.3.0/mkinstalldirs0000755000175000017500000000370410755301563013074 00000000000000#! /bin/sh # mkinstalldirs --- make directory hierarchy # Author: Noah Friedman # Created: 1993-05-16 # Public domain errstatus=0 dirmode="" usage="\ Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..." # process command line arguments while test $# -gt 0 ; do case $1 in -h | --help | --h*) # -h for help echo "$usage" 1>&2 exit 0 ;; -m) # -m PERM arg shift test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } dirmode=$1 shift ;; --) # stop option processing shift break ;; -*) # unknown option echo "$usage" 1>&2 exit 1 ;; *) # first non-opt arg break ;; esac done for file do if test -d "$file"; then shift else break fi done case $# in 0) exit 0 ;; esac case $dirmode in '') if mkdir -p -- . 2>/dev/null; then echo "mkdir -p -- $*" exec mkdir -p -- "$@" fi ;; *) if mkdir -m "$dirmode" -p -- . 2>/dev/null; then echo "mkdir -m $dirmode -p -- $*" exec mkdir -m "$dirmode" -p -- "$@" fi ;; esac for file do set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` shift pathcomp= for d do pathcomp="$pathcomp$d" case $pathcomp in -*) pathcomp=./$pathcomp ;; esac if test ! -d "$pathcomp"; then echo "mkdir $pathcomp" mkdir "$pathcomp" || lasterr=$? if test ! -d "$pathcomp"; then errstatus=$lasterr else if test ! -z "$dirmode"; then echo "chmod $dirmode $pathcomp" lasterr="" chmod "$dirmode" "$pathcomp" || lasterr=$? if test ! -z "$lasterr"; then errstatus=$lasterr fi fi fi fi pathcomp="$pathcomp/" done done exit $errstatus # Local Variables: # mode: shell-script # sh-indentation: 2 # End: # mkinstalldirs ends here gmysqlcc-0.3.0/src/0000777000175000017500000000000010760516433011135 500000000000000gmysqlcc-0.3.0/src/gmlc_gui_helpers.h0000644000175000017500000000266210755301563014540 00000000000000/* * 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 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, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __GMLC_GUI_HELPERS_H__ #define __GMLC_GUI_HELPERS_H__ #include "gmlc_main.h" G_BEGIN_DECLS typedef struct _askFilenameInfos { GtkWidget * dialog; void * userData; } askFilenameInfos; typedef askFilenameInfos * p_askFilenameInfos; GString * askInfo(const gchar * title, const gchar * message, const gchar * defaultValue); gboolean askConfirmation(const gchar * title, const gchar * message); gboolean askYesno(const gchar * title, const gchar * message); gboolean askFilename(const gchar * title, const gchar * filename, void (*okevent) (GtkWidget *widget, gpointer user_data), gpointer user_data); gchar * gmlc_helpers_protect_underscore (const gchar * str); G_END_DECLS #endif /* __GMLC_GUI_HELPERS_H__ */ gmysqlcc-0.3.0/src/gmlc_misc_config.h0000644000175000017500000000634510755301562014513 00000000000000/* * 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 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, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __GMLC_MISC_CONFIG_H__ #define __GMLC_MISC_CONFIG_H__ #include #include #include #include #include #include #include #include "../config.h" #include "gmlc_mysql_server.h" #define GMYSQLCC_CONF_DIR "gmysqlcc" #define SERVERS_FILE "gmysqlcc_serv.xml" #define CONFIG_FILE "gmysqlcc_conf.xml" G_BEGIN_DECLS #define GMLC_TYPE_MISC_CONFIG (gmlc_misc_config_get_type ()) #define GMLC_MISC_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GMLC_TYPE_MISC_CONFIG, GmlcMiscConfig)) #define GMLC_MISC_CONFIG_CLASS(obj) (G_TYPE_CHECK_CLASS_CAST ((obj), GMLC_TYPE_MISC_CONFIG, GmlcMiscConfigClass)) #define GMLC_IS_MISC_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GMLC_TYPE_MISC_CONFIG)) #define GMLC_IS_MISC_CONFIG_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE ((obj), GMLC_TYPE_MISC_CONFIG)) #define GMLC_MISC_CONFIG_GET_CLASS (G_TYPE_INSTANCE_GET_CLASS ((obj), GMLC_TYPE_MISC_CONFIG, GmlcMiscConfigClass)) typedef struct _GmlcMiscConfig GmlcMiscConfig; typedef struct _GmlcMiscConfigClass GmlcMiscConfigClass; struct _GmlcMiscConfig { GObject parent; /* instance members */ /* private */ /* config file name */ gchar * pcConfigFilename; gchar * pcServersFilename; /* Fonts' names */ gchar * pcQueryFontName; gchar * pcHelpFontName; /* Servers' list */ GList * lstServers; }; struct _GmlcMiscConfigClass { GObjectClass parent_class; /* class members */ }; GType gmlc_misc_config_get_type (void); GmlcMiscConfig * gmlc_misc_config_new (void); gboolean gmlc_misc_config_add_server (GmlcMiscConfig * pGmlcMscCfg, const gchar * name, const gchar * host, const gint port, const gchar * login, const gchar * passwd, const gchar * dbAllowedList, const gchar * localSock, const gboolean read_only, const gboolean write_warning); gboolean gmlc_misc_config_update_server (GmlcMiscConfig * pGmlcMscCfg, const gchar * oldname, const gchar * name, const gchar * host, const gint port, const gchar * login, const gchar * passwd, const gchar * dbAllowedList, const gchar * localSock, const gboolean read_only, const gboolean write_warning); gboolean gmlc_misc_config_del_server (GmlcMiscConfig * pGmlcMscCfg, const gchar * name); GmlcMysqlServer * gmlc_misc_config_get_server (GmlcMiscConfig * pGmlcMscCfg, const gchar * name); gboolean gmlc_misc_config_read (GmlcMiscConfig * pGmlcMscCfg); gboolean gmlc_misc_config_write (GmlcMiscConfig * pGmlcMscCfg); G_END_DECLS #endif /* __GMLC_MISC_CONFIG_H__ */ gmysqlcc-0.3.0/src/gmlc_mysql_database.c0000644000175000017500000005205210755301563015214 00000000000000/* * 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 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 Library 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include "gmlc_mysql_database.h" #include "gmlc_misc_hashtable.h" static void gmlc_mysql_database_finalize (GmlcMysqlDatabase * pGmlcMysqlDb); static void gmlc_mysql_database_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec); static void gmlc_mysql_database_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec); static void gmlc_mysql_database_interface_structure_init (gpointer g_iface, gpointer iface_data); static gchar * gmlc_mysql_database_structure_get_create (GmlcMysqlDatabase * pGmlcMysqlDb, gboolean bMyself, const gchar * pcOtherName); static gchar * gmlc_mysql_database_structure_get_alter (GmlcMysqlDatabase * pGmlcMysqlDb, gboolean bMyself, const gchar * pcOtherName); static gchar * gmlc_mysql_database_structure_get_drop (GmlcMysqlDatabase * pGmlcMysqlDb, gboolean bMyself, const gchar * pcOtherName); enum { PROP_0, PROP_FLAGGED, PROP_SERVER, PROP_DB_NAME }; G_DEFINE_TYPE_WITH_CODE (GmlcMysqlDatabase, gmlc_mysql_database, G_TYPE_OBJECT, G_IMPLEMENT_INTERFACE (GMLC_MYSQL_TYPE_STRUCTURE, gmlc_mysql_database_interface_structure_init)); static void gmlc_mysql_database_interface_structure_init (gpointer g_iface, gpointer iface_data) { GmlcMysqlStructureInterface * pIface = (GmlcMysqlStructureInterface *) g_iface; pIface->get_create = (gchar * (*) (GmlcMysqlStructure * poSelf, gboolean bMyself, const gchar * pcOtherName))gmlc_mysql_database_structure_get_create; pIface->get_alter = (gchar * (*) (GmlcMysqlStructure * poSelf, gboolean bMyself, const gchar * pcOtherName))gmlc_mysql_database_structure_get_alter; pIface->get_drop = (gchar * (*) (GmlcMysqlStructure * poSelf, gboolean bMyself, const gchar * pcOtherName))gmlc_mysql_database_structure_get_drop; } static void gmlc_mysql_database_class_init (GmlcMysqlDatabaseClass *pClass) { GObjectClass *pObjClass = G_OBJECT_CLASS(pClass); pObjClass->finalize = (GObjectFinalizeFunc) gmlc_mysql_database_finalize; pObjClass->get_property = gmlc_mysql_database_get_property; pObjClass->set_property = gmlc_mysql_database_set_property; g_object_class_install_property(pObjClass, PROP_SERVER, g_param_spec_object("server", "Server object", "Server object", GMLC_MYSQL_TYPE_SERVER, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); g_object_class_install_property(pObjClass, PROP_DB_NAME, g_param_spec_string("db_name", "Database name", "Name of the database", "", G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); g_object_class_install_property(pObjClass, PROP_FLAGGED, g_param_spec_boolean("flagged", "Object Flagged", "Object Flagged", FALSE, G_PARAM_READWRITE)); } static void gmlc_mysql_database_init (GmlcMysqlDatabase *pGmlcMysqlDb) { pGmlcMysqlDb->pGmlcMysqlSrv = NULL;/* r-c */ pGmlcMysqlDb->pcDbName = NULL; /* r-c */ pGmlcMysqlDb->htbTables = g_hash_table_new_full(&g_str_hash, &g_str_equal, &g_free, &g_object_unref); pGmlcMysqlDb->htbViews = g_hash_table_new_full(&g_str_hash, &g_str_equal, &g_free, &g_object_unref); pGmlcMysqlDb->htbFunctions = g_hash_table_new_full(&g_str_hash, &g_str_equal, &g_free, &g_object_unref); pGmlcMysqlDb->htbProcedures = g_hash_table_new_full(&g_str_hash, &g_str_equal, &g_free, &g_object_unref); } static void gmlc_mysql_database_finalize (GmlcMysqlDatabase *pGmlcMysqlDb) { g_free(pGmlcMysqlDb->pcDbName); } static void gmlc_mysql_database_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec) { GmlcMysqlDatabase * pGmlcMysqlDb = GMLC_MYSQL_DATABASE(object); switch (prop_id) { case PROP_SERVER : g_value_set_object(value, pGmlcMysqlDb->pGmlcMysqlSrv); break; case PROP_DB_NAME : g_value_set_string(value, pGmlcMysqlDb->pcDbName); break; case PROP_FLAGGED : g_value_set_boolean(value, pGmlcMysqlDb->bFlagged); break; default: { G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); break; } } } static void gmlc_mysql_database_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec) { GmlcMysqlDatabase * pGmlcMysqlDb = GMLC_MYSQL_DATABASE(object); switch (prop_id) { case PROP_SERVER : pGmlcMysqlDb->pGmlcMysqlSrv = g_value_get_object(value); break; case PROP_DB_NAME : g_free(pGmlcMysqlDb->pcDbName); pGmlcMysqlDb->pcDbName = g_value_dup_string(value); break; case PROP_FLAGGED : pGmlcMysqlDb->bFlagged = g_value_get_boolean(value); break; default: { G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); break; } } } static gchar * gmlc_mysql_database_structure_get_create (GmlcMysqlDatabase * pGmlcMysqlDb, gboolean bMyself, const gchar * pcOtherName) { const gchar * pcDbName = NULL; gchar * pcDefCharset = NULL, * pcDefCollation = NULL, * pcSqlQuery = NULL; if (bMyself) { pcDbName = pGmlcMysqlDb->pcDbName; } else if (pcOtherName != NULL) { pcDbName = pcOtherName; } else { pcDbName = ""; } pcDefCharset = gmlc_mysql_query_static_get_one_result(pGmlcMysqlDb->pGmlcMysqlSrv, NULL, "SHOW LOCAL VARIABLES LIKE 'character_set_server'", 1); pcDefCollation = gmlc_mysql_query_static_get_one_result(pGmlcMysqlDb->pGmlcMysqlSrv, NULL, "SHOW LOCAL VARIABLES LIKE 'collation_server'", 1); pcSqlQuery = g_strdup_printf("CREATE DATABASE `%s`\n\tCHARACTER SET '%s'\n\tCOLLATE '%s';", pcDbName, pcDefCharset, pcDefCollation); return pcSqlQuery; } static gchar * gmlc_mysql_database_structure_get_alter (GmlcMysqlDatabase * pGmlcMysqlDb, gboolean bMyself, const gchar * pcOtherName) { const gchar * pcDbName = NULL; gchar * pcDefCharset = NULL, * pcDefCollation = NULL, * pcSqlQuery = NULL; if (bMyself) { pcDbName = pGmlcMysqlDb->pcDbName; } else if (pcOtherName != NULL) { pcDbName = pcOtherName; } else { pcDbName = ""; } pcDefCharset = gmlc_mysql_query_static_get_one_result(pGmlcMysqlDb->pGmlcMysqlSrv, NULL, "SHOW LOCAL VARIABLES LIKE 'character_set_server'", 1); pcDefCollation = gmlc_mysql_query_static_get_one_result(pGmlcMysqlDb->pGmlcMysqlSrv, NULL, "SHOW LOCAL VARIABLES LIKE 'collation_server'", 1); pcSqlQuery = g_strdup_printf("ALTER DATABASE `%s`\n\tCHARACTER SET '%s'\n\tCOLLATE '%s';", pcDbName, pcDefCharset, pcDefCollation); return pcSqlQuery; } static gchar * gmlc_mysql_database_structure_get_drop (GmlcMysqlDatabase * pGmlcMysqlDb, gboolean bMyself, const gchar * pcOtherName) { const gchar * pcDbName = NULL; gchar * pcSqlQuery = NULL; if (bMyself) { pcDbName = pGmlcMysqlDb->pcDbName; } else if (pcOtherName != NULL) { pcDbName = pcOtherName; } else { pcDbName = ""; } pcSqlQuery = g_strdup_printf("DROP DATABASE `%s`;", pcDbName); return pcSqlQuery; } GmlcMysqlDatabase * gmlc_mysql_database_new (GmlcMysqlServer * pGmlcMysqlSrv, const gchar * pcDbName) { return GMLC_MYSQL_DATABASE(g_object_new(GMLC_MYSQL_TYPE_DATABASE, "server", pGmlcMysqlSrv, "db_name", pcDbName, NULL)); } GmlcMysqlQuery * gmlc_mysql_database_get_query(GmlcMysqlDatabase * pGmlcMysqlDb) { GmlcMysqlQuery * poGmlcMysqlQry = NULL; poGmlcMysqlQry = gmlc_mysql_query_new(pGmlcMysqlDb->pGmlcMysqlSrv, pGmlcMysqlDb->pcDbName); return poGmlcMysqlQry; } GArray * gmlc_mysql_database_tables_name_list(GmlcMysqlDatabase * pGmlcMysqlDb, gboolean bUpdateList) { GArray * arList = NULL; void internal_gmlc_mysql_database_tables_name_list_append_name (gpointer key, gpointer value, gpointer user_data) { gchar * pcName = (gchar *) key; GArray * arList = (GArray *) user_data; UNUSED_VAR(value); g_array_append_val(arList, pcName); } if (bUpdateList) { gmlc_mysql_database_update_tables_list(pGmlcMysqlDb); } arList = g_array_new(TRUE, TRUE, sizeof(gchar *)); g_hash_table_foreach(pGmlcMysqlDb->htbTables, &internal_gmlc_mysql_database_tables_name_list_append_name, arList); return arList; } GmlcMysqlTable * gmlc_mysql_database_get_table(GmlcMysqlDatabase * pGmlcMysqlDb, const gchar * pcName) { g_return_val_if_fail(pcName != NULL, NULL); return GMLC_MYSQL_TABLE(g_hash_table_lookup(pGmlcMysqlDb->htbTables, pcName)); } gboolean gmlc_mysql_database_update_tables_list(GmlcMysqlDatabase * pGmlcMysqlDb) { GmlcMysqlTable * pGmlcMysqlTbl = NULL; GmlcMysqlQuery * pGmlcMysqlQry = NULL; GArray * arRow = NULL; gchar * pcSql = NULL; gchar * pcName = NULL, * pcType = NULL, * pcRows = NULL, * pcSize = NULL, * pcEngine = NULL; gulong lVersion = 0; g_object_get(G_OBJECT(pGmlcMysqlDb->pGmlcMysqlSrv), "version", &lVersion, NULL); pGmlcMysqlQry = gmlc_mysql_query_new (pGmlcMysqlDb->pGmlcMysqlSrv, pGmlcMysqlDb->pcDbName); if (lVersion < 50000) { // For version < 5.0.0 pcSql = g_strdup_printf("SHOW TABLE STATUS;"); } else { pcSql = g_strdup_printf("SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE table_schema = '%s';", pGmlcMysqlDb->pcDbName); } if (gmlc_mysql_query_execute(pGmlcMysqlQry, pcSql, strlen(pcSql), TRUE)) { gmlc_misc_hash_table_set_all_flag(pGmlcMysqlDb->htbTables, FALSE); while ((arRow = gmlc_mysql_query_next_record(pGmlcMysqlQry)) != NULL) { pcName = NULL; /* Get table information */ if (lVersion < 50000) { // For version < 5.0.0 pcName = g_array_index(arRow, gchar *, 0); if (lVersion <= 40100) { // For version < 4.1.0 pcEngine = g_array_index(arRow, gchar *, 1); pcRows = g_array_index(arRow, gchar *, 3); pcSize = g_array_index(arRow, gchar *, 5); } else { pcEngine = g_array_index(arRow, gchar *, 1); pcRows = g_array_index(arRow, gchar *, 4); pcSize = g_array_index(arRow, gchar *, 6); } } else { pcType = g_array_index(arRow, gchar *, 3); if (pcType[0] == 'B' || pcType[0] == 'T' || pcType[0] == 'S') { /* Check if type is 'BASE TABLE' or 'TEMPORARY' or 'SYSTEM VIEW' */ pcName = g_array_index(arRow, gchar *, 2); pcEngine = g_array_index(arRow, gchar *, 4); pcRows = g_array_index(arRow, gchar *, 7); pcSize = g_array_index(arRow, gchar *, 9); } } /* Create table object */ if (pcName != NULL) { pGmlcMysqlTbl = GMLC_MYSQL_TABLE(g_hash_table_lookup(pGmlcMysqlDb->htbTables, pcName)); if (pGmlcMysqlTbl == NULL) { pGmlcMysqlTbl = gmlc_mysql_table_new_with_stat(pGmlcMysqlDb, pcName, pcRows, pcSize, pcEngine); g_hash_table_insert(pGmlcMysqlDb->htbTables, g_strdup(pcName), pGmlcMysqlTbl); } else { g_object_set(pGmlcMysqlTbl, "rows", pcRows, "size", pcSize, "engine", pcEngine, NULL); } g_object_set(G_OBJECT(pGmlcMysqlTbl), "flagged", TRUE, NULL); } gmlc_mysql_query_free_record_content(arRow); } gmlc_misc_hash_table_remove_unflag_object(pGmlcMysqlDb->htbTables); } g_free(pcSql); g_object_unref(pGmlcMysqlQry); return TRUE; } gchar * gmlc_mysql_database_create_new_table_sql(GmlcMysqlDatabase *pGmlcMysqlDb, const gchar * pcOtherName) { const gchar * pcName = NULL; gchar * pcSqlQuery = NULL; if (pcOtherName != NULL) { pcName = pcOtherName; } else { pcName = ""; } pcSqlQuery = g_strdup_printf("CREATE TABLE `%s` (\n);", pcName); return pcSqlQuery; } GArray * gmlc_mysql_database_views_name_list(GmlcMysqlDatabase * pGmlcMysqlDb, gboolean bUpdateList) { GArray * arList = NULL; void internal_gmlc_mysql_database_views_name_list_append_name (gpointer key, gpointer value, gpointer user_data) { gchar * pcName = (gchar *) key; GArray * arList = (GArray *) user_data; UNUSED_VAR(value); g_array_append_val(arList, pcName); } if (bUpdateList) { gmlc_mysql_database_update_views_list(pGmlcMysqlDb); } arList = g_array_new(TRUE, TRUE, sizeof(gchar *)); g_hash_table_foreach(pGmlcMysqlDb->htbViews, &internal_gmlc_mysql_database_views_name_list_append_name, arList); return arList; } GmlcMysqlView * gmlc_mysql_database_get_view(GmlcMysqlDatabase * pGmlcMysqlDb, const gchar * pcName) { g_return_val_if_fail(pcName != NULL, NULL); return GMLC_MYSQL_VIEW(g_hash_table_lookup(pGmlcMysqlDb->htbViews, pcName)); } gboolean gmlc_mysql_database_update_views_list(GmlcMysqlDatabase * pGmlcMysqlDb) { GmlcMysqlView * pGmlcMysqlViw = NULL; GmlcMysqlQuery * pGmlcMysqlQry = NULL; GArray * arListName = NULL; GArray * arRow = NULL; gchar * pcSql = NULL; gchar * pcName = NULL; gulong lVersion = 0; gint i = 0; g_object_get(G_OBJECT(pGmlcMysqlDb->pGmlcMysqlSrv), "version", &lVersion, NULL); if (lVersion >= 50000) { // For version >= 5.0.0 pGmlcMysqlQry = gmlc_mysql_query_new (pGmlcMysqlDb->pGmlcMysqlSrv, pGmlcMysqlDb->pcDbName); pcSql = g_strdup_printf("SELECT table_name FROM INFORMATION_SCHEMA.VIEWS WHERE table_schema = '%s';", pGmlcMysqlDb->pcDbName); if (gmlc_mysql_query_execute(pGmlcMysqlQry, pcSql, strlen(pcSql), TRUE)) { arListName = g_array_new(TRUE, TRUE, sizeof(gchar *)); while ((arRow = gmlc_mysql_query_next_record(pGmlcMysqlQry)) != NULL) { pcName = g_array_index(arRow, gchar *, 0); g_array_append_val(arListName, pcName); g_array_free(arRow, TRUE); } } g_free(pcSql); g_object_unref(pGmlcMysqlQry); } if (arListName != NULL) { gmlc_misc_hash_table_set_all_flag(pGmlcMysqlDb->htbViews, FALSE); for (i = 0; i < arListName->len; i++) { pcName = g_array_index(arListName, gchar *, i); pGmlcMysqlViw = GMLC_MYSQL_VIEW(g_hash_table_lookup(pGmlcMysqlDb->htbViews, pcName)); if (pGmlcMysqlViw == NULL) { pGmlcMysqlViw = gmlc_mysql_view_new(pGmlcMysqlDb, pcName); g_hash_table_insert(pGmlcMysqlDb->htbViews, g_strdup(pcName), pGmlcMysqlViw); } g_object_set(G_OBJECT(pGmlcMysqlViw), "flagged", TRUE, NULL); g_free(pcName); } gmlc_misc_hash_table_remove_unflag_object(pGmlcMysqlDb->htbViews); g_array_free(arListName, TRUE); } return TRUE; } gchar * gmlc_mysql_database_create_new_view_sql(GmlcMysqlDatabase *pGmlcMysqlDb, const gchar * pcOtherName) { const gchar * pcName = NULL; gchar * pcSqlQuery = NULL; if (pcOtherName != NULL) { pcName = pcOtherName; } else { pcName = ""; } pcSqlQuery = g_strdup_printf("CREATE VIEW `%s` AS SELECT * FROM WHERE 1;", pcName); return pcSqlQuery; } GArray * gmlc_mysql_database_functions_name_list(GmlcMysqlDatabase * pGmlcMysqlDb, gboolean bUpdateList) { GArray * arList = NULL; void internal_gmlc_mysql_database_functions_name_list_append_name (gpointer key, gpointer value, gpointer user_data) { gchar * pcName = (gchar *) key; GArray * arList = (GArray *) user_data; UNUSED_VAR(value); g_array_append_val(arList, pcName); } if (bUpdateList) { gmlc_mysql_database_update_functions_list(pGmlcMysqlDb); } arList = g_array_new(TRUE, TRUE, sizeof(gchar *)); g_hash_table_foreach(pGmlcMysqlDb->htbFunctions, &internal_gmlc_mysql_database_functions_name_list_append_name, arList); return arList; } GmlcMysqlFunction * gmlc_mysql_database_get_function(GmlcMysqlDatabase * pGmlcMysqlDb, const gchar * pcName) { g_return_val_if_fail(pcName != NULL, NULL); return GMLC_MYSQL_FUNCTION(g_hash_table_lookup(pGmlcMysqlDb->htbFunctions, pcName)); } gboolean gmlc_mysql_database_update_functions_list(GmlcMysqlDatabase * pGmlcMysqlDb) { GmlcMysqlFunction * pGmlcMysqlFnct = NULL; GmlcMysqlQuery * pGmlcMysqlQry = NULL; GArray * arListName = NULL; GArray * arRow = NULL; gchar * pcSql = NULL; gchar * pcName = NULL; gchar * pcType = NULL; gulong lVersion = 0; gint i = 0; g_object_get(G_OBJECT(pGmlcMysqlDb->pGmlcMysqlSrv), "version", &lVersion, NULL); if (lVersion >= 50000) { // For version >= 5.0.0 pGmlcMysqlQry = gmlc_mysql_query_new (pGmlcMysqlDb->pGmlcMysqlSrv, pGmlcMysqlDb->pcDbName); pcSql = g_strdup_printf("SELECT routine_name, routine_type FROM INFORMATION_SCHEMA.ROUTINES WHERE routine_schema = '%s';", pGmlcMysqlDb->pcDbName); if (gmlc_mysql_query_execute(pGmlcMysqlQry, pcSql, strlen(pcSql), TRUE)) { arListName = g_array_new(TRUE, TRUE, sizeof(gchar *)); while ((arRow = gmlc_mysql_query_next_record(pGmlcMysqlQry)) != NULL) { pcName = g_array_index(arRow, gchar *, 0); pcType = g_array_index(arRow, gchar *, 1); if (pcType[0] == 'F') { /* Check if type is 'FUNCTION' */ g_array_append_val(arListName, pcName); } else { g_free(pcName); } g_free(pcType); g_array_free(arRow, TRUE); } } g_free(pcSql); g_object_unref(pGmlcMysqlQry); } if (arListName != NULL) { gmlc_misc_hash_table_set_all_flag(pGmlcMysqlDb->htbFunctions, FALSE); for (i = 0; i < arListName->len; i++) { pcName = g_array_index(arListName, gchar *, i); pGmlcMysqlFnct = GMLC_MYSQL_FUNCTION(g_hash_table_lookup(pGmlcMysqlDb->htbFunctions, pcName)); if (pGmlcMysqlFnct == NULL) { pGmlcMysqlFnct = gmlc_mysql_function_new(pGmlcMysqlDb, pcName); g_hash_table_insert(pGmlcMysqlDb->htbFunctions, g_strdup(pcName), pGmlcMysqlFnct); } g_object_set(G_OBJECT(pGmlcMysqlFnct), "flagged", TRUE, NULL); g_free(pcName); } gmlc_misc_hash_table_remove_unflag_object(pGmlcMysqlDb->htbFunctions); g_array_free(arListName, TRUE); } return TRUE; } gchar * gmlc_mysql_database_create_new_function_sql(GmlcMysqlDatabase *pGmlcMysqlDb, const gchar * pcOtherName) { const gchar * pcName = NULL; gchar * pcSqlQuery = NULL; if (pcOtherName != NULL) { pcName = pcOtherName; } else { pcName = ""; } pcSqlQuery = g_strdup_printf("CREATE FUNCTION `%s` ()\n RETURNS \n\n ;", pcName); return pcSqlQuery; } GArray * gmlc_mysql_database_procedures_name_list(GmlcMysqlDatabase * pGmlcMysqlDb, gboolean bUpdateList) { GArray * arList = NULL; void internal_gmlc_mysql_database_procedures_name_list_append_name (gpointer key, gpointer value, gpointer user_data) { gchar * pcName = (gchar *) key; GArray * arList = (GArray *) user_data; UNUSED_VAR(value); g_array_append_val(arList, pcName); } if (bUpdateList) { gmlc_mysql_database_update_procedures_list(pGmlcMysqlDb); } arList = g_array_new(TRUE, TRUE, sizeof(gchar *)); g_hash_table_foreach(pGmlcMysqlDb->htbProcedures, &internal_gmlc_mysql_database_procedures_name_list_append_name, arList); return arList; } GmlcMysqlProcedure * gmlc_mysql_database_get_procedure(GmlcMysqlDatabase * pGmlcMysqlDb, const gchar * pcName) { g_return_val_if_fail(pcName != NULL, NULL); return GMLC_MYSQL_PROCEDURE(g_hash_table_lookup(pGmlcMysqlDb->htbProcedures, pcName)); } gboolean gmlc_mysql_database_update_procedures_list(GmlcMysqlDatabase * pGmlcMysqlDb) { GmlcMysqlProcedure * pGmlcMysqlPrc = NULL; GmlcMysqlQuery * pGmlcMysqlQry = NULL; GArray * arListName = NULL; GArray * arRow = NULL; gchar * pcSql = NULL; gchar * pcName = NULL; gchar * pcType = NULL; gulong lVersion = 0; gint i = 0; g_object_get(G_OBJECT(pGmlcMysqlDb->pGmlcMysqlSrv), "version", &lVersion, NULL); if (lVersion >= 50000) { // For version >= 5.0.0 pGmlcMysqlQry = gmlc_mysql_query_new (pGmlcMysqlDb->pGmlcMysqlSrv, pGmlcMysqlDb->pcDbName); pcSql = g_strdup_printf("SELECT routine_name, routine_type FROM INFORMATION_SCHEMA.ROUTINES WHERE routine_schema = '%s';", pGmlcMysqlDb->pcDbName); if (gmlc_mysql_query_execute(pGmlcMysqlQry, pcSql, strlen(pcSql), TRUE)) { arListName = g_array_new(TRUE, TRUE, sizeof(gchar *)); while ((arRow = gmlc_mysql_query_next_record(pGmlcMysqlQry)) != NULL) { pcName = g_array_index(arRow, gchar *, 0); pcType = g_array_index(arRow, gchar *, 1); if (pcType[0] == 'P') { /* Check if type is 'PROCEDURE' */ g_array_append_val(arListName, pcName); } else { g_free(pcName); } g_free(pcType); g_array_free(arRow, TRUE); } } g_free(pcSql); g_object_unref(pGmlcMysqlQry); } if (arListName != NULL) { gmlc_misc_hash_table_set_all_flag(pGmlcMysqlDb->htbProcedures, FALSE); for (i = 0; i < arListName->len; i++) { pcName = g_array_index(arListName, gchar *, i); pGmlcMysqlPrc = GMLC_MYSQL_PROCEDURE(g_hash_table_lookup(pGmlcMysqlDb->htbProcedures, pcName)); if (pGmlcMysqlPrc == NULL) { pGmlcMysqlPrc = gmlc_mysql_procedure_new(pGmlcMysqlDb, pcName); g_hash_table_insert(pGmlcMysqlDb->htbProcedures, g_strdup(pcName), pGmlcMysqlPrc); } g_object_set(G_OBJECT(pGmlcMysqlPrc), "flagged", TRUE, NULL); g_free(pcName); } gmlc_misc_hash_table_remove_unflag_object(pGmlcMysqlDb->htbProcedures); g_array_free(arListName, TRUE); } return TRUE; } gchar * gmlc_mysql_database_create_new_procedure_sql(GmlcMysqlDatabase *pGmlcMysqlDb, const gchar * pcOtherName) { const gchar * pcName = NULL; gchar * pcSqlQuery = NULL; if (pcOtherName != NULL) { pcName = pcOtherName; } else { pcName = ""; } pcSqlQuery = g_strdup_printf("CREATE PROCEDURE `%s` ()\n \n ;", pcName); return pcSqlQuery; } gmysqlcc-0.3.0/src/gmlc_mysql_server.c0000644000175000017500000002627010755301563014761 00000000000000/* * 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 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, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "gmlc_mysql_server.h" #include "gmlc_mysql_database.h" #include "gmlc_mysql_query.h" #include "gmlc_misc_hashtable.h" static void gmlc_mysql_server_finalize (GmlcMysqlServer * pGmlcMysqlSrv); static void gmlc_mysql_server_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec); static void gmlc_mysql_server_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec); enum { PROP_0, PROP_NAME, PROP_HOST, PROP_PORT, PROP_LOGIN, PROP_PASSWORD, PROP_LOCAL_SOCK, PROP_ALLOWED_DBS, PROP_READ_ONLY, PROP_WRITE_WARNING, PROP_VERSION }; G_DEFINE_TYPE (GmlcMysqlServer, gmlc_mysql_server, G_TYPE_OBJECT); static void gmlc_mysql_server_class_init (GmlcMysqlServerClass * pClass) { GObjectClass *pObjClass = G_OBJECT_CLASS(pClass); pObjClass->finalize = (GObjectFinalizeFunc) gmlc_mysql_server_finalize; pObjClass->get_property = gmlc_mysql_server_get_property; pObjClass->set_property = gmlc_mysql_server_set_property; g_object_class_install_property(pObjClass, PROP_NAME, g_param_spec_string("name", "Server name", "Name (not host) of the mysql server", "", G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); g_object_class_install_property(pObjClass, PROP_HOST, g_param_spec_string("hostname", "Server host name", "Host name of the mysql server", "", G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); g_object_class_install_property(pObjClass, PROP_PORT, g_param_spec_uint("port", "Server port", "Port of the mysql server", 0, 65535, 3306, G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); g_object_class_install_property(pObjClass, PROP_LOGIN, g_param_spec_string("login", "Server login", "Login for the mysql server", "", G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); g_object_class_install_property(pObjClass, PROP_PASSWORD, g_param_spec_string("password", "Server password", "Password for the mysql server", "", G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); g_object_class_install_property(pObjClass, PROP_LOCAL_SOCK, g_param_spec_string("local_socket", "Local socket file name", "Local socket file name used for access to the mysql server", "", G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); g_object_class_install_property(pObjClass, PROP_ALLOWED_DBS, g_param_spec_string("allowed_dbs", "Allowed databases", "Databases allowed to the login for the mysql server", "", G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); g_object_class_install_property(pObjClass, PROP_READ_ONLY, g_param_spec_boolean("read_only", "Read only server", "The mysql server is marked as read only", FALSE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); g_object_class_install_property(pObjClass, PROP_WRITE_WARNING, g_param_spec_boolean("write_warning", "Write warning server", "Display write warning for this mysql server", FALSE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); g_object_class_install_property(pObjClass, PROP_VERSION, g_param_spec_ulong("version", "Server version", "Version of the mysql server", 0, G_MAXULONG, 0, G_PARAM_READABLE)); } static void gmlc_mysql_server_init (GmlcMysqlServer * pGmlcMysqlSrv) { pGmlcMysqlSrv->pcName = NULL; pGmlcMysqlSrv->pcHost = NULL; pGmlcMysqlSrv->iPort = 3306; pGmlcMysqlSrv->pcLogin = NULL; pGmlcMysqlSrv->pcPassword = NULL; pGmlcMysqlSrv->pcLocalSock = NULL; pGmlcMysqlSrv->pcAllowedDbs = NULL; pGmlcMysqlSrv->bReadOnly = FALSE; pGmlcMysqlSrv->bWriteWarning = FALSE; pGmlcMysqlSrv->lVersion = 0; pGmlcMysqlSrv->arCharsets = NULL; pGmlcMysqlSrv->htbDatabases = g_hash_table_new_full(&g_str_hash, &g_str_equal, &g_free, &g_object_unref); } static void gmlc_mysql_server_finalize (GmlcMysqlServer * pGmlcMysqlSrv) { g_hash_table_destroy(pGmlcMysqlSrv->htbDatabases); g_array_free(pGmlcMysqlSrv->arCharsets, TRUE); g_free(pGmlcMysqlSrv->pcName); g_free(pGmlcMysqlSrv->pcHost); g_free(pGmlcMysqlSrv->pcLogin); g_free(pGmlcMysqlSrv->pcPassword); g_free(pGmlcMysqlSrv->pcLocalSock); g_free(pGmlcMysqlSrv->pcAllowedDbs); } static void gmlc_mysql_server_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec) { GmlcMysqlServer * pGmlcMysqlSrv = GMLC_MYSQL_SERVER(object); switch (prop_id) { case PROP_NAME : g_free(pGmlcMysqlSrv->pcName); pGmlcMysqlSrv->pcName = g_value_dup_string(value); break; case PROP_HOST : g_free(pGmlcMysqlSrv->pcHost); pGmlcMysqlSrv->pcHost = g_value_dup_string(value); break; case PROP_PORT : pGmlcMysqlSrv->iPort = g_value_get_uint (value); break; case PROP_LOGIN : g_free(pGmlcMysqlSrv->pcLogin); pGmlcMysqlSrv->pcLogin = g_value_dup_string(value); break; case PROP_PASSWORD : g_free(pGmlcMysqlSrv->pcPassword); pGmlcMysqlSrv->pcPassword = g_value_dup_string(value); break; case PROP_LOCAL_SOCK : g_free(pGmlcMysqlSrv->pcLocalSock); pGmlcMysqlSrv->pcLocalSock = g_value_dup_string(value); break; case PROP_ALLOWED_DBS : g_free(pGmlcMysqlSrv->pcAllowedDbs); pGmlcMysqlSrv->pcAllowedDbs = g_value_dup_string(value); break; case PROP_READ_ONLY : pGmlcMysqlSrv->bReadOnly = g_value_get_boolean(value); break; case PROP_WRITE_WARNING : pGmlcMysqlSrv->bWriteWarning = g_value_get_boolean(value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); break; } } static void gmlc_mysql_server_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec) { GmlcMysqlServer * pGmlcMysqlSrv = GMLC_MYSQL_SERVER(object); switch (prop_id) { case PROP_NAME : g_value_set_string(value, pGmlcMysqlSrv->pcName); break; case PROP_HOST : g_value_set_string(value, pGmlcMysqlSrv->pcHost); break; case PROP_PORT : g_value_set_uint(value, pGmlcMysqlSrv->iPort); break; case PROP_LOGIN : g_value_set_string(value, pGmlcMysqlSrv->pcLogin); break; case PROP_PASSWORD : g_value_set_string(value, pGmlcMysqlSrv->pcPassword); break; case PROP_LOCAL_SOCK : g_value_set_string(value, pGmlcMysqlSrv->pcLocalSock); break; case PROP_ALLOWED_DBS : g_value_set_string(value, pGmlcMysqlSrv->pcAllowedDbs); break; case PROP_READ_ONLY : g_value_set_boolean(value, pGmlcMysqlSrv->bReadOnly); break; case PROP_WRITE_WARNING : g_value_set_boolean(value, pGmlcMysqlSrv->bWriteWarning); break; case PROP_VERSION : if (pGmlcMysqlSrv->lVersion == 0) { GmlcMysqlQuery * pGmlcMysqlQry = NULL; pGmlcMysqlQry = gmlc_mysql_query_new(pGmlcMysqlSrv, NULL); pGmlcMysqlSrv->lVersion = gmlc_mysql_query_get_version(pGmlcMysqlQry); g_object_unref(G_OBJECT(pGmlcMysqlQry)); } g_value_set_ulong(value, pGmlcMysqlSrv->lVersion); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); break; } } GmlcMysqlServer * gmlc_mysql_server_new (void) { return GMLC_MYSQL_SERVER(g_object_new (GMLC_MYSQL_TYPE_SERVER, NULL)); } gchar * gmlc_mysql_server_generate_xml_config(GmlcMysqlServer * pGmlcMysqlSrv) { GString * xmlContent = NULL; gchar * pcRet = NULL; xmlContent = g_string_new("\t\n"); g_string_append_printf(xmlContent, "\t\t\n", pGmlcMysqlSrv->pcName); g_string_append_printf(xmlContent, "\t\t\n", pGmlcMysqlSrv->pcHost); g_string_append_printf(xmlContent, "\t\t%d\n", pGmlcMysqlSrv->iPort); g_string_append_printf(xmlContent, "\t\t\n", pGmlcMysqlSrv->pcLogin); g_string_append_printf(xmlContent, "\t\t\n", pGmlcMysqlSrv->pcPassword); if (pGmlcMysqlSrv->pcAllowedDbs != NULL) { g_string_append_printf(xmlContent, "\t\t\n", pGmlcMysqlSrv->pcAllowedDbs); } else { g_string_append_printf(xmlContent, "\t\t\n"); } if (pGmlcMysqlSrv->pcLocalSock != NULL) { g_string_append_printf(xmlContent, "\t\t\n", pGmlcMysqlSrv->pcLocalSock); } else { g_string_append_printf(xmlContent, "\t\t\n"); } g_string_append(xmlContent, "\t\t\n"); if (pGmlcMysqlSrv->bReadOnly) { g_string_append_printf(xmlContent, "\t\t\t\n"); } if (pGmlcMysqlSrv->bWriteWarning) { g_string_append_printf(xmlContent, "\t\t\t\n"); } g_string_append(xmlContent, "\t\t\n\t\n"); pcRet = g_strdup(xmlContent->str); g_string_free(xmlContent, TRUE); return pcRet; } GArray * gmlc_mysql_server_databases_name_list (GmlcMysqlServer * pGmlcMysqlSrv, gboolean bUpdateList) { GArray * arList = NULL; void internal_gmlc_mysql_server_database_name_list_append_name (gpointer key, gpointer value, gpointer user_data) { gchar * pcName = (gchar *) key; GArray * arList = (GArray *) user_data; UNUSED_VAR(value); g_array_append_val(arList, pcName); } if (bUpdateList) { gmlc_mysql_server_update_databases_list(pGmlcMysqlSrv); } arList = g_array_new(TRUE, TRUE, sizeof(gchar *)); g_hash_table_foreach(pGmlcMysqlSrv->htbDatabases, &internal_gmlc_mysql_server_database_name_list_append_name, arList); return arList; } gboolean gmlc_mysql_server_update_databases_list(GmlcMysqlServer * pGmlcMysqlSrv) { GmlcMysqlDatabase * pGmlcMysqlDb = NULL; GmlcMysqlQuery * pGmlcMysqlQry = NULL; GArray * arListDb = NULL; GArray * arRow = NULL; gchar * pcName = NULL; gint i = 0; pGmlcMysqlQry = gmlc_mysql_query_new (pGmlcMysqlSrv, NULL); if (gmlc_mysql_query_execute(pGmlcMysqlQry, "SHOW DATABASES;", 15, TRUE)) { arListDb = g_array_new(TRUE, TRUE, sizeof(gchar *)); while ((arRow = gmlc_mysql_query_next_record(pGmlcMysqlQry)) != NULL) { pcName = g_array_index(arRow, gchar *, 0); g_array_append_val(arListDb, pcName); g_array_free(arRow, TRUE); } } g_object_unref(pGmlcMysqlQry); if (arListDb != NULL) { gmlc_misc_hash_table_set_all_flag(pGmlcMysqlSrv->htbDatabases, FALSE); for (i = 0; i < arListDb->len; i++) { pcName = g_array_index(arListDb, gchar *, i); pGmlcMysqlDb = GMLC_MYSQL_DATABASE(g_hash_table_lookup(pGmlcMysqlSrv->htbDatabases, pcName)); if (pGmlcMysqlDb == NULL) { pGmlcMysqlDb = gmlc_mysql_database_new(pGmlcMysqlSrv, pcName); g_hash_table_insert(pGmlcMysqlSrv->htbDatabases, g_strdup(pcName), pGmlcMysqlDb); } g_object_set(G_OBJECT(pGmlcMysqlDb), "flagged", TRUE, NULL); g_free(pcName); } gmlc_misc_hash_table_remove_unflag_object(pGmlcMysqlSrv->htbDatabases); g_array_free(arListDb, TRUE); } return TRUE; } GmlcMysqlDatabase * gmlc_mysql_server_get_database(GmlcMysqlServer * pGmlcMysqlSrv, const gchar * pcName) { g_return_val_if_fail(pcName != NULL, NULL); return GMLC_MYSQL_DATABASE(g_hash_table_lookup(pGmlcMysqlSrv->htbDatabases, pcName)); } gmysqlcc-0.3.0/src/Makefile.in0000644000175000017500000004036210757562667013143 00000000000000# Makefile.in generated by automake 1.10.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 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@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@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@ bin_PROGRAMS = gmysqlcc$(EXEEXT) subdir = src DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(bindir)" binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) am_gmysqlcc_OBJECTS = gmlc_gui_helpers.$(OBJEXT) \ gmlc_gui_connexions.$(OBJEXT) gmlc_gui_server.$(OBJEXT) \ gmlc_gui_server_tab.$(OBJEXT) \ gmlc_gui_server_tab_data.$(OBJEXT) \ gmlc_gui_server_tab_help.$(OBJEXT) \ gmlc_gui_server_tab_query.$(OBJEXT) gmlc_main.$(OBJEXT) \ gmlc_misc_config.$(OBJEXT) gmlc_misc_hashtable.$(OBJEXT) \ gmlc_mysql_structure.$(OBJEXT) gmlc_mysql_server.$(OBJEXT) \ gmlc_mysql_query.$(OBJEXT) gmlc_mysql_database.$(OBJEXT) \ gmlc_mysql_table.$(OBJEXT) gmlc_mysql_view.$(OBJEXT) \ gmlc_mysql_procedure.$(OBJEXT) gmlc_mysql_function.$(OBJEXT) gmysqlcc_OBJECTS = $(am_gmysqlcc_OBJECTS) am__DEPENDENCIES_1 = gmysqlcc_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) gmysqlcc_LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(gmysqlcc_LDFLAGS) \ $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(gmysqlcc_SOURCES) DIST_SOURCES = $(gmysqlcc_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GTKSourceView_CFLAGS = @GTKSourceView_CFLAGS@ GTKSourceView_LIBS = @GTKSourceView_LIBS@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MYSQLCFG = @MYSQLCFG@ MySQLc_CFLAGS = @MySQLc_CFLAGS@ MySQLc_LIBS = @MySQLc_LIBS@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ 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@ 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_builddir = @top_builddir@ top_srcdir = @top_srcdir@ INCLUDES = \ $(GTK_CFLAGS) \ $(GTKSourceView_CFLAGS) \ $(MySQLc_CFLAGS) AM_CFLAGS = \ -Wall gmysqlcc_SOURCES = \ gmlc_gui_helpers.c\ gmlc_gui_helpers.h\ gmlc_gui_connexions.c\ gmlc_gui_connexions.h\ gmlc_gui_server.c\ gmlc_gui_server.h\ gmlc_gui_server_tab.c\ gmlc_gui_server_tab.h\ gmlc_gui_server_tab_data.c\ gmlc_gui_server_tab_data.h\ gmlc_gui_server_tab_help.c\ gmlc_gui_server_tab_help.h\ gmlc_gui_server_tab_query.c\ gmlc_gui_server_tab_query.h\ gmlc_main.h\ gmlc_main.c\ gmlc_misc_config.c\ gmlc_misc_config.h\ gmlc_misc_hashtable.c\ gmlc_misc_hashtable.h\ gmlc_mysql_structure.c\ gmlc_mysql_structure.h\ gmlc_mysql_server.c\ gmlc_mysql_server.h\ gmlc_mysql_query.c\ gmlc_mysql_query.h\ gmlc_mysql_database.c\ gmlc_mysql_database.h\ gmlc_mysql_table.c\ gmlc_mysql_table.h\ gmlc_mysql_view.c\ gmlc_mysql_view.h\ gmlc_mysql_procedure.c\ gmlc_mysql_procedure.h\ gmlc_mysql_function.c\ gmlc_mysql_function.h gmysqlcc_LDFLAGS = gmysqlcc_LDADD = \ $(GTK_LIBS) \ $(GTKSourceView_LIBS) \ $(MySQLc_LIBS) all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(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 \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu src/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 install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ else :; fi; \ done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ rm -f "$(DESTDIR)$(bindir)/$$f"; \ done clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) gmysqlcc$(EXEEXT): $(gmysqlcc_OBJECTS) $(gmysqlcc_DEPENDENCIES) @rm -f gmysqlcc$(EXEEXT) $(gmysqlcc_LINK) $(gmysqlcc_OBJECTS) $(gmysqlcc_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gmlc_gui_connexions.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gmlc_gui_helpers.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gmlc_gui_server.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gmlc_gui_server_tab.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gmlc_gui_server_tab_data.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gmlc_gui_server_tab_help.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gmlc_gui_server_tab_query.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gmlc_main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gmlc_misc_config.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gmlc_misc_hashtable.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gmlc_mysql_database.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gmlc_mysql_function.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gmlc_mysql_procedure.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gmlc_mysql_query.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gmlc_mysql_server.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gmlc_mysql_structure.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gmlc_mysql_table.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gmlc_mysql_view.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags 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 $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$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 $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-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) 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-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-exec-am: install-binPROGRAMS install-html: install-html-am install-info: install-info-am install-man: install-pdf: install-pdf-am install-ps: install-ps-am installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic ctags distclean distclean-compile \ distclean-generic distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-binPROGRAMS \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am 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-compile \ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-binPROGRAMS # 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: gmysqlcc-0.3.0/src/gmlc_misc_hashtable.h0000644000175000017500000000230610755301563015173 00000000000000/* * 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 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, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __GMLC_MISC_HASHTABLE_H__ #define __GMLC_MISC_HASHTABLE_H__ #include #include #define UNUSED_VAR(x) (x = x) G_BEGIN_DECLS gboolean gmlc_misc_hash_table_set_flag(GHashTable * htbLstObjects, gpointer pValue, gboolean bNewValue); gboolean gmlc_misc_hash_table_set_all_flag(GHashTable * htbLstObjects, gboolean bNewValue); gboolean gmlc_misc_hash_table_remove_unflag_object(GHashTable * htbLstObjects); G_END_DECLS #endif /* __GMLC_MISC_HASHTABLE_H__ */ gmysqlcc-0.3.0/src/gmlc_gui_server_tab_help.h0000644000175000017500000000454010755301563016237 00000000000000/* * 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 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, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __GMLC_GUI_SERVER_TAB_HELP_H__ #define __GMLC_GUI_SERVER_TAB_HELP_H__ #include "gmlc_main.h" #include "gmlc_gui_server.h" #include "gmlc_mysql_server.h" G_BEGIN_DECLS #define GMLC_GUI_TYPE_SERVER_TAB_HELP (gmlc_gui_server_tab_help_get_type ()) #define GMLC_GUI_SERVER_TAB_HELP(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GMLC_GUI_TYPE_SERVER_TAB_HELP, GmlcGuiServerTabHelp)) #define GMLC_GUI_SERVER_TAB_HELP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GMLC_GUI_TYPE_SERVER_TAB_HELP, GmlcGuiServerTabHelpClass)) #define GMLC_IS_GUI_SERVER_TAB_HELP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GMLC_GUI_TYPE_SERVER_TAB_HELP)) #define GMLC_IS_GUI_SERVER_TAB_HELP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GMLC_GUI_TYPE_SERVER_TAB_HELP)) #define GMLC_GET_GUI_SERVER_TAB_HELP_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GMLC_GUI_TYPE_SERVER_TAB_HELP, GmlcGuiServerTabHelpClass)) typedef struct _GmlcGuiServerTabHelp GmlcGuiServerTabHelp; typedef struct _GmlcGuiServerTabHelpClass GmlcGuiServerTabHelpClass; struct _GmlcGuiServerTabHelp { GtkVBox parent; /* private members */ GmlcMysqlServer * pGmlcMysqlSrv; GmlcGuiServer * pGmlcGuiSrv; /* Help Part */ GtkWidget * trvHelpCategories; GtkWidget * txtHelpSearchKeyword; GtkWidget * trvHelpTopics; GtkWidget * txvHelpTopic; gint iCurrentCategory; gint iCurrentTopic; }; struct _GmlcGuiServerTabHelpClass { GtkVBoxClass parent_class; /* define vtable methods and signals here */ }; GType gmlc_gui_server_tab_help_get_type (void); GmlcGuiServerTabHelp * gmlc_gui_server_tab_help_new (GmlcGuiServer * pGmlcGuiSrv); G_END_DECLS #endif /* __GMLC_GUI_SERVER_TAB_HELP_H__ */ gmysqlcc-0.3.0/src/gmlc_gui_connexions.h0000644000175000017500000000441310755301563015255 00000000000000/* * 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 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, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __GMLC_GUI_CONNEXIONS_H__ #define __GMLC_GUI_CONNEXIONS_H__ #include "gmlc_main.h" #include "gmlc_mysql_server.h" G_BEGIN_DECLS #define GMLC_GUI_TYPE_CONNEXIONS (gmlc_gui_connexions_get_type ()) #define GMLC_GUI_CONNEXIONS(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GMLC_GUI_TYPE_CONNEXIONS, GmlcGuiConnexions)) #define GMLC_GUI_CONNEXIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GMLC_GUI_TYPE_CONNEXIONS, GmlcGuiConnexionsClass)) #define GMLC_IS_GUI_CONNEXIONS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GMLC_GUI_TYPE_CONNEXIONS)) #define GMLC_IS_GUI_CONNEXIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GMLC_GUI_TYPE_CONNEXIONS)) #define GMLC_GET_GUI_CONNEXIONS_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GMLC_GUI_TYPE_CONNEXIONS, GmlcGuiConnexionsClass)) typedef struct _GmlcGuiConnexions GmlcGuiConnexions; typedef struct _GmlcGuiConnexionsClass GmlcGuiConnexionsClass; struct _GmlcGuiConnexions { GtkWindow parent; /* private members */ GtkWidget * txtName; GtkWidget * txtHost; GtkWidget * txtPort; GtkWidget * txtLogin; GtkWidget * txtPasswd; GtkWidget * txtAllowedDb; GtkWidget * txtLocalSock; GtkWidget * chkReadOnly; GtkWidget * chkWriteWarning; GtkWidget * lstListHosts; GtkWidget * vbxEditPart; gboolean bShowEditPart; GmlcMysqlServer * pCurrMysqlSrv; }; struct _GmlcGuiConnexionsClass { GtkWindowClass parent_class; /* define vtable methods and signals here */ }; GType gmlc_gui_connexions_get_type (void); GmlcGuiConnexions * gmlc_gui_connexions_new (); G_END_DECLS #endif /* __GMLC_GUI_CONNEXIONS_H__ */ gmysqlcc-0.3.0/src/gmlc_mysql_query.h0000644000175000017500000000661410755301562014624 00000000000000/* * 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 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, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __GMLC_MYSQL_QUERY_H__ #define __GMLC_MYSQL_QUERY_H__ #include #include #include #include "gmlc_mysql_server.h" #define UNUSED_VAR(x) (x = x) G_BEGIN_DECLS #define GMLC_MYSQL_TYPE_QUERY (gmlc_mysql_query_get_type ()) #define GMLC_MYSQL_QUERY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GMLC_MYSQL_TYPE_QUERY, GmlcMysqlQuery)) #define GMLC_MYSQL_QUERY_CLASS(obj) (G_TYPE_CHECK_CLASS_CAST ((obj), GMLC_MYSQL_TYPE_QUERY, GmlcMysqlQueryClass)) #define GMLC_MYSQL_IS_QUERY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GMLC_MYSQL_TYPE_QUERY)) #define GMLC_MYSQL_IS_QUERY_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE ((obj), GMLC_MYSQL_TYPE_QUERY)) #define GMLC_MYSQL_QUERY_GET_CLASS (G_TYPE_INSTANCE_GET_CLASS ((obj), GMLC_MYSQL_TYPE_QUERY, GmlcMysqlQueryClass)) typedef struct _GmlcMysqlQuery GmlcMysqlQuery; typedef struct _GmlcMysqlQueryClass GmlcMysqlQueryClass; struct _GmlcMysqlQuery { GObject parent; /* private */ /* Query Infos */ gchar * pcQuery; gsize szQuery; /* Result Infos */ gint iErrCode; gchar * pcErrMsg; gint iEditResult; gint iNbField; gboolean bNoRecord; /* Connection Infos */ GmlcMysqlServer * pGmlcMysqlSrv; gchar * pcDbName; /* Mysql Infos */ MYSQL * pMysqlLink; MYSQL_RES * pMysqlResult; MYSQL_FIELD * pMysqlHeaders; GArray * arMysqlHeaders; gchar * pcSrvCharset; gulong lVersion; }; struct _GmlcMysqlQueryClass { GObjectClass parent_class; /* class members */ }; GType gmlc_mysql_query_get_type (void); gboolean gmlc_tools_query_is_read_query(const gchar * pcQuery, gsize szQuery); void gmlc_mysql_query_free_record_content(GArray * arRow); gchar * gmlc_mysql_query_static_get_one_result(GmlcMysqlServer * pGmlcMysqlSrv, const gchar * pcDbName, const gchar * pcQuery, const gint iIdxField); GmlcMysqlQuery * gmlc_mysql_query_new (GmlcMysqlServer * pGmlcMysqlSrv, const gchar * pcDbName); gulong gmlc_mysql_query_get_version(GmlcMysqlQuery * pGmlcMysqlQry); gchar * gmlc_mysql_query_get_current_charset(GmlcMysqlQuery * pGmlcMysqlQry); gboolean gmlc_mysql_query_execute(GmlcMysqlQuery * pGmlcMysqlQry, const gchar * pcQuery, gsize szQuery, gboolean bForceWrite); gboolean gmlc_mysql_query_have_record(GmlcMysqlQuery * pGmlcMysqlQry); GArray * gmlc_mysql_query_next_record(GmlcMysqlQuery * pGmlcMysqlQry); gboolean gmlc_mysql_query_have_more_result(GmlcMysqlQuery * pGmlcMysqlQry); gboolean gmlc_mysql_query_goto_next_result(GmlcMysqlQuery * pGmlcMysqlQry); gboolean gmlc_mysql_query_free_result (GmlcMysqlQuery * pGmlcMysqlQry); GArray * gmlc_mysql_query_get_headers(GmlcMysqlQuery * pGmlcMysqlQry); G_END_DECLS #endif /* __GMLC_MYSQL_QUERY_H__ */ gmysqlcc-0.3.0/src/gmlc_mysql_query.c0000644000175000017500000005717710755301562014631 00000000000000/* * 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 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, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "gmlc_mysql_query.h" #include #include static void gmlc_mysql_query_finalize (GmlcMysqlQuery * pGmlcMysqlQry); static void gmlc_mysql_query_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec); static void gmlc_mysql_query_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec); static gboolean gmlc_mysql_query_connect(GmlcMysqlQuery * pGmlcMysqlQry); void gmlc_mysql_query_read_error(GmlcMysqlQuery * pGmlcMysqlQry, gboolean bClearOnly); enum { PROP_0, PROP_RAW_HEADERS, PROP_SERVER, PROP_QUERY, PROP_SRV_CHARSET, PROP_DB_NAME, PROP_ERR_MSG, PROP_ABS_TABLE_NAME, PROP_TABLE_NAME, PROP_NB_FIELD, PROP_EDIT_RESULT, PROP_ERR_CODE, PROP_CAN_EDIT }; G_DEFINE_TYPE (GmlcMysqlQuery, gmlc_mysql_query, G_TYPE_OBJECT); gboolean gmlc_tools_query_is_read_query(const gchar * pcQuery, gsize szQuery) { GString * pstrWord = NULL; gchar * pcQueryUp = NULL, * pcTmp = NULL, * pcPrevTmp = NULL; gunichar ucChar = 0; gsize szPos = 0; gboolean bReturn = TRUE; gboolean bEndLoop, bFirstWord, bInString; pcQueryUp = g_utf8_strup(pcQuery, szQuery); if (pcQueryUp == NULL) { return FALSE; } if (!g_utf8_validate(pcQueryUp, szQuery, NULL)) { return FALSE; } /*g_print("Test query (%d) : '%s'\n", szQuery, pcQueryUp);*/ pcTmp = pcQueryUp; pstrWord = g_string_sized_new(16); bFirstWord = TRUE; bEndLoop = FALSE; bInString = FALSE; szPos = 0; while (!bEndLoop && szPos < szQuery) { ucChar = g_utf8_get_char(pcTmp); /*g_print("Current (%d/%d) '%c' : '%s'\n", szPos, szQuery, *pcTmp, pcTmp);*/ if (bFirstWord) { if (!g_unichar_isspace(ucChar)) { g_string_append_unichar(pstrWord, ucChar); } else if (g_unichar_isspace(ucChar) && pstrWord->len == 0) { /* Do nothing ! */ } else { /* Check word */ gboolean bReadCmd = FALSE; /*g_print("**** Checked first word : '%s' : ", pstrWord->str);*/ if (g_ascii_strncasecmp(pstrWord->str, "SELECT", 6) == 0) { bReadCmd = TRUE; } else if (g_ascii_strncasecmp(pstrWord->str, "SHOW", 4) == 0) { bReadCmd = TRUE; } else if (g_ascii_strncasecmp(pstrWord->str, "EXPLAIN", 7) == 0) { bReadCmd = TRUE; } else if (g_ascii_strncasecmp(pstrWord->str, "DESCRIBE", 8) == 0) { bReadCmd = TRUE; } else if (g_ascii_strncasecmp(pstrWord->str, "#", 1) == 0) { /* Comments */ bReadCmd = TRUE; while (*pcTmp != '\n') { pcTmp = g_utf8_next_char(pcTmp); szPos ++; } } if (!bReadCmd) { bReturn = FALSE; bEndLoop = TRUE; } /*g_print("- Word status : %s - Global status : %s ****\n", ((bReadCmd) ? "True" : "False"), ((bReturn) ? "True" : "False"));*/ bFirstWord = FALSE; } } else if ((*pcTmp) == ';' && !bInString) { g_string_set_size(pstrWord, 0); bFirstWord = TRUE; } else if (((*pcTmp) == '\'' || (*pcTmp) == '"') && (*pcPrevTmp) != '\\') { bInString = !bInString; /*g_print("In a string : %s\n", ((bInString) ? "True" : "False"));*/ } pcPrevTmp = pcTmp; pcTmp = g_utf8_next_char(pcTmp); szPos ++; } /*g_print("Returned value : %s\n", ((bReturn) ? "True" : "False"));*/ g_free (pcQueryUp); return bReturn; } gchar * gmlc_tools_query_get_one_result(MYSQL * pMysqlLink, const gchar * pcCharset, const gchar * pcQuery, const gint iIdxField) { MYSQL_RES * pMysqlResult = NULL; MYSQL_ROW pCurrRow = NULL; GError * oErr = NULL; gulong * arlLengths = NULL; gchar * pcRet = NULL, * pcConvQuery = NULL; gint iErrCode = 0, iNbrField = 0; if (pMysqlLink == NULL) { return NULL; } pcConvQuery = g_convert(pcQuery, -1, pcCharset, "UTF-8", NULL, NULL, &oErr); if (pcConvQuery == NULL && oErr != NULL) { g_printerr("gmlc_tools_query_get_one_result - g_convert - Failed to convert query\nQuery : '%s'\nError: (%d) %s\n", pcQuery, oErr->code, oErr->message); } iErrCode = mysql_real_query(pMysqlLink, pcConvQuery, strlen(pcConvQuery)); if (iErrCode != 0) { g_printerr("gmlc_tools_query_get_one_result - mysql_real_query - Failed to query\nQuery : '%s'\nError: (%d - %d) %s\n", pcQuery, iErrCode, mysql_errno(pMysqlLink), mysql_error(pMysqlLink)); return NULL; } iNbrField = mysql_field_count(pMysqlLink); if (iErrCode != 0 && iNbrField < 0) { g_printerr("gmlc_tools_query_get_one_result - mysql_field_count - Failed to query\nQuery : '%s'\nError: (%d - %d) %s\n", pcQuery, iErrCode, mysql_errno(pMysqlLink), mysql_error(pMysqlLink)); return NULL; } else if (iErrCode == 0 && iNbrField == 0) { /*mysql_qry->editResult = mysql_affected_rows(mysql_qry->mysql_link);*/ return NULL; } pMysqlResult = mysql_use_result(pMysqlLink); if (pMysqlResult == (MYSQL_RES *)NULL) { g_printerr("gmlc_tools_query_get_one_result - mysql_use_result - Failed to use results\nQuery : '%s'\nError: (%d) %s\n", pcQuery, mysql_errno(pMysqlLink), mysql_error(pMysqlLink)); return NULL; } pCurrRow = mysql_fetch_row(pMysqlResult); if (pCurrRow == NULL) { g_printerr("gmlc_tools_query_get_one_result - mysql_fetch_row - Failed to use results\nQuery : '%s'\nError: (%d) %s\n", pcQuery, mysql_errno(pMysqlLink), mysql_error(pMysqlLink)); mysql_free_result(pMysqlResult); return NULL; } arlLengths = mysql_fetch_lengths(pMysqlResult); pcRet = g_convert(pCurrRow[iIdxField], arlLengths[iIdxField], "UTF-8", pcCharset, NULL, NULL, &oErr); if (pcRet == NULL && oErr != NULL) { g_printerr("gmlc_tools_query_get_one_result - g_convert - Failed to convert result \nQuery : '%s'\nError: (%d) %s\n", pcQuery, oErr->code, oErr->message); } mysql_free_result(pMysqlResult); return pcRet; } static void gmlc_mysql_query_class_init (GmlcMysqlQueryClass * pClass) { GObjectClass *pObjClass = G_OBJECT_CLASS(pClass); pObjClass->finalize = (GObjectFinalizeFunc) gmlc_mysql_query_finalize; pObjClass->get_property = gmlc_mysql_query_get_property; pObjClass->set_property = gmlc_mysql_query_set_property; g_object_class_install_property(pObjClass, PROP_SERVER, g_param_spec_object("server", "Server object", "Server object", GMLC_MYSQL_TYPE_SERVER, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); g_object_class_install_property(pObjClass, PROP_QUERY, g_param_spec_string("query", "Query string", "Sql Query string", "", G_PARAM_READABLE)); g_object_class_install_property(pObjClass, PROP_SRV_CHARSET, g_param_spec_string("srv_charset", "Server charset", "Charset used on server", "", G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); g_object_class_install_property(pObjClass, PROP_DB_NAME, g_param_spec_string("db_name", "Database name", "Name of the database", "", G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); g_object_class_install_property(pObjClass, PROP_ERR_MSG, g_param_spec_string("err_msg", "Error message", "Error message", "", G_PARAM_READABLE)); g_object_class_install_property(pObjClass, PROP_ERR_CODE, g_param_spec_int("err_code", "Error code", "Munerical code of error", 0, 65535, 0, G_PARAM_READABLE)); } static void gmlc_mysql_query_init (GmlcMysqlQuery * pGmlcMysqlQry) { pGmlcMysqlQry->pGmlcMysqlSrv = NULL;/* r-c */ pGmlcMysqlQry->pMysqlLink = NULL; /* --- */ pGmlcMysqlQry->pMysqlResult = NULL; /* --- */ pGmlcMysqlQry->pcQuery = NULL; /* r-- */ pGmlcMysqlQry->pcDbName = NULL; /* r-c */ pGmlcMysqlQry->pcErrMsg = NULL; /* r-- */ pGmlcMysqlQry->iErrCode = 0; /* r-- */ pGmlcMysqlQry->iEditResult = 0; /* r-- */ pGmlcMysqlQry->bNoRecord = FALSE; /* r-- */ pGmlcMysqlQry->lVersion = 0; /* r-- */ pGmlcMysqlQry->pcSrvCharset = NULL; /* r-c */ pGmlcMysqlQry->pMysqlHeaders = NULL; /* --- */ pGmlcMysqlQry->arMysqlHeaders = NULL; } static void gmlc_mysql_query_finalize (GmlcMysqlQuery * pGmlcMysqlQry) { /* Close DB connection */ if (pGmlcMysqlQry->pMysqlLink != NULL) { mysql_close(pGmlcMysqlQry->pMysqlLink); } /* Release pointers */ gmlc_mysql_query_read_error(pGmlcMysqlQry, TRUE); g_free(pGmlcMysqlQry->pcDbName); g_free(pGmlcMysqlQry->pcSrvCharset); g_free(pGmlcMysqlQry->pcQuery); } static void gmlc_mysql_query_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec) { GmlcMysqlQuery * pGmlcMysqlQry = GMLC_MYSQL_QUERY(object); switch (prop_id) { case PROP_SERVER : pGmlcMysqlQry->pGmlcMysqlSrv = g_value_get_object(value); break; case PROP_SRV_CHARSET: /*g_free(pGmlcMysqlQry->pcSrvCharset); pGmlcMysqlQry->pcSrvCharset = g_value_dup_string(value);*/ break; case PROP_DB_NAME : g_free(pGmlcMysqlQry->pcDbName); pGmlcMysqlQry->pcDbName = g_value_dup_string(value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); break; } } static void gmlc_mysql_query_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec) { GmlcMysqlQuery * pGmlcMysqlQry = GMLC_MYSQL_QUERY(object); UNUSED_VAR(pGmlcMysqlQry); switch (prop_id) { default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); break; } } GmlcMysqlQuery * gmlc_mysql_query_new (GmlcMysqlServer * pGmlcMysqlSrv, const gchar * pcDbName) { GmlcMysqlQuery * pGmlcMysqlQry = NULL; pGmlcMysqlQry = GMLC_MYSQL_QUERY(g_object_new (GMLC_MYSQL_TYPE_QUERY, "server", GMLC_MYSQL_SERVER(pGmlcMysqlSrv), "db_name", pcDbName, NULL)); gmlc_mysql_query_get_version(pGmlcMysqlQry); //gmlc_mysql_query_get_current_charset(pGmlcMysqlQry); return pGmlcMysqlQry; } gchar * gmlc_mysql_query_static_get_one_result(GmlcMysqlServer * pGmlcMysqlSrv, const gchar * pcDbName, const gchar * pcQuery, const gint iIdxField) { GmlcMysqlQuery * pGmlcMysqlQry = NULL; gchar * pcRetValue = NULL; pGmlcMysqlQry = gmlc_mysql_query_new(pGmlcMysqlSrv, pcDbName); g_return_val_if_fail(pGmlcMysqlQry != NULL, NULL); if (pGmlcMysqlQry->pMysqlLink == NULL) { gmlc_mysql_query_connect(pGmlcMysqlQry); } g_return_val_if_fail(pGmlcMysqlQry->pMysqlLink != NULL, NULL); pcRetValue = gmlc_tools_query_get_one_result(pGmlcMysqlQry->pMysqlLink, pGmlcMysqlQry->pcSrvCharset, pcQuery, iIdxField); g_object_unref(pGmlcMysqlQry); return pcRetValue; } static gboolean gmlc_mysql_query_connect(GmlcMysqlQuery * pGmlcMysqlQry) { gint iRet = 0; g_return_val_if_fail(pGmlcMysqlQry != NULL, FALSE); if (pGmlcMysqlQry->pMysqlLink != NULL) { return TRUE; } pGmlcMysqlQry->pMysqlLink = mysql_init(NULL); if (pGmlcMysqlQry->pMysqlLink == NULL) { gmlc_mysql_query_read_error(pGmlcMysqlQry, TRUE); pGmlcMysqlQry->iErrCode = -1; pGmlcMysqlQry->pcErrMsg = g_strdup("**** Can't prepare mysql connection ****"); g_printerr("Failed to connect to database: Error (%d) : %s\n", pGmlcMysqlQry->iErrCode, pGmlcMysqlQry->pcErrMsg); return FALSE; } if (!mysql_real_connect(pGmlcMysqlQry->pMysqlLink, pGmlcMysqlQry->pGmlcMysqlSrv->pcHost, pGmlcMysqlQry->pGmlcMysqlSrv->pcLogin, pGmlcMysqlQry->pGmlcMysqlSrv->pcPassword, pGmlcMysqlQry->pcDbName, pGmlcMysqlQry->pGmlcMysqlSrv->iPort, pGmlcMysqlQry->pGmlcMysqlSrv->pcLocalSock, CLIENT_MULTI_STATEMENTS) ) { gmlc_mysql_query_read_error(pGmlcMysqlQry, FALSE); pGmlcMysqlQry->pMysqlLink = NULL; g_printerr("Failed to connect to database: Error (%d) : %s\n", pGmlcMysqlQry->iErrCode, pGmlcMysqlQry->pcErrMsg); return FALSE; } pGmlcMysqlQry->pcSrvCharset = NULL; iRet = mysql_set_character_set(pGmlcMysqlQry->pMysqlLink, "utf8"); if (iRet != 0) { g_printerr("Failed to set the connection's caracter set to 'utf8' - '%d'\n", iRet); gmlc_mysql_query_get_current_charset(pGmlcMysqlQry); } else { MY_CHARSET_INFO cs; mysql_get_character_set_info(pGmlcMysqlQry->pMysqlLink, &cs); g_print("collation name: %s\n", cs.csname); pGmlcMysqlQry->pcSrvCharset = g_strdup(cs.csname); } g_print("Charset : '%s'\n", pGmlcMysqlQry->pcSrvCharset); return TRUE; } gboolean gmlc_mysql_query_execute(GmlcMysqlQuery * pGmlcMysqlQry, const gchar * pcQuery, gsize szQuery, gboolean bForceWrite) { GError * oErr = NULL; gchar * pcTmp = NULL; gsize szTmp = 0; gint iErrCode = 0; gboolean bIsReadQuery = FALSE; g_return_val_if_fail(pGmlcMysqlQry != NULL, FALSE); if (pGmlcMysqlQry->pcSrvCharset != NULL) { pcTmp = g_convert(pcQuery, szQuery, pGmlcMysqlQry->pcSrvCharset, "UTF-8", NULL, &szTmp, &oErr); if (pcTmp == NULL && oErr != NULL) { g_printerr("gmlc_mysql_query_execute - g_convert - Failed to convert query\nQuery : '%s'\nError: (%d) %s\n", pcQuery, oErr->code, oErr->message); return FALSE; } } else { pcTmp = g_strndup(pcQuery, szQuery); szTmp = szQuery; } g_free(pGmlcMysqlQry->pcQuery); pGmlcMysqlQry->pcQuery = pcTmp; pGmlcMysqlQry->szQuery = szTmp; gmlc_mysql_query_connect(pGmlcMysqlQry); if (pGmlcMysqlQry->pMysqlLink == NULL) { return FALSE; } bIsReadQuery = gmlc_tools_query_is_read_query(pGmlcMysqlQry->pcQuery, pGmlcMysqlQry->szQuery); if (pGmlcMysqlQry->pGmlcMysqlSrv->bReadOnly && !bIsReadQuery) { gmlc_mysql_query_read_error(pGmlcMysqlQry, TRUE); pGmlcMysqlQry->iErrCode = -1000; pGmlcMysqlQry->pcErrMsg = g_strdup("gmysqlcc : Server in Read-only mode"); return FALSE; } if (pGmlcMysqlQry->pGmlcMysqlSrv->bWriteWarning && !bIsReadQuery) { if (!bForceWrite) { gmlc_mysql_query_read_error(pGmlcMysqlQry, TRUE); pGmlcMysqlQry->iErrCode = -1001; pGmlcMysqlQry->pcErrMsg = g_strdup("gmysqlcc : Server in write warning mode"); return FALSE; } } iErrCode = mysql_real_query(pGmlcMysqlQry->pMysqlLink, pcQuery, szQuery); if (iErrCode != 0) { gmlc_mysql_query_read_error(pGmlcMysqlQry, FALSE); g_printerr("gmlc_mysql_query_execute - mysql_real_query - Failed to query\nQuery : '%s'\nError: (%d - %d) %s\n", pGmlcMysqlQry->pcQuery, iErrCode, pGmlcMysqlQry->iErrCode, pGmlcMysqlQry->pcErrMsg); return FALSE; } pGmlcMysqlQry->iNbField = mysql_field_count(pGmlcMysqlQry->pMysqlLink); if (iErrCode != 0 && pGmlcMysqlQry->iNbField < 0) { gmlc_mysql_query_read_error(pGmlcMysqlQry, FALSE); g_printerr("gmlc_mysql_query_execute - mysql_field_count - Failed to query : '%s'\nError: (%d - %d) %s\n", pGmlcMysqlQry->pcQuery, iErrCode, pGmlcMysqlQry->iErrCode, pGmlcMysqlQry->pcErrMsg); return FALSE; } else if (iErrCode == 0 && pGmlcMysqlQry->iNbField == 0) { pGmlcMysqlQry->iEditResult = mysql_affected_rows(pGmlcMysqlQry->pMysqlLink); pGmlcMysqlQry->bNoRecord = TRUE; gmlc_mysql_query_read_error(pGmlcMysqlQry, TRUE); return TRUE; } return TRUE; } gboolean gmlc_mysql_query_have_record(GmlcMysqlQuery * pGmlcMysqlQry) { g_return_val_if_fail(pGmlcMysqlQry != NULL, FALSE); return (!pGmlcMysqlQry->bNoRecord); } GArray * gmlc_mysql_query_next_record(GmlcMysqlQuery * pGmlcMysqlQry) { GArray * arRecordValue = NULL; GError * oErr = NULL; MYSQL_ROW pCurrRow; gchar * pcConverted = NULL; gulong * arlSizes = NULL; gsize szConverted = 0; int i = 0; g_return_val_if_fail(pGmlcMysqlQry != NULL, FALSE); if (pGmlcMysqlQry->pMysqlResult == NULL) { if (pGmlcMysqlQry->bNoRecord) { gmlc_mysql_query_read_error(pGmlcMysqlQry, TRUE); return NULL; } pGmlcMysqlQry->pMysqlResult = mysql_use_result(pGmlcMysqlQry->pMysqlLink); if (pGmlcMysqlQry->pMysqlResult == NULL) { gmlc_mysql_query_read_error(pGmlcMysqlQry, FALSE); g_printerr("gmlc_mysql_query_next_record - mysql_use_result - Failed\nQuery : '%s'\nError: (%d) %s\n", pGmlcMysqlQry->pcQuery, pGmlcMysqlQry->iErrCode, pGmlcMysqlQry->pcErrMsg); return NULL; } pGmlcMysqlQry->pMysqlHeaders = mysql_fetch_fields(pGmlcMysqlQry->pMysqlResult); if (pGmlcMysqlQry->pMysqlHeaders == NULL) { gmlc_mysql_query_read_error(pGmlcMysqlQry, FALSE); g_printerr("gmlc_mysql_query_execute - mysql_fetch_fields - Failed to query : '%s'\nError: (%d) %s\n", pGmlcMysqlQry->pcQuery, pGmlcMysqlQry->iErrCode, pGmlcMysqlQry->pcErrMsg); } pGmlcMysqlQry->bNoRecord = FALSE; } pCurrRow = mysql_fetch_row(pGmlcMysqlQry->pMysqlResult); if (pCurrRow == NULL) { gmlc_mysql_query_read_error(pGmlcMysqlQry, FALSE); if (pGmlcMysqlQry->iErrCode != 0) { g_printerr("gmlc_mysql_query_next_record - mysql_fetch_row - Failed\nQuery : '%s'\nError: (%d) %s\n", pGmlcMysqlQry->pcQuery, pGmlcMysqlQry->iErrCode, pGmlcMysqlQry->pcErrMsg); } return NULL; } arlSizes = mysql_fetch_lengths(pGmlcMysqlQry->pMysqlResult); if (pCurrRow == NULL) { gmlc_mysql_query_read_error(pGmlcMysqlQry, FALSE); g_printerr("gmlc_mysql_query_next_record - mysql_fetch_lengths - Failed\nQuery : '%s'\nError: (%d) %s\n", pGmlcMysqlQry->pcQuery, pGmlcMysqlQry->iErrCode, pGmlcMysqlQry->pcErrMsg); return NULL; } arRecordValue = g_array_sized_new (FALSE, TRUE, sizeof (gchar *), pGmlcMysqlQry->iNbField); for(i = 0; i < pGmlcMysqlQry->iNbField; i++) { if (pCurrRow[i] != NULL) { pcConverted = NULL; if (pGmlcMysqlQry->pcSrvCharset != NULL && pGmlcMysqlQry->pMysqlHeaders[i].charsetnr != 63) { pcConverted = g_convert(pCurrRow[i], arlSizes[i], "utf8", pGmlcMysqlQry->pcSrvCharset, NULL, &szConverted, &oErr); g_print("Convert (%d - %s -> utf8) : '%s' -> '%s'\n", pGmlcMysqlQry->pMysqlHeaders[i].charsetnr, pGmlcMysqlQry->pcSrvCharset, pCurrRow[i], pcConverted); if (pcConverted == NULL) { pcConverted = g_strdup("Binary BLOB"); } } else { pcConverted = g_strndup(pCurrRow[i], arlSizes[i]); g_print("NO Convert (%d) : '%s' -> '%s'\n", pGmlcMysqlQry->pMysqlHeaders[i].charsetnr, pCurrRow[i], pcConverted); } } else { pcConverted = g_strdup("NULL"); } g_array_append_val (arRecordValue, pcConverted); } return arRecordValue; } void gmlc_mysql_query_free_record_content(GArray * arRow) { gint i; for (i = 0; i < arRow->len; i++) { g_free(g_array_index(arRow, gchar *, i)); } g_array_free(arRow, TRUE); } GArray * gmlc_mysql_query_get_headers(GmlcMysqlQuery * pGmlcMysqlQry) { MYSQL_FIELD * pField = NULL; GArray * arHeaders = NULL; GError * oErr = NULL; gchar * pcTmp = NULL; gsize szTmp = 0; int i = 0; g_return_val_if_fail(pGmlcMysqlQry != NULL, NULL); if (pGmlcMysqlQry->iNbField == 0) { return NULL; } if (pGmlcMysqlQry->pMysqlHeaders == NULL) { return NULL; } if (pGmlcMysqlQry->arMysqlHeaders == NULL) { pGmlcMysqlQry->arMysqlHeaders = g_array_sized_new (FALSE, TRUE, sizeof (char *), pGmlcMysqlQry->iNbField); for(i = 0; i < pGmlcMysqlQry->iNbField; i++) { pField = &pGmlcMysqlQry->pMysqlHeaders[i]; if (pGmlcMysqlQry->pcSrvCharset != NULL) { pcTmp = g_convert(pField->name, strlen(pField->name), "UTF-8", pGmlcMysqlQry->pcSrvCharset, NULL, &szTmp, &oErr); if (pcTmp == NULL && oErr != NULL) { g_printerr("gmlc_mysql_query_get_headers - g_convert - Failed to convert header\nHeader : '%s'\nError: (%d) %s\n", pField->name, oErr->code, oErr->message); pcTmp = g_strdup(pField->name); } } else { pcTmp = g_strdup(pField->name); } g_array_append_val (pGmlcMysqlQry->arMysqlHeaders, pcTmp); } } arHeaders = g_array_sized_new (FALSE, TRUE, sizeof (char *), pGmlcMysqlQry->iNbField); for(i = 0; i < pGmlcMysqlQry->arMysqlHeaders->len; i++) { pcTmp = g_array_index(pGmlcMysqlQry->arMysqlHeaders, gchar *, i); g_array_append_val (arHeaders, pcTmp); } return arHeaders; } gboolean gmlc_mysql_query_have_more_result(GmlcMysqlQuery * pGmlcMysqlQry) { g_return_val_if_fail(pGmlcMysqlQry != NULL, FALSE); return mysql_more_results(pGmlcMysqlQry->pMysqlLink); } gboolean gmlc_mysql_query_goto_next_result(GmlcMysqlQuery * pGmlcMysqlQry) { gint iNextRes = 0; g_return_val_if_fail(pGmlcMysqlQry != NULL, FALSE); gmlc_mysql_query_free_result(pGmlcMysqlQry); iNextRes = mysql_next_result(pGmlcMysqlQry->pMysqlLink); if (iNextRes < 0) { pGmlcMysqlQry->iEditResult = 0; pGmlcMysqlQry->bNoRecord = TRUE; gmlc_mysql_query_read_error(pGmlcMysqlQry, TRUE); return FALSE; } if (iNextRes > 0) { gmlc_mysql_query_read_error(pGmlcMysqlQry, FALSE); g_printerr("gmlc_mysql_query_goto_next_result - mysql_next_result - Failed\nQuery : '%s'\nError: (%d) %s\n", pGmlcMysqlQry->pcQuery, pGmlcMysqlQry->iErrCode, pGmlcMysqlQry->pcErrMsg); return FALSE; } pGmlcMysqlQry->iNbField = mysql_field_count(pGmlcMysqlQry->pMysqlLink); if (iNextRes > 0 && pGmlcMysqlQry->iNbField < 0) { gmlc_mysql_query_read_error(pGmlcMysqlQry, FALSE); g_printerr("gmlc_mysql_query_goto_next_result - mysql_field_count - Failed to query : '%s'\nError: (%d - %d) %s\n", pGmlcMysqlQry->pcQuery, iNextRes, pGmlcMysqlQry->iErrCode, pGmlcMysqlQry->pcErrMsg); return FALSE; } else if (iNextRes == 0 && pGmlcMysqlQry->iNbField == 0) { pGmlcMysqlQry->iEditResult = mysql_affected_rows(pGmlcMysqlQry->pMysqlLink); pGmlcMysqlQry->bNoRecord = TRUE; gmlc_mysql_query_read_error(pGmlcMysqlQry, TRUE); return TRUE; } return (iNextRes == 0) ? TRUE : FALSE ; } gboolean gmlc_mysql_query_free_result (GmlcMysqlQuery * pGmlcMysqlQry) { gchar * pcTmp = NULL; gint i = 0; g_return_val_if_fail(pGmlcMysqlQry != NULL, FALSE); if (pGmlcMysqlQry->pMysqlResult != NULL || (pGmlcMysqlQry->pMysqlResult == NULL && pGmlcMysqlQry->bNoRecord == TRUE)) { mysql_free_result(pGmlcMysqlQry->pMysqlResult); if (pGmlcMysqlQry->arMysqlHeaders != NULL) { for (i = 0; i < pGmlcMysqlQry->arMysqlHeaders->len; i ++) { pcTmp = g_array_index(pGmlcMysqlQry->arMysqlHeaders, gchar *, i); g_free(pcTmp); } g_array_free(pGmlcMysqlQry->arMysqlHeaders, TRUE); } pGmlcMysqlQry->pMysqlResult = NULL; pGmlcMysqlQry->pMysqlHeaders = NULL; pGmlcMysqlQry->arMysqlHeaders = NULL; pGmlcMysqlQry->iNbField = 0; pGmlcMysqlQry->bNoRecord = FALSE; pGmlcMysqlQry->iEditResult = 0; gmlc_mysql_query_read_error(pGmlcMysqlQry, TRUE); } return TRUE; } gulong gmlc_mysql_query_get_version(GmlcMysqlQuery * pGmlcMysqlQry) { g_return_val_if_fail(pGmlcMysqlQry != NULL, 0); if (pGmlcMysqlQry->lVersion != 0) { return pGmlcMysqlQry->lVersion; } if (pGmlcMysqlQry->pMysqlLink == NULL) { gmlc_mysql_query_connect(pGmlcMysqlQry); } if (pGmlcMysqlQry->pMysqlLink == NULL) { return 0; } pGmlcMysqlQry->lVersion = mysql_get_server_version(pGmlcMysqlQry->pMysqlLink); return pGmlcMysqlQry->lVersion; } gchar * gmlc_mysql_query_get_current_charset(GmlcMysqlQuery * pGmlcMysqlQry) { gchar * pcCharset = NULL; g_return_val_if_fail(pGmlcMysqlQry != NULL, NULL); if (pGmlcMysqlQry->pMysqlLink == NULL) { gmlc_mysql_query_connect(pGmlcMysqlQry); } if (pGmlcMysqlQry->pMysqlLink == NULL) { return NULL; } if (pGmlcMysqlQry->lVersion >= 40100) { pcCharset = gmlc_tools_query_get_one_result(pGmlcMysqlQry->pMysqlLink, "ISO-8859-1", "SHOW VARIABLES LIKE 'character_set_results'", 1); if (pcCharset != NULL) { g_free(pGmlcMysqlQry->pcSrvCharset); pGmlcMysqlQry->pcSrvCharset = pcCharset; } } else { pcCharset = gmlc_tools_query_get_one_result(pGmlcMysqlQry->pMysqlLink, "ISO-8859-1", "SHOW VARIABLES LIKE 'character_set'", 1); if (pcCharset != NULL) { g_free(pGmlcMysqlQry->pcSrvCharset); pGmlcMysqlQry->pcSrvCharset = pcCharset; } } return pGmlcMysqlQry->pcSrvCharset; } void gmlc_mysql_query_read_error(GmlcMysqlQuery * pGmlcMysqlQry, gboolean bClearOnly) { g_return_if_fail(pGmlcMysqlQry != NULL); if (pGmlcMysqlQry->iErrCode < 0) { g_free(pGmlcMysqlQry->pcErrMsg); } if (bClearOnly) { pGmlcMysqlQry->iErrCode = 0; pGmlcMysqlQry->pcErrMsg = NULL; } else { pGmlcMysqlQry->iErrCode = mysql_errno(pGmlcMysqlQry->pMysqlLink); pGmlcMysqlQry->pcErrMsg = (gchar *)mysql_error(pGmlcMysqlQry->pMysqlLink); } } gmysqlcc-0.3.0/src/gmlc_gui_connexions.c0000644000175000017500000007500710755301563015257 00000000000000/* * 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 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, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "gmlc_gui_connexions.h" #include "gmlc_gui_server.h" static void gmlc_gui_connexions_finalize (GmlcGuiConnexions * pGmlcGuiCnxns); static void gmlc_gui_connexions_create_widgets (GmlcGuiConnexions * pGmlcGuiCnxns); static void gmlc_gui_connexions_init_widgets (GmlcGuiConnexions * pGmlcGuiCnxns); void gmlc_gui_connexions_fill_server_list (GmlcGuiConnexions * pGmlcGuiCnxns); void gmlc_gui_connexions_dislpay_current_server (GmlcGuiConnexions * pGmlcGuiCnxns); static gboolean gmlc_gui_connexions_evt_delete (GtkWidget *widget, GdkEvent *event, gpointer user_data); static void gmlc_gui_connexions_evt_destroy(GtkWidget *widget, gpointer user_data); void gmlc_gui_connexions_evt_btnNew_clicked (GtkWidget *widget, gpointer user_data); void gmlc_gui_connexions_evt_btnAdd_clicked (GtkWidget *widget, gpointer user_data); void gmlc_gui_connexions_evt_btnEdit_clicked (GtkWidget *widget, gpointer user_data); void gmlc_gui_connexions_evt_btnDel_clicked (GtkWidget *widget, gpointer user_data); void gmlc_gui_connexions_evt_btnServerUp_clicked (GtkWidget *widget, gpointer user_data); void gmlc_gui_connexions_evt_btnServerDown_clicked (GtkWidget *widget, gpointer user_data); void gmlc_gui_connexions_evt_btnTlbrEdit_clicked (GtkWidget *widget, gpointer user_data); void gmlc_gui_connexions_evt_btnTlbrLoad_clicked (GtkWidget *widget, gpointer user_data); void gmlc_gui_connexions_evt_btnTlbrConnect_clicked (GtkWidget *widget, gpointer user_data); void gmlc_gui_connexions_evt_btnTlbrClose_clicked (GtkWidget *widget, gpointer user_data); void gmlc_gui_connexions_evt_lstListHosts_selected (GtkTreeSelection *selection, gpointer user_data); gboolean gmlc_gui_connexions_evt_lstListHosts_btnpress(GtkWidget *widget, GdkEventButton *event, gpointer user_data); char * arFieldNames[] = {"Name", "Host", "Port", "Login", "Password", "Local socket"}; enum { PROP_0, }; G_DEFINE_TYPE (GmlcGuiConnexions, gmlc_gui_connexions, GTK_TYPE_WINDOW); static void gmlc_gui_connexions_class_init (GmlcGuiConnexionsClass * pClass) { GObjectClass *pObjClass = G_OBJECT_CLASS(pClass); pObjClass->finalize = (GObjectFinalizeFunc) gmlc_gui_connexions_finalize; } static void gmlc_gui_connexions_init (GmlcGuiConnexions * pGmlcGuiCnxns) { gtk_window_set_title (GTK_WINDOW(pGmlcGuiCnxns), _("GMySQLcc - Connections list")); gtk_window_set_default_size (GTK_WINDOW(pGmlcGuiCnxns), 640, 480); /*g_signal_connect(G_OBJECT (pGmlcGuiCnxns), "destroy", G_CALLBACK (gmlc_gui_connexions_evt_destroy), NULL);*/ g_signal_connect(G_OBJECT (pGmlcGuiCnxns), "delete-event", G_CALLBACK (gmlc_gui_connexions_evt_delete), NULL); pGmlcGuiCnxns->pCurrMysqlSrv = NULL; pGmlcGuiCnxns->bShowEditPart = TRUE; gmlc_gui_connexions_create_widgets(pGmlcGuiCnxns); gmlc_gui_connexions_init_widgets(pGmlcGuiCnxns); /* To hide edition server part */ gmlc_gui_connexions_evt_btnTlbrEdit_clicked(NULL, pGmlcGuiCnxns); } static void gmlc_gui_connexions_finalize (GmlcGuiConnexions * pGmlcGuiCnxns) { UNUSED_VAR(pGmlcGuiCnxns); } GmlcGuiConnexions * gmlc_gui_connexions_new () { GmlcGuiConnexions * pGmlcGuiCnxns = NULL; pGmlcGuiCnxns = GMLC_GUI_CONNEXIONS(g_object_new(GMLC_GUI_TYPE_CONNEXIONS, NULL)); return pGmlcGuiCnxns; } static void gmlc_gui_connexions_create_widgets (GmlcGuiConnexions * pGmlcGuiCnxns) { /*GtkWidget *vbox5, *vbox7; GtkWidget *hbox5, *hbox6, *hbox7, *hbox8, *hbox12, *hbox13, *hbox14, *hbox15, *hbox16, *hbox17; GtkWidget *label9, *label10, *label11, *label12, *label13, *label14, *label17; GtkWidget *scrolledwindow3;*/ GtkWidget *frame, *vbxMain, *vbox, *hbox, *hpaned; GtkWidget *label; GtkWidget *scrolledwindow; GtkWidget *toolbar; GtkWidget *btnNew, *btnAdd, *btnEdit, *btnDel, *btnServerUp, *btnServerDown; GtkWidget * imgToolbar; GtkToolItem * btnTlbrConnect, * btnTlbrEdit, * btnTlbrClose, * btnTlbrLoad; GtkTreeSelection *select; GtkTooltips * tooltips; tooltips = gtk_tooltips_new(); vbxMain = gtk_vbox_new (FALSE, 0); gtk_widget_show (vbxMain); gtk_container_add (GTK_CONTAINER (pGmlcGuiCnxns), vbxMain); toolbar = gtk_toolbar_new (); gtk_widget_show (toolbar); gtk_box_pack_start (GTK_BOX (vbxMain), toolbar, FALSE, FALSE, 0); gtk_toolbar_set_style (GTK_TOOLBAR (toolbar), GTK_TOOLBAR_BOTH_HORIZ); imgToolbar = gtk_image_new_from_stock(GTK_STOCK_EXECUTE, GTK_ICON_SIZE_LARGE_TOOLBAR); gtk_widget_show(imgToolbar); btnTlbrConnect = gtk_tool_button_new (imgToolbar, _("Connection")); gtk_tool_item_set_is_important (GTK_TOOL_ITEM(btnTlbrConnect), TRUE); g_signal_connect (G_OBJECT (btnTlbrConnect), "clicked", G_CALLBACK (gmlc_gui_connexions_evt_btnTlbrConnect_clicked), pGmlcGuiCnxns); gtk_widget_show(GTK_WIDGET(btnTlbrConnect)); gtk_toolbar_insert(GTK_TOOLBAR(toolbar), GTK_TOOL_ITEM(btnTlbrConnect), -1); gtk_tool_item_set_tooltip (GTK_TOOL_ITEM(btnTlbrConnect), tooltips, _("Connect to a server"), NULL); imgToolbar = gtk_image_new_from_stock(GTK_STOCK_EXECUTE, GTK_ICON_SIZE_LARGE_TOOLBAR); gtk_widget_show(imgToolbar); btnTlbrEdit = gtk_tool_button_new (imgToolbar, _("Edit Server")); gtk_tool_item_set_is_important (GTK_TOOL_ITEM(btnTlbrEdit), TRUE); g_signal_connect (G_OBJECT (btnTlbrEdit), "clicked", G_CALLBACK (gmlc_gui_connexions_evt_btnTlbrEdit_clicked), pGmlcGuiCnxns); gtk_widget_show(GTK_WIDGET(btnTlbrEdit)); gtk_toolbar_insert(GTK_TOOLBAR(toolbar), GTK_TOOL_ITEM(btnTlbrEdit), -1); gtk_tool_item_set_tooltip (GTK_TOOL_ITEM(btnTlbrEdit), tooltips, _("Display edit server part"), NULL); imgToolbar = gtk_image_new_from_stock(GTK_STOCK_OPEN, GTK_ICON_SIZE_LARGE_TOOLBAR); gtk_widget_show(imgToolbar); btnTlbrLoad = gtk_tool_button_new (imgToolbar, _("Execute SQL file")); gtk_tool_item_set_is_important (GTK_TOOL_ITEM(btnTlbrLoad), TRUE); g_signal_connect (G_OBJECT (btnTlbrLoad), "clicked", G_CALLBACK (gmlc_gui_connexions_evt_btnTlbrLoad_clicked), pGmlcGuiCnxns); gtk_widget_show(GTK_WIDGET(btnTlbrLoad)); gtk_toolbar_insert(GTK_TOOLBAR(toolbar), GTK_TOOL_ITEM(btnTlbrLoad), -1); gtk_tool_item_set_tooltip (GTK_TOOL_ITEM(btnTlbrLoad), tooltips, _("Execute an SQL file on a MySQL server"), NULL); imgToolbar = gtk_image_new_from_stock(GTK_STOCK_CLOSE, GTK_ICON_SIZE_LARGE_TOOLBAR); gtk_widget_show(imgToolbar); btnTlbrClose = gtk_tool_button_new (imgToolbar, _("Close")); gtk_tool_item_set_is_important (GTK_TOOL_ITEM(btnTlbrClose), TRUE); g_signal_connect (G_OBJECT (btnTlbrClose), "clicked", G_CALLBACK (gmlc_gui_connexions_evt_btnTlbrClose_clicked), pGmlcGuiCnxns); gtk_widget_show(GTK_WIDGET(btnTlbrClose)); gtk_toolbar_insert(GTK_TOOLBAR(toolbar), GTK_TOOL_ITEM(btnTlbrClose), -1); gtk_tool_item_set_tooltip (GTK_TOOL_ITEM(btnTlbrClose), tooltips, _("Close window"), NULL); hpaned = gtk_hpaned_new (); gtk_widget_show (hpaned); gtk_container_add (GTK_CONTAINER (vbxMain), hpaned); gtk_paned_set_position (GTK_PANED (hpaned), 250); vbox = gtk_vbox_new (FALSE, 0); gtk_widget_show (vbox); gtk_paned_pack1 (GTK_PANED (hpaned), vbox, TRUE, TRUE); scrolledwindow = gtk_scrolled_window_new (NULL, NULL); gtk_widget_show (scrolledwindow); gtk_box_pack_start (GTK_BOX (vbox), scrolledwindow, TRUE, TRUE, 0); pGmlcGuiCnxns->lstListHosts = gtk_tree_view_new (); gtk_widget_show (pGmlcGuiCnxns->lstListHosts); gtk_tree_view_set_rules_hint(GTK_TREE_VIEW (pGmlcGuiCnxns->lstListHosts), TRUE); gtk_container_add (GTK_CONTAINER (scrolledwindow), pGmlcGuiCnxns->lstListHosts); g_signal_connect (G_OBJECT (pGmlcGuiCnxns->lstListHosts), "button-press-event", G_CALLBACK (gmlc_gui_connexions_evt_lstListHosts_btnpress), pGmlcGuiCnxns); select = gtk_tree_view_get_selection (GTK_TREE_VIEW (pGmlcGuiCnxns->lstListHosts)); gtk_tree_selection_set_mode (select, GTK_SELECTION_SINGLE); g_signal_connect (G_OBJECT (select), "changed", G_CALLBACK (gmlc_gui_connexions_evt_lstListHosts_selected), pGmlcGuiCnxns); hbox = gtk_hbox_new (TRUE, 0); gtk_widget_show (hbox); gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, TRUE, 0); btnServerUp = gtk_button_new_from_stock(GTK_STOCK_GO_UP); gtk_widget_show (btnServerUp); gtk_box_pack_start (GTK_BOX (hbox), btnServerUp, FALSE, FALSE, 0); g_signal_connect (G_OBJECT (btnServerUp), "clicked", G_CALLBACK (gmlc_gui_connexions_evt_btnServerUp_clicked), pGmlcGuiCnxns); btnServerDown = gtk_button_new_from_stock(GTK_STOCK_GO_DOWN); gtk_widget_show (btnServerDown); gtk_box_pack_start (GTK_BOX (hbox), btnServerDown, FALSE, FALSE, 0); g_signal_connect (G_OBJECT (btnServerDown), "clicked", G_CALLBACK (gmlc_gui_connexions_evt_btnServerDown_clicked), pGmlcGuiCnxns); pGmlcGuiCnxns->vbxEditPart = gtk_vbox_new (FALSE, 0); gtk_widget_show (pGmlcGuiCnxns->vbxEditPart); gtk_paned_pack2 (GTK_PANED (hpaned), pGmlcGuiCnxns->vbxEditPart, TRUE, TRUE); frame = gtk_frame_new (NULL); gtk_widget_show (frame); gtk_box_pack_start (GTK_BOX (pGmlcGuiCnxns->vbxEditPart), frame, FALSE, FALSE, 0); label = gtk_label_new (_("Server")); gtk_widget_show (label); gtk_frame_set_label_widget (GTK_FRAME (frame), label); gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT); vbox = gtk_vbox_new (FALSE, 0); gtk_widget_show (vbox); gtk_container_add (GTK_CONTAINER (frame), vbox); gtk_container_set_border_width (GTK_CONTAINER (vbox), 4); hbox = gtk_hbox_new (FALSE, 0); gtk_widget_show (hbox); gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (hbox), 2); label = gtk_label_new (_("Name :")); gtk_widget_show (label); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT); pGmlcGuiCnxns->txtName = gtk_entry_new (); gtk_widget_show (pGmlcGuiCnxns->txtName); gtk_box_pack_start (GTK_BOX (hbox), pGmlcGuiCnxns->txtName, TRUE, TRUE, 2); hbox = gtk_hbox_new (FALSE, 0); gtk_widget_show (hbox); gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (hbox), 2); label = gtk_label_new (_("Host :")); gtk_widget_show (label); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT); pGmlcGuiCnxns->txtHost = gtk_entry_new (); gtk_widget_show (pGmlcGuiCnxns->txtHost); gtk_box_pack_start (GTK_BOX (hbox), pGmlcGuiCnxns->txtHost, TRUE, TRUE, 2); hbox = gtk_hbox_new (FALSE, 0); gtk_widget_show (hbox); gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (hbox), 2); label = gtk_label_new (_("Port :")); gtk_widget_show (label); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT); pGmlcGuiCnxns->txtPort = gtk_entry_new (); gtk_widget_show (pGmlcGuiCnxns->txtPort); gtk_box_pack_start (GTK_BOX (hbox), pGmlcGuiCnxns->txtPort, TRUE, TRUE, 2); gtk_entry_set_max_length (GTK_ENTRY (pGmlcGuiCnxns->txtPort), 5); hbox = gtk_hbox_new (FALSE, 0); gtk_widget_show (hbox); gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (hbox), 2); label = gtk_label_new (_("User name :")); gtk_widget_show (label); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT); pGmlcGuiCnxns->txtLogin = gtk_entry_new (); gtk_widget_show (pGmlcGuiCnxns->txtLogin); gtk_box_pack_start (GTK_BOX (hbox), pGmlcGuiCnxns->txtLogin, TRUE, TRUE, 2); hbox = gtk_hbox_new (FALSE, 0); gtk_widget_show (hbox); gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (hbox), 2); label = gtk_label_new (_("Password :")); gtk_widget_show (label); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT); pGmlcGuiCnxns->txtPasswd = gtk_entry_new (); gtk_widget_show (pGmlcGuiCnxns->txtPasswd); gtk_box_pack_start (GTK_BOX (hbox), pGmlcGuiCnxns->txtPasswd, TRUE, TRUE, 2); hbox = gtk_hbox_new (FALSE, 0); gtk_widget_show (hbox); gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (hbox), 2); label = gtk_label_new (_("Local socket file :")); gtk_widget_show (label); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT); pGmlcGuiCnxns->txtLocalSock = gtk_entry_new (); gtk_widget_show (pGmlcGuiCnxns->txtLocalSock); gtk_box_pack_start (GTK_BOX (hbox), pGmlcGuiCnxns->txtLocalSock, TRUE, TRUE, 2); hbox = gtk_hbox_new (FALSE, 0); gtk_widget_show (hbox); gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (hbox), 2); pGmlcGuiCnxns->chkReadOnly = gtk_check_button_new_with_label (_("Read only server")); gtk_widget_show (pGmlcGuiCnxns->chkReadOnly); gtk_box_pack_start (GTK_BOX (hbox), pGmlcGuiCnxns->chkReadOnly, TRUE, TRUE, 2); hbox = gtk_hbox_new (FALSE, 0); gtk_widget_show (hbox); gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (hbox), 2); pGmlcGuiCnxns->chkWriteWarning = gtk_check_button_new_with_label (_("Warning about write query on this server")); gtk_widget_show (pGmlcGuiCnxns->chkWriteWarning); gtk_box_pack_start (GTK_BOX (hbox), pGmlcGuiCnxns->chkWriteWarning, TRUE, TRUE, 2); hbox = gtk_hbox_new (FALSE, 0); gtk_widget_show (hbox); gtk_box_pack_start (GTK_BOX (pGmlcGuiCnxns->vbxEditPart), hbox, FALSE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (hbox), 1); btnNew = gtk_button_new_from_stock(GTK_STOCK_NEW); gtk_widget_show (btnNew); gtk_box_pack_start (GTK_BOX (hbox), btnNew, TRUE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (btnNew), 2); g_signal_connect (G_OBJECT (btnNew), "clicked", G_CALLBACK (gmlc_gui_connexions_evt_btnNew_clicked), pGmlcGuiCnxns); btnAdd = gtk_button_new_from_stock(GTK_STOCK_ADD); gtk_widget_show (btnAdd); gtk_box_pack_start (GTK_BOX (hbox), btnAdd, TRUE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (btnAdd), 2); g_signal_connect (G_OBJECT (btnAdd), "clicked", G_CALLBACK (gmlc_gui_connexions_evt_btnAdd_clicked), pGmlcGuiCnxns); btnEdit = gtk_button_new_from_stock(GTK_STOCK_APPLY); gtk_widget_show (btnEdit); gtk_box_pack_start (GTK_BOX (hbox), btnEdit, TRUE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (btnEdit), 2); g_signal_connect (G_OBJECT (btnEdit), "clicked", G_CALLBACK (gmlc_gui_connexions_evt_btnEdit_clicked), pGmlcGuiCnxns); btnDel = gtk_button_new_from_stock(GTK_STOCK_DELETE); gtk_widget_show (btnDel); gtk_box_pack_start (GTK_BOX (hbox), btnDel, TRUE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (btnDel), 2); g_signal_connect (G_OBJECT (btnDel), "clicked", G_CALLBACK (gmlc_gui_connexions_evt_btnDel_clicked), pGmlcGuiCnxns); } static void gmlc_gui_connexions_init_widgets (GmlcGuiConnexions * pGmlcGuiCnxns) { GtkTreeViewColumn * currCol; GtkCellRenderer * renderer; renderer = gtk_cell_renderer_text_new (); currCol = gtk_tree_view_column_new_with_attributes (_("Server name"), renderer, "text", 0, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (pGmlcGuiCnxns->lstListHosts), currCol); gmlc_gui_connexions_fill_server_list(pGmlcGuiCnxns); } void gmlc_gui_connexions_fill_server_list (GmlcGuiConnexions * pGmlcGuiCnxns) { GmlcMysqlServer * pGmlcMysqlSrv = NULL; GList * items = NULL; GtkListStore * lstStrBase = NULL; GtkTreeIter iter, * itSel = NULL; GtkTreeSelection* selection = NULL; GtkTreePath * pathToSelRow = NULL; lstStrBase = gtk_list_store_new(2, G_TYPE_STRING, G_TYPE_POINTER); items = g_list_first(GpGmlcMscCfg->lstServers); while (items != NULL) { pGmlcMysqlSrv = GMLC_MYSQL_SERVER(items->data); /* Display if needed the field */ if (pGmlcMysqlSrv != NULL) { gtk_list_store_append (lstStrBase, &iter); gtk_list_store_set (lstStrBase, &iter, 0, pGmlcMysqlSrv->pcName, -1); gtk_list_store_set (lstStrBase, &iter, 1, pGmlcMysqlSrv, -1); if (pGmlcMysqlSrv == pGmlcGuiCnxns->pCurrMysqlSrv) { itSel = gtk_tree_iter_copy(&iter); } } /* Go to next item */ items = g_list_next(items); } gtk_tree_view_set_model(GTK_TREE_VIEW(pGmlcGuiCnxns->lstListHosts), GTK_TREE_MODEL(lstStrBase)); if (itSel != NULL) { selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(pGmlcGuiCnxns->lstListHosts)); gtk_tree_selection_select_iter(GTK_TREE_SELECTION(selection), itSel); pathToSelRow = gtk_tree_model_get_path (GTK_TREE_MODEL(lstStrBase), itSel); gtk_tree_view_scroll_to_cell (GTK_TREE_VIEW(pGmlcGuiCnxns->lstListHosts), pathToSelRow, NULL, TRUE, 0.5, 0.0); gtk_tree_path_free (pathToSelRow); gtk_tree_iter_free (itSel); gmlc_gui_connexions_dislpay_current_server (pGmlcGuiCnxns); } g_object_unref (G_OBJECT (lstStrBase)); } void gmlc_gui_connexions_dislpay_current_server (GmlcGuiConnexions * pGmlcGuiCnxns) { GmlcMysqlServer * pGmlcMysqlSrv = pGmlcGuiCnxns->pCurrMysqlSrv; char tmpPort [G_ASCII_DTOSTR_BUF_SIZE + 1]; if (pGmlcMysqlSrv != NULL) { g_ascii_dtostr(tmpPort, G_ASCII_DTOSTR_BUF_SIZE, pGmlcMysqlSrv->iPort); gtk_entry_set_text(GTK_ENTRY(pGmlcGuiCnxns->txtName), pGmlcMysqlSrv->pcName); gtk_entry_set_text(GTK_ENTRY(pGmlcGuiCnxns->txtHost), pGmlcMysqlSrv->pcHost); gtk_entry_set_text(GTK_ENTRY(pGmlcGuiCnxns->txtPort), tmpPort); gtk_entry_set_text(GTK_ENTRY(pGmlcGuiCnxns->txtLogin), pGmlcMysqlSrv->pcLogin); gtk_entry_set_text(GTK_ENTRY(pGmlcGuiCnxns->txtPasswd), pGmlcMysqlSrv->pcPassword); gtk_entry_set_text(GTK_ENTRY(pGmlcGuiCnxns->txtLocalSock), ((pGmlcMysqlSrv->pcLocalSock != NULL) ? pGmlcMysqlSrv->pcLocalSock : "")); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(pGmlcGuiCnxns->chkReadOnly), pGmlcMysqlSrv->bReadOnly); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(pGmlcGuiCnxns->chkWriteWarning), pGmlcMysqlSrv->bWriteWarning); } else { gtk_entry_set_text(GTK_ENTRY(pGmlcGuiCnxns->txtName), ""); gtk_entry_set_text(GTK_ENTRY(pGmlcGuiCnxns->txtHost), ""); gtk_entry_set_text(GTK_ENTRY(pGmlcGuiCnxns->txtPort), "3306"); gtk_entry_set_text(GTK_ENTRY(pGmlcGuiCnxns->txtLogin), ""); gtk_entry_set_text(GTK_ENTRY(pGmlcGuiCnxns->txtPasswd), ""); gtk_entry_set_text(GTK_ENTRY(pGmlcGuiCnxns->txtLocalSock), "/var/run/mysqld/mysqld.sock"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(pGmlcGuiCnxns->chkReadOnly), FALSE); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(pGmlcGuiCnxns->chkWriteWarning), FALSE); } } static gboolean gmlc_gui_connexions_evt_delete (GtkWidget *widget, GdkEvent *event, gpointer user_data) { UNUSED_VAR(event); UNUSED_VAR(user_data); gtk_widget_hide(GTK_WIDGET(widget)); if (GiNbrWnd <= 0) { gtk_main_quit(); return TRUE; } return FALSE; } static void gmlc_gui_connexions_evt_destroy(GtkWidget *widget, gpointer user_data) { UNUSED_VAR(user_data); gtk_widget_hide(GTK_WIDGET(widget)); if (GiNbrWnd <= 0) { gtk_main_quit(); } } void gmlc_gui_connexions_evt_btnNew_clicked (GtkWidget *widget, gpointer user_data) { GmlcGuiConnexions * pGmlcGuiCnxns = GMLC_GUI_CONNEXIONS(user_data); pGmlcGuiCnxns->pCurrMysqlSrv = NULL; gmlc_gui_connexions_fill_server_list(pGmlcGuiCnxns); } void gmlc_gui_connexions_evt_btnAdd_clicked (GtkWidget *widget, gpointer user_data) { GmlcGuiConnexions * pGmlcGuiCnxns = GMLC_GUI_CONNEXIONS(user_data); GString * infos[6]; GtkWidget * msgdlg; gboolean read_only, write_warning; int i, j, port; /* Get data */ infos[0] = g_string_new(gtk_entry_get_text(GTK_ENTRY(pGmlcGuiCnxns->txtName))); infos[1] = g_string_new(gtk_entry_get_text(GTK_ENTRY(pGmlcGuiCnxns->txtHost))); infos[2] = g_string_new(gtk_entry_get_text(GTK_ENTRY(pGmlcGuiCnxns->txtPort))); infos[3] = g_string_new(gtk_entry_get_text(GTK_ENTRY(pGmlcGuiCnxns->txtLogin))); infos[4] = g_string_new(gtk_entry_get_text(GTK_ENTRY(pGmlcGuiCnxns->txtPasswd))); infos[5] = g_string_new(gtk_entry_get_text(GTK_ENTRY(pGmlcGuiCnxns->txtLocalSock))); read_only = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(pGmlcGuiCnxns->chkReadOnly)); write_warning = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(pGmlcGuiCnxns->chkWriteWarning)); /* Check data */ for (i = 0; i < 4; i++) { if (infos[i]->len == 0) { /* check if not empty */ msgdlg = gtk_message_dialog_new(GTK_WINDOW(pGmlcGuiCnxns), GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, _("Field %s cannot be empty !!!"), arFieldNames[i]); gtk_dialog_run (GTK_DIALOG (msgdlg)); gtk_widget_destroy (msgdlg); return; } else if (i == 2) { /* check if port is a number */ for (j = 0; j < infos[i]->len; j++) { if (!g_ascii_isdigit(infos[i]->str[j])) { msgdlg = gtk_message_dialog_new(GTK_WINDOW(pGmlcGuiCnxns), GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, _("Field %s can only contain digits !!!"), arFieldNames[i]); gtk_dialog_run (GTK_DIALOG (msgdlg)); gtk_widget_destroy (msgdlg); return; } } } } /* Check if name is unique */ if (gmlc_misc_config_get_server(GpGmlcMscCfg, infos[0]->str) != NULL) { msgdlg = gtk_message_dialog_new(GTK_WINDOW(pGmlcGuiCnxns), GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, _("Name already taken !\nPlease set another one.")); gtk_dialog_run (GTK_DIALOG (msgdlg)); gtk_widget_destroy (msgdlg); return; } /* Insert data in configuration */ port = (int)g_ascii_strtoull(infos[2]->str, NULL, 10); if (gmlc_misc_config_add_server(GpGmlcMscCfg, infos[0]->str, infos[1]->str, port, infos[3]->str, infos[4]->str, NULL, infos[5]->str, read_only, write_warning)) { pGmlcGuiCnxns->pCurrMysqlSrv = gmlc_misc_config_get_server(GpGmlcMscCfg, infos[0]->str); gmlc_gui_connexions_fill_server_list(pGmlcGuiCnxns); } for (i = 0; i < 6; i++) { if (infos[i] != NULL) { g_string_free(infos[i], TRUE); } } } void gmlc_gui_connexions_evt_btnEdit_clicked (GtkWidget *widget, gpointer user_data) { GmlcGuiConnexions * pGmlcGuiCnxns = GMLC_GUI_CONNEXIONS(user_data); GmlcMysqlServer * pGmlcMysqlSrv; GString * infos[6]; GtkWidget * msgdlg; gboolean read_only, write_warning; int i, j, port; if (pGmlcGuiCnxns->pCurrMysqlSrv == NULL) { msgdlg = gtk_message_dialog_new(GTK_WINDOW(pGmlcGuiCnxns), GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, _("Please select a server")); gtk_dialog_run (GTK_DIALOG (msgdlg)); gtk_widget_destroy (msgdlg); return; } /* Get data */ infos[0] = g_string_new(gtk_entry_get_text(GTK_ENTRY(pGmlcGuiCnxns->txtName))); infos[1] = g_string_new(gtk_entry_get_text(GTK_ENTRY(pGmlcGuiCnxns->txtHost))); infos[2] = g_string_new(gtk_entry_get_text(GTK_ENTRY(pGmlcGuiCnxns->txtPort))); infos[3] = g_string_new(gtk_entry_get_text(GTK_ENTRY(pGmlcGuiCnxns->txtLogin))); infos[4] = g_string_new(gtk_entry_get_text(GTK_ENTRY(pGmlcGuiCnxns->txtPasswd))); infos[5] = g_string_new(gtk_entry_get_text(GTK_ENTRY(pGmlcGuiCnxns->txtLocalSock))); read_only = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(pGmlcGuiCnxns->chkReadOnly)); write_warning = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(pGmlcGuiCnxns->chkWriteWarning)); /* Check data */ for (i = 0; i < 4; i++) { if (infos[i]->len == 0) { /* check if not empty */ msgdlg = gtk_message_dialog_new(GTK_WINDOW(pGmlcGuiCnxns), GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, _("Field %s cannot be empty !!!"), arFieldNames[i]); gtk_dialog_run (GTK_DIALOG (msgdlg)); gtk_widget_destroy (msgdlg); return; } else if (i == 2) { /* check if port is a number */ for (j = 0; j < infos[i]->len; j++) { if (!g_ascii_isdigit(infos[i]->str[j])) { msgdlg = gtk_message_dialog_new(GTK_WINDOW(pGmlcGuiCnxns), GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, _("Field %s can only contain digits !!!"), arFieldNames[i]); gtk_dialog_run (GTK_DIALOG (msgdlg)); gtk_widget_destroy (msgdlg); return; } } } } /* Check if name is unique */ pGmlcMysqlSrv = gmlc_misc_config_get_server(GpGmlcMscCfg, infos[0]->str); if (pGmlcMysqlSrv != NULL && pGmlcMysqlSrv != pGmlcGuiCnxns->pCurrMysqlSrv) { msgdlg = gtk_message_dialog_new(GTK_WINDOW(pGmlcGuiCnxns), GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, _("Name already taken !\nPlease set another one.")); gtk_dialog_run (GTK_DIALOG (msgdlg)); gtk_widget_destroy (msgdlg); return; } /* Update data in configuration */ port = (int)g_ascii_strtoull(infos[2]->str, NULL, 10); if (gmlc_misc_config_update_server(GpGmlcMscCfg, pGmlcGuiCnxns->pCurrMysqlSrv->pcName, infos[0]->str, infos[1]->str, port, infos[3]->str, infos[4]->str, NULL, infos[5]->str, read_only, write_warning)) { gmlc_gui_connexions_fill_server_list(pGmlcGuiCnxns); } for (i = 0; i < 6; i++) { if (infos[i] != NULL) { g_string_free(infos[i], 1); } } } void gmlc_gui_connexions_evt_btnDel_clicked (GtkWidget *widget, gpointer user_data) { GmlcGuiConnexions * pGmlcGuiCnxns = GMLC_GUI_CONNEXIONS(user_data); GtkWidget * msgdlg; if (pGmlcGuiCnxns->pCurrMysqlSrv != NULL) { if (!gmlc_misc_config_del_server (GpGmlcMscCfg, pGmlcGuiCnxns->pCurrMysqlSrv->pcName)) { msgdlg = gtk_message_dialog_new(GTK_WINDOW(pGmlcGuiCnxns), GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, _("Can't delete this server !!!")); gtk_dialog_run (GTK_DIALOG (msgdlg)); gtk_widget_destroy (msgdlg); } else { gmlc_gui_connexions_fill_server_list(pGmlcGuiCnxns); } } else { msgdlg = gtk_message_dialog_new(GTK_WINDOW(pGmlcGuiCnxns), GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, _("Please select a server")); gtk_dialog_run (GTK_DIALOG (msgdlg)); gtk_widget_destroy (msgdlg); } } void gmlc_gui_connexions_evt_btnServerUp_clicked (GtkWidget *widget, gpointer user_data) { GmlcGuiConnexions * pGmlcGuiCnxns = GMLC_GUI_CONNEXIONS(user_data); GtkTreeIter itCurr; GtkTreeModel *model = NULL; GtkTreeSelection* selection = NULL; GmlcMysqlServer * pGmlcMysqlSrv = NULL; GList * lstCurr = NULL, * lstTrgt = NULL; GtkWidget * msgdlg = NULL; gboolean error = FALSE; selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(pGmlcGuiCnxns->lstListHosts)); if (gtk_tree_selection_get_selected (selection, &model, &itCurr)) { gtk_tree_model_get (model, &itCurr, 1, &pGmlcMysqlSrv, -1); lstCurr = g_list_find (GpGmlcMscCfg->lstServers, pGmlcMysqlSrv); if (lstCurr != NULL && lstCurr->prev != NULL) { lstTrgt = lstCurr->prev; GpGmlcMscCfg->lstServers = g_list_insert_before(GpGmlcMscCfg->lstServers, lstTrgt, pGmlcMysqlSrv); GpGmlcMscCfg->lstServers = g_list_delete_link(GpGmlcMscCfg->lstServers, lstCurr); gmlc_gui_connexions_fill_server_list(pGmlcGuiCnxns); } else { error = TRUE; } } else { error = TRUE; } if (error) { msgdlg = gtk_message_dialog_new(GTK_WINDOW(pGmlcGuiCnxns), GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, _("Can't move up more !!!")); gtk_dialog_run (GTK_DIALOG (msgdlg)); gtk_widget_destroy (msgdlg); } } void gmlc_gui_connexions_evt_btnServerDown_clicked (GtkWidget *widget, gpointer user_data) { GmlcGuiConnexions * pGmlcGuiCnxns = GMLC_GUI_CONNEXIONS(user_data); GtkTreeIter itCurr; GtkTreeModel * model = NULL; GtkTreeSelection * selection = NULL; GmlcMysqlServer * pGmlcMysqlSrv = NULL; GList * lstCurr = NULL, * lstTrgt = NULL; GtkWidget * msgdlg = NULL; gboolean error = FALSE; selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(pGmlcGuiCnxns->lstListHosts)); if (gtk_tree_selection_get_selected (selection, &model, &itCurr)) { gtk_tree_model_get (model, &itCurr, 1, &pGmlcMysqlSrv, -1); lstCurr = g_list_find (GpGmlcMscCfg->lstServers, pGmlcMysqlSrv); if (lstCurr != NULL && lstCurr->next != NULL) { lstTrgt = lstCurr->next->next; GpGmlcMscCfg->lstServers = g_list_insert_before(GpGmlcMscCfg->lstServers, lstTrgt, pGmlcMysqlSrv); GpGmlcMscCfg->lstServers = g_list_delete_link(GpGmlcMscCfg->lstServers, lstCurr); gmlc_gui_connexions_fill_server_list(pGmlcGuiCnxns); } else { error = TRUE; } } else { error = TRUE; } if (error) { msgdlg = gtk_message_dialog_new(GTK_WINDOW(pGmlcGuiCnxns), GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, _("Can't move down more !!!")); gtk_dialog_run (GTK_DIALOG (msgdlg)); gtk_widget_destroy (msgdlg); } } void gmlc_gui_connexions_evt_btnTlbrEdit_clicked (GtkWidget *widget, gpointer user_data) { GmlcGuiConnexions * pGmlcGuiCnxns = GMLC_GUI_CONNEXIONS(user_data); pGmlcGuiCnxns->bShowEditPart = (pGmlcGuiCnxns->bShowEditPart) ? FALSE : TRUE ; if (pGmlcGuiCnxns->bShowEditPart) { gtk_widget_show(GTK_WIDGET(pGmlcGuiCnxns->vbxEditPart)); } else { gtk_widget_hide(GTK_WIDGET(pGmlcGuiCnxns->vbxEditPart)); } } void gmlc_gui_connexions_evt_btnTlbrLoad_clicked (GtkWidget *widget, gpointer user_data) { /* p_gmysqlcc_gui_exec_file gui_xcfl = NULL; gui_xcfl = gmysqlcc_gui_exec_file_new_open_file(); if (gui_xcfl != NULL) { gmysqlcc_gui_exec_file_display(gui_xcfl, TRUE); } */ } void gmlc_gui_connexions_evt_btnTlbrConnect_clicked (GtkWidget *widget, gpointer user_data) { GmlcGuiConnexions * pGmlcGuiCnxns = GMLC_GUI_CONNEXIONS(user_data); GmlcGuiServer * pGmlcGuiSrv = NULL; GtkWidget * msgdlg; if (pGmlcGuiCnxns->pCurrMysqlSrv != NULL) { pGmlcGuiSrv = gmlc_gui_server_new(pGmlcGuiCnxns->pCurrMysqlSrv); gtk_widget_show(GTK_WIDGET(pGmlcGuiSrv)); gtk_widget_hide(GTK_WIDGET(pGmlcGuiCnxns)); } else { msgdlg = gtk_message_dialog_new(GTK_WINDOW(pGmlcGuiCnxns), GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, _("Please select a server")); gtk_dialog_run (GTK_DIALOG (msgdlg)); gtk_widget_destroy (msgdlg); } } void gmlc_gui_connexions_evt_btnTlbrClose_clicked (GtkWidget *widget, gpointer user_data) { GmlcGuiConnexions * pGmlcGuiCnxns = GMLC_GUI_CONNEXIONS(user_data); gtk_widget_hide(GTK_WIDGET(pGmlcGuiCnxns)); if (GiNbrWnd <= 0) { gtk_main_quit(); } } void gmlc_gui_connexions_evt_lstListHosts_selected (GtkTreeSelection *selection, gpointer user_data) { GmlcGuiConnexions * pGmlcGuiCnxns = GMLC_GUI_CONNEXIONS(user_data); GtkTreeIter iter; GtkTreeModel *model; if (gtk_tree_selection_get_selected (selection, &model, &iter)) { gtk_tree_model_get (model, &iter, 1, &pGmlcGuiCnxns->pCurrMysqlSrv, -1); gmlc_gui_connexions_dislpay_current_server(pGmlcGuiCnxns); } } gboolean gmlc_gui_connexions_evt_lstListHosts_btnpress(GtkWidget *widget, GdkEventButton *event, gpointer user_data) { if (event->type == GDK_2BUTTON_PRESS) { gmlc_gui_connexions_evt_btnTlbrConnect_clicked(widget, user_data); } return FALSE; } gmysqlcc-0.3.0/src/gmlc_mysql_function.c0000644000175000017500000001522710755301563015300 00000000000000/* * 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 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 Library 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "gmlc_mysql_function.h" static void gmlc_mysql_function_finalize (GmlcMysqlFunction * pGmlcMysqlFnct); static void gmlc_mysql_function_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec); static void gmlc_mysql_function_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec); static void gmlc_mysql_function_interface_structure_init (gpointer g_iface, gpointer iface_data); static gchar * gmlc_mysql_function_structure_get_create (GmlcMysqlFunction * pGmlcMysqlFnct, gboolean bMyself, const gchar * pcOtherName); static gchar * gmlc_mysql_function_structure_get_alter (GmlcMysqlFunction * pGmlcMysqlFnct, gboolean bMyself, const gchar * pcOtherName); static gchar * gmlc_mysql_function_structure_get_drop (GmlcMysqlFunction * pGmlcMysqlFnct, gboolean bMyself, const gchar * pcOtherName); enum { PROP_0, PROP_DATABASE, PROP_NAME, PROP_FLAGGED }; G_DEFINE_TYPE_WITH_CODE (GmlcMysqlFunction, gmlc_mysql_function, G_TYPE_OBJECT, G_IMPLEMENT_INTERFACE (GMLC_MYSQL_TYPE_STRUCTURE, gmlc_mysql_function_interface_structure_init)); static void gmlc_mysql_function_interface_structure_init (gpointer g_iface, gpointer iface_data) { GmlcMysqlStructureInterface * pIface = (GmlcMysqlStructureInterface *) g_iface; pIface->get_create = (gchar * (*) (GmlcMysqlStructure * poSelf, gboolean bMyself, const gchar * pcOtherName))gmlc_mysql_function_structure_get_create; pIface->get_alter = (gchar * (*) (GmlcMysqlStructure * poSelf, gboolean bMyself, const gchar * pcOtherName))gmlc_mysql_function_structure_get_alter; pIface->get_drop = (gchar * (*) (GmlcMysqlStructure * poSelf, gboolean bMyself, const gchar * pcOtherName))gmlc_mysql_function_structure_get_drop; } static void gmlc_mysql_function_class_init(GmlcMysqlFunctionClass *pClass) { GObjectClass * pObjClass = G_OBJECT_CLASS(pClass); pObjClass->finalize = (GObjectFinalizeFunc) gmlc_mysql_function_finalize; pObjClass->get_property = gmlc_mysql_function_get_property; pObjClass->set_property = gmlc_mysql_function_set_property; g_object_class_install_property(pObjClass, PROP_DATABASE, g_param_spec_object("database", "Database object", "Database object", GMLC_MYSQL_TYPE_DATABASE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); g_object_class_install_property(pObjClass, PROP_NAME, g_param_spec_string("name", "Function name", "Name of the function", "", G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); g_object_class_install_property(pObjClass, PROP_FLAGGED, g_param_spec_boolean("flagged", "Object Flagged", "Object Flagged", FALSE, G_PARAM_READWRITE)); } static void gmlc_mysql_function_init(GmlcMysqlFunction * pGmlcMysqlFnct) { pGmlcMysqlFnct->pGmlcMysqlDb = NULL; pGmlcMysqlFnct->pcName = NULL; pGmlcMysqlFnct->bFlagged = FALSE; } static void gmlc_mysql_function_finalize(GmlcMysqlFunction * pGmlcMysqlFnct) { g_free(pGmlcMysqlFnct->pcName); /*G_OBJECT_CLASS(parent_class)->finalize(object);*/ } static void gmlc_mysql_function_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec) { GmlcMysqlFunction * pGmlcMysqlFnct = GMLC_MYSQL_FUNCTION(object); switch (prop_id) { case PROP_DATABASE : g_value_set_object(value, pGmlcMysqlFnct->pGmlcMysqlDb); break; case PROP_NAME : g_value_set_string(value, pGmlcMysqlFnct->pcName); break; case PROP_FLAGGED : g_value_set_boolean(value, pGmlcMysqlFnct->bFlagged); break; default: { G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); break; } } } static void gmlc_mysql_function_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec) { GmlcMysqlFunction * pGmlcMysqlFnct = GMLC_MYSQL_FUNCTION(object); switch (prop_id) { case PROP_DATABASE : pGmlcMysqlFnct->pGmlcMysqlDb = g_value_get_object(value); break; case PROP_NAME : g_free(pGmlcMysqlFnct->pcName); pGmlcMysqlFnct->pcName = g_value_dup_string(value); break; case PROP_FLAGGED : pGmlcMysqlFnct->bFlagged = g_value_get_boolean(value); break; default: { G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); break; } } } static gchar * gmlc_mysql_function_structure_get_create (GmlcMysqlFunction * pGmlcMysqlFnct, gboolean bMyself, const gchar * pcOtherName) { const gchar * pcName = NULL; gchar * pcSqlQuery = NULL, * pcQuery = NULL; if (bMyself) { g_object_get(pGmlcMysqlFnct, "name", &pcName, NULL); pcQuery = g_strdup_printf("SHOW CREATE FUNCTION `%s`;", pcName); pcSqlQuery = gmlc_mysql_query_static_get_one_result(pGmlcMysqlFnct->pGmlcMysqlDb->pGmlcMysqlSrv, pGmlcMysqlFnct->pGmlcMysqlDb->pcDbName, pcQuery, 2); g_free(pcQuery); } else { pcSqlQuery = gmlc_mysql_database_create_new_function_sql(pGmlcMysqlFnct->pGmlcMysqlDb, pcOtherName); } return pcSqlQuery; } static gchar * gmlc_mysql_function_structure_get_alter (GmlcMysqlFunction * pGmlcMysqlFnct, gboolean bMyself, const gchar * pcOtherName) { gchar * pcDrop = NULL, * pcCreate = NULL, * pcSqlQuery = NULL; pcDrop = gmlc_mysql_function_structure_get_drop(pGmlcMysqlFnct, bMyself, pcOtherName); pcCreate = gmlc_mysql_function_structure_get_create(pGmlcMysqlFnct, bMyself, pcOtherName); pcSqlQuery = g_strdup_printf("%s\n%s\n", pcDrop, pcCreate); g_free(pcCreate); g_free(pcDrop); return pcSqlQuery; } static gchar * gmlc_mysql_function_structure_get_drop (GmlcMysqlFunction * pGmlcMysqlFnct, gboolean bMyself, const gchar * pcOtherName) { const gchar * pcName = NULL; gchar * pcSqlQuery = NULL; if (bMyself) { pcName = pGmlcMysqlFnct->pcName; } else if (pcOtherName != NULL) { pcName = pcOtherName; } else { pcName = ""; } pcSqlQuery = g_strdup_printf("DROP PROCEDURE `%s`;", pcName); return pcSqlQuery; } GmlcMysqlFunction * gmlc_mysql_function_new(GmlcMysqlDatabase * pGmlcMysqlDb, gchar * pcName) { GmlcMysqlFunction * pGmlcMysqlFnct; pGmlcMysqlFnct = GMLC_MYSQL_FUNCTION(g_object_new(GMLC_TYPE_MYSQL_FUNCTION, "database", pGmlcMysqlDb, "name", pcName, NULL)); return pGmlcMysqlFnct; } gmysqlcc-0.3.0/src/gmlc_main.c0000644000175000017500000000426210755301562013146 00000000000000/* * 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 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, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define __GMYSQLCC_MAIN_PART__ #include "gmlc_main.h" #include "gmlc_gui_connexions.h" int GiNbrWnd = 0; GmlcMiscConfig * GpGmlcMscCfg = NULL; GtkWidget * GpGmlcGuiCnxns = NULL; /*p_gmysqlcc_gui_list_server gmysqlcc_gui_list_server;*/ #ifdef USE_GTKSOURCEVIEW GtkSourceLanguageManager * LangManager; #endif /* USE_GTKSOURCEVIEW */ gboolean gmysqlcc_main_before_end(gpointer data); int main(int argc, char *argv[]) { /* Init gtk library */ gtk_init (&argc, &argv); /* Init gettext library */ bindtextdomain (PACKAGE, PACKAGE_LOCALE_DIR); textdomain (PACKAGE); bind_textdomain_codeset(PACKAGE, "utf8"); /* Init types list */ /*gmysqlcc_helpers_field_capability_init_array();*/ /* Read configuration */ GpGmlcMscCfg = gmlc_misc_config_new(); if (!gmlc_misc_config_read(GpGmlcMscCfg)) { g_printerr("Can't start gmysqlcc - Error during configuration ... \n"); return 1; } /* Add trigger to save configuration before the end of gmysqlcc */ gtk_quit_add(0, gmysqlcc_main_before_end, NULL); #ifdef USE_GTKSOURCEVIEW /* Get Language Manager to select sql type */ LangManager = gtk_source_language_manager_new(); #endif /* USE_GTKSOURCEVIEW */ /* Create server list windows */ GpGmlcGuiCnxns = GTK_WIDGET(gmlc_gui_connexions_new()); gtk_widget_show(GpGmlcGuiCnxns); /* Start the application */ gtk_main (); return 0; } gboolean gmysqlcc_main_before_end(gpointer data) { UNUSED_VAR(data); gmlc_misc_config_write(GpGmlcMscCfg); return TRUE; } gmysqlcc-0.3.0/src/gmlc_mysql_structure.h0000644000175000017500000000433010755301563015511 00000000000000/* * 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 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, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __GMLC_MYSQL_STRUCTURE_H__ #define __GMLC_MYSQL_STRUCTURE_H__ #define UNUSED_VAR(x) (x = x) #include G_BEGIN_DECLS #define GMLC_MYSQL_TYPE_STRUCTURE (gmlc_mysql_structure_get_type ()) #define GMLC_MYSQL_STRUCTURE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GMLC_MYSQL_TYPE_STRUCTURE, GmlcMysqlStructure)) #define GMLC_MYSQL_IS_STRUCTURE_TAB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GMLC_MYSQL_TYPE_STRUCTURE)) #define GMLC_MYSQL_STRUCTURE_GET_INTERFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), GMLC_MYSQL_TYPE_STRUCTURE, GmlcMysqlStructureInterface)) typedef struct _GmlcMysqlStructure GmlcMysqlStructure; typedef struct _GmlcMysqlStructureInterface GmlcMysqlStructureInterface; struct _GmlcMysqlStructureInterface { GTypeInterface parent; gchar * (* get_create) (GmlcMysqlStructure * poSelf, gboolean bMyself, const gchar * pcOtherName); gchar * (* get_alter) (GmlcMysqlStructure * poSelf, gboolean bMyself, const gchar * pcOtherName); gchar * (* get_drop) (GmlcMysqlStructure * poSelf, gboolean bMyself, const gchar * pcOtherName); }; GType gmlc_mysql_structure_get_type (void); gchar * gmlc_mysql_structure_get_create (GmlcMysqlStructure * poSelf, gboolean bMyself, const gchar * pcOtherName); gchar * gmlc_mysql_structure_get_alter (GmlcMysqlStructure * poSelf, gboolean bMyself, const gchar * pcOtherName); gchar * gmlc_mysql_structure_get_drop (GmlcMysqlStructure * poSelf, gboolean bMyself, const gchar * pcOtherName); G_END_DECLS #endif /* __GMLC_MYSQL_STRUCTURE_H__ */ gmysqlcc-0.3.0/src/Makefile.am0000644000175000017500000000216210755301563013106 00000000000000## Process this file with automake to produce Makefile.in INCLUDES = \ $(GTK_CFLAGS) \ $(GTKSourceView_CFLAGS) \ $(MySQLc_CFLAGS) AM_CFLAGS =\ -Wall bin_PROGRAMS = gmysqlcc gmysqlcc_SOURCES = \ gmlc_gui_helpers.c\ gmlc_gui_helpers.h\ gmlc_gui_connexions.c\ gmlc_gui_connexions.h\ gmlc_gui_server.c\ gmlc_gui_server.h\ gmlc_gui_server_tab.c\ gmlc_gui_server_tab.h\ gmlc_gui_server_tab_data.c\ gmlc_gui_server_tab_data.h\ gmlc_gui_server_tab_help.c\ gmlc_gui_server_tab_help.h\ gmlc_gui_server_tab_query.c\ gmlc_gui_server_tab_query.h\ gmlc_main.h\ gmlc_main.c\ gmlc_misc_config.c\ gmlc_misc_config.h\ gmlc_misc_hashtable.c\ gmlc_misc_hashtable.h\ gmlc_mysql_structure.c\ gmlc_mysql_structure.h\ gmlc_mysql_server.c\ gmlc_mysql_server.h\ gmlc_mysql_query.c\ gmlc_mysql_query.h\ gmlc_mysql_database.c\ gmlc_mysql_database.h\ gmlc_mysql_table.c\ gmlc_mysql_table.h\ gmlc_mysql_view.c\ gmlc_mysql_view.h\ gmlc_mysql_procedure.c\ gmlc_mysql_procedure.h\ gmlc_mysql_function.c\ gmlc_mysql_function.h gmysqlcc_LDFLAGS = gmysqlcc_LDADD = \ $(GTK_LIBS) \ $(GTKSourceView_LIBS) \ $(MySQLc_LIBS) gmysqlcc-0.3.0/src/gmlc_gui_server_tab_query.c0000644000175000017500000007305210755301563016453 00000000000000/* * 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 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, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "gmlc_gui_server_tab.h" #include "gmlc_gui_server_tab_query.h" #include "gmlc_gui_helpers.h" #include "gmlc_mysql_query.h" #include static void gmlc_gui_server_tab_query_finalize (GmlcGuiServerTabQuery * pGmlcGuiSrvTabQuery); static void gmlc_gui_server_tab_query_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec); static void gmlc_gui_server_tab_query_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec); static void gmlc_gui_server_tab_query_interface_init (gpointer g_iface, gpointer iface_data); static void gmlc_gui_server_tab_query_update_ui (GmlcGuiServerTabQuery * pGmlcGuiSrvTabQuery, gboolean bShow); void gmlc_gui_server_tab_query_create_toolbar_items (GmlcGuiServerTabQuery * pGmlcGuiSrvTabQuery); void gmlc_gui_server_tab_query_create_widgets (GmlcGuiServerTabQuery * pGmlcGuiSrvTabQuery); void gmlc_gui_server_tab_query_init_widgets (GmlcGuiServerTabQuery * pGmlcGuiSrvTabQuery); void gmlc_gui_server_tab_query_execute_query (GmlcGuiServerTabQuery * pGmlcGuiSrvTabQuery, const gchar * query); void gmlc_gui_server_tab_query_clean_all_result(GmlcGuiServerTabQuery * pGmlcGuiSrvTabQuery); void gmlc_gui_server_tab_query_display_all_result(GmlcGuiServerTabQuery * pGmlcGuiSrvTabQuery); void gmlc_gui_server_tab_query_display_one_result(GmlcGuiServerTabQuery * pGmlcGuiSrvTabQuery); void gmlc_gui_server_tab_query_display_one_info(GmlcGuiServerTabQuery * pGmlcGuiSrvTabQuery); gboolean gmlc_gui_server_tab_query_evt_window_keyrelease (GtkWidget *widget, GdkEventKey *event, gpointer user_data); void gmlc_gui_server_tab_query_load_from_file (GmlcGuiServerTabQuery * pGmlcGuiSrvTabQuery, const gchar * pcFileName); void gmlc_gui_server_tab_query_save_to_file (GmlcGuiServerTabQuery * pGmlcGuiSrvTabQuery, const gchar * pcFileName); void gmlc_gui_server_tab_query_evt_btn_save_clicked(GtkWidget *widget, gpointer user_data); void gmlc_gui_server_tab_query_evt_btnExecSql_clicked(GtkWidget *widget, gpointer user_data); void gmlc_gui_server_tab_query_evt_btnDuplicateSql_clicked(GtkWidget *widget, gpointer user_data); void gmlc_gui_server_tab_query_evt_btnDumpSql_clicked(GtkWidget *widget, gpointer user_data); void gmlc_gui_server_tab_query_evt_btnClose_clicked(GtkWidget *widget, gpointer user_data); enum { PROP_0, PROP_SERVER, PROP_SERVER_WINDOW, PROP_DATABASE_NAME, PROP_FILENAME, }; G_DEFINE_TYPE_WITH_CODE (GmlcGuiServerTabQuery, gmlc_gui_server_tab_query, GTK_TYPE_VBOX, G_IMPLEMENT_INTERFACE (GMLC_GUI_TYPE_SERVER_TAB, gmlc_gui_server_tab_query_interface_init)); static void gmlc_gui_server_tab_query_interface_init (gpointer g_iface, gpointer iface_data) { GmlcGuiServerTabInterface *pIface = (GmlcGuiServerTabInterface *)g_iface; pIface->update_ui = (void (*) (GmlcGuiServerTab * self, gboolean bShow))gmlc_gui_server_tab_query_update_ui; } static void gmlc_gui_server_tab_query_class_init (GmlcGuiServerTabQueryClass * pClass) { GObjectClass *pObjClass = G_OBJECT_CLASS(pClass); pObjClass->finalize = (GObjectFinalizeFunc) gmlc_gui_server_tab_query_finalize; pObjClass->get_property = gmlc_gui_server_tab_query_get_property; pObjClass->set_property = gmlc_gui_server_tab_query_set_property; g_object_class_install_property(pObjClass, PROP_SERVER, g_param_spec_object("server", "Server object", "Server object", GMLC_MYSQL_TYPE_SERVER, G_PARAM_READABLE)); g_object_class_install_property(pObjClass, PROP_SERVER_WINDOW, g_param_spec_object("server_window", "Server window object", "Server window object", GMLC_GUI_TYPE_SERVER, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); g_object_class_install_property(pObjClass, PROP_DATABASE_NAME, g_param_spec_string("db_name", "Database name", "Name of the database", "", G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); g_object_class_install_property(pObjClass, PROP_FILENAME, g_param_spec_string("filename", "File name", "File name of the sql script", "", G_PARAM_READWRITE)); } static void gmlc_gui_server_tab_query_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec) { GmlcGuiServerTabQuery * pGmlcGuiSrvTabQuery = GMLC_GUI_SERVER_TAB_QUERY(object); switch (prop_id) { case PROP_SERVER : g_value_set_object(value, pGmlcGuiSrvTabQuery->pGmlcMysqlSrv); break; case PROP_SERVER_WINDOW : g_value_set_object(value, pGmlcGuiSrvTabQuery->pGmlcGuiSrv); break; case PROP_DATABASE_NAME : g_value_set_string(value, pGmlcGuiSrvTabQuery->pcDbName); break; case PROP_FILENAME : g_value_set_string(value, pGmlcGuiSrvTabQuery->pcFileName); break; default: { G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); break; } } } static void gmlc_gui_server_tab_query_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec) { GmlcGuiServerTabQuery * pGmlcGuiSrvTabQuery = GMLC_GUI_SERVER_TAB_QUERY(object); switch (prop_id) { case PROP_SERVER_WINDOW : pGmlcGuiSrvTabQuery->pGmlcGuiSrv = g_value_get_object(value); g_object_get(pGmlcGuiSrvTabQuery->pGmlcGuiSrv, "server", &pGmlcGuiSrvTabQuery->pGmlcMysqlSrv, NULL); gmlc_gui_server_tab_query_create_toolbar_items(pGmlcGuiSrvTabQuery); gmlc_gui_server_tab_query_create_widgets(pGmlcGuiSrvTabQuery); gmlc_gui_server_tab_query_init_widgets(pGmlcGuiSrvTabQuery); pGmlcGuiSrvTabQuery->pGmlcMysqlQry = gmlc_mysql_query_new(pGmlcGuiSrvTabQuery->pGmlcMysqlSrv, pGmlcGuiSrvTabQuery->pcDbName); break; case PROP_DATABASE_NAME : g_free(pGmlcGuiSrvTabQuery->pcDbName); pGmlcGuiSrvTabQuery->pcDbName = g_value_dup_string(value); break; case PROP_FILENAME : g_free(pGmlcGuiSrvTabQuery->pcFileName); pGmlcGuiSrvTabQuery->pcFileName = g_value_dup_string(value); break; default: { G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); break; } } } static void gmlc_gui_server_tab_query_init (GmlcGuiServerTabQuery * pGmlcGuiSrvTabQuery) { pGmlcGuiSrvTabQuery->pcDbName = NULL; pGmlcGuiSrvTabQuery->pGmlcMysqlSrv = NULL; pGmlcGuiSrvTabQuery->pGmlcMysqlQry = NULL; pGmlcGuiSrvTabQuery->pcFileName = NULL; g_signal_connect (G_OBJECT (pGmlcGuiSrvTabQuery), "key-release-event", G_CALLBACK (gmlc_gui_server_tab_query_evt_window_keyrelease), pGmlcGuiSrvTabQuery); } static void gmlc_gui_server_tab_query_finalize (GmlcGuiServerTabQuery * pGmlcGuiSrvTabQuery) { if (GTK_IS_WIDGET(pGmlcGuiSrvTabQuery->poQueryToolbar)) { gtk_widget_destroy(pGmlcGuiSrvTabQuery->poQueryToolbar); } } static void gmlc_gui_server_tab_query_update_ui (GmlcGuiServerTabQuery * pGmlcGuiSrvTabQuery, gboolean bShow) { if (bShow) { gtk_widget_show(pGmlcGuiSrvTabQuery->poQueryToolbar); } else { gtk_widget_hide(pGmlcGuiSrvTabQuery->poQueryToolbar); } } GmlcGuiServerTabQuery * gmlc_gui_server_tab_query_new (GmlcGuiServer * pGmlcGuiSrv, const gchar * pcDefDbName) { GmlcGuiServerTabQuery * pGmlcGuiSrvTabQuery = NULL; pGmlcGuiSrvTabQuery = GMLC_GUI_SERVER_TAB_QUERY(g_object_new(GMLC_GUI_TYPE_SERVER_TAB_QUERY, "db_name", pcDefDbName, "server_window", pGmlcGuiSrv, NULL)); return pGmlcGuiSrvTabQuery; } void gmlc_gui_server_tab_query_create_toolbar_items (GmlcGuiServerTabQuery * pGmlcGuiSrvTabQuery) { GtkWidget * poHBoxToolbar = NULL; GtkWidget * poImgBtn = NULL; GtkWidget * poBtn = NULL; g_object_get(pGmlcGuiSrvTabQuery->pGmlcGuiSrv, "toolbar-hbox", &poHBoxToolbar, NULL); pGmlcGuiSrvTabQuery->poQueryToolbar = gtk_hbox_new (FALSE, 2); gtk_widget_show (pGmlcGuiSrvTabQuery->poQueryToolbar); gtk_box_pack_start (GTK_BOX (poHBoxToolbar), pGmlcGuiSrvTabQuery->poQueryToolbar, TRUE, TRUE, 0); poBtn = gtk_button_new_from_stock(GTK_STOCK_OPEN); gtk_button_set_relief(GTK_BUTTON(poBtn), GTK_RELIEF_NONE); g_signal_connect (poBtn, "clicked", G_CALLBACK (gmlc_gui_server_tab_query_evt_btn_load_clicked), pGmlcGuiSrvTabQuery); gtk_widget_show(GTK_WIDGET(poBtn)); gtk_box_pack_start(GTK_BOX (pGmlcGuiSrvTabQuery->poQueryToolbar), poBtn, FALSE, FALSE, 0); poBtn = gtk_button_new_from_stock(GTK_STOCK_SAVE); gtk_button_set_relief(GTK_BUTTON(poBtn), GTK_RELIEF_NONE); g_signal_connect (poBtn, "clicked", G_CALLBACK (gmlc_gui_server_tab_query_evt_btn_save_clicked), pGmlcGuiSrvTabQuery); gtk_widget_show(GTK_WIDGET(poBtn)); gtk_box_pack_start(GTK_BOX (pGmlcGuiSrvTabQuery->poQueryToolbar), poBtn, FALSE, FALSE, 0); poImgBtn = gtk_image_new_from_stock(GTK_STOCK_EXECUTE, GTK_ICON_SIZE_LARGE_TOOLBAR); gtk_widget_show(poImgBtn); poBtn = gtk_button_new_with_label(_("Execute")); gtk_button_set_image(GTK_BUTTON(poBtn), poImgBtn); gtk_button_set_relief(GTK_BUTTON(poBtn), GTK_RELIEF_NONE); g_signal_connect(poBtn, "clicked", G_CALLBACK (gmlc_gui_server_tab_query_evt_btnExecSql_clicked), pGmlcGuiSrvTabQuery); gtk_widget_show(poBtn); gtk_box_pack_start(GTK_BOX(pGmlcGuiSrvTabQuery->poQueryToolbar), poBtn, FALSE, FALSE, 0); poImgBtn = gtk_image_new_from_stock(GTK_STOCK_COPY, GTK_ICON_SIZE_LARGE_TOOLBAR); gtk_widget_show(poImgBtn); poBtn = gtk_button_new_with_label(_("Duplicate")); gtk_button_set_image(GTK_BUTTON(poBtn), poImgBtn); gtk_button_set_relief(GTK_BUTTON(poBtn), GTK_RELIEF_NONE); g_signal_connect(poBtn, "clicked", G_CALLBACK (gmlc_gui_server_tab_query_evt_btnDuplicateSql_clicked), pGmlcGuiSrvTabQuery); gtk_widget_show(poBtn); gtk_box_pack_start(GTK_BOX(pGmlcGuiSrvTabQuery->poQueryToolbar), poBtn, FALSE, FALSE, 0); /* poImgBtn = gtk_image_new_from_stock(GTK_STOCK_FLOPPY, GTK_ICON_SIZE_LARGE_TOOLBAR); gtk_widget_show(poImgBtn); poBtn = gtk_button_new_with_label(_("Dump")); gtk_button_set_image(GTK_BUTTON(poBtn), poImgBtn); gtk_button_set_relief(GTK_BUTTON(poBtn), GTK_RELIEF_NONE); / * g_signal_connect(poBtn, "clicked", G_CALLBACK (gmlc_gui_server_tab_query_evt_btnDumpSql_clicked), pGmlcGuiSrvTabQuery); * / gtk_widget_show(poBtn); gtk_box_pack_start(GTK_BOX(pGmlcGuiSrvTabQuery->poQueryToolbar), poBtn, FALSE, FALSE, 0); */ poImgBtn = gtk_image_new_from_stock(GTK_STOCK_CLOSE, GTK_ICON_SIZE_LARGE_TOOLBAR); gtk_widget_show(poImgBtn); poBtn = gtk_button_new_with_label(_("Close tab")); gtk_button_set_image(GTK_BUTTON(poBtn), poImgBtn); gtk_button_set_relief(GTK_BUTTON(poBtn), GTK_RELIEF_NONE); g_signal_connect(poBtn, "clicked", G_CALLBACK (gmlc_gui_server_tab_query_evt_btnClose_clicked), pGmlcGuiSrvTabQuery); gtk_widget_show(poBtn); gtk_box_pack_start(GTK_BOX(pGmlcGuiSrvTabQuery->poQueryToolbar), poBtn, FALSE, FALSE, 0); } void gmlc_gui_server_tab_query_create_widgets (GmlcGuiServerTabQuery * pGmlcGuiSrvTabQuery) { GtkWidget *vpanedSQL; GtkWidget *scrlwndSQLRequest; GtkTooltips * tooltips; PangoFontDescription * pCourierFontDesc = NULL; glong lServerVersion = 0; /*GtkTreeSelection *select;*/ #ifdef USE_GTKSOURCEVIEW GtkTextBuffer * txtBuffer; #endif /* USE_GTKSOURCEVIEW */ tooltips = gtk_tooltips_new(); g_object_get(G_OBJECT(pGmlcGuiSrvTabQuery->pGmlcMysqlSrv), "version", &lServerVersion, NULL); vpanedSQL = gtk_vpaned_new (); gtk_widget_show (vpanedSQL); gtk_box_pack_start (GTK_BOX (pGmlcGuiSrvTabQuery), vpanedSQL, TRUE, TRUE, 0); gtk_paned_set_position (GTK_PANED (vpanedSQL), 100); scrlwndSQLRequest = gtk_scrolled_window_new (NULL, NULL); gtk_widget_show (scrlwndSQLRequest); gtk_paned_pack1 (GTK_PANED (vpanedSQL), scrlwndSQLRequest, FALSE, TRUE); #ifdef USE_GTKSOURCEVIEW pGmlcGuiSrvTabQuery->txtSQLRequest = gtk_source_view_new (); gtk_source_view_set_show_line_numbers (GTK_SOURCE_VIEW(pGmlcGuiSrvTabQuery->txtSQLRequest), TRUE); gtk_source_view_set_indent_width (GTK_SOURCE_VIEW(pGmlcGuiSrvTabQuery->txtSQLRequest), 2); txtBuffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(pGmlcGuiSrvTabQuery->txtSQLRequest)); gtk_source_buffer_set_highlight_syntax (GTK_SOURCE_BUFFER(txtBuffer), TRUE); gtk_source_buffer_set_language(GTK_SOURCE_BUFFER(txtBuffer), gtk_source_language_manager_get_language(LangManager, "sql")); #else /* USE_GTKSOURCEVIEW */ pGmlcGuiSrvTabQuery->txtSQLRequest = gtk_text_view_new (); #endif /* USE_GTKSOURCEVIEW */ gtk_widget_show (pGmlcGuiSrvTabQuery->txtSQLRequest); gtk_container_add (GTK_CONTAINER (scrlwndSQLRequest), pGmlcGuiSrvTabQuery->txtSQLRequest); pCourierFontDesc = pango_font_description_from_string(GpGmlcMscCfg->pcQueryFontName); gtk_widget_modify_font(pGmlcGuiSrvTabQuery->txtSQLRequest, pCourierFontDesc); pango_font_description_free(pCourierFontDesc); pGmlcGuiSrvTabQuery->tabSQLResult = gtk_notebook_new (); gtk_notebook_set_scrollable(GTK_NOTEBOOK(pGmlcGuiSrvTabQuery->tabSQLResult), TRUE); gtk_widget_show (pGmlcGuiSrvTabQuery->tabSQLResult); gtk_paned_pack2 (GTK_PANED (vpanedSQL), pGmlcGuiSrvTabQuery->tabSQLResult, TRUE, TRUE); pGmlcGuiSrvTabQuery->lstSQLResult = NULL; pGmlcGuiSrvTabQuery->statusbarSQL = NULL; /* pGmlcGuiSrvTabQuery->statusbarSQL = gtk_statusbar_new (); gtk_widget_show (pGmlcGuiSrvTabQuery->statusbarSQL); gtk_box_pack_start (GTK_BOX (pGmlcGuiSrvTabQuery), pGmlcGuiSrvTabQuery->statusbarSQL, FALSE, FALSE, 0); */ } void gmlc_gui_server_tab_query_init_widgets (GmlcGuiServerTabQuery * pGmlcGuiSrvTabQuery) { UNUSED_VAR(pGmlcGuiSrvTabQuery); } gboolean gmlc_gui_server_tab_query_set_query (GmlcGuiServerTabQuery * pGmlcGuiSrvTabQuery, const gchar * pcQuery, gboolean bExecNow) { GtkTextBuffer * txtBuffer; if (pcQuery != NULL) { txtBuffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(pGmlcGuiSrvTabQuery->txtSQLRequest)); gtk_text_buffer_set_text(GTK_TEXT_BUFFER(txtBuffer), pcQuery, -1); if (bExecNow) { gmlc_gui_server_tab_query_execute_query (pGmlcGuiSrvTabQuery, pcQuery); } return TRUE; } return FALSE; } gchar * gmlc_gui_server_tab_query_get_query (GmlcGuiServerTabQuery * pGmlcGuiSrvTabQuery) { GtkTextBuffer * txtBuffer; GtkTextIter begin, end; gchar * pcSqlQuery; txtBuffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(pGmlcGuiSrvTabQuery->txtSQLRequest)); if (!gtk_text_buffer_get_selection_bounds(txtBuffer, &begin, &end)) { gtk_text_buffer_get_start_iter (GTK_TEXT_BUFFER(txtBuffer), &begin); gtk_text_buffer_get_end_iter (GTK_TEXT_BUFFER(txtBuffer), &end); } pcSqlQuery = gtk_text_buffer_get_text(GTK_TEXT_BUFFER(txtBuffer), &begin, &end, FALSE); return pcSqlQuery; } void gmlc_gui_server_tab_query_execute_query (GmlcGuiServerTabQuery * pGmlcGuiSrvTabQuery, const gchar * query) { GtkWidget * msgdlg; gmlc_mysql_query_free_result(pGmlcGuiSrvTabQuery->pGmlcMysqlQry); if (!gmlc_mysql_query_execute(pGmlcGuiSrvTabQuery->pGmlcMysqlQry, query, strlen(query), FALSE)) { /* if is it a write warning */ if (pGmlcGuiSrvTabQuery->pGmlcMysqlQry->pGmlcMysqlSrv->bWriteWarning && pGmlcGuiSrvTabQuery->pGmlcMysqlQry->iErrCode == -1001) { if (askYesno(_("Write Warning !!!"), _("Warning !!! This server has been marked with Write Warning flags !!!\nIt is dangerous for the data ... :)\n\nDo you want force the execution of the query ?"))) { if (!gmlc_mysql_query_execute(pGmlcGuiSrvTabQuery->pGmlcMysqlQry, query, strlen(query), TRUE)) { /* Query Not Ok */ msgdlg = gtk_message_dialog_new(GTK_WINDOW(pGmlcGuiSrvTabQuery->pGmlcGuiSrv), GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, _("Error during the query : (%d) %s"), pGmlcGuiSrvTabQuery->pGmlcMysqlQry->iErrCode, pGmlcGuiSrvTabQuery->pGmlcMysqlQry->pcErrMsg); gtk_dialog_run (GTK_DIALOG (msgdlg)); gtk_widget_destroy (msgdlg); gmlc_mysql_query_free_result(pGmlcGuiSrvTabQuery->pGmlcMysqlQry); return; } } else { gmlc_mysql_query_free_result(pGmlcGuiSrvTabQuery->pGmlcMysqlQry); return; } } else { /* It is really an error */ /* Query Not Ok */ msgdlg = gtk_message_dialog_new(GTK_WINDOW(pGmlcGuiSrvTabQuery->pGmlcGuiSrv), GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, _("Error during the query : (%d) %s"), pGmlcGuiSrvTabQuery->pGmlcMysqlQry->iErrCode, pGmlcGuiSrvTabQuery->pGmlcMysqlQry->pcErrMsg); gtk_dialog_run (GTK_DIALOG (msgdlg)); gtk_widget_destroy (msgdlg); gmlc_mysql_query_free_result(pGmlcGuiSrvTabQuery->pGmlcMysqlQry); return; } } /* Query Ok ... Continue */ /* Select query - Display datas */ pGmlcGuiSrvTabQuery->iNumResult = 0; gmlc_gui_server_tab_query_clean_all_result(pGmlcGuiSrvTabQuery); gmlc_gui_server_tab_query_display_all_result(pGmlcGuiSrvTabQuery); } void gmlc_gui_server_tab_query_clean_all_result(GmlcGuiServerTabQuery * pGmlcGuiSrvTabQuery) { while (gtk_notebook_get_n_pages(GTK_NOTEBOOK(pGmlcGuiSrvTabQuery->tabSQLResult)) > 0) { gtk_notebook_remove_page(GTK_NOTEBOOK(pGmlcGuiSrvTabQuery->tabSQLResult), 0); } } void gmlc_gui_server_tab_query_display_all_result(GmlcGuiServerTabQuery * pGmlcGuiSrvTabQuery) { GtkWidget * msgdlg; do { /* Modification query - Display affected rows */ if (pGmlcGuiSrvTabQuery->pGmlcMysqlQry->iErrCode == 0 && pGmlcGuiSrvTabQuery->pGmlcMysqlQry->iNbField == 0) { gmlc_gui_server_tab_query_display_one_info(pGmlcGuiSrvTabQuery); } else { gmlc_gui_server_tab_query_display_one_result(pGmlcGuiSrvTabQuery); } } while (gmlc_mysql_query_goto_next_result(pGmlcGuiSrvTabQuery->pGmlcMysqlQry)); if (pGmlcGuiSrvTabQuery->pGmlcMysqlQry->iErrCode != 0) { /* Query Not Ok */ msgdlg = gtk_message_dialog_new(GTK_WINDOW(pGmlcGuiSrvTabQuery->pGmlcGuiSrv), GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, _("Error during the query : (%d) %s"), pGmlcGuiSrvTabQuery->pGmlcMysqlQry->iErrCode, pGmlcGuiSrvTabQuery->pGmlcMysqlQry->pcErrMsg); gtk_dialog_run (GTK_DIALOG (msgdlg)); gtk_widget_destroy (msgdlg); gmlc_mysql_query_free_result(pGmlcGuiSrvTabQuery->pGmlcMysqlQry); } } void gmlc_gui_server_tab_query_display_one_result(GmlcGuiServerTabQuery * pGmlcGuiSrvTabQuery) { GtkWidget * sclSQLResult = NULL; GtkWidget * lstSQLResult = NULL; /*GtkWidget * select = NULL;*/ GtkWidget * lblTabTitle = NULL; GString * strTitle = NULL; GArray * arRow = NULL; GArray * arHeaders = NULL; gint i = 0; GtkTreeViewColumn * poCurrCol = NULL; GtkListStore * poLstStore = NULL; GtkCellRenderer * * ppoRenderer = NULL; GType * poTypes = NULL; gchar * pcColTitle = NULL; gint iNbrCol = 0; guint iCount = 0; GValue poGVal = {0, }; GValue poGValPtr = {0, }; GtkTreeIter iter; /* sColsInfo * psColsInfo = NULL; guint sbContext, sbItemId; GValue gvalbool = {0, }; GString *strSttsBar; */ pGmlcGuiSrvTabQuery->iNumResult ++; /* Create widgets */ strTitle = g_string_new(""); g_string_append_printf(strTitle, _("Result %d"), pGmlcGuiSrvTabQuery->iNumResult); lblTabTitle = gtk_label_new(strTitle->str); gtk_widget_show (lblTabTitle); g_string_free(strTitle, TRUE); sclSQLResult = gtk_scrolled_window_new (NULL, NULL); gtk_widget_show (sclSQLResult); gtk_notebook_append_page(GTK_NOTEBOOK(pGmlcGuiSrvTabQuery->tabSQLResult), sclSQLResult, lblTabTitle); lstSQLResult = gtk_tree_view_new (); gtk_widget_show (lstSQLResult); gtk_tree_view_set_rules_hint(GTK_TREE_VIEW (lstSQLResult), TRUE); gtk_container_add (GTK_CONTAINER (sclSQLResult), lstSQLResult); /* select = gtk_tree_view_get_selection (GTK_TREE_VIEW (lstSQLResult)); gtk_tree_selection_set_mode (select, GTK_SELECTION_SINGLE); g_signal_connect (G_OBJECT (select), "changed", G_CALLBACK (gmysqlcc_gui_server_tab_query_evt_resultRow_selected), gui_pGmlcGuiSrvTabQuery); */ /* Create columns and display values */ arRow = gmlc_mysql_query_next_record(pGmlcGuiSrvTabQuery->pGmlcMysqlQry); /* To get back fields headers */ arHeaders = gmlc_mysql_query_get_headers(pGmlcGuiSrvTabQuery->pGmlcMysqlQry); if (arHeaders != NULL) { ppoRenderer = (GtkCellRenderer * *)g_try_malloc(arHeaders->len * sizeof(GtkCellRenderer *)); /* if (mysql_query_is_editable(gui_query->mysql_qry)) { psColsInfo = (sColsInfo *)g_try_malloc(arHeaders->len * sizeof(sColsInfo)); g_value_init(&gvalbool, G_TYPE_BOOLEAN); g_value_set_boolean(&gvalbool, TRUE); for (i = 0; i < gui_query->mysql_qry->nbrField; i++) { ppoRenderer[i] = gtk_cell_renderer_text_new (); psColsInfo[i].gui_query = gui_query; psColsInfo[i].numCol = i; g_object_set_property(G_OBJECT(ppoRenderer[i]), "editable", &gvalbool); g_signal_connect (G_OBJECT (ppoRenderer[i]), "edited", G_CALLBACK (gmysqlcc_gui_server_tab_query_evt_resultRow_edited), (gpointer)&psColsInfo[i]); } } else { */ for (i = 0; i < arHeaders->len; i++) { ppoRenderer[i] = gtk_cell_renderer_text_new (); } g_print("Can't Edit :( !!!\n"); /* } */ iNbrCol = arHeaders->len + 1; poTypes = (GType *)g_try_malloc(iNbrCol * sizeof(GType)); for(i = 0; i < arHeaders->len; i++) { pcColTitle = gmlc_helpers_protect_underscore(g_array_index(arHeaders, gchar *, i)); poCurrCol = gtk_tree_view_column_new_with_attributes (pcColTitle, ppoRenderer[i], "text", i, NULL); gtk_tree_view_column_set_resizable(GTK_TREE_VIEW_COLUMN(poCurrCol), TRUE); gtk_tree_view_column_set_sizing(GTK_TREE_VIEW_COLUMN(poCurrCol), GTK_TREE_VIEW_COLUMN_AUTOSIZE); gtk_tree_view_append_column (GTK_TREE_VIEW (lstSQLResult), poCurrCol); g_free(pcColTitle); poTypes[i] = G_TYPE_STRING; } poTypes[arHeaders->len] = G_TYPE_POINTER; poLstStore = gtk_list_store_newv(iNbrCol, poTypes); iCount = 0; g_value_init(&poGVal, G_TYPE_STRING); g_value_init(&poGValPtr, G_TYPE_POINTER); g_print ("*** Read data of new query \n"); if (arRow != NULL) { do { iCount ++; gtk_list_store_append(poLstStore, &iter); for(i = 0; i < arRow->len; i++) { g_value_set_string(&poGVal, g_array_index(arRow, gchar *, i)); gtk_list_store_set_value(poLstStore, &iter, i, &poGVal); g_free(g_array_index(arRow, gchar *, i)); } g_value_set_pointer(&poGValPtr, NULL); gtk_list_store_set_value(poLstStore, &iter, arRow->len, &poGValPtr); g_array_free(arRow, TRUE); } while ((arRow = gmlc_mysql_query_next_record(pGmlcGuiSrvTabQuery->pGmlcMysqlQry)) != NULL); } gtk_tree_view_set_model(GTK_TREE_VIEW(lstSQLResult), GTK_TREE_MODEL(poLstStore)); g_object_unref (G_OBJECT (poLstStore)); } } void gmlc_gui_server_tab_query_display_one_info(GmlcGuiServerTabQuery * pGmlcGuiSrvTabQuery) { GtkTextBuffer * txtBuffer; GtkWidget * sclSQLResult = NULL; GtkWidget * txtSQLInfo = NULL; GtkWidget * lblTabTitle = NULL; PangoFontDescription * pCourierFontDesc = NULL; GString * strTitle = NULL; GString * strInfos = NULL; pGmlcGuiSrvTabQuery->iNumResult ++; /* Create widgets */ strTitle = g_string_new(""); g_string_append_printf(strTitle, _("Result %d"), pGmlcGuiSrvTabQuery->iNumResult); lblTabTitle = gtk_label_new(strTitle->str); gtk_widget_show (lblTabTitle); g_string_free(strTitle, TRUE); sclSQLResult = gtk_scrolled_window_new (NULL, NULL); gtk_widget_show (sclSQLResult); gtk_notebook_append_page(GTK_NOTEBOOK(pGmlcGuiSrvTabQuery->tabSQLResult), sclSQLResult, lblTabTitle); txtSQLInfo = gtk_text_view_new (); pCourierFontDesc = pango_font_description_from_string(GpGmlcMscCfg->pcQueryFontName); gtk_widget_modify_font(txtSQLInfo, pCourierFontDesc); pango_font_description_free(pCourierFontDesc); gtk_widget_show (txtSQLInfo); gtk_container_add (GTK_CONTAINER (sclSQLResult), txtSQLInfo); /* Display information */ strInfos = g_string_new(""); g_string_append_printf(strInfos, _("Query ok.\nAffected row : %d"), pGmlcGuiSrvTabQuery->pGmlcMysqlQry->iEditResult); txtBuffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(txtSQLInfo)); gtk_text_buffer_set_text(GTK_TEXT_BUFFER(txtBuffer), strInfos->str, -1); g_string_free(strInfos, TRUE); } gboolean gmlc_gui_server_tab_query_evt_window_keyrelease (GtkWidget *widget, GdkEventKey *event, gpointer user_data) { if ((event->state & GDK_CONTROL_MASK && event->keyval == GDK_e) || (event->keyval == GDK_F5)) { gmlc_gui_server_tab_query_evt_btnExecSql_clicked (widget, user_data); return TRUE; } else if ((event->state & GDK_CONTROL_MASK && event->keyval == GDK_w)) { gmlc_gui_server_tab_query_evt_btnClose_clicked (widget, user_data); } else if ((event->state & GDK_CONTROL_MASK && event->keyval == GDK_d)) { gmlc_gui_server_tab_query_evt_btnDuplicateSql_clicked (widget, user_data); } return FALSE; } void gmlc_gui_server_tab_query_load_from_file (GmlcGuiServerTabQuery * pGmlcGuiSrvTabQuery, const gchar * pcFileName) { gchar * content = NULL; GtkTextBuffer * txtBuffer; GIOChannel * loadFile; GError * err = NULL; gsize nbBytes; g_return_if_fail (pcFileName != NULL); g_object_set(pGmlcGuiSrvTabQuery, "filename", pcFileName, NULL); loadFile = g_io_channel_new_file(pcFileName, "r", &err); g_io_channel_set_encoding(loadFile, "ISO-8859-15", &err); if (g_io_channel_read_to_end(loadFile, &content, &nbBytes, &err) != G_IO_STATUS_NORMAL) { content = NULL; } g_io_channel_unref(loadFile); txtBuffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(pGmlcGuiSrvTabQuery->txtSQLRequest)); gtk_text_buffer_set_text(GTK_TEXT_BUFFER(txtBuffer), content, -1); } void gmlc_gui_server_tab_query_evt_btn_load_clicked(GtkWidget *widget, gpointer user_data) { GmlcGuiServerTabQuery * pGmlcGuiSrvTabQuery = GMLC_GUI_SERVER_TAB_QUERY(user_data); GtkWidget * poChooser = NULL; gint response; poChooser = gtk_file_chooser_dialog_new (_("Load sql file"), GTK_WINDOW(pGmlcGuiSrvTabQuery->pGmlcGuiSrv), GTK_FILE_CHOOSER_ACTION_OPEN, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OPEN, GTK_RESPONSE_OK, NULL); if (pGmlcGuiSrvTabQuery->pcFileName != NULL) { gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (poChooser), pGmlcGuiSrvTabQuery->pcFileName); } response = gtk_dialog_run (GTK_DIALOG (poChooser)); if (response == GTK_RESPONSE_OK) { gchar * pcFileName = NULL; pcFileName = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (poChooser)); if (pcFileName != NULL) { gmlc_gui_server_tab_query_load_from_file (pGmlcGuiSrvTabQuery, pcFileName); g_free (pcFileName); } } gtk_widget_destroy (poChooser); } void gmlc_gui_server_tab_query_save_to_file (GmlcGuiServerTabQuery * pGmlcGuiSrvTabQuery, const gchar * pcFileName) { gchar * content = NULL; GtkTextBuffer * txtBuffer; GtkTextIter begin, end; GIOChannel * saveFile; GError * err = NULL; gsize nbBytes; g_return_if_fail (pcFileName != NULL); g_object_set(pGmlcGuiSrvTabQuery, "filename", pcFileName, NULL); txtBuffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(pGmlcGuiSrvTabQuery->txtSQLRequest)); gtk_text_buffer_get_start_iter (GTK_TEXT_BUFFER(txtBuffer), &begin); gtk_text_buffer_get_end_iter (GTK_TEXT_BUFFER(txtBuffer), &end); content = (gchar *)gtk_text_buffer_get_text (GTK_TEXT_BUFFER(txtBuffer), &begin, &end, FALSE); saveFile = g_io_channel_new_file(pcFileName, "w", &err); g_io_channel_set_encoding(saveFile, "ISO-8859-15", &err); g_io_channel_write_chars(saveFile, content, -1, &nbBytes, &err); g_io_channel_unref(saveFile); } void gmlc_gui_server_tab_query_evt_btn_save_clicked(GtkWidget *widget, gpointer user_data) { GmlcGuiServerTabQuery * pGmlcGuiSrvTabQuery = GMLC_GUI_SERVER_TAB_QUERY(user_data); GtkWidget * poChooser = NULL; gint response; poChooser = gtk_file_chooser_dialog_new (_("Save sql file"), GTK_WINDOW(pGmlcGuiSrvTabQuery->pGmlcGuiSrv), GTK_FILE_CHOOSER_ACTION_SAVE, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_SAVE, GTK_RESPONSE_OK, NULL); if (pGmlcGuiSrvTabQuery->pcFileName != NULL) { gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (poChooser), pGmlcGuiSrvTabQuery->pcFileName); } response = gtk_dialog_run (GTK_DIALOG (poChooser)); if (response == GTK_RESPONSE_OK) { gchar * pcFileName = NULL; pcFileName = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (poChooser)); if (pcFileName != NULL) { gmlc_gui_server_tab_query_save_to_file (pGmlcGuiSrvTabQuery, pcFileName); g_free (pcFileName); } } gtk_widget_destroy (poChooser); } void gmlc_gui_server_tab_query_evt_btnExecSql_clicked(GtkWidget *widget, gpointer user_data) { GmlcGuiServerTabQuery * pGmlcGuiSrvTabQuery = GMLC_GUI_SERVER_TAB_QUERY(user_data); gchar * pcSqlQuery; UNUSED_VAR(widget); g_print("Execute SQL\n"); pcSqlQuery = gmlc_gui_server_tab_query_get_query(pGmlcGuiSrvTabQuery); g_print("SQL Query : '%s'\n", pcSqlQuery); gmlc_gui_server_tab_query_execute_query(pGmlcGuiSrvTabQuery, pcSqlQuery); g_free(pcSqlQuery); } void gmlc_gui_server_tab_query_evt_btnDuplicateSql_clicked(GtkWidget *widget, gpointer user_data) { GmlcGuiServerTabQuery * pGmlcGuiSrvTabQuery = GMLC_GUI_SERVER_TAB_QUERY(user_data); gchar * pcSqlQuery; UNUSED_VAR(widget); pcSqlQuery = gmlc_gui_server_tab_query_get_query(pGmlcGuiSrvTabQuery); gmlc_gui_server_add_query_tab(pGmlcGuiSrvTabQuery->pGmlcGuiSrv, pGmlcGuiSrvTabQuery->pcDbName, pcSqlQuery, FALSE); g_free(pcSqlQuery); } void gmlc_gui_server_tab_query_evt_btnDumpSql_clicked(GtkWidget *widget, gpointer user_data) { GmlcGuiServerTabQuery * pGmlcGuiSrvTabQuery = GMLC_GUI_SERVER_TAB_QUERY(user_data); /*p_gmysqlcc_gui_dump gui_dump;*/ gchar * pcSqlQuery; UNUSED_VAR(widget); pcSqlQuery = gmlc_gui_server_tab_query_get_query(pGmlcGuiSrvTabQuery); g_print("Dump query ...\n%s\n", pcSqlQuery); /* gui_dump = gmlc_gui_dump_new(NULL, mysql_query_get_database(pGmlcGuiQry->mysql_qry), NULL, pcSqlQuery); gmlc_gui_dump_display(gui_dump, TRUE); */ g_free(pcSqlQuery); } void gmlc_gui_server_tab_query_evt_btnClose_clicked(GtkWidget *widget, gpointer user_data) { GmlcGuiServerTabQuery * pGmlcGuiSrvTabQuery = GMLC_GUI_SERVER_TAB_QUERY(user_data); UNUSED_VAR(widget); gmlc_gui_server_close_query_tab(pGmlcGuiSrvTabQuery->pGmlcGuiSrv, GTK_WIDGET(pGmlcGuiSrvTabQuery)); } gmysqlcc-0.3.0/src/gmlc_gui_server.c0000644000175000017500000002402710755301563014376 00000000000000/* * 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 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, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "gmlc_gui_server.h" #include "gmlc_gui_server_tab.h" #include "gmlc_gui_server_tab_data.h" #include "gmlc_gui_server_tab_help.h" #include "gmlc_gui_server_tab_query.h" static void gmlc_gui_server_finalize (GmlcGuiServer * pGmlcGuiSrv); static void gmlc_gui_server_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec); static void gmlc_gui_server_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec); static void gmlc_gui_server_create_widgets (GmlcGuiServer * pGmlcGuiSrv); static void gmlc_gui_server_create_tabs(GmlcGuiServer * pGmlcGuiSrv); static void gmlc_gui_server_init_widgets (GmlcGuiServer * pGmlcGuiSrv); static void gmlc_gui_server_evt_destroy(GtkWidget *widget, gpointer user_data); static void gmlc_gui_server_evt_tab_selected (GtkNotebook *notebook, GtkNotebookPage *page, guint page_num, gpointer user_data); static void gmlc_gui_server_evt_btnTlbrClose_clicked (GtkWidget *widget, gpointer user_data); static void gmlc_gui_server_evt_btnTlbrSqlServerList_clicked (GtkWidget *widget, gpointer user_data); enum { PROP_0, PROP_SERVER, PROP_TOOLBAR, PROP_VBOX_TOOLBAR, }; G_DEFINE_TYPE (GmlcGuiServer, gmlc_gui_server, GTK_TYPE_WINDOW); static void gmlc_gui_server_class_init (GmlcGuiServerClass * pClass) { GObjectClass *pObjClass = G_OBJECT_CLASS(pClass); pObjClass->finalize = (GObjectFinalizeFunc) gmlc_gui_server_finalize; pObjClass->get_property = gmlc_gui_server_get_property; pObjClass->set_property = gmlc_gui_server_set_property; g_object_class_install_property(pObjClass, PROP_SERVER, g_param_spec_object("server", "Server object", "Server object", GMLC_MYSQL_TYPE_SERVER, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); g_object_class_install_property(pObjClass, PROP_VBOX_TOOLBAR, g_param_spec_object("toolbar-hbox", "HBox where is the toolbar object", "HBox where is the toolbar object", GTK_TYPE_HBOX, G_PARAM_READABLE)); } static void gmlc_gui_server_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec) { GmlcGuiServer * pGmlcGuiSrv = GMLC_GUI_SERVER(object); switch (prop_id) { case PROP_SERVER : g_value_set_object(value, pGmlcGuiSrv->pGmlcMysqlSrv); break; case PROP_VBOX_TOOLBAR : g_value_set_object(value, pGmlcGuiSrv->poHBoxToolbar); break; default: { G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); break; } } } static void gmlc_gui_server_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec) { GmlcGuiServer * pGmlcGuiSrv = GMLC_GUI_SERVER(object); switch (prop_id) { case PROP_SERVER : { gchar * pcTitle = NULL; gchar * pcName = NULL; pGmlcGuiSrv->pGmlcMysqlSrv = g_value_get_object(value); g_object_get(pGmlcGuiSrv->pGmlcMysqlSrv, "name", &pcName, NULL); pcTitle = g_strdup_printf(_("GMySQLcc - Server window : %s"), pcName); gtk_window_set_title (GTK_WINDOW(pGmlcGuiSrv), pcTitle); gmlc_gui_server_create_tabs(pGmlcGuiSrv); gmlc_gui_server_init_widgets(pGmlcGuiSrv); g_free(pcTitle); g_free(pcName); break; } default: { G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); break; } } } static void gmlc_gui_server_init (GmlcGuiServer * pGmlcGuiSrv) { GiNbrWnd ++; gtk_window_set_title (GTK_WINDOW(pGmlcGuiSrv), _("GMySQLcc - Server window : %s")); gtk_window_set_default_size (GTK_WINDOW(pGmlcGuiSrv), 640, 480); g_signal_connect(G_OBJECT (pGmlcGuiSrv), "destroy", G_CALLBACK (gmlc_gui_server_evt_destroy), NULL); pGmlcGuiSrv->pGmlcMysqlSrv = NULL; gmlc_gui_server_create_widgets(pGmlcGuiSrv); } static void gmlc_gui_server_finalize (GmlcGuiServer * pGmlcGuiSrv) { UNUSED_VAR(pGmlcGuiSrv); } GmlcGuiServer * gmlc_gui_server_new (GmlcMysqlServer * pGmlcMysqlSrv) { GmlcGuiServer * pGmlcGuiSrv = NULL; pGmlcGuiSrv = GMLC_GUI_SERVER(g_object_new(GMLC_GUI_TYPE_SERVER, "server", pGmlcMysqlSrv, NULL)); return pGmlcGuiSrv; } static void gmlc_gui_server_create_widgets (GmlcGuiServer * pGmlcGuiSrv) { GtkWidget * statusbar; GtkWidget * vbox; GtkWidget * imgBtn; GtkWidget * poBtn; GtkTooltips * tooltips; tooltips = gtk_tooltips_new(); vbox = gtk_vbox_new (FALSE, 0); gtk_widget_show (vbox); gtk_container_add (GTK_CONTAINER (pGmlcGuiSrv), vbox); pGmlcGuiSrv->poHBoxToolbar = gtk_hbox_new (FALSE, 0); gtk_widget_show (pGmlcGuiSrv->poHBoxToolbar); gtk_box_pack_start (GTK_BOX (vbox), pGmlcGuiSrv->poHBoxToolbar, FALSE, FALSE, 0); /* poBtn = gtk_button_new_from_stock(GTK_STOCK_CLOSE); gtk_button_set_relief(GTK_BUTTON(poBtn), GTK_RELIEF_NONE); g_signal_connect(poBtn, "clicked", G_CALLBACK (gmlc_gui_server_evt_btnTlbrClose_clicked), pGmlcGuiSrv); gtk_widget_show(poBtn); gtk_box_pack_end(GTK_BOX (pGmlcGuiSrv->poHBoxToolbar), poBtn, FALSE, FALSE, 0); */ imgBtn = gtk_image_new_from_stock(GTK_STOCK_OPEN, GTK_ICON_SIZE_LARGE_TOOLBAR); gtk_widget_show(imgBtn); poBtn = gtk_button_new_with_label (_("Servers list")); gtk_button_set_image(GTK_BUTTON(poBtn), imgBtn); gtk_button_set_relief(GTK_BUTTON(poBtn), GTK_RELIEF_NONE); g_signal_connect(poBtn, "clicked", G_CALLBACK (gmlc_gui_server_evt_btnTlbrSqlServerList_clicked), pGmlcGuiSrv); gtk_widget_show(poBtn); gtk_box_pack_end(GTK_BOX (pGmlcGuiSrv->poHBoxToolbar), poBtn, FALSE, FALSE, 0); pGmlcGuiSrv->nbkGeneral = gtk_notebook_new (); gtk_widget_show (pGmlcGuiSrv->nbkGeneral); gtk_box_pack_start (GTK_BOX (vbox), pGmlcGuiSrv->nbkGeneral, TRUE, TRUE, 0); g_signal_connect (G_OBJECT (pGmlcGuiSrv->nbkGeneral), "switch-page", G_CALLBACK (gmlc_gui_server_evt_tab_selected), pGmlcGuiSrv); statusbar = gtk_statusbar_new (); gtk_widget_show (statusbar); gtk_box_pack_start (GTK_BOX (vbox), statusbar, FALSE, FALSE, 0); } static void gmlc_gui_server_create_tabs(GmlcGuiServer * pGmlcGuiSrv) { GtkWidget * poLabel = NULL; GtkWidget * poTab = NULL; glong lServerVersion = 0; gint iPageShow = 0; g_object_get(G_OBJECT(pGmlcGuiSrv->pGmlcMysqlSrv), "version", &lServerVersion, NULL); gtk_notebook_set_scrollable(GTK_NOTEBOOK(pGmlcGuiSrv->nbkGeneral), TRUE); if (lServerVersion >= 40100) { poLabel = gtk_label_new(_("Help")); gtk_widget_show (poLabel); gtk_label_set_justify (GTK_LABEL (poLabel), GTK_JUSTIFY_LEFT); poTab = GTK_WIDGET(gmlc_gui_server_tab_help_new(pGmlcGuiSrv)); gtk_widget_show (poTab); gtk_notebook_append_page(GTK_NOTEBOOK(pGmlcGuiSrv->nbkGeneral), poTab, poLabel); gtk_notebook_set_tab_reorderable(GTK_NOTEBOOK(pGmlcGuiSrv->nbkGeneral), poTab, TRUE); iPageShow = 1; } poLabel = gtk_label_new(_("Databases")); gtk_widget_show (poLabel); gtk_label_set_justify (GTK_LABEL (poLabel), GTK_JUSTIFY_LEFT); poTab = GTK_WIDGET(gmlc_gui_server_tab_data_new(pGmlcGuiSrv)); gtk_widget_show (poTab); gtk_notebook_append_page(GTK_NOTEBOOK(pGmlcGuiSrv->nbkGeneral), poTab, poLabel); gtk_notebook_set_tab_reorderable(GTK_NOTEBOOK(pGmlcGuiSrv->nbkGeneral), poTab, TRUE); gtk_notebook_set_current_page(GTK_NOTEBOOK(pGmlcGuiSrv->nbkGeneral), iPageShow); } static void gmlc_gui_server_init_widgets (GmlcGuiServer * pGmlcGuiSrv) { } GtkWidget * gmlc_gui_server_add_query_tab(GmlcGuiServer * pGmlcGuiSrv, const gchar * pcDbName, const gchar * pcQuery, gboolean bExecNow) { GtkWidget * poLabel = NULL; GtkWidget * poTab = NULL; gchar * pcText = NULL; gint iNewPage = 0; pcText = g_strdup_printf(_("Query - db : '%s'"), pcDbName); poLabel = gtk_label_new(pcText); gtk_widget_show (poLabel); gtk_label_set_justify (GTK_LABEL (poLabel), GTK_JUSTIFY_LEFT); poTab = GTK_WIDGET(gmlc_gui_server_tab_query_new(pGmlcGuiSrv, pcDbName)); gtk_widget_show (poTab); iNewPage = gtk_notebook_append_page(GTK_NOTEBOOK(pGmlcGuiSrv->nbkGeneral), poTab, poLabel); gtk_notebook_set_tab_reorderable(GTK_NOTEBOOK(pGmlcGuiSrv->nbkGeneral), poTab, TRUE); gtk_notebook_set_current_page(GTK_NOTEBOOK(pGmlcGuiSrv->nbkGeneral), iNewPage); if (pcQuery != NULL) { gmlc_gui_server_tab_query_set_query(GMLC_GUI_SERVER_TAB_QUERY(poTab), pcQuery, bExecNow); } g_free(pcText); return poTab; } void gmlc_gui_server_close_query_tab(GmlcGuiServer * pGmlcGuiSrv, GtkWidget * pTabQuery) { gint iPageIdx = 0; iPageIdx = gtk_notebook_page_num(GTK_NOTEBOOK(pGmlcGuiSrv->nbkGeneral), pTabQuery); gtk_notebook_remove_page(GTK_NOTEBOOK(pGmlcGuiSrv->nbkGeneral), iPageIdx); } static void gmlc_gui_server_evt_destroy(GtkWidget *widget, gpointer user_data) { UNUSED_VAR(user_data); gtk_widget_hide(GTK_WIDGET(widget)); GiNbrWnd --; if (GiNbrWnd <= 0) { gtk_main_quit(); } } static void gmlc_gui_server_evt_tab_selected (GtkNotebook *poNoteBook, GtkNotebookPage *page, guint iPageNum, gpointer user_data) { GtkWidget * pChild = NULL; gint iPrevPageNum = 0; UNUSED_VAR(page); UNUSED_VAR(user_data); iPrevPageNum = gtk_notebook_get_current_page(poNoteBook); pChild = gtk_notebook_get_nth_page(poNoteBook, iPrevPageNum); gmlc_gui_server_tab_update_ui(GMLC_GUI_SERVER_TAB(pChild), FALSE); pChild = gtk_notebook_get_nth_page(poNoteBook, iPageNum); gmlc_gui_server_tab_update_ui(GMLC_GUI_SERVER_TAB(pChild), TRUE); } void gmlc_gui_server_evt_btnTlbrSqlServerList_clicked (GtkWidget *widget, gpointer user_data) { UNUSED_VAR(widget); UNUSED_VAR(user_data); gtk_widget_show(GpGmlcGuiCnxns); } void gmlc_gui_server_evt_btnTlbrClose_clicked (GtkWidget *widget, gpointer user_data) { GmlcGuiServer * pGmlcGuiSrv = GMLC_GUI_SERVER(user_data); UNUSED_VAR(widget); gtk_widget_destroy(GTK_WIDGET(pGmlcGuiSrv)); } gmysqlcc-0.3.0/src/gmlc_gui_server_tab.h0000644000175000017500000000327410755301563015232 00000000000000/* * 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 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, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __GMLC_GUI_SERVER_TAB_H__ #define __GMLC_GUI_SERVER_TAB_H__ #include "gmlc_main.h" #include G_BEGIN_DECLS #define GMLC_GUI_TYPE_SERVER_TAB (gmlc_gui_server_tab_get_type ()) #define GMLC_GUI_SERVER_TAB(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GMLC_GUI_TYPE_SERVER_TAB, GmlcGuiServerTab)) #define GMLC_IS_GUI_SERVER_TAB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GMLC_GUI_TYPE_SERVER_TAB)) #define GMLC_GUI_SERVER_TAB_GET_INTERFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), GMLC_GUI_TYPE_SERVER_TAB, GmlcGuiServerTabInterface)) typedef struct _GmlcGuiServerTab GmlcGuiServerTab; typedef struct _GmlcGuiServerTabInterface GmlcGuiServerTabInterface; struct _GmlcGuiServerTabInterface { GTypeInterface parent; void (* update_ui) (GmlcGuiServerTab * self, gboolean bShow); }; GType gmlc_gui_server_tab_get_type (void); void gmlc_gui_server_tab_update_ui (GmlcGuiServerTab * self, gboolean bShow); G_END_DECLS #endif /* __GMLC_GUI_SERVER_TAB_H__ */ gmysqlcc-0.3.0/src/gmlc_mysql_structure.c0000644000175000017500000000416410755301562015510 00000000000000/* * 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 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, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "gmlc_mysql_structure.h" static void gmlc_mysql_structure_base_init (gpointer g_class) { static gboolean initialized = FALSE; UNUSED_VAR(g_class); if (!initialized) { /* create interface signals here. */ initialized = TRUE; } } GType gmlc_mysql_structure_get_type (void) { static GType type = 0; if (type == 0) { static const GTypeInfo info = { sizeof (GmlcMysqlStructureInterface), gmlc_mysql_structure_base_init, /* base_init */ NULL, /* base_finalize */ NULL, /* class_init */ NULL, /* class_finalize */ NULL, /* class_data */ 0, 0, /* n_preallocs */ NULL /* instance_init */ }; type = g_type_register_static (G_TYPE_INTERFACE, "GmlcMysqlStructure", &info, 0); } return type; } gchar * gmlc_mysql_structure_get_create (GmlcMysqlStructure * poSelf, gboolean bMyself, const gchar * pcOtherName) { return GMLC_MYSQL_STRUCTURE_GET_INTERFACE(poSelf)->get_create(poSelf, bMyself, pcOtherName); } gchar * gmlc_mysql_structure_get_alter (GmlcMysqlStructure * poSelf, gboolean bMyself, const gchar * pcOtherName) { return GMLC_MYSQL_STRUCTURE_GET_INTERFACE(poSelf)->get_alter(poSelf, bMyself, pcOtherName); } gchar * gmlc_mysql_structure_get_drop (GmlcMysqlStructure * poSelf, gboolean bMyself, const gchar * pcOtherName) { return GMLC_MYSQL_STRUCTURE_GET_INTERFACE(poSelf)->get_drop(poSelf, bMyself, pcOtherName); } gmysqlcc-0.3.0/src/gmlc_mysql_function.h0000644000175000017500000000432710755301563015304 00000000000000/* * 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 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 Library 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __GMLC_MYSQL_FUNCTION_H__ #define __GMLC_MYSQL_FUNCTION_H__ #include #include #include "gmlc_mysql_database.h" #include "gmlc_mysql_structure.h" #define UNUSED_VAR(x) (x = x) G_BEGIN_DECLS #define GMLC_TYPE_MYSQL_FUNCTION (gmlc_mysql_function_get_type ()) #define GMLC_MYSQL_FUNCTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GMLC_TYPE_MYSQL_FUNCTION, GmlcMysqlFunction)) #define GMLC_MYSQL_FUNCTION_CLASS(kls) (G_TYPE_CHECK_CLASS_CAST((kls), GMLC_TYPE_MYSQL_FUNCTION, GmlcMysqlFunctionClass)) #define GMLC_IS_MYSQL_FUNCTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GMLC_TYPE_MYSQL_FUNCTION)) #define GMLC_IS_MYSQL_FUNCTION_CLASS(kls) (G_TYPE_CHECK_CLASS_TYPE ((kls), GMLC_TYPE_MYSQL_FUNCTION)) #define GMLC_MYSQL_FUNCTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GMLC_TYPE_MYSQL_FUNCTION, GmlcMysqlFunctionClass)) #ifndef __GMLC_MYSQL_FUNCTION_H__TYPE__ #define __GMLC_MYSQL_FUNCTION_H__TYPE__ typedef struct _GmlcMysqlFunction GmlcMysqlFunction; #endif /* __GMLC_MYSQL_FUNCTION_H__TYPE__ */ typedef struct _GmlcMysqlFunctionClass GmlcMysqlFunctionClass; struct _GmlcMysqlFunction { GObject parent; GmlcMysqlDatabase * pGmlcMysqlDb; gchar * pcName; gboolean bFlagged; }; struct _GmlcMysqlFunctionClass { GObjectClass parent_class; /* Add Signal Functions Here */ }; GType gmlc_mysql_function_get_type(); GmlcMysqlFunction * gmlc_mysql_function_new(GmlcMysqlDatabase * pGmlcMysqlDb, gchar * pcName); G_END_DECLS #endif /* __GMLC_MYSQL_FUNCTION_H__ */ gmysqlcc-0.3.0/src/gmlc_mysql_view.h0000644000175000017500000000437510755301563014434 00000000000000/* * 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 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 Library 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __GMLC_MYSQL_VIEW_H__ #define __GMLC_MYSQL_VIEW_H__ #include #include #include "gmlc_mysql_structure.h" #ifndef __GMLC_MYSQL_DATABASE_H__TYPE__ #define __GMLC_MYSQL_DATABASE_H__TYPE__ typedef struct _GmlcMysqlDatabase GmlcMysqlDatabase; #endif /* __GMLC_MYSQL_DATABASE_H__TYPE__ */ #define UNUSED_VAR(x) (x = x) G_BEGIN_DECLS #define GMLC_TYPE_MYSQL_VIEW (gmlc_mysql_view_get_type ()) #define GMLC_MYSQL_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GMLC_TYPE_MYSQL_VIEW, GmlcMysqlView)) #define GMLC_MYSQL_VIEW_CLASS(kls) (G_TYPE_CHECK_CLASS_CAST((kls), GMLC_TYPE_MYSQL_VIEW, GmlcMysqlViewClass)) #define GMLC_IS_MYSQL_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GMLC_TYPE_MYSQL_VIEW)) #define GMLC_IS_MYSQL_VIEW_CLASS(kls) (G_TYPE_CHECK_CLASS_TYPE ((kls), GMLC_TYPE_MYSQL_VIEW)) #define GMLC_MYSQL_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GMLC_TYPE_MYSQL_VIEW, GmlcMysqlViewClass)) #ifndef __GMLC_MYSQL_VIEW_H__TYPE__ #define __GMLC_MYSQL_VIEW_H__TYPE__ typedef struct _GmlcMysqlView GmlcMysqlView; #endif /* __GMLC_MYSQL_VIEW_H__TYPE__ */ typedef struct _GmlcMysqlViewClass GmlcMysqlViewClass; struct _GmlcMysqlView { GObject parent; GmlcMysqlDatabase * pGmlcMysqlDb; gchar * pcName; gboolean bFlagged; }; struct _GmlcMysqlViewClass { GObjectClass parent_class; /* Add Signal Functions Here */ }; GType gmlc_mysql_view_get_type(); GmlcMysqlView * gmlc_mysql_view_new(GmlcMysqlDatabase * pGmlcMysqlDb, gchar * pcName); G_END_DECLS #endif /* __GMLC_MYSQL_VIEW_H__ */ gmysqlcc-0.3.0/src/gmlc_gui_server.h0000644000175000017500000000443410755301563014403 00000000000000/* * 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 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, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __GMLC_GUI_SERVER_H__ #define __GMLC_GUI_SERVER_H__ #include "gmlc_main.h" #include "gmlc_mysql_server.h" #include "gmlc_mysql_database.h" #include "gmlc_mysql_table.h" #include "gmlc_mysql_view.h" G_BEGIN_DECLS #define GMLC_GUI_TYPE_SERVER (gmlc_gui_server_get_type ()) #define GMLC_GUI_SERVER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GMLC_GUI_TYPE_SERVER, GmlcGuiServer)) #define GMLC_GUI_SERVER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GMLC_GUI_TYPE_SERVER, GmlcGuiServerClass)) #define GMLC_IS_GUI_SERVER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GMLC_GUI_TYPE_SERVER)) #define GMLC_IS_GUI_SERVER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GMLC_GUI_TYPE_SERVER)) #define GMLC_GET_GUI_SERVER_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GMLC_GUI_TYPE_SERVER, GmlcGuiServerClass)) typedef struct _GmlcGuiServer GmlcGuiServer; typedef struct _GmlcGuiServerClass GmlcGuiServerClass; struct _GmlcGuiServer { GtkWindow parent; /* private members */ GmlcMysqlServer * pGmlcMysqlSrv; /* General Widgets */ GtkWidget * nbkGeneral; GtkWidget * poHBoxToolbar; }; struct _GmlcGuiServerClass { GtkWindowClass parent_class; /* define vtable methods and signals here */ }; GType gmlc_gui_server_get_type (void); GmlcGuiServer * gmlc_gui_server_new (GmlcMysqlServer * pGmlcMysqlSrv); GtkWidget * gmlc_gui_server_add_query_tab(GmlcGuiServer * pGmlcGuiSrv, const gchar * pcDbName, const gchar * pcQuery, gboolean bExecNow); void gmlc_gui_server_close_query_tab(GmlcGuiServer * pGmlcGuiSrv, GtkWidget * pTabQuery); G_END_DECLS #endif /* __GMLC_GUI_SERVER_H__ */ gmysqlcc-0.3.0/src/gmlc_mysql_table.c0000644000175000017500000002021510755301563014533 00000000000000/* * 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 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 Library 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "gmlc_mysql_table.h" static void gmlc_mysql_table_finalize (GmlcMysqlTable * pGmlcMysqlTbl); static void gmlc_mysql_table_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec); static void gmlc_mysql_table_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec); static void gmlc_mysql_table_interface_structure_init (gpointer g_iface, gpointer iface_data); static gchar * gmlc_mysql_table_structure_get_create (GmlcMysqlTable * pGmlcMysqlTbl, gboolean bMyself, const gchar * pcOtherName); static gchar * gmlc_mysql_table_structure_get_alter (GmlcMysqlTable * pGmlcMysqlTbl, gboolean bMyself, const gchar * pcOtherName); static gchar * gmlc_mysql_table_structure_get_drop (GmlcMysqlTable * pGmlcMysqlTbl, gboolean bMyself, const gchar * pcOtherName); enum { PROP_0, PROP_DATABASE, PROP_NAME, PROP_ROWS, PROP_SIZE, PROP_ENGINE, PROP_FLAGGED }; G_DEFINE_TYPE_WITH_CODE (GmlcMysqlTable, gmlc_mysql_table, G_TYPE_OBJECT, G_IMPLEMENT_INTERFACE (GMLC_MYSQL_TYPE_STRUCTURE, gmlc_mysql_table_interface_structure_init)); static void gmlc_mysql_table_interface_structure_init (gpointer g_iface, gpointer iface_data) { GmlcMysqlStructureInterface * pIface = (GmlcMysqlStructureInterface *) g_iface; pIface->get_create = (gchar * (*) (GmlcMysqlStructure * poSelf, gboolean bMyself, const gchar * pcOtherName))gmlc_mysql_table_structure_get_create; pIface->get_alter = (gchar * (*) (GmlcMysqlStructure * poSelf, gboolean bMyself, const gchar * pcOtherName))gmlc_mysql_table_structure_get_alter; pIface->get_drop = (gchar * (*) (GmlcMysqlStructure * poSelf, gboolean bMyself, const gchar * pcOtherName))gmlc_mysql_table_structure_get_drop; } static void gmlc_mysql_table_class_init(GmlcMysqlTableClass *pClass) { GObjectClass * pObjClass = G_OBJECT_CLASS(pClass); pObjClass->finalize = (GObjectFinalizeFunc) gmlc_mysql_table_finalize; pObjClass->get_property = gmlc_mysql_table_get_property; pObjClass->set_property = gmlc_mysql_table_set_property; g_object_class_install_property(pObjClass, PROP_DATABASE, g_param_spec_object("database", "Database object", "Database object", GMLC_MYSQL_TYPE_DATABASE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); g_object_class_install_property(pObjClass, PROP_NAME, g_param_spec_string("name", "Table name", "Name of the table", "", G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); g_object_class_install_property(pObjClass, PROP_ROWS, g_param_spec_string("rows", "Table rows", "Rows' number of the table", "", G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); g_object_class_install_property(pObjClass, PROP_SIZE, g_param_spec_string("size", "Table size", "Size of the table", "", G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); g_object_class_install_property(pObjClass, PROP_ENGINE, g_param_spec_string("engine", "Table type", "Type of the table", "", G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); g_object_class_install_property(pObjClass, PROP_FLAGGED, g_param_spec_boolean("flagged", "Object Flagged", "Object Flagged", FALSE, G_PARAM_READWRITE)); } static void gmlc_mysql_table_init(GmlcMysqlTable * pGmlcMysqlTbl) { pGmlcMysqlTbl->pGmlcMysqlDb = NULL; pGmlcMysqlTbl->pcName = NULL; pGmlcMysqlTbl->pcRows = NULL; pGmlcMysqlTbl->pcSize = NULL; pGmlcMysqlTbl->pcEngine = NULL; pGmlcMysqlTbl->bFlagged = FALSE; } static void gmlc_mysql_table_finalize(GmlcMysqlTable * pGmlcMysqlTbl) { g_free(pGmlcMysqlTbl->pcName); g_free(pGmlcMysqlTbl->pcRows); g_free(pGmlcMysqlTbl->pcSize); g_free(pGmlcMysqlTbl->pcEngine); /*G_OBJECT_CLASS(parent_class)->finalize(object);*/ } static void gmlc_mysql_table_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec) { GmlcMysqlTable * pGmlcMysqlTbl = GMLC_MYSQL_TABLE(object); switch (prop_id) { case PROP_DATABASE : g_value_set_object(value, pGmlcMysqlTbl->pGmlcMysqlDb); break; case PROP_NAME : g_value_set_string(value, pGmlcMysqlTbl->pcName); break; case PROP_ROWS : g_value_set_string(value, pGmlcMysqlTbl->pcRows); break; case PROP_SIZE : g_value_set_string(value, pGmlcMysqlTbl->pcSize); break; case PROP_ENGINE : g_value_set_string(value, pGmlcMysqlTbl->pcEngine); break; case PROP_FLAGGED : g_value_set_boolean(value, pGmlcMysqlTbl->bFlagged); break; default: { G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); break; } } } static void gmlc_mysql_table_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec) { GmlcMysqlTable * pGmlcMysqlTbl = GMLC_MYSQL_TABLE(object); switch (prop_id) { case PROP_DATABASE : pGmlcMysqlTbl->pGmlcMysqlDb = g_value_get_object(value); break; case PROP_NAME : g_free(pGmlcMysqlTbl->pcName); pGmlcMysqlTbl->pcName = g_value_dup_string(value); break; case PROP_ROWS : g_free(pGmlcMysqlTbl->pcRows); pGmlcMysqlTbl->pcRows = g_value_dup_string(value); break; case PROP_SIZE : g_free(pGmlcMysqlTbl->pcSize); pGmlcMysqlTbl->pcSize = g_value_dup_string(value); break; case PROP_ENGINE : g_free(pGmlcMysqlTbl->pcEngine); pGmlcMysqlTbl->pcEngine = g_value_dup_string(value); break; case PROP_FLAGGED : pGmlcMysqlTbl->bFlagged = g_value_get_boolean(value); break; default: { G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); break; } } } static gchar * gmlc_mysql_table_structure_get_create (GmlcMysqlTable * pGmlcMysqlTbl, gboolean bMyself, const gchar * pcOtherName) { const gchar * pcName = NULL; gchar * pcSqlQuery = NULL, * pcQuery = NULL; if (bMyself) { g_object_get(pGmlcMysqlTbl, "name", &pcName, NULL); pcQuery = g_strdup_printf("SHOW CREATE TABLE `%s`;", pcName); pcSqlQuery = gmlc_mysql_query_static_get_one_result(pGmlcMysqlTbl->pGmlcMysqlDb->pGmlcMysqlSrv, pGmlcMysqlTbl->pGmlcMysqlDb->pcDbName, pcQuery, 1); g_free(pcQuery); } else { pcSqlQuery = gmlc_mysql_database_create_new_table_sql(pGmlcMysqlTbl->pGmlcMysqlDb, pcOtherName); } return pcSqlQuery; } static gchar * gmlc_mysql_table_structure_get_alter (GmlcMysqlTable * pGmlcMysqlTbl, gboolean bMyself, const gchar * pcOtherName) { const gchar * pcName = NULL; gchar * pcSqlQuery = NULL; if (bMyself) { pcName = pGmlcMysqlTbl->pcName; } else if (pcOtherName != NULL) { pcName = pcOtherName; } else { pcName = ""; } pcSqlQuery = g_strdup_printf("ALTER TABLE `%s`\n ;", pcName); return pcSqlQuery; } static gchar * gmlc_mysql_table_structure_get_drop (GmlcMysqlTable * pGmlcMysqlTbl, gboolean bMyself, const gchar * pcOtherName) { const gchar * pcName = NULL; gchar * pcSqlQuery = NULL; if (bMyself) { pcName = pGmlcMysqlTbl->pcName; } else if (pcOtherName != NULL) { pcName = pcOtherName; } else { pcName = ""; } pcSqlQuery = g_strdup_printf("DROP TABLE `%s`;", pcName); return pcSqlQuery; } GmlcMysqlTable * gmlc_mysql_table_new(GmlcMysqlDatabase * pGmlcMysqlDb, gchar * pcTblName) { GmlcMysqlTable * pGmlcMysqlTbl; pGmlcMysqlTbl = GMLC_MYSQL_TABLE(g_object_new(GMLC_TYPE_MYSQL_TABLE, "database", pGmlcMysqlDb, "name", pcTblName, NULL)); return pGmlcMysqlTbl; } GmlcMysqlTable * gmlc_mysql_table_new_with_stat(GmlcMysqlDatabase * pGmlcMysqlDb, gchar * pcTblName, gchar * pcRows, gchar * pcSize, gchar * pcEngine) { GmlcMysqlTable * pGmlcMysqlTbl; pGmlcMysqlTbl = GMLC_MYSQL_TABLE(g_object_new(GMLC_TYPE_MYSQL_TABLE, "database", pGmlcMysqlDb, "name", pcTblName, "rows", pcRows, "size", pcSize, "engine", pcEngine, NULL)); return pGmlcMysqlTbl; } gmysqlcc-0.3.0/src/gmlc_mysql_table.h0000644000175000017500000000451510755301563014545 00000000000000/* * 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 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 Library 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __GMLC_MYSQL_TABLE_H__ #define __GMLC_MYSQL_TABLE_H__ #include #include #include "gmlc_mysql_database.h" #include "gmlc_mysql_structure.h" #define UNUSED_VAR(x) (x = x) G_BEGIN_DECLS #define GMLC_TYPE_MYSQL_TABLE (gmlc_mysql_table_get_type ()) #define GMLC_MYSQL_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GMLC_TYPE_MYSQL_TABLE, GmlcMysqlTable)) #define GMLC_MYSQL_TABLE_CLASS(kls) (G_TYPE_CHECK_CLASS_CAST((kls), GMLC_TYPE_MYSQL_TABLE, GmlcMysqlTableClass)) #define GMLC_IS_MYSQL_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GMLC_TYPE_MYSQL_TABLE)) #define GMLC_IS_MYSQL_TABLE_CLASS(kls) (G_TYPE_CHECK_CLASS_TYPE ((kls), GMLC_TYPE_MYSQL_TABLE)) #define GMLC_MYSQL_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GMLC_TYPE_MYSQL_TABLE, GmlcMysqlTableClass)) #ifndef __GMLC_MYSQL_TABLE_H__TYPE__ #define __GMLC_MYSQL_TABLE_H__TYPE__ typedef struct _GmlcMysqlTable GmlcMysqlTable; #endif /* __GMLC_MYSQL_TABLE_H__TYPE__ */ typedef struct _GmlcMysqlTableClass GmlcMysqlTableClass; struct _GmlcMysqlTable { GObject parent; GmlcMysqlDatabase * pGmlcMysqlDb; gchar * pcName; gchar * pcRows; gchar * pcSize; gchar * pcEngine; gboolean bFlagged; }; struct _GmlcMysqlTableClass { GObjectClass parent_class; /* Add Signal Functions Here */ }; GType gmlc_mysql_table_get_type(); GmlcMysqlTable * gmlc_mysql_table_new(GmlcMysqlDatabase * pGmlcMysqlDb, gchar * pcTblName); GmlcMysqlTable * gmlc_mysql_table_new_with_stat(GmlcMysqlDatabase * pGmlcMysqlDb, gchar * pcTblName, gchar * pcRows, gchar * pcSize, gchar * pcType); G_END_DECLS #endif /* __GMLC_MYSQL_TABLE_H__ */ gmysqlcc-0.3.0/src/gmlc_gui_server_tab_query.h0000644000175000017500000000557310755301562016462 00000000000000/* * 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 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, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __GMLC_GUI_SERVER_TAB_QUERY_H__ #define __GMLC_GUI_SERVER_TAB_QUERY_H__ #include "gmlc_main.h" #include "gmlc_gui_server.h" #include "gmlc_mysql_server.h" G_BEGIN_DECLS #define GMLC_GUI_TYPE_SERVER_TAB_QUERY (gmlc_gui_server_tab_query_get_type ()) #define GMLC_GUI_SERVER_TAB_QUERY(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GMLC_GUI_TYPE_SERVER_TAB_QUERY, GmlcGuiServerTabQuery)) #define GMLC_GUI_SERVER_TAB_QUERY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GMLC_GUI_TYPE_SERVER_TAB_QUERY, GmlcGuiServerTabQueryClass)) #define GMLC_IS_GUI_SERVER_TAB_QUERY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GMLC_GUI_TYPE_SERVER_TAB_QUERY)) #define GMLC_IS_GUI_SERVER_TAB_QUERY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GMLC_GUI_TYPE_SERVER_TAB_QUERY)) #define GMLC_GET_GUI_SERVER_TAB_QUERY_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GMLC_GUI_TYPE_SERVER_TAB_QUERY, GmlcGuiServerTabQueryClass)) typedef struct _GmlcGuiServerTabQuery GmlcGuiServerTabQuery; typedef struct _GmlcGuiServerTabQueryClass GmlcGuiServerTabQueryClass; struct _GmlcGuiServerTabQuery { GtkVBox parent; /* private members */ GmlcMysqlServer * pGmlcMysqlSrv; GmlcGuiServer * pGmlcGuiSrv; gchar * pcDbName; gchar * pcFileName; /* Toolbar Part */ GtkWidget * poQueryToolbar; /* Query Part */ GtkWidget * txtSQLRequest; GtkWidget * tabSQLResult; GtkWidget * lstSQLResult; GtkWidget * statusbarSQL; /* p_mysql_database mysql_db; */ GmlcMysqlQuery * pGmlcMysqlQry; guint iNumResult; /* gint currCharset;*/ /* GSList * lstRows;*/ }; struct _GmlcGuiServerTabQueryClass { GtkVBoxClass parent_class; /* define vtable methods and signals here */ }; GType gmlc_gui_server_tab_query_get_type (void); GmlcGuiServerTabQuery * gmlc_gui_server_tab_query_new (GmlcGuiServer * pGmlcGuiSrv, const gchar * pcDefDbName); gboolean gmlc_gui_server_tab_query_set_query (GmlcGuiServerTabQuery * pGmlcGuiSrvTabQuery, const gchar * pcQuery, gboolean bExecNow); gchar * gmlc_gui_server_tab_query_get_query (GmlcGuiServerTabQuery * pGmlcGuiSrvTabQuery); void gmlc_gui_server_tab_query_evt_btn_load_clicked(GtkWidget *widget, gpointer user_data); G_END_DECLS #endif /* __GMLC_GUI_SERVER_TAB_QUERY_H__ */ gmysqlcc-0.3.0/src/gmlc_mysql_procedure.c0000644000175000017500000001525210755301563015441 00000000000000/* * 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 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 Library 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "gmlc_mysql_procedure.h" static void gmlc_mysql_procedure_finalize (GmlcMysqlProcedure * pGmlcMysqlPrc); static void gmlc_mysql_procedure_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec); static void gmlc_mysql_procedure_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec); static void gmlc_mysql_procedure_interface_structure_init (gpointer g_iface, gpointer iface_data); static gchar * gmlc_mysql_procedure_structure_get_create (GmlcMysqlProcedure * pGmlcMysqlPrc, gboolean bMyself, const gchar * pcOtherName); static gchar * gmlc_mysql_procedure_structure_get_alter (GmlcMysqlProcedure * pGmlcMysqlPrc, gboolean bMyself, const gchar * pcOtherName); static gchar * gmlc_mysql_procedure_structure_get_drop (GmlcMysqlProcedure * pGmlcMysqlPrc, gboolean bMyself, const gchar * pcOtherName); enum { PROP_0, PROP_DATABASE, PROP_NAME, PROP_FLAGGED }; G_DEFINE_TYPE_WITH_CODE (GmlcMysqlProcedure, gmlc_mysql_procedure, G_TYPE_OBJECT, G_IMPLEMENT_INTERFACE (GMLC_MYSQL_TYPE_STRUCTURE, gmlc_mysql_procedure_interface_structure_init)); static void gmlc_mysql_procedure_interface_structure_init (gpointer g_iface, gpointer iface_data) { GmlcMysqlStructureInterface * pIface = (GmlcMysqlStructureInterface *) g_iface; pIface->get_create = (gchar * (*) (GmlcMysqlStructure * poSelf, gboolean bMyself, const gchar * pcOtherName))gmlc_mysql_procedure_structure_get_create; pIface->get_alter = (gchar * (*) (GmlcMysqlStructure * poSelf, gboolean bMyself, const gchar * pcOtherName))gmlc_mysql_procedure_structure_get_alter; pIface->get_drop = (gchar * (*) (GmlcMysqlStructure * poSelf, gboolean bMyself, const gchar * pcOtherName))gmlc_mysql_procedure_structure_get_drop; } static void gmlc_mysql_procedure_class_init(GmlcMysqlProcedureClass *pClass) { GObjectClass * pObjClass = G_OBJECT_CLASS(pClass); pObjClass->finalize = (GObjectFinalizeFunc) gmlc_mysql_procedure_finalize; pObjClass->get_property = gmlc_mysql_procedure_get_property; pObjClass->set_property = gmlc_mysql_procedure_set_property; g_object_class_install_property(pObjClass, PROP_DATABASE, g_param_spec_object("database", "Database object", "Database object", GMLC_MYSQL_TYPE_DATABASE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); g_object_class_install_property(pObjClass, PROP_NAME, g_param_spec_string("name", "Procedure name", "Name of the procedure", "", G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); g_object_class_install_property(pObjClass, PROP_FLAGGED, g_param_spec_boolean("flagged", "Object Flagged", "Object Flagged", FALSE, G_PARAM_READWRITE)); } static void gmlc_mysql_procedure_init(GmlcMysqlProcedure * pGmlcMysqlPrc) { pGmlcMysqlPrc->pGmlcMysqlDb = NULL; pGmlcMysqlPrc->pcName = NULL; pGmlcMysqlPrc->bFlagged = FALSE; } static void gmlc_mysql_procedure_finalize(GmlcMysqlProcedure * pGmlcMysqlPrc) { g_free(pGmlcMysqlPrc->pcName); /*G_OBJECT_CLASS(parent_class)->finalize(object);*/ } static void gmlc_mysql_procedure_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec) { GmlcMysqlProcedure * pGmlcMysqlPrc = GMLC_MYSQL_PROCEDURE(object); switch (prop_id) { case PROP_DATABASE : g_value_set_object(value, pGmlcMysqlPrc->pGmlcMysqlDb); break; case PROP_NAME : g_value_set_string(value, pGmlcMysqlPrc->pcName); break; case PROP_FLAGGED : g_value_set_boolean(value, pGmlcMysqlPrc->bFlagged); break; default: { G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); break; } } } static void gmlc_mysql_procedure_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec) { GmlcMysqlProcedure * pGmlcMysqlPrc = GMLC_MYSQL_PROCEDURE(object); switch (prop_id) { case PROP_DATABASE : pGmlcMysqlPrc->pGmlcMysqlDb = g_value_get_object(value); break; case PROP_NAME : g_free(pGmlcMysqlPrc->pcName); pGmlcMysqlPrc->pcName = g_value_dup_string(value); break; case PROP_FLAGGED : pGmlcMysqlPrc->bFlagged = g_value_get_boolean(value); break; default: { G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); break; } } } static gchar * gmlc_mysql_procedure_structure_get_create (GmlcMysqlProcedure * pGmlcMysqlPrc, gboolean bMyself, const gchar * pcOtherName) { const gchar * pcName = NULL; gchar * pcSqlQuery = NULL, * pcQuery = NULL; if (bMyself) { g_object_get(pGmlcMysqlPrc, "name", &pcName, NULL); pcQuery = g_strdup_printf("SHOW CREATE PROCEDURE `%s`;", pcName); pcSqlQuery = gmlc_mysql_query_static_get_one_result(pGmlcMysqlPrc->pGmlcMysqlDb->pGmlcMysqlSrv, pGmlcMysqlPrc->pGmlcMysqlDb->pcDbName, pcQuery, 2); g_free(pcQuery); } else { pcSqlQuery = gmlc_mysql_database_create_new_procedure_sql(pGmlcMysqlPrc->pGmlcMysqlDb, pcOtherName); } return pcSqlQuery; } static gchar * gmlc_mysql_procedure_structure_get_alter (GmlcMysqlProcedure * pGmlcMysqlPrc, gboolean bMyself, const gchar * pcOtherName) { gchar * pcDrop = NULL, * pcCreate = NULL, * pcSqlQuery = NULL; pcDrop = gmlc_mysql_procedure_structure_get_drop(pGmlcMysqlPrc, bMyself, pcOtherName); pcCreate = gmlc_mysql_procedure_structure_get_create(pGmlcMysqlPrc, bMyself, pcOtherName); pcSqlQuery = g_strdup_printf("%s\n%s\n", pcDrop, pcCreate); g_free(pcCreate); g_free(pcDrop); return pcSqlQuery; } static gchar * gmlc_mysql_procedure_structure_get_drop (GmlcMysqlProcedure * pGmlcMysqlPrc, gboolean bMyself, const gchar * pcOtherName) { const gchar * pcName = NULL; gchar * pcSqlQuery = NULL; if (bMyself) { pcName = pGmlcMysqlPrc->pcName; } else if (pcOtherName != NULL) { pcName = pcOtherName; } else { pcName = ""; } pcSqlQuery = g_strdup_printf("DROP PROCEDURE `%s`;", pcName); return pcSqlQuery; } GmlcMysqlProcedure * gmlc_mysql_procedure_new(GmlcMysqlDatabase * pGmlcMysqlDb, gchar * pcName) { GmlcMysqlProcedure * pGmlcMysqlPrc; pGmlcMysqlPrc = GMLC_MYSQL_PROCEDURE(g_object_new(GMLC_TYPE_MYSQL_PROCEDURE, "database", pGmlcMysqlDb, "name", pcName, NULL)); return pGmlcMysqlPrc; } gmysqlcc-0.3.0/src/gmlc_mysql_server.h0000644000175000017500000000547410755301562014770 00000000000000/* * 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 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, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __GMLC_MYSQL_SERVER_H__ #define __GMLC_MYSQL_SERVER_H__ #include #include #ifndef __GMLC_MYSQL_DATABASE_H__TYPE__ #define __GMLC_MYSQL_DATABASE_H__TYPE__ typedef struct _GmlcMysqlDatabase GmlcMysqlDatabase; #endif /* __GMLC_MYSQL_DATABASE_H__TYPE__ */ #define UNUSED_VAR(x) (x = x) G_BEGIN_DECLS #define GMLC_MYSQL_TYPE_SERVER (gmlc_mysql_server_get_type ()) #define GMLC_MYSQL_SERVER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GMLC_MYSQL_TYPE_SERVER, GmlcMysqlServer)) #define GMLC_MYSQL_SERVER_CLASS(obj) (G_TYPE_CHECK_CLASS_CAST ((obj), GMLC_MYSQL_TYPE_SERVER, GmlcMysqlServerClass)) #define GMLC_MYSQL_IS_SERVER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GMLC_MYSQL_TYPE_SERVER)) #define GMLC_MYSQL_IS_SERVER_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE ((obj), GMLC_MYSQL_TYPE_SERVER)) #define GMLC_MYSQL_SERVER_GET_CLASS (G_TYPE_INSTANCE_GET_CLASS ((obj), GMLC_MYSQL_TYPE_SERVER, GmlcMysqlServerClass)) typedef struct _GmlcMysqlServer GmlcMysqlServer; typedef struct _GmlcMysqlServerClass GmlcMysqlServerClass; struct _GmlcMysqlServer { GObject parent; /* instance members */ /* private */ /* Connection infos */ gchar * pcName; gchar * pcHost; guint iPort; gchar * pcLogin; gchar * pcPassword; gchar * pcLocalSock; /* Server protections */ gchar * pcAllowedDbs; gboolean bReadOnly; gboolean bWriteWarning; /* Server datas */ gulong lVersion; GArray * arCharsets; GHashTable * htbDatabases; }; struct _GmlcMysqlServerClass { GObjectClass parent_class; /* class members */ }; GType gmlc_mysql_server_get_type (void); GArray * gmlc_mysql_server_databases_name_list(GmlcMysqlServer * pGmlcMysqlSrv, gboolean bUpdateList); GmlcMysqlDatabase * gmlc_mysql_server_get_database(GmlcMysqlServer * pGmlcMysqlSrv, const gchar * pcName); gboolean gmlc_mysql_server_update_databases_list(GmlcMysqlServer * pGmlcMysqlSrv); GmlcMysqlServer * gmlc_mysql_server_new (void); gchar * gmlc_mysql_server_generate_xml_config(GmlcMysqlServer * pGmlcMysqlSrv); G_END_DECLS #endif /* __GMLC_MYSQL_SERVER_H__ */ gmysqlcc-0.3.0/src/gmlc_mysql_view.c0000644000175000017500000001464610755301563014431 00000000000000/* * 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 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 Library 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "gmlc_mysql_view.h" #include "gmlc_mysql_database.h" static void gmlc_mysql_view_finalize (GmlcMysqlView * pGmlcMysqlVw); static void gmlc_mysql_view_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec); static void gmlc_mysql_view_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec); static void gmlc_mysql_view_interface_structure_init (gpointer g_iface, gpointer iface_data); static gchar * gmlc_mysql_view_structure_get_create (GmlcMysqlView * pGmlcMysqlVw, gboolean bMyself, const gchar * pcOtherName); static gchar * gmlc_mysql_view_structure_get_alter (GmlcMysqlView * pGmlcMysqlVw, gboolean bMyself, const gchar * pcOtherName); static gchar * gmlc_mysql_view_structure_get_drop (GmlcMysqlView * pGmlcMysqlVw, gboolean bMyself, const gchar * pcOtherName); enum { PROP_0, PROP_DATABASE, PROP_NAME, PROP_FLAGGED }; G_DEFINE_TYPE_WITH_CODE (GmlcMysqlView, gmlc_mysql_view, G_TYPE_OBJECT, G_IMPLEMENT_INTERFACE (GMLC_MYSQL_TYPE_STRUCTURE, gmlc_mysql_view_interface_structure_init)); static void gmlc_mysql_view_interface_structure_init (gpointer g_iface, gpointer iface_data) { GmlcMysqlStructureInterface * pIface = (GmlcMysqlStructureInterface *) g_iface; pIface->get_create = (gchar * (*) (GmlcMysqlStructure * poSelf, gboolean bMyself, const gchar * pcOtherName))gmlc_mysql_view_structure_get_create; pIface->get_alter = (gchar * (*) (GmlcMysqlStructure * poSelf, gboolean bMyself, const gchar * pcOtherName))gmlc_mysql_view_structure_get_alter; pIface->get_drop = (gchar * (*) (GmlcMysqlStructure * poSelf, gboolean bMyself, const gchar * pcOtherName))gmlc_mysql_view_structure_get_drop; } static void gmlc_mysql_view_class_init(GmlcMysqlViewClass *pClass) { GObjectClass * pObjClass = G_OBJECT_CLASS(pClass); pObjClass->finalize = (GObjectFinalizeFunc) gmlc_mysql_view_finalize; pObjClass->get_property = gmlc_mysql_view_get_property; pObjClass->set_property = gmlc_mysql_view_set_property; g_object_class_install_property(pObjClass, PROP_DATABASE, g_param_spec_object("database", "Database object", "Database object", GMLC_MYSQL_TYPE_DATABASE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); g_object_class_install_property(pObjClass, PROP_NAME, g_param_spec_string("name", "View name", "Name of the View", "", G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); g_object_class_install_property(pObjClass, PROP_FLAGGED, g_param_spec_boolean("flagged", "Object Flagged", "Object Flagged", FALSE, G_PARAM_READWRITE)); } static void gmlc_mysql_view_init(GmlcMysqlView * pGmlcMysqlVw) { pGmlcMysqlVw->pGmlcMysqlDb = NULL; pGmlcMysqlVw->pcName = NULL; pGmlcMysqlVw->bFlagged = FALSE; } static void gmlc_mysql_view_finalize(GmlcMysqlView * pGmlcMysqlVw) { g_free(pGmlcMysqlVw->pcName); /*G_OBJECT_CLASS(parent_class)->finalize(object);*/ } static void gmlc_mysql_view_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec) { GmlcMysqlView * pGmlcMysqlViw = GMLC_MYSQL_VIEW(object); switch (prop_id) { case PROP_DATABASE : g_value_set_object(value, pGmlcMysqlViw->pGmlcMysqlDb); break; case PROP_NAME : g_value_set_string(value, pGmlcMysqlViw->pcName); break; case PROP_FLAGGED : g_value_set_boolean(value, pGmlcMysqlViw->bFlagged); break; default: { G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); break; } } } static void gmlc_mysql_view_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec) { GmlcMysqlView * pGmlcMysqlViw = GMLC_MYSQL_VIEW(object); switch (prop_id) { case PROP_DATABASE : pGmlcMysqlViw->pGmlcMysqlDb = g_value_get_object(value); break; case PROP_NAME : g_free(pGmlcMysqlViw->pcName); pGmlcMysqlViw->pcName = g_value_dup_string(value); break; case PROP_FLAGGED : pGmlcMysqlViw->bFlagged = g_value_get_boolean(value); break; default: { G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); break; } } } static gchar * gmlc_mysql_view_structure_get_create (GmlcMysqlView * pGmlcMysqlVw, gboolean bMyself, const gchar * pcOtherName) { const gchar * pcName = NULL; gchar * pcSqlQuery = NULL, * pcQuery = NULL; if (bMyself) { g_object_get(pGmlcMysqlVw, "name", &pcName, NULL); pcQuery = g_strdup_printf("SHOW CREATE VIEW `%s`;", pcName); pcSqlQuery = gmlc_mysql_query_static_get_one_result(pGmlcMysqlVw->pGmlcMysqlDb->pGmlcMysqlSrv, pGmlcMysqlVw->pGmlcMysqlDb->pcDbName, pcQuery, 1); g_free(pcQuery); } else { pcSqlQuery = gmlc_mysql_database_create_new_view_sql(pGmlcMysqlVw->pGmlcMysqlDb, pcOtherName); } return pcSqlQuery; } static gchar * gmlc_mysql_view_structure_get_alter (GmlcMysqlView * pGmlcMysqlVw, gboolean bMyself, const gchar * pcOtherName) { gchar * pcSqlCreate = NULL, * pcSqlQuery = NULL, * pcTmp = NULL; gint i = 0; pcSqlCreate = gmlc_mysql_view_structure_get_create(pGmlcMysqlVw, bMyself, pcOtherName); pcTmp = pcSqlCreate; while (pcTmp[i] != ' ') { pcTmp ++; } pcSqlQuery = g_strdup_printf("ALTER%s", pcTmp); g_free(pcSqlCreate); pcTmp = NULL; return pcSqlQuery; } static gchar * gmlc_mysql_view_structure_get_drop (GmlcMysqlView * pGmlcMysqlVw, gboolean bMyself, const gchar * pcOtherName) { const gchar * pcName = NULL; gchar * pcSqlQuery = NULL; if (bMyself) { pcName = pGmlcMysqlVw->pcName; } else if (pcOtherName != NULL) { pcName = pcOtherName; } else { pcName = ""; } pcSqlQuery = g_strdup_printf("DROP VIEW `%s`;", pcName); return pcSqlQuery; } GmlcMysqlView * gmlc_mysql_view_new(GmlcMysqlDatabase * pGmlcMysqlDb, gchar * pcName) { GmlcMysqlView * pGmlcMysqlVw; pGmlcMysqlVw = GMLC_MYSQL_VIEW(g_object_new(GMLC_TYPE_MYSQL_VIEW, "database", pGmlcMysqlDb, "name", pcName, NULL)); return pGmlcMysqlVw; } gmysqlcc-0.3.0/src/gmlc_gui_server_tab_data.h0000644000175000017500000000542010755301562016215 00000000000000/* * 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 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, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __GMLC_GUI_SERVER_TAB_DATA_H__ #define __GMLC_GUI_SERVER_TAB_DATA_H__ #include "gmlc_main.h" #include "gmlc_gui_server.h" #include "gmlc_mysql_server.h" #include "gmlc_mysql_database.h" #include "gmlc_mysql_table.h" #include "gmlc_mysql_view.h" G_BEGIN_DECLS #define GMLC_GUI_TYPE_SERVER_TAB_DATA (gmlc_gui_server_tab_data_get_type ()) #define GMLC_GUI_SERVER_TAB_DATA(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GMLC_GUI_TYPE_SERVER_TAB_DATA, GmlcGuiServerTabData)) #define GMLC_GUI_SERVER_TAB_DATA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GMLC_GUI_TYPE_SERVER_TAB_DATA, GmlcGuiServerTabDataClass)) #define GMLC_IS_GUI_SERVER_TAB_DATA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GMLC_GUI_TYPE_SERVER_TAB_DATA)) #define GMLC_IS_GUI_SERVER_TAB_DATA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GMLC_GUI_TYPE_SERVER_TAB_DATA)) #define GMLC_GET_GUI_SERVER_TAB_DATA_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GMLC_GUI_TYPE_SERVER_TAB_DATA, GmlcGuiServerTabDataClass)) typedef struct _GmlcGuiServerTabData GmlcGuiServerTabData; typedef struct _GmlcGuiServerTabDataClass GmlcGuiServerTabDataClass; struct _GmlcGuiServerTabData { GtkVBox parent; /* private members */ GmlcMysqlServer * pGmlcMysqlSrv; GmlcGuiServer * pGmlcGuiSrv; /* Global toolbar */ GtkWidget * poDataToolbar; /* Table/View/Proc/Func Part */ GtkWidget * lstBase; GtkWidget * lstTables; GtkWidget * lstViews; GtkWidget * lstProcedures; GtkWidget * lstFunctions; /* Menu Part */ GtkWidget * mnuBdOps; GtkWidget * mnuTblOps; GtkWidget * mnuVwOps; GtkWidget * mnuProcOps; GtkWidget * mnuFuncOps; GmlcMysqlDatabase * pGmlcMysqlDb; GmlcMysqlTable * pGmlcMysqlTbl; GmlcMysqlView * pGmlcMysqlVw; GmlcMysqlProcedure * pGmlcMysqlProc; GmlcMysqlFunction * pGmlcMysqlFunc; }; struct _GmlcGuiServerTabDataClass { GtkVBoxClass parent_class; /* define vtable methods and signals here */ }; GType gmlc_gui_server_tab_data_get_type (void); GmlcGuiServerTabData * gmlc_gui_server_tab_data_new (GmlcGuiServer * pGmlcGuiSrv); G_END_DECLS #endif /* __GMLC_GUI_SERVER_TAB_DATA_H__ */ gmysqlcc-0.3.0/src/gmlc_gui_server_tab_data.c0000644000175000017500000017574210755301563016230 00000000000000/* * 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 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, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "gmlc_gui_server_tab_data.h" #include "gmlc_gui_server_tab_query.h" #include "gmlc_gui_server_tab.h" #include "gmlc_mysql_query.h" static void gmlc_gui_server_tab_data_finalize (GmlcGuiServerTabData * pGmlcGuiSrvTabData); static void gmlc_gui_server_tab_data_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec); static void gmlc_gui_server_tab_data_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec); static void gmlc_gui_server_tab_data_interface_init (gpointer g_iface, gpointer iface_data); static void gmlc_gui_server_tab_data_update_ui (GmlcGuiServerTabData * pGmlcGuiSrvTabData, gboolean bShow); void gmlc_gui_server_tab_data_create_toolbar_items (GmlcGuiServerTabData * pGmlcGuiSrvTabData); void gmlc_gui_server_tab_data_create_widgets (GmlcGuiServerTabData * pGmlcGuiSrvTabData); void gmlc_gui_server_tab_data_init_widgets (GmlcGuiServerTabData * pGmlcGuiSrvTabData); void gmlc_gui_server_tab_data_open_query (GmlcGuiServerTabData * pGmlcGuiSrvTabData, const gchar * pcQuery, gboolean bExecNow); void gmlc_gui_server_tab_data_open_file (GmlcGuiServerTabData * pGmlcGuiSrvTabData); void gmlc_gui_server_tab_data_open_query_select (GmlcGuiServerTabData * pGmlcGuiSrvTabData, gboolean bUseTable); void gmlc_gui_server_tab_data_fill_database_list (GmlcGuiServerTabData * pGmlcGuiSrvTabData); void gmlc_gui_server_tab_data_fill_tables_list (GmlcGuiServerTabData * pGmlcGuiSrvTabData); void gmlc_gui_server_tab_data_fill_views_list (GmlcGuiServerTabData * pGmlcGuiSrvTabData); void gmlc_gui_server_tab_data_fill_procedures_list (GmlcGuiServerTabData * pGmlcGuiSrvTabData); void gmlc_gui_server_tab_data_fill_functions_list (GmlcGuiServerTabData * pGmlcGuiSrvTabData); static void gmlc_gui_server_tab_data_evt_btn_sql_file_clicked (GtkWidget *widget, gpointer user_data); static void gmlc_gui_server_tab_data_evt_btn_sql_clicked (GtkWidget *widget, gpointer user_data); static gboolean gmlc_gui_server_tab_data_evt_lst_db_btnpress (GtkWidget *widget, GdkEventButton *event, gpointer user_data); static void gmlc_gui_server_tab_data_evt_lst_db_selected (GtkTreeSelection *selection, gpointer user_data); static void gmlc_gui_server_tab_data_evt_menu_db_add_activate (GtkWidget *widget, gpointer user_data); static void gmlc_gui_server_tab_data_evt_menu_db_alter_activate (GtkWidget *widget, gpointer user_data); static void gmlc_gui_server_tab_data_evt_menu_db_remove_activate (GtkWidget *widget, gpointer user_data); static void gmlc_gui_server_tab_data_evt_menu_db_refresh_activate (GtkWidget *widget, gpointer user_data); static void gmlc_gui_server_tab_data_evt_menu_db_show_create_activate (GtkWidget *widget, gpointer user_data); static gboolean gmlc_gui_server_tab_data_evt_lst_tbl_btnpress (GtkWidget *widget, GdkEventButton *event, gpointer user_data); static void gmlc_gui_server_tab_data_evt_lst_tbl_selected (GtkTreeSelection *selection, gpointer user_data); static void gmlc_gui_server_tab_data_evt_menu_tbl_display_activate (GtkWidget *widget, gpointer user_data); static void gmlc_gui_server_tab_data_evt_menu_tbl_add_activate (GtkWidget *widget, gpointer user_data); static void gmlc_gui_server_tab_data_evt_menu_tbl_alter_activate (GtkWidget *widget, gpointer user_data); static void gmlc_gui_server_tab_data_evt_menu_tbl_remove_activate (GtkWidget *widget, gpointer user_data); static void gmlc_gui_server_tab_data_evt_menu_tbl_refresh_activate (GtkWidget *widget, gpointer user_data); static void gmlc_gui_server_tab_data_evt_menu_tbl_show_create_activate (GtkWidget *widget, gpointer user_data); static gboolean gmlc_gui_server_tab_data_evt_lst_vw_btnpress (GtkWidget *widget, GdkEventButton *event, gpointer user_data); static void gmlc_gui_server_tab_data_evt_lst_vw_selected (GtkTreeSelection *selection, gpointer user_data); static void gmlc_gui_server_tab_data_evt_menu_vw_display_activate (GtkWidget *widget, gpointer user_data); static void gmlc_gui_server_tab_data_evt_menu_vw_add_activate (GtkWidget *widget, gpointer user_data); static void gmlc_gui_server_tab_data_evt_menu_vw_alter_activate (GtkWidget *widget, gpointer user_data); static void gmlc_gui_server_tab_data_evt_menu_vw_remove_activate (GtkWidget *widget, gpointer user_data); static void gmlc_gui_server_tab_data_evt_menu_vw_refresh_activate (GtkWidget *widget, gpointer user_data); static void gmlc_gui_server_tab_data_evt_menu_vw_show_create_activate (GtkWidget *widget, gpointer user_data); static gboolean gmlc_gui_server_tab_data_evt_lst_proc_btnpress (GtkWidget *widget, GdkEventButton *event, gpointer user_data); static void gmlc_gui_server_tab_data_evt_lst_proc_selected (GtkTreeSelection *selection, gpointer user_data); static void gmlc_gui_server_tab_data_evt_menu_proc_display_activate (GtkWidget *widget, gpointer user_data); static void gmlc_gui_server_tab_data_evt_menu_proc_add_activate (GtkWidget *widget, gpointer user_data); static void gmlc_gui_server_tab_data_evt_menu_proc_alter_activate (GtkWidget *widget, gpointer user_data); static void gmlc_gui_server_tab_data_evt_menu_proc_remove_activate (GtkWidget *widget, gpointer user_data); static void gmlc_gui_server_tab_data_evt_menu_proc_refresh_activate (GtkWidget *widget, gpointer user_data); static void gmlc_gui_server_tab_data_evt_menu_proc_show_create_activate (GtkWidget *widget, gpointer user_data); static gboolean gmlc_gui_server_tab_data_evt_lst_func_btnpress (GtkWidget *widget, GdkEventButton *event, gpointer user_data); static void gmlc_gui_server_tab_data_evt_lst_func_selected (GtkTreeSelection *selection, gpointer user_data); static void gmlc_gui_server_tab_data_evt_menu_func_display_activate (GtkWidget *widget, gpointer user_data); static void gmlc_gui_server_tab_data_evt_menu_func_add_activate (GtkWidget *widget, gpointer user_data); static void gmlc_gui_server_tab_data_evt_menu_func_alter_activate (GtkWidget *widget, gpointer user_data); static void gmlc_gui_server_tab_data_evt_menu_func_remove_activate (GtkWidget *widget, gpointer user_data); static void gmlc_gui_server_tab_data_evt_menu_func_refresh_activate (GtkWidget *widget, gpointer user_data); static void gmlc_gui_server_tab_data_evt_menu_func_show_create_activate (GtkWidget *widget, gpointer user_data); enum { PROP_0, PROP_SERVER, PROP_SERVER_WINDOW, }; G_DEFINE_TYPE_WITH_CODE (GmlcGuiServerTabData, gmlc_gui_server_tab_data, GTK_TYPE_VBOX, G_IMPLEMENT_INTERFACE (GMLC_GUI_TYPE_SERVER_TAB, gmlc_gui_server_tab_data_interface_init)); static void gmlc_gui_server_tab_data_interface_init (gpointer g_iface, gpointer iface_data) { GmlcGuiServerTabInterface *pIface = (GmlcGuiServerTabInterface *)g_iface; pIface->update_ui = (void (*) (GmlcGuiServerTab * self, gboolean bShow))gmlc_gui_server_tab_data_update_ui; } static void gmlc_gui_server_tab_data_class_init (GmlcGuiServerTabDataClass * pClass) { GObjectClass *pObjClass = G_OBJECT_CLASS(pClass); pObjClass->finalize = (GObjectFinalizeFunc) gmlc_gui_server_tab_data_finalize; pObjClass->get_property = gmlc_gui_server_tab_data_get_property; pObjClass->set_property = gmlc_gui_server_tab_data_set_property; g_object_class_install_property(pObjClass, PROP_SERVER, g_param_spec_object("server", "Server object", "Server object", GMLC_MYSQL_TYPE_SERVER, G_PARAM_READABLE)); g_object_class_install_property(pObjClass, PROP_SERVER_WINDOW, g_param_spec_object("server_window", "Server window object", "Server window object", GMLC_GUI_TYPE_SERVER, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); } static void gmlc_gui_server_tab_data_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec) { GmlcGuiServerTabData * pGmlcGuiSrvTabData = GMLC_GUI_SERVER_TAB_DATA(object); switch (prop_id) { case PROP_SERVER : g_value_set_object(value, pGmlcGuiSrvTabData->pGmlcMysqlSrv); break; case PROP_SERVER_WINDOW : g_value_set_object(value, pGmlcGuiSrvTabData->pGmlcGuiSrv); break; default: { G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); break; } } } static void gmlc_gui_server_tab_data_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec) { GmlcGuiServerTabData * pGmlcGuiSrvTabData = GMLC_GUI_SERVER_TAB_DATA(object); switch (prop_id) { case PROP_SERVER_WINDOW : pGmlcGuiSrvTabData->pGmlcGuiSrv = g_value_get_object(value); g_object_get(pGmlcGuiSrvTabData->pGmlcGuiSrv, "server", &pGmlcGuiSrvTabData->pGmlcMysqlSrv, NULL); gmlc_gui_server_tab_data_create_widgets(pGmlcGuiSrvTabData); gmlc_gui_server_tab_data_init_widgets(pGmlcGuiSrvTabData); gmlc_gui_server_tab_data_create_toolbar_items(pGmlcGuiSrvTabData); break; default: { G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); break; } } } static void gmlc_gui_server_tab_data_init (GmlcGuiServerTabData * pGmlcGuiSrvTabData) { pGmlcGuiSrvTabData->pGmlcGuiSrv = NULL; pGmlcGuiSrvTabData->pGmlcMysqlSrv = NULL; pGmlcGuiSrvTabData->pGmlcMysqlDb = NULL; pGmlcGuiSrvTabData->pGmlcMysqlTbl = NULL; pGmlcGuiSrvTabData->pGmlcMysqlVw = NULL; pGmlcGuiSrvTabData->pGmlcMysqlProc = NULL; pGmlcGuiSrvTabData->pGmlcMysqlFunc = NULL; } static void gmlc_gui_server_tab_data_finalize (GmlcGuiServerTabData * pGmlcGuiSrvTabData) { UNUSED_VAR(pGmlcGuiSrvTabData); } static void gmlc_gui_server_tab_data_update_ui (GmlcGuiServerTabData * pGmlcGuiSrvTabData, gboolean bShow) { if (bShow) { gtk_widget_show(pGmlcGuiSrvTabData->poDataToolbar); } else { gtk_widget_hide(pGmlcGuiSrvTabData->poDataToolbar); } } GmlcGuiServerTabData * gmlc_gui_server_tab_data_new (GmlcGuiServer * pGmlcGuiSrv) { GmlcGuiServerTabData * pGmlcGuiSrvTabData = NULL; pGmlcGuiSrvTabData = GMLC_GUI_SERVER_TAB_DATA(g_object_new(GMLC_GUI_TYPE_SERVER_TAB_DATA, "server_window", pGmlcGuiSrv, NULL)); return pGmlcGuiSrvTabData; } void gmlc_gui_server_tab_data_create_toolbar_items (GmlcGuiServerTabData * pGmlcGuiSrvTabData) { GtkWidget * poHBoxToolbar = NULL; GtkWidget * poImgBtn = NULL; GtkWidget * poBtnSql = NULL; GtkWidget * poBtnSqlFile = NULL; g_object_get(pGmlcGuiSrvTabData->pGmlcGuiSrv, "toolbar-hbox", &poHBoxToolbar, NULL); pGmlcGuiSrvTabData->poDataToolbar = gtk_hbox_new (FALSE, 2); gtk_widget_show (pGmlcGuiSrvTabData->poDataToolbar); gtk_box_pack_start (GTK_BOX (poHBoxToolbar), pGmlcGuiSrvTabData->poDataToolbar, TRUE, TRUE, 0); poImgBtn = gtk_image_new_from_stock(GTK_STOCK_EXECUTE, GTK_ICON_SIZE_LARGE_TOOLBAR); gtk_widget_show(poImgBtn); poBtnSql = gtk_button_new_with_label (_("SQL")); gtk_button_set_image(GTK_BUTTON(poBtnSql), poImgBtn); gtk_button_set_relief(GTK_BUTTON(poBtnSql), GTK_RELIEF_NONE); g_signal_connect (poBtnSql, "clicked", G_CALLBACK (gmlc_gui_server_tab_data_evt_btn_sql_clicked), pGmlcGuiSrvTabData); gtk_widget_show(poBtnSql); gtk_box_pack_start (GTK_BOX (pGmlcGuiSrvTabData->poDataToolbar), poBtnSql, FALSE, FALSE, 0); poImgBtn = gtk_image_new_from_stock(GTK_STOCK_EXECUTE, GTK_ICON_SIZE_LARGE_TOOLBAR); gtk_widget_show(poImgBtn); poBtnSqlFile = gtk_button_new_with_label (_("SQL File")); gtk_button_set_image(GTK_BUTTON(poBtnSqlFile), poImgBtn); gtk_button_set_relief(GTK_BUTTON(poBtnSqlFile), GTK_RELIEF_NONE); g_signal_connect (poBtnSqlFile, "clicked", G_CALLBACK (gmlc_gui_server_tab_data_evt_btn_sql_file_clicked), pGmlcGuiSrvTabData); gtk_widget_show(poBtnSqlFile); gtk_box_pack_start (GTK_BOX (pGmlcGuiSrvTabData->poDataToolbar), poBtnSqlFile, FALSE, FALSE, 0); } void gmlc_gui_server_tab_data_create_widgets (GmlcGuiServerTabData * pGmlcGuiSrvTabData) { GtkTreeSelection * select; GtkWidget * vbox, * hpaned, * nbkDatas; GtkWidget * label; GtkWidget * scrolledwindow; GtkWidget * poMenuOpsItem; glong lServerVersion = 0; g_object_get(G_OBJECT(pGmlcGuiSrvTabData->pGmlcMysqlSrv), "version", &lServerVersion, NULL); hpaned = gtk_hpaned_new (); gtk_widget_show (hpaned); gtk_paned_set_position (GTK_PANED (hpaned), 200); gtk_box_pack_start (GTK_BOX (pGmlcGuiSrvTabData), hpaned, TRUE, TRUE, 0); vbox = gtk_vbox_new (FALSE, 0); gtk_widget_show (vbox); gtk_paned_pack1 (GTK_PANED (hpaned), vbox, FALSE, TRUE); scrolledwindow = gtk_scrolled_window_new (NULL, NULL); gtk_widget_show (scrolledwindow); gtk_box_pack_start (GTK_BOX (vbox), scrolledwindow, TRUE, TRUE, 0); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS); pGmlcGuiSrvTabData->lstBase = gtk_tree_view_new (); gtk_widget_show (pGmlcGuiSrvTabData->lstBase); gtk_tree_view_set_rules_hint(GTK_TREE_VIEW (pGmlcGuiSrvTabData->lstBase), TRUE); gtk_container_add (GTK_CONTAINER (scrolledwindow), pGmlcGuiSrvTabData->lstBase); select = gtk_tree_view_get_selection (GTK_TREE_VIEW (pGmlcGuiSrvTabData->lstBase)); gtk_tree_selection_set_mode (select, GTK_SELECTION_SINGLE); g_signal_connect(pGmlcGuiSrvTabData->lstBase, "button-press-event", G_CALLBACK (gmlc_gui_server_tab_data_evt_lst_db_btnpress), pGmlcGuiSrvTabData); g_signal_connect(select, "changed", G_CALLBACK (gmlc_gui_server_tab_data_evt_lst_db_selected), pGmlcGuiSrvTabData); pGmlcGuiSrvTabData->mnuBdOps = gtk_menu_new(); gtk_widget_show (pGmlcGuiSrvTabData->mnuBdOps); poMenuOpsItem = gtk_menu_item_new_with_label(_("Refresh")); gtk_widget_show (poMenuOpsItem); gtk_menu_append (GTK_MENU_SHELL(pGmlcGuiSrvTabData->mnuBdOps), poMenuOpsItem); g_signal_connect (poMenuOpsItem, "activate", G_CALLBACK (gmlc_gui_server_tab_data_evt_menu_db_refresh_activate), pGmlcGuiSrvTabData); poMenuOpsItem = gtk_separator_menu_item_new(); gtk_widget_show (poMenuOpsItem); gtk_menu_append (GTK_MENU_SHELL(pGmlcGuiSrvTabData->mnuBdOps), poMenuOpsItem); poMenuOpsItem = gtk_menu_item_new_with_label(_("Add a database")); gtk_widget_show (poMenuOpsItem); gtk_menu_append (GTK_MENU_SHELL(pGmlcGuiSrvTabData->mnuBdOps), poMenuOpsItem); g_signal_connect (poMenuOpsItem, "activate", G_CALLBACK (gmlc_gui_server_tab_data_evt_menu_db_add_activate), pGmlcGuiSrvTabData); poMenuOpsItem = gtk_menu_item_new_with_label(_("Alter a database")); gtk_widget_show (poMenuOpsItem); gtk_menu_append (GTK_MENU_SHELL(pGmlcGuiSrvTabData->mnuBdOps), poMenuOpsItem); g_signal_connect (poMenuOpsItem, "activate", G_CALLBACK (gmlc_gui_server_tab_data_evt_menu_db_alter_activate), pGmlcGuiSrvTabData); poMenuOpsItem = gtk_menu_item_new_with_label(_("Remove a database")); gtk_widget_show (poMenuOpsItem); gtk_menu_append (GTK_MENU_SHELL(pGmlcGuiSrvTabData->mnuBdOps), poMenuOpsItem); g_signal_connect (poMenuOpsItem, "activate", G_CALLBACK (gmlc_gui_server_tab_data_evt_menu_db_remove_activate), pGmlcGuiSrvTabData); poMenuOpsItem = gtk_separator_menu_item_new(); gtk_widget_show (poMenuOpsItem); gtk_menu_append (GTK_MENU_SHELL(pGmlcGuiSrvTabData->mnuBdOps), poMenuOpsItem); poMenuOpsItem = gtk_menu_item_new_with_label(_("Display all create structures")); gtk_widget_show (poMenuOpsItem); gtk_menu_append (GTK_MENU_SHELL(pGmlcGuiSrvTabData->mnuBdOps), poMenuOpsItem); g_signal_connect (poMenuOpsItem, "activate", G_CALLBACK (gmlc_gui_server_tab_data_evt_menu_db_show_create_activate), pGmlcGuiSrvTabData); nbkDatas = gtk_notebook_new (); gtk_widget_show (nbkDatas); gtk_paned_pack2 (GTK_PANED (hpaned), nbkDatas, TRUE, TRUE); label = gtk_label_new (_("Tables")); gtk_widget_show (label); gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT); vbox = gtk_vbox_new (FALSE, 0); gtk_widget_show (vbox); gtk_notebook_append_page(GTK_NOTEBOOK(nbkDatas), vbox, label); scrolledwindow = gtk_scrolled_window_new (NULL, NULL); gtk_widget_show (scrolledwindow); gtk_box_pack_start (GTK_BOX (vbox), scrolledwindow, TRUE, TRUE, 0); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS); pGmlcGuiSrvTabData->lstTables = gtk_tree_view_new (); gtk_widget_show (pGmlcGuiSrvTabData->lstTables); gtk_container_add (GTK_CONTAINER (scrolledwindow), pGmlcGuiSrvTabData->lstTables); gtk_tree_view_set_rules_hint(GTK_TREE_VIEW (pGmlcGuiSrvTabData->lstTables), TRUE); select = gtk_tree_view_get_selection (GTK_TREE_VIEW (pGmlcGuiSrvTabData->lstTables)); gtk_tree_selection_set_mode (select, GTK_SELECTION_SINGLE); g_signal_connect(pGmlcGuiSrvTabData->lstTables, "button-press-event", G_CALLBACK (gmlc_gui_server_tab_data_evt_lst_tbl_btnpress), pGmlcGuiSrvTabData); g_signal_connect(select, "changed", G_CALLBACK (gmlc_gui_server_tab_data_evt_lst_tbl_selected), pGmlcGuiSrvTabData); pGmlcGuiSrvTabData->mnuTblOps = gtk_menu_new(); gtk_widget_show (pGmlcGuiSrvTabData->mnuTblOps); poMenuOpsItem = gtk_menu_item_new_with_label(_("Refresh")); gtk_widget_show (poMenuOpsItem); gtk_menu_append (GTK_MENU_SHELL(pGmlcGuiSrvTabData->mnuTblOps), poMenuOpsItem); g_signal_connect (poMenuOpsItem, "activate", G_CALLBACK (gmlc_gui_server_tab_data_evt_menu_tbl_refresh_activate), pGmlcGuiSrvTabData); poMenuOpsItem = gtk_separator_menu_item_new(); gtk_widget_show (poMenuOpsItem); gtk_menu_append (GTK_MENU_SHELL(pGmlcGuiSrvTabData->mnuTblOps), poMenuOpsItem); poMenuOpsItem = gtk_menu_item_new_with_label(_("Display table data")); gtk_widget_show (poMenuOpsItem); gtk_menu_append (GTK_MENU_SHELL(pGmlcGuiSrvTabData->mnuTblOps), poMenuOpsItem); g_signal_connect (poMenuOpsItem, "activate", G_CALLBACK (gmlc_gui_server_tab_data_evt_menu_tbl_display_activate), pGmlcGuiSrvTabData); poMenuOpsItem = gtk_separator_menu_item_new(); gtk_widget_show (poMenuOpsItem); gtk_menu_append (GTK_MENU_SHELL(pGmlcGuiSrvTabData->mnuTblOps), poMenuOpsItem); poMenuOpsItem = gtk_menu_item_new_with_label(_("Add a table")); gtk_widget_show (poMenuOpsItem); gtk_menu_append (GTK_MENU_SHELL(pGmlcGuiSrvTabData->mnuTblOps), poMenuOpsItem); g_signal_connect (poMenuOpsItem, "activate", G_CALLBACK (gmlc_gui_server_tab_data_evt_menu_tbl_add_activate), pGmlcGuiSrvTabData); poMenuOpsItem = gtk_menu_item_new_with_label(_("Alter a table")); gtk_widget_show (poMenuOpsItem); gtk_menu_append (GTK_MENU_SHELL(pGmlcGuiSrvTabData->mnuTblOps), poMenuOpsItem); g_signal_connect (poMenuOpsItem, "activate", G_CALLBACK (gmlc_gui_server_tab_data_evt_menu_tbl_alter_activate), pGmlcGuiSrvTabData); poMenuOpsItem = gtk_menu_item_new_with_label(_("Remove a table")); gtk_widget_show (poMenuOpsItem); gtk_menu_append (GTK_MENU_SHELL(pGmlcGuiSrvTabData->mnuTblOps), poMenuOpsItem); g_signal_connect (poMenuOpsItem, "activate", G_CALLBACK (gmlc_gui_server_tab_data_evt_menu_tbl_remove_activate), pGmlcGuiSrvTabData); poMenuOpsItem = gtk_separator_menu_item_new(); gtk_widget_show (poMenuOpsItem); gtk_menu_append (GTK_MENU_SHELL(pGmlcGuiSrvTabData->mnuTblOps), poMenuOpsItem); poMenuOpsItem = gtk_menu_item_new_with_label(_("Display create structure")); gtk_widget_show (poMenuOpsItem); gtk_menu_append (GTK_MENU_SHELL(pGmlcGuiSrvTabData->mnuTblOps), poMenuOpsItem); g_signal_connect (poMenuOpsItem, "activate", G_CALLBACK (gmlc_gui_server_tab_data_evt_menu_tbl_show_create_activate), pGmlcGuiSrvTabData); if (lServerVersion >= 50001) { label = gtk_label_new (_("Views")); gtk_widget_show (label); gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT); vbox = gtk_vbox_new (FALSE, 0); gtk_widget_show (vbox); gtk_notebook_append_page(GTK_NOTEBOOK(nbkDatas), vbox, label); scrolledwindow = gtk_scrolled_window_new (NULL, NULL); gtk_widget_show (scrolledwindow); gtk_box_pack_start (GTK_BOX (vbox), scrolledwindow, TRUE, TRUE, 0); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS); pGmlcGuiSrvTabData->lstViews = gtk_tree_view_new (); gtk_widget_show (pGmlcGuiSrvTabData->lstViews); gtk_container_add (GTK_CONTAINER (scrolledwindow), pGmlcGuiSrvTabData->lstViews); gtk_tree_view_set_rules_hint(GTK_TREE_VIEW (pGmlcGuiSrvTabData->lstViews), TRUE); select = gtk_tree_view_get_selection (GTK_TREE_VIEW (pGmlcGuiSrvTabData->lstViews)); gtk_tree_selection_set_mode (select, GTK_SELECTION_SINGLE); g_signal_connect(pGmlcGuiSrvTabData->lstViews, "button-press-event", G_CALLBACK (gmlc_gui_server_tab_data_evt_lst_vw_btnpress), pGmlcGuiSrvTabData); g_signal_connect(select, "changed", G_CALLBACK (gmlc_gui_server_tab_data_evt_lst_vw_selected), pGmlcGuiSrvTabData); pGmlcGuiSrvTabData->mnuVwOps = gtk_menu_new(); gtk_widget_show (pGmlcGuiSrvTabData->mnuVwOps); poMenuOpsItem = gtk_menu_item_new_with_label(_("Refresh")); gtk_widget_show (poMenuOpsItem); gtk_menu_append (GTK_MENU_SHELL(pGmlcGuiSrvTabData->mnuVwOps), poMenuOpsItem); g_signal_connect (poMenuOpsItem, "activate", G_CALLBACK (gmlc_gui_server_tab_data_evt_menu_vw_refresh_activate), pGmlcGuiSrvTabData); poMenuOpsItem = gtk_separator_menu_item_new(); gtk_widget_show (poMenuOpsItem); gtk_menu_append (GTK_MENU_SHELL(pGmlcGuiSrvTabData->mnuVwOps), poMenuOpsItem); poMenuOpsItem = gtk_menu_item_new_with_label(_("Display view data")); gtk_widget_show (poMenuOpsItem); gtk_menu_append (GTK_MENU_SHELL(pGmlcGuiSrvTabData->mnuVwOps), poMenuOpsItem); g_signal_connect (poMenuOpsItem, "activate", G_CALLBACK (gmlc_gui_server_tab_data_evt_menu_vw_display_activate), pGmlcGuiSrvTabData); poMenuOpsItem = gtk_separator_menu_item_new(); gtk_widget_show (poMenuOpsItem); gtk_menu_append (GTK_MENU_SHELL(pGmlcGuiSrvTabData->mnuVwOps), poMenuOpsItem); poMenuOpsItem = gtk_menu_item_new_with_label(_("Add a view")); gtk_widget_show (poMenuOpsItem); gtk_menu_append (GTK_MENU_SHELL(pGmlcGuiSrvTabData->mnuVwOps), poMenuOpsItem); g_signal_connect (poMenuOpsItem, "activate", G_CALLBACK (gmlc_gui_server_tab_data_evt_menu_vw_add_activate), pGmlcGuiSrvTabData); poMenuOpsItem = gtk_menu_item_new_with_label(_("Alter a view")); gtk_widget_show (poMenuOpsItem); gtk_menu_append (GTK_MENU_SHELL(pGmlcGuiSrvTabData->mnuVwOps), poMenuOpsItem); g_signal_connect (poMenuOpsItem, "activate", G_CALLBACK (gmlc_gui_server_tab_data_evt_menu_vw_alter_activate), pGmlcGuiSrvTabData); poMenuOpsItem = gtk_menu_item_new_with_label(_("Remove a view")); gtk_widget_show (poMenuOpsItem); gtk_menu_append (GTK_MENU_SHELL(pGmlcGuiSrvTabData->mnuVwOps), poMenuOpsItem); g_signal_connect (poMenuOpsItem, "activate", G_CALLBACK (gmlc_gui_server_tab_data_evt_menu_vw_remove_activate), pGmlcGuiSrvTabData); poMenuOpsItem = gtk_separator_menu_item_new(); gtk_widget_show (poMenuOpsItem); gtk_menu_append (GTK_MENU_SHELL(pGmlcGuiSrvTabData->mnuVwOps), poMenuOpsItem); poMenuOpsItem = gtk_menu_item_new_with_label(_("Display create structure")); gtk_widget_show (poMenuOpsItem); gtk_menu_append (GTK_MENU_SHELL(pGmlcGuiSrvTabData->mnuVwOps), poMenuOpsItem); g_signal_connect (poMenuOpsItem, "activate", G_CALLBACK (gmlc_gui_server_tab_data_evt_menu_vw_show_create_activate), pGmlcGuiSrvTabData); label = gtk_label_new (_("Procedures")); gtk_widget_show (label); gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT); vbox = gtk_vbox_new (FALSE, 0); gtk_widget_show (vbox); gtk_notebook_append_page(GTK_NOTEBOOK(nbkDatas), vbox, label); scrolledwindow = gtk_scrolled_window_new (NULL, NULL); gtk_widget_show (scrolledwindow); gtk_box_pack_start (GTK_BOX (vbox), scrolledwindow, TRUE, TRUE, 0); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS); pGmlcGuiSrvTabData->lstProcedures = gtk_tree_view_new (); gtk_widget_show (pGmlcGuiSrvTabData->lstProcedures); gtk_container_add (GTK_CONTAINER (scrolledwindow), pGmlcGuiSrvTabData->lstProcedures); gtk_tree_view_set_rules_hint(GTK_TREE_VIEW (pGmlcGuiSrvTabData->lstProcedures), TRUE); select = gtk_tree_view_get_selection (GTK_TREE_VIEW (pGmlcGuiSrvTabData->lstProcedures)); gtk_tree_selection_set_mode (select, GTK_SELECTION_SINGLE); g_signal_connect(pGmlcGuiSrvTabData->lstProcedures, "button-press-event", G_CALLBACK (gmlc_gui_server_tab_data_evt_lst_proc_btnpress), pGmlcGuiSrvTabData); g_signal_connect(select, "changed", G_CALLBACK (gmlc_gui_server_tab_data_evt_lst_proc_selected), pGmlcGuiSrvTabData); pGmlcGuiSrvTabData->mnuProcOps = gtk_menu_new(); gtk_widget_show (pGmlcGuiSrvTabData->mnuProcOps); poMenuOpsItem = gtk_menu_item_new_with_label(_("Refresh")); gtk_widget_show (poMenuOpsItem); gtk_menu_append (GTK_MENU_SHELL(pGmlcGuiSrvTabData->mnuProcOps), poMenuOpsItem); g_signal_connect (poMenuOpsItem, "activate", G_CALLBACK (gmlc_gui_server_tab_data_evt_menu_proc_refresh_activate), pGmlcGuiSrvTabData); poMenuOpsItem = gtk_separator_menu_item_new(); gtk_widget_show (poMenuOpsItem); gtk_menu_append (GTK_MENU_SHELL(pGmlcGuiSrvTabData->mnuProcOps), poMenuOpsItem); poMenuOpsItem = gtk_menu_item_new_with_label(_("Execute a procedure")); gtk_widget_show (poMenuOpsItem); gtk_menu_append (GTK_MENU_SHELL(pGmlcGuiSrvTabData->mnuProcOps), poMenuOpsItem); g_signal_connect (poMenuOpsItem, "activate", G_CALLBACK (gmlc_gui_server_tab_data_evt_menu_proc_display_activate), pGmlcGuiSrvTabData); poMenuOpsItem = gtk_separator_menu_item_new(); gtk_widget_show (poMenuOpsItem); gtk_menu_append (GTK_MENU_SHELL(pGmlcGuiSrvTabData->mnuProcOps), poMenuOpsItem); poMenuOpsItem = gtk_menu_item_new_with_label(_("Add a procedure")); gtk_widget_show (poMenuOpsItem); gtk_menu_append (GTK_MENU_SHELL(pGmlcGuiSrvTabData->mnuProcOps), poMenuOpsItem); g_signal_connect (poMenuOpsItem, "activate", G_CALLBACK (gmlc_gui_server_tab_data_evt_menu_proc_add_activate), pGmlcGuiSrvTabData); poMenuOpsItem = gtk_menu_item_new_with_label(_("Alter a procedure")); gtk_widget_show (poMenuOpsItem); gtk_menu_append (GTK_MENU_SHELL(pGmlcGuiSrvTabData->mnuProcOps), poMenuOpsItem); g_signal_connect (poMenuOpsItem, "activate", G_CALLBACK (gmlc_gui_server_tab_data_evt_menu_proc_alter_activate), pGmlcGuiSrvTabData); poMenuOpsItem = gtk_menu_item_new_with_label(_("Remove a procedure")); gtk_widget_show (poMenuOpsItem); gtk_menu_append (GTK_MENU_SHELL(pGmlcGuiSrvTabData->mnuProcOps), poMenuOpsItem); g_signal_connect (poMenuOpsItem, "activate", G_CALLBACK (gmlc_gui_server_tab_data_evt_menu_proc_remove_activate), pGmlcGuiSrvTabData); poMenuOpsItem = gtk_separator_menu_item_new(); gtk_widget_show (poMenuOpsItem); gtk_menu_append (GTK_MENU_SHELL(pGmlcGuiSrvTabData->mnuProcOps), poMenuOpsItem); poMenuOpsItem = gtk_menu_item_new_with_label(_("Display create structure")); gtk_widget_show (poMenuOpsItem); gtk_menu_append (GTK_MENU_SHELL(pGmlcGuiSrvTabData->mnuProcOps), poMenuOpsItem); g_signal_connect (poMenuOpsItem, "activate", G_CALLBACK (gmlc_gui_server_tab_data_evt_menu_proc_show_create_activate), pGmlcGuiSrvTabData); label = gtk_label_new (_("Functions")); gtk_widget_show (label); gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT); vbox = gtk_vbox_new (FALSE, 0); gtk_widget_show (vbox); gtk_notebook_append_page(GTK_NOTEBOOK(nbkDatas), vbox, label); scrolledwindow = gtk_scrolled_window_new (NULL, NULL); gtk_widget_show (scrolledwindow); gtk_box_pack_start (GTK_BOX (vbox), scrolledwindow, TRUE, TRUE, 0); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS); pGmlcGuiSrvTabData->lstFunctions = gtk_tree_view_new (); gtk_widget_show (pGmlcGuiSrvTabData->lstFunctions); gtk_container_add (GTK_CONTAINER (scrolledwindow), pGmlcGuiSrvTabData->lstFunctions); gtk_tree_view_set_rules_hint(GTK_TREE_VIEW (pGmlcGuiSrvTabData->lstFunctions), TRUE); select = gtk_tree_view_get_selection (GTK_TREE_VIEW (pGmlcGuiSrvTabData->lstFunctions)); gtk_tree_selection_set_mode (select, GTK_SELECTION_SINGLE); g_signal_connect(pGmlcGuiSrvTabData->lstFunctions, "button-press-event", G_CALLBACK (gmlc_gui_server_tab_data_evt_lst_func_btnpress), pGmlcGuiSrvTabData); g_signal_connect(select, "changed", G_CALLBACK (gmlc_gui_server_tab_data_evt_lst_func_selected), pGmlcGuiSrvTabData); pGmlcGuiSrvTabData->mnuFuncOps = gtk_menu_new(); gtk_widget_show (pGmlcGuiSrvTabData->mnuFuncOps); poMenuOpsItem = gtk_menu_item_new_with_label(_("Refresh")); gtk_widget_show (poMenuOpsItem); gtk_menu_append (GTK_MENU_SHELL(pGmlcGuiSrvTabData->mnuFuncOps), poMenuOpsItem); g_signal_connect (poMenuOpsItem, "activate", G_CALLBACK (gmlc_gui_server_tab_data_evt_menu_func_refresh_activate), pGmlcGuiSrvTabData); poMenuOpsItem = gtk_separator_menu_item_new(); gtk_widget_show (poMenuOpsItem); gtk_menu_append (GTK_MENU_SHELL(pGmlcGuiSrvTabData->mnuFuncOps), poMenuOpsItem); poMenuOpsItem = gtk_menu_item_new_with_label(_("Execute a function")); gtk_widget_show (poMenuOpsItem); gtk_menu_append (GTK_MENU_SHELL(pGmlcGuiSrvTabData->mnuFuncOps), poMenuOpsItem); g_signal_connect (poMenuOpsItem, "activate", G_CALLBACK (gmlc_gui_server_tab_data_evt_menu_func_display_activate), pGmlcGuiSrvTabData); poMenuOpsItem = gtk_separator_menu_item_new(); gtk_widget_show (poMenuOpsItem); gtk_menu_append (GTK_MENU_SHELL(pGmlcGuiSrvTabData->mnuFuncOps), poMenuOpsItem); poMenuOpsItem = gtk_menu_item_new_with_label(_("Add a function")); gtk_widget_show (poMenuOpsItem); gtk_menu_append (GTK_MENU_SHELL(pGmlcGuiSrvTabData->mnuFuncOps), poMenuOpsItem); g_signal_connect (poMenuOpsItem, "activate", G_CALLBACK (gmlc_gui_server_tab_data_evt_menu_func_add_activate), pGmlcGuiSrvTabData); poMenuOpsItem = gtk_menu_item_new_with_label(_("Alter a function")); gtk_widget_show (poMenuOpsItem); gtk_menu_append (GTK_MENU_SHELL(pGmlcGuiSrvTabData->mnuFuncOps), poMenuOpsItem); g_signal_connect (poMenuOpsItem, "activate", G_CALLBACK (gmlc_gui_server_tab_data_evt_menu_func_alter_activate), pGmlcGuiSrvTabData); poMenuOpsItem = gtk_menu_item_new_with_label(_("Remove a function")); gtk_widget_show (poMenuOpsItem); gtk_menu_append (GTK_MENU_SHELL(pGmlcGuiSrvTabData->mnuFuncOps), poMenuOpsItem); g_signal_connect (poMenuOpsItem, "activate", G_CALLBACK (gmlc_gui_server_tab_data_evt_menu_func_remove_activate), pGmlcGuiSrvTabData); poMenuOpsItem = gtk_separator_menu_item_new(); gtk_widget_show (poMenuOpsItem); gtk_menu_append (GTK_MENU_SHELL(pGmlcGuiSrvTabData->mnuFuncOps), poMenuOpsItem); poMenuOpsItem = gtk_menu_item_new_with_label(_("Display create structure")); gtk_widget_show (poMenuOpsItem); gtk_menu_append (GTK_MENU_SHELL(pGmlcGuiSrvTabData->mnuFuncOps), poMenuOpsItem); g_signal_connect (poMenuOpsItem, "activate", G_CALLBACK (gmlc_gui_server_tab_data_evt_menu_func_show_create_activate), pGmlcGuiSrvTabData); } } void gmlc_gui_server_tab_data_init_widgets (GmlcGuiServerTabData * pGmlcGuiSrvTabData) { GtkTreeViewColumn * currCol; GtkCellRenderer * renderer; GtkListStore * lstEmpty; glong lServerVersion = 0; g_object_get(G_OBJECT(pGmlcGuiSrvTabData->pGmlcMysqlSrv), "version", &lServerVersion, NULL); /* Generate columns for all tree views */ renderer = gtk_cell_renderer_text_new (); /* Databases columns */ currCol = gtk_tree_view_column_new_with_attributes (_("Databases"), renderer, "text", 0, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (pGmlcGuiSrvTabData->lstBase), currCol); lstEmpty = gtk_list_store_new(1, G_TYPE_STRING); gtk_tree_view_set_model(GTK_TREE_VIEW(pGmlcGuiSrvTabData->lstBase), GTK_TREE_MODEL(lstEmpty)); g_object_unref (G_OBJECT (lstEmpty)); /* Table columns */ currCol = gtk_tree_view_column_new_with_attributes (_("Name"), renderer, "text", 0, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (pGmlcGuiSrvTabData->lstTables), currCol); currCol = gtk_tree_view_column_new_with_attributes (_("Rows"), renderer, "text", 1, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (pGmlcGuiSrvTabData->lstTables), currCol); currCol = gtk_tree_view_column_new_with_attributes (_("Size"), renderer, "text", 2, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (pGmlcGuiSrvTabData->lstTables), currCol); currCol = gtk_tree_view_column_new_with_attributes (_("Type"), renderer, "text", 3, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (pGmlcGuiSrvTabData->lstTables), currCol); lstEmpty = gtk_list_store_new(4, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING); gtk_tree_view_set_model(GTK_TREE_VIEW(pGmlcGuiSrvTabData->lstTables), GTK_TREE_MODEL(lstEmpty)); g_object_unref (G_OBJECT (lstEmpty)); if (lServerVersion >= 50001) { /* View columns */ currCol = gtk_tree_view_column_new_with_attributes (_("Name"), renderer, "text", 0, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (pGmlcGuiSrvTabData->lstViews), currCol); lstEmpty = gtk_list_store_new(1, G_TYPE_STRING); gtk_tree_view_set_model(GTK_TREE_VIEW(pGmlcGuiSrvTabData->lstViews), GTK_TREE_MODEL(lstEmpty)); g_object_unref (G_OBJECT (lstEmpty)); /* Procedure columns */ currCol = gtk_tree_view_column_new_with_attributes (_("Name"), renderer, "text", 0, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (pGmlcGuiSrvTabData->lstProcedures), currCol); lstEmpty = gtk_list_store_new(1, G_TYPE_STRING); gtk_tree_view_set_model(GTK_TREE_VIEW(pGmlcGuiSrvTabData->lstProcedures), GTK_TREE_MODEL(lstEmpty)); g_object_unref (G_OBJECT (lstEmpty)); /* Function columns */ currCol = gtk_tree_view_column_new_with_attributes (_("Name"), renderer, "text", 0, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (pGmlcGuiSrvTabData->lstFunctions), currCol); lstEmpty = gtk_list_store_new(1, G_TYPE_STRING); gtk_tree_view_set_model(GTK_TREE_VIEW(pGmlcGuiSrvTabData->lstFunctions), GTK_TREE_MODEL(lstEmpty)); g_object_unref (G_OBJECT (lstEmpty)); } gmlc_gui_server_tab_data_fill_database_list(pGmlcGuiSrvTabData); } void gmlc_gui_server_tab_data_open_file (GmlcGuiServerTabData * pGmlcGuiSrvTabData) { gchar * pcDbName = NULL; GtkWidget * poQueryTab = NULL; if (pGmlcGuiSrvTabData->pGmlcMysqlDb != NULL) { g_object_get(G_OBJECT(pGmlcGuiSrvTabData->pGmlcMysqlDb), "db_name", &pcDbName, NULL); poQueryTab = gmlc_gui_server_add_query_tab(pGmlcGuiSrvTabData->pGmlcGuiSrv, pcDbName, NULL, FALSE); } else { poQueryTab = gmlc_gui_server_add_query_tab(pGmlcGuiSrvTabData->pGmlcGuiSrv, NULL, NULL, FALSE); } gmlc_gui_server_tab_query_evt_btn_load_clicked(NULL, poQueryTab); } void gmlc_gui_server_tab_data_open_query (GmlcGuiServerTabData * pGmlcGuiSrvTabData, const gchar * pcQuery, gboolean bExecNow) { gchar * pcDbName = NULL; if (pGmlcGuiSrvTabData->pGmlcMysqlDb != NULL) { g_object_get(G_OBJECT(pGmlcGuiSrvTabData->pGmlcMysqlDb), "db_name", &pcDbName, NULL); gmlc_gui_server_add_query_tab(pGmlcGuiSrvTabData->pGmlcGuiSrv, pcDbName, pcQuery, bExecNow); } else { gmlc_gui_server_add_query_tab(pGmlcGuiSrvTabData->pGmlcGuiSrv, NULL, pcQuery, bExecNow); } } void gmlc_gui_server_tab_data_open_query_select (GmlcGuiServerTabData * pGmlcGuiSrvTabData, gboolean bUseTable) { gchar * pcSql = NULL, * pcDbName = NULL, * pcTblName = NULL; if (bUseTable && pGmlcGuiSrvTabData->pGmlcMysqlTbl != NULL) { g_object_get(G_OBJECT(pGmlcGuiSrvTabData->pGmlcMysqlDb), "db_name", &pcDbName, NULL); g_object_get(G_OBJECT(pGmlcGuiSrvTabData->pGmlcMysqlTbl), "name", &pcTblName, NULL); pcSql = g_strdup_printf("SELECT * \nFROM `%s`.`%s`\nWHERE 1\nLIMIT 1000", pcDbName, pcTblName); } gmlc_gui_server_tab_data_open_query(pGmlcGuiSrvTabData, pcSql, (pcSql != NULL)); g_free(pcSql); } void gmlc_gui_server_tab_data_fill_database_list (GmlcGuiServerTabData * pGmlcGuiSrvTabData) { GtkListStore * lstStrBase = NULL, * lstEmpty = NULL; glong lServerVersion = 0; g_object_get(G_OBJECT(pGmlcGuiSrvTabData->pGmlcMysqlSrv), "version", &lServerVersion, NULL); void sub_ht_fill_database_list(gpointer key, gpointer value, gpointer user_data) { GmlcMysqlDatabase * pGmlcMysqlDb = GMLC_MYSQL_DATABASE(value); GtkListStore * lstStrBase = GTK_LIST_STORE(user_data); GtkTreeIter iter; gchar * pcName = NULL; g_object_get(G_OBJECT(pGmlcMysqlDb), "db_name", &pcName, NULL); gtk_list_store_append (lstStrBase, &iter); gtk_list_store_set (lstStrBase, &iter, 0, pcName, 1, pGmlcMysqlDb, -1); } lstStrBase = gtk_list_store_new(2, G_TYPE_STRING, G_TYPE_POINTER); gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE(lstStrBase), 0, GTK_SORT_ASCENDING); if (gmlc_mysql_server_update_databases_list(pGmlcGuiSrvTabData->pGmlcMysqlSrv)) { g_hash_table_foreach(pGmlcGuiSrvTabData->pGmlcMysqlSrv->htbDatabases, &sub_ht_fill_database_list, lstStrBase); } gtk_tree_view_set_model(GTK_TREE_VIEW(pGmlcGuiSrvTabData->lstBase), GTK_TREE_MODEL(lstStrBase)); g_object_unref (G_OBJECT (lstStrBase)); lstEmpty = gtk_list_store_new(4, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING); gtk_tree_view_set_model(GTK_TREE_VIEW(pGmlcGuiSrvTabData->lstTables), GTK_TREE_MODEL(lstEmpty)); g_object_unref (G_OBJECT (lstEmpty)); if (lServerVersion >= 50001) { lstEmpty = gtk_list_store_new(1, G_TYPE_STRING); gtk_tree_view_set_model(GTK_TREE_VIEW(pGmlcGuiSrvTabData->lstViews), GTK_TREE_MODEL(lstEmpty)); g_object_unref (G_OBJECT (lstEmpty)); lstEmpty = gtk_list_store_new(1, G_TYPE_STRING); gtk_tree_view_set_model(GTK_TREE_VIEW(pGmlcGuiSrvTabData->lstProcedures), GTK_TREE_MODEL(lstEmpty)); g_object_unref (G_OBJECT (lstEmpty)); lstEmpty = gtk_list_store_new(1, G_TYPE_STRING); gtk_tree_view_set_model(GTK_TREE_VIEW(pGmlcGuiSrvTabData->lstFunctions), GTK_TREE_MODEL(lstEmpty)); g_object_unref (G_OBJECT (lstEmpty)); } pGmlcGuiSrvTabData->pGmlcMysqlDb = NULL; pGmlcGuiSrvTabData->pGmlcMysqlTbl = NULL; pGmlcGuiSrvTabData->pGmlcMysqlVw = NULL; pGmlcGuiSrvTabData->pGmlcMysqlProc = NULL; pGmlcGuiSrvTabData->pGmlcMysqlFunc = NULL; } void gmlc_gui_server_tab_data_fill_tables_list (GmlcGuiServerTabData * pGmlcGuiSrvTabData) { GtkListStore * lstStrTable; void sub_ht_fill_table_list(gpointer key, gpointer value, gpointer user_data) { GmlcMysqlTable * pGmlcMysqlTbl = GMLC_MYSQL_TABLE(value); GtkListStore * lstStrTable = GTK_LIST_STORE(user_data); GtkTreeIter iter; gchar * pcName = NULL, * pcRows = NULL, * pcSize = NULL, * pcEngine = NULL; g_object_get(G_OBJECT(pGmlcMysqlTbl), "name", &pcName, "rows", &pcRows, "size", &pcSize, "engine", &pcEngine, NULL); gtk_list_store_append (lstStrTable, &iter); gtk_list_store_set (lstStrTable, &iter, 0, pcName, 1, pcRows, 2, pcSize, 3, pcEngine, 4, pGmlcMysqlTbl, -1); } lstStrTable = gtk_list_store_new(5, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_POINTER); gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE(lstStrTable), 0, GTK_SORT_ASCENDING); /* Fill listStore with tables */ if (gmlc_mysql_database_update_tables_list(pGmlcGuiSrvTabData->pGmlcMysqlDb)) { g_hash_table_foreach(pGmlcGuiSrvTabData->pGmlcMysqlDb->htbTables, &sub_ht_fill_table_list, lstStrTable); } gtk_tree_view_set_model(GTK_TREE_VIEW(pGmlcGuiSrvTabData->lstTables), GTK_TREE_MODEL(lstStrTable)); g_object_unref (G_OBJECT (lstStrTable)); pGmlcGuiSrvTabData->pGmlcMysqlTbl = NULL; } void gmlc_gui_server_tab_data_fill_views_list (GmlcGuiServerTabData * pGmlcGuiSrvTabData) { GtkListStore * lstStrView; void sub_ht_fill_view_list(gpointer key, gpointer value, gpointer user_data) { GmlcMysqlView * pGmlcMysqlVw = GMLC_MYSQL_VIEW(value); GtkListStore * lstStrView = GTK_LIST_STORE(user_data); GtkTreeIter iter; gchar * pcName = NULL; g_object_get(G_OBJECT(pGmlcMysqlVw), "name", &pcName, NULL); gtk_list_store_append (lstStrView, &iter); gtk_list_store_set (lstStrView, &iter, 0, pcName, 1, pGmlcMysqlVw, -1); } lstStrView = gtk_list_store_new(2, G_TYPE_STRING, G_TYPE_POINTER); gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE(lstStrView), 0, GTK_SORT_ASCENDING); /* Fill listStore with views */ if (gmlc_mysql_database_update_views_list(pGmlcGuiSrvTabData->pGmlcMysqlDb)) { g_hash_table_foreach(pGmlcGuiSrvTabData->pGmlcMysqlDb->htbViews, sub_ht_fill_view_list, lstStrView); } gtk_tree_view_set_model(GTK_TREE_VIEW(pGmlcGuiSrvTabData->lstViews), GTK_TREE_MODEL(lstStrView)); g_object_unref (G_OBJECT (lstStrView)); pGmlcGuiSrvTabData->pGmlcMysqlVw = NULL; } void gmlc_gui_server_tab_data_fill_procedures_list (GmlcGuiServerTabData * pGmlcGuiSrvTabData) { GtkListStore * lstStrProcedure; void sub_ht_fill_procedure_list(gpointer key, gpointer value, gpointer user_data) { GmlcMysqlProcedure * pGmlcMysqlProc = GMLC_MYSQL_PROCEDURE(value); GtkListStore * lstStrProcedure = GTK_LIST_STORE(user_data); GtkTreeIter iter; gchar * pcName = NULL; g_object_get(G_OBJECT(pGmlcMysqlProc), "name", &pcName, NULL); gtk_list_store_append (lstStrProcedure, &iter); gtk_list_store_set (lstStrProcedure, &iter, 0, pcName, 1, pGmlcMysqlProc, -1); } lstStrProcedure = gtk_list_store_new(2, G_TYPE_STRING, G_TYPE_POINTER); gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE(lstStrProcedure), 0, GTK_SORT_ASCENDING); /* Fill listStore with procedures */ if (gmlc_mysql_database_update_procedures_list(pGmlcGuiSrvTabData->pGmlcMysqlDb)) { g_hash_table_foreach(pGmlcGuiSrvTabData->pGmlcMysqlDb->htbProcedures, sub_ht_fill_procedure_list, lstStrProcedure); } gtk_tree_view_set_model(GTK_TREE_VIEW(pGmlcGuiSrvTabData->lstProcedures), GTK_TREE_MODEL(lstStrProcedure)); g_object_unref (G_OBJECT (lstStrProcedure)); pGmlcGuiSrvTabData->pGmlcMysqlProc = NULL; } void gmlc_gui_server_tab_data_fill_functions_list (GmlcGuiServerTabData * pGmlcGuiSrvTabData) { GtkListStore * lstStrFunction; void sub_ht_fill_function_list(gpointer key, gpointer value, gpointer user_data) { GmlcMysqlFunction * pGmlcMysqlFunc = GMLC_MYSQL_FUNCTION(value); GtkListStore * lstStrFunction = GTK_LIST_STORE(user_data); GtkTreeIter iter; gchar * pcName = NULL; g_object_get(G_OBJECT(pGmlcMysqlFunc), "name", &pcName, NULL); gtk_list_store_append (lstStrFunction, &iter); gtk_list_store_set (lstStrFunction, &iter, 0, pcName, 1, pGmlcMysqlFunc, -1); } lstStrFunction = gtk_list_store_new(2, G_TYPE_STRING, G_TYPE_POINTER); gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE(lstStrFunction), 0, GTK_SORT_ASCENDING); /* Fill listStore with views*/ if (gmlc_mysql_database_update_functions_list(pGmlcGuiSrvTabData->pGmlcMysqlDb)) { g_hash_table_foreach(pGmlcGuiSrvTabData->pGmlcMysqlDb->htbFunctions, sub_ht_fill_function_list, lstStrFunction); } gtk_tree_view_set_model(GTK_TREE_VIEW(pGmlcGuiSrvTabData->lstFunctions), GTK_TREE_MODEL(lstStrFunction)); g_object_unref (G_OBJECT (lstStrFunction)); pGmlcGuiSrvTabData->pGmlcMysqlFunc = NULL; } static void gmlc_gui_server_tab_data_evt_btn_sql_file_clicked (GtkWidget *widget, gpointer user_data) { GmlcGuiServerTabData * pGmlcGuiSrvTabData = GMLC_GUI_SERVER_TAB_DATA(user_data); UNUSED_VAR(widget); UNUSED_VAR(pGmlcGuiSrvTabData); gmlc_gui_server_tab_data_open_file(pGmlcGuiSrvTabData); } static void gmlc_gui_server_tab_data_evt_btn_sql_clicked (GtkWidget *widget, gpointer user_data) { GmlcGuiServerTabData * pGmlcGuiSrvTabData = GMLC_GUI_SERVER_TAB_DATA(user_data); UNUSED_VAR(widget); gmlc_gui_server_tab_data_open_query_select (pGmlcGuiSrvTabData, FALSE); } static gboolean gmlc_gui_server_tab_data_evt_lst_db_btnpress (GtkWidget *widget, GdkEventButton *event, gpointer user_data) { GmlcGuiServerTabData * pGmlcGuiSrvTabData = GMLC_GUI_SERVER_TAB_DATA(user_data); switch (event->button) { case 1 : /* Left button */ if (event->type == GDK_2BUTTON_PRESS) { gmlc_gui_server_tab_data_open_query_select (pGmlcGuiSrvTabData, FALSE); } break; case 3 : /* Right button */ if (event->type == GDK_BUTTON_PRESS) { gtk_menu_popup(GTK_MENU(pGmlcGuiSrvTabData->mnuBdOps), NULL, NULL, NULL, user_data, event->button, event->time); } break; } return FALSE; } static void gmlc_gui_server_tab_data_evt_lst_db_selected (GtkTreeSelection *selection, gpointer user_data) { GmlcGuiServerTabData * pGmlcGuiSrvTabData = GMLC_GUI_SERVER_TAB_DATA(user_data); GtkTreeIter iter; GtkTreeModel *model; glong lServerVersion = 0; g_object_get(G_OBJECT(pGmlcGuiSrvTabData->pGmlcMysqlSrv), "version", &lServerVersion, NULL); g_print("Changed !\n"); if (gtk_tree_selection_get_selected (selection, &model, &iter)) { gtk_tree_model_get (model, &iter, 1, &pGmlcGuiSrvTabData->pGmlcMysqlDb, -1); gmlc_gui_server_tab_data_fill_tables_list(pGmlcGuiSrvTabData); if (lServerVersion >= 50001) { gmlc_gui_server_tab_data_fill_views_list(pGmlcGuiSrvTabData); gmlc_gui_server_tab_data_fill_procedures_list(pGmlcGuiSrvTabData); gmlc_gui_server_tab_data_fill_functions_list(pGmlcGuiSrvTabData); } } } static void gmlc_gui_server_tab_data_evt_menu_db_refresh_activate (GtkWidget *widget, gpointer user_data) { GmlcGuiServerTabData * pGmlcGuiSrvTabData = GMLC_GUI_SERVER_TAB_DATA(user_data); UNUSED_VAR(widget); gmlc_gui_server_tab_data_fill_database_list(pGmlcGuiSrvTabData); } static void gmlc_gui_server_tab_data_evt_menu_db_add_activate (GtkWidget *widget, gpointer user_data) { GmlcGuiServerTabData * pGmlcGuiSrvTabData = GMLC_GUI_SERVER_TAB_DATA(user_data); gchar * pcQuery = NULL; UNUSED_VAR(widget); if (pGmlcGuiSrvTabData->pGmlcMysqlDb != NULL) { pcQuery = gmlc_mysql_structure_get_create(GMLC_MYSQL_STRUCTURE(pGmlcGuiSrvTabData->pGmlcMysqlDb), FALSE, NULL); gmlc_gui_server_tab_data_open_query(pGmlcGuiSrvTabData, pcQuery, FALSE); g_free(pcQuery); } } static void gmlc_gui_server_tab_data_evt_menu_db_alter_activate (GtkWidget *widget, gpointer user_data) { GmlcGuiServerTabData * pGmlcGuiSrvTabData = GMLC_GUI_SERVER_TAB_DATA(user_data); gchar * pcQuery = NULL; UNUSED_VAR(widget); if (pGmlcGuiSrvTabData->pGmlcMysqlDb != NULL) { pcQuery = gmlc_mysql_structure_get_alter(GMLC_MYSQL_STRUCTURE(pGmlcGuiSrvTabData->pGmlcMysqlDb), TRUE, NULL); gmlc_gui_server_tab_data_open_query(pGmlcGuiSrvTabData, pcQuery, FALSE); g_free(pcQuery); } } static void gmlc_gui_server_tab_data_evt_menu_db_remove_activate (GtkWidget *widget, gpointer user_data) { GmlcGuiServerTabData * pGmlcGuiSrvTabData = GMLC_GUI_SERVER_TAB_DATA(user_data); gchar * pcQuery = NULL; UNUSED_VAR(widget); if (pGmlcGuiSrvTabData->pGmlcMysqlDb != NULL) { pcQuery = gmlc_mysql_structure_get_drop(GMLC_MYSQL_STRUCTURE(pGmlcGuiSrvTabData->pGmlcMysqlDb), TRUE, NULL); gmlc_gui_server_tab_data_open_query(pGmlcGuiSrvTabData, pcQuery, FALSE); g_free(pcQuery); } } static void gmlc_gui_server_tab_data_evt_menu_db_show_create_activate (GtkWidget *widget, gpointer user_data) { GmlcGuiServerTabData * pGmlcGuiSrvTabData = GMLC_GUI_SERVER_TAB_DATA(user_data); gchar * pcQuery = NULL; UNUSED_VAR(widget); if (pGmlcGuiSrvTabData->pGmlcMysqlDb != NULL) { pcQuery = gmlc_mysql_structure_get_create(GMLC_MYSQL_STRUCTURE(pGmlcGuiSrvTabData->pGmlcMysqlDb), TRUE, NULL); gmlc_gui_server_tab_data_open_query(pGmlcGuiSrvTabData, pcQuery, FALSE); g_free(pcQuery); } } static gboolean gmlc_gui_server_tab_data_evt_lst_tbl_btnpress (GtkWidget *widget, GdkEventButton *event, gpointer user_data) { GmlcGuiServerTabData * pGmlcGuiSrvTabData = GMLC_GUI_SERVER_TAB_DATA(user_data); switch (event->button) { case 1 : /* Left button */ if (event->type == GDK_2BUTTON_PRESS) { gmlc_gui_server_tab_data_evt_menu_tbl_display_activate (widget, user_data); } break; case 3 : /* Right button */ if (event->type == GDK_BUTTON_PRESS) { gtk_menu_popup(GTK_MENU(pGmlcGuiSrvTabData->mnuTblOps), NULL, NULL, NULL, user_data, event->button, event->time); } break; } return FALSE; } static void gmlc_gui_server_tab_data_evt_lst_tbl_selected (GtkTreeSelection *selection, gpointer user_data) { GmlcGuiServerTabData * pGmlcGuiSrvTabData = GMLC_GUI_SERVER_TAB_DATA(user_data); GtkTreeIter iter; GtkTreeModel *model; if (gtk_tree_selection_get_selected (selection, &model, &iter)) { gtk_tree_model_get (model, &iter, 4, &pGmlcGuiSrvTabData->pGmlcMysqlTbl, -1); } } static void gmlc_gui_server_tab_data_evt_menu_tbl_display_activate (GtkWidget *widget, gpointer user_data) { GmlcGuiServerTabData * pGmlcGuiSrvTabData = GMLC_GUI_SERVER_TAB_DATA(user_data); gchar * pcQuery = NULL, * pcDbName = NULL, * pcTblName = NULL; UNUSED_VAR(widget); if (pGmlcGuiSrvTabData->pGmlcMysqlTbl != NULL) { g_object_get(G_OBJECT(pGmlcGuiSrvTabData->pGmlcMysqlDb), "db_name", &pcDbName, NULL); g_object_get(G_OBJECT(pGmlcGuiSrvTabData->pGmlcMysqlTbl), "name", &pcTblName, NULL); pcQuery = g_strdup_printf("SELECT * \nFROM `%s`.`%s`\nWHERE 1\nLIMIT 1000", pcDbName, pcTblName); gmlc_gui_server_tab_data_open_query(pGmlcGuiSrvTabData, pcQuery, FALSE); g_free(pcQuery); g_free(pcTblName); g_free(pcDbName); } } static void gmlc_gui_server_tab_data_evt_menu_tbl_add_activate (GtkWidget *widget, gpointer user_data) { GmlcGuiServerTabData * pGmlcGuiSrvTabData = GMLC_GUI_SERVER_TAB_DATA(user_data); gchar * pcQuery = NULL; UNUSED_VAR(widget); if (pGmlcGuiSrvTabData->pGmlcMysqlTbl != NULL) { pcQuery = gmlc_mysql_structure_get_create(GMLC_MYSQL_STRUCTURE(pGmlcGuiSrvTabData->pGmlcMysqlTbl), FALSE, NULL); } else { pcQuery = gmlc_mysql_database_create_new_table_sql(pGmlcGuiSrvTabData->pGmlcMysqlDb, NULL); } gmlc_gui_server_tab_data_open_query(pGmlcGuiSrvTabData, pcQuery, FALSE); g_free(pcQuery); } static void gmlc_gui_server_tab_data_evt_menu_tbl_alter_activate (GtkWidget *widget, gpointer user_data) { GmlcGuiServerTabData * pGmlcGuiSrvTabData = GMLC_GUI_SERVER_TAB_DATA(user_data); gchar * pcQuery = NULL; UNUSED_VAR(widget); if (pGmlcGuiSrvTabData->pGmlcMysqlTbl != NULL) { pcQuery = gmlc_mysql_structure_get_alter(GMLC_MYSQL_STRUCTURE(pGmlcGuiSrvTabData->pGmlcMysqlTbl), TRUE, NULL); gmlc_gui_server_tab_data_open_query(pGmlcGuiSrvTabData, pcQuery, FALSE); g_free(pcQuery); } } static void gmlc_gui_server_tab_data_evt_menu_tbl_remove_activate (GtkWidget *widget, gpointer user_data) { GmlcGuiServerTabData * pGmlcGuiSrvTabData = GMLC_GUI_SERVER_TAB_DATA(user_data); gchar * pcQuery = NULL; UNUSED_VAR(widget); if (pGmlcGuiSrvTabData->pGmlcMysqlTbl != NULL) { pcQuery = gmlc_mysql_structure_get_drop(GMLC_MYSQL_STRUCTURE(pGmlcGuiSrvTabData->pGmlcMysqlTbl), TRUE, NULL); gmlc_gui_server_tab_data_open_query(pGmlcGuiSrvTabData, pcQuery, FALSE); g_free(pcQuery); } } static void gmlc_gui_server_tab_data_evt_menu_tbl_refresh_activate (GtkWidget *widget, gpointer user_data) { GmlcGuiServerTabData * pGmlcGuiSrvTabData = GMLC_GUI_SERVER_TAB_DATA(user_data); UNUSED_VAR(widget); if (pGmlcGuiSrvTabData->pGmlcMysqlDb != NULL) { gmlc_gui_server_tab_data_fill_tables_list(pGmlcGuiSrvTabData); } } static void gmlc_gui_server_tab_data_evt_menu_tbl_show_create_activate (GtkWidget *widget, gpointer user_data) { GmlcGuiServerTabData * pGmlcGuiSrvTabData = GMLC_GUI_SERVER_TAB_DATA(user_data); gchar * pcQuery = NULL; UNUSED_VAR(widget); if (pGmlcGuiSrvTabData->pGmlcMysqlTbl != NULL) { pcQuery = gmlc_mysql_structure_get_create(GMLC_MYSQL_STRUCTURE(pGmlcGuiSrvTabData->pGmlcMysqlTbl), TRUE, NULL); gmlc_gui_server_tab_data_open_query(pGmlcGuiSrvTabData, pcQuery, FALSE); g_free(pcQuery); } } static gboolean gmlc_gui_server_tab_data_evt_lst_vw_btnpress (GtkWidget *widget, GdkEventButton *event, gpointer user_data) { GmlcGuiServerTabData * pGmlcGuiSrvTabData = GMLC_GUI_SERVER_TAB_DATA(user_data); switch (event->button) { case 1 : /* Left button */ if (event->type == GDK_2BUTTON_PRESS) { gmlc_gui_server_tab_data_evt_menu_vw_display_activate(widget, user_data); } break; case 3 : /* Right button */ if (event->type == GDK_BUTTON_PRESS) { gtk_menu_popup(GTK_MENU(pGmlcGuiSrvTabData->mnuVwOps), NULL, NULL, NULL, user_data, event->button, event->time); } break; } return FALSE; } static void gmlc_gui_server_tab_data_evt_lst_vw_selected (GtkTreeSelection *selection, gpointer user_data) { GmlcGuiServerTabData * pGmlcGuiSrvTabData = GMLC_GUI_SERVER_TAB_DATA(user_data); GtkTreeIter iter; GtkTreeModel *model; if (gtk_tree_selection_get_selected (selection, &model, &iter)) { gtk_tree_model_get (model, &iter, 1, &pGmlcGuiSrvTabData->pGmlcMysqlVw, -1); } } static void gmlc_gui_server_tab_data_evt_menu_vw_display_activate (GtkWidget *widget, gpointer user_data) { GmlcGuiServerTabData * pGmlcGuiSrvTabData = GMLC_GUI_SERVER_TAB_DATA(user_data); gchar * pcQuery = NULL, * pcDbName = NULL, * pcVwName = NULL; UNUSED_VAR(widget); if (pGmlcGuiSrvTabData->pGmlcMysqlVw != NULL) { g_object_get(G_OBJECT(pGmlcGuiSrvTabData->pGmlcMysqlDb), "db_name", &pcDbName, NULL); g_object_get(G_OBJECT(pGmlcGuiSrvTabData->pGmlcMysqlVw), "name", &pcVwName, NULL); pcQuery = g_strdup_printf("SELECT * \nFROM `%s`.`%s`\nWHERE 1\nLIMIT 1000", pcDbName, pcVwName); gmlc_gui_server_tab_data_open_query(pGmlcGuiSrvTabData, pcQuery, FALSE); g_free(pcQuery); g_free(pcVwName); g_free(pcDbName); } } static void gmlc_gui_server_tab_data_evt_menu_vw_add_activate (GtkWidget *widget, gpointer user_data) { GmlcGuiServerTabData * pGmlcGuiSrvTabData = GMLC_GUI_SERVER_TAB_DATA(user_data); gchar * pcQuery = NULL; UNUSED_VAR(widget); if (pGmlcGuiSrvTabData->pGmlcMysqlVw != NULL) { pcQuery = gmlc_mysql_structure_get_create(GMLC_MYSQL_STRUCTURE(pGmlcGuiSrvTabData->pGmlcMysqlVw), FALSE, NULL); } else { pcQuery = gmlc_mysql_database_create_new_view_sql(pGmlcGuiSrvTabData->pGmlcMysqlDb, NULL); } gmlc_gui_server_tab_data_open_query(pGmlcGuiSrvTabData, pcQuery, FALSE); g_free(pcQuery); } static void gmlc_gui_server_tab_data_evt_menu_vw_alter_activate (GtkWidget *widget, gpointer user_data) { GmlcGuiServerTabData * pGmlcGuiSrvTabData = GMLC_GUI_SERVER_TAB_DATA(user_data); gchar * pcQuery = NULL; UNUSED_VAR(widget); if (pGmlcGuiSrvTabData->pGmlcMysqlVw != NULL) { pcQuery = gmlc_mysql_structure_get_alter(GMLC_MYSQL_STRUCTURE(pGmlcGuiSrvTabData->pGmlcMysqlVw), TRUE, NULL); gmlc_gui_server_tab_data_open_query(pGmlcGuiSrvTabData, pcQuery, FALSE); g_free(pcQuery); } } static void gmlc_gui_server_tab_data_evt_menu_vw_remove_activate (GtkWidget *widget, gpointer user_data) { GmlcGuiServerTabData * pGmlcGuiSrvTabData = GMLC_GUI_SERVER_TAB_DATA(user_data); gchar * pcQuery = NULL; UNUSED_VAR(widget); if (pGmlcGuiSrvTabData->pGmlcMysqlVw != NULL) { pcQuery = gmlc_mysql_structure_get_drop(GMLC_MYSQL_STRUCTURE(pGmlcGuiSrvTabData->pGmlcMysqlVw), TRUE, NULL); gmlc_gui_server_tab_data_open_query(pGmlcGuiSrvTabData, pcQuery, FALSE); g_free(pcQuery); } } static void gmlc_gui_server_tab_data_evt_menu_vw_refresh_activate (GtkWidget *widget, gpointer user_data) { GmlcGuiServerTabData * pGmlcGuiSrvTabData = GMLC_GUI_SERVER_TAB_DATA(user_data); UNUSED_VAR(widget); if (pGmlcGuiSrvTabData->pGmlcMysqlDb != NULL) { gmlc_gui_server_tab_data_fill_views_list(pGmlcGuiSrvTabData); } } static void gmlc_gui_server_tab_data_evt_menu_vw_show_create_activate (GtkWidget *widget, gpointer user_data) { GmlcGuiServerTabData * pGmlcGuiSrvTabData = GMLC_GUI_SERVER_TAB_DATA(user_data); gchar * pcQuery = NULL; UNUSED_VAR(widget); if (pGmlcGuiSrvTabData->pGmlcMysqlVw != NULL) { pcQuery = gmlc_mysql_structure_get_create(GMLC_MYSQL_STRUCTURE(pGmlcGuiSrvTabData->pGmlcMysqlVw), TRUE, NULL); gmlc_gui_server_tab_data_open_query(pGmlcGuiSrvTabData, pcQuery, FALSE); g_free(pcQuery); } } static gboolean gmlc_gui_server_tab_data_evt_lst_proc_btnpress (GtkWidget *widget, GdkEventButton *event, gpointer user_data) { GmlcGuiServerTabData * pGmlcGuiSrvTabData = GMLC_GUI_SERVER_TAB_DATA(user_data); switch (event->button) { case 1 : /* Left button */ if (event->type == GDK_2BUTTON_PRESS) { /*gmlc_gui_server_tab_data_open_query_select (pGmlcGuiSrvTabData, TRUE);*/ gmlc_gui_server_tab_data_evt_menu_proc_display_activate (widget, user_data); } break; case 3 : /* Right button */ if (event->type == GDK_BUTTON_PRESS) { gtk_menu_popup(GTK_MENU(pGmlcGuiSrvTabData->mnuProcOps), NULL, NULL, NULL, user_data, event->button, event->time); } break; } return FALSE; } static void gmlc_gui_server_tab_data_evt_lst_proc_selected (GtkTreeSelection *selection, gpointer user_data) { GmlcGuiServerTabData * pGmlcGuiSrvTabData = GMLC_GUI_SERVER_TAB_DATA(user_data); GtkTreeIter iter; GtkTreeModel *model; if (gtk_tree_selection_get_selected (selection, &model, &iter)) { gtk_tree_model_get (model, &iter, 1, &pGmlcGuiSrvTabData->pGmlcMysqlProc, -1); } } static void gmlc_gui_server_tab_data_evt_menu_proc_display_activate (GtkWidget *widget, gpointer user_data) { GmlcGuiServerTabData * pGmlcGuiSrvTabData = GMLC_GUI_SERVER_TAB_DATA(user_data); gchar * pcQuery = NULL, * pcDbName = NULL, * pcProcName = NULL; UNUSED_VAR(widget); if (pGmlcGuiSrvTabData->pGmlcMysqlProc != NULL) { g_object_get(G_OBJECT(pGmlcGuiSrvTabData->pGmlcMysqlDb), "db_name", &pcDbName, NULL); g_object_get(G_OBJECT(pGmlcGuiSrvTabData->pGmlcMysqlProc), "name", &pcProcName, NULL); pcQuery = g_strdup_printf("CALL `%s`.`%s`();\n", pcDbName, pcProcName); gmlc_gui_server_tab_data_open_query(pGmlcGuiSrvTabData, pcQuery, FALSE); g_free(pcQuery); g_free(pcProcName); g_free(pcDbName); } } static void gmlc_gui_server_tab_data_evt_menu_proc_add_activate (GtkWidget *widget, gpointer user_data) { GmlcGuiServerTabData * pGmlcGuiSrvTabData = GMLC_GUI_SERVER_TAB_DATA(user_data); gchar * pcQuery = NULL; UNUSED_VAR(widget); if (pGmlcGuiSrvTabData->pGmlcMysqlProc != NULL) { pcQuery = gmlc_mysql_structure_get_create(GMLC_MYSQL_STRUCTURE(pGmlcGuiSrvTabData->pGmlcMysqlProc), FALSE, NULL); } else { pcQuery = gmlc_mysql_database_create_new_procedure_sql(pGmlcGuiSrvTabData->pGmlcMysqlDb, NULL); } gmlc_gui_server_tab_data_open_query(pGmlcGuiSrvTabData, pcQuery, FALSE); g_free(pcQuery); } static void gmlc_gui_server_tab_data_evt_menu_proc_alter_activate (GtkWidget *widget, gpointer user_data) { GmlcGuiServerTabData * pGmlcGuiSrvTabData = GMLC_GUI_SERVER_TAB_DATA(user_data); gchar * pcQuery = NULL; UNUSED_VAR(widget); if (pGmlcGuiSrvTabData->pGmlcMysqlProc != NULL) { pcQuery = gmlc_mysql_structure_get_alter(GMLC_MYSQL_STRUCTURE(pGmlcGuiSrvTabData->pGmlcMysqlProc), TRUE, NULL); gmlc_gui_server_tab_data_open_query(pGmlcGuiSrvTabData, pcQuery, FALSE); g_free(pcQuery); } } static void gmlc_gui_server_tab_data_evt_menu_proc_remove_activate (GtkWidget *widget, gpointer user_data) { GmlcGuiServerTabData * pGmlcGuiSrvTabData = GMLC_GUI_SERVER_TAB_DATA(user_data); gchar * pcQuery = NULL; UNUSED_VAR(widget); if (pGmlcGuiSrvTabData->pGmlcMysqlProc != NULL) { pcQuery = gmlc_mysql_structure_get_drop(GMLC_MYSQL_STRUCTURE(pGmlcGuiSrvTabData->pGmlcMysqlProc), TRUE, NULL); gmlc_gui_server_tab_data_open_query(pGmlcGuiSrvTabData, pcQuery, FALSE); g_free(pcQuery); } } static void gmlc_gui_server_tab_data_evt_menu_proc_refresh_activate (GtkWidget *widget, gpointer user_data) { GmlcGuiServerTabData * pGmlcGuiSrvTabData = GMLC_GUI_SERVER_TAB_DATA(user_data); UNUSED_VAR(widget); if (pGmlcGuiSrvTabData->pGmlcMysqlDb != NULL) { gmlc_gui_server_tab_data_fill_procedures_list(pGmlcGuiSrvTabData); } } static void gmlc_gui_server_tab_data_evt_menu_proc_show_create_activate (GtkWidget *widget, gpointer user_data) { GmlcGuiServerTabData * pGmlcGuiSrvTabData = GMLC_GUI_SERVER_TAB_DATA(user_data); gchar * pcQuery = NULL; UNUSED_VAR(widget); if (pGmlcGuiSrvTabData->pGmlcMysqlProc != NULL) { pcQuery = gmlc_mysql_structure_get_create(GMLC_MYSQL_STRUCTURE(pGmlcGuiSrvTabData->pGmlcMysqlProc), TRUE, NULL); gmlc_gui_server_tab_data_open_query(pGmlcGuiSrvTabData, pcQuery, FALSE); g_free(pcQuery); } } static gboolean gmlc_gui_server_tab_data_evt_lst_func_btnpress (GtkWidget *widget, GdkEventButton *event, gpointer user_data) { GmlcGuiServerTabData * pGmlcGuiSrvTabData = GMLC_GUI_SERVER_TAB_DATA(user_data); switch (event->button) { case 1 : /* Left button */ if (event->type == GDK_2BUTTON_PRESS) { /*gmlc_gui_server_tab_data_open_query_select (pGmlcGuiSrvTabData, TRUE);*/ } break; case 3 : /* Right button */ if (event->type == GDK_BUTTON_PRESS) { gtk_menu_popup(GTK_MENU(pGmlcGuiSrvTabData->mnuFuncOps), NULL, NULL, NULL, user_data, event->button, event->time); } break; } return FALSE; } static void gmlc_gui_server_tab_data_evt_lst_func_selected (GtkTreeSelection *selection, gpointer user_data) { GmlcGuiServerTabData * pGmlcGuiSrvTabData = GMLC_GUI_SERVER_TAB_DATA(user_data); GtkTreeIter iter; GtkTreeModel *model; if (gtk_tree_selection_get_selected (selection, &model, &iter)) { gtk_tree_model_get (model, &iter, 1, &pGmlcGuiSrvTabData->pGmlcMysqlFunc, -1); } } static void gmlc_gui_server_tab_data_evt_menu_func_display_activate (GtkWidget *widget, gpointer user_data) { GmlcGuiServerTabData * pGmlcGuiSrvTabData = GMLC_GUI_SERVER_TAB_DATA(user_data); gchar * pcQuery = NULL, * pcDbName = NULL, * pcFuncName = NULL; UNUSED_VAR(widget); if (pGmlcGuiSrvTabData->pGmlcMysqlProc != NULL) { g_object_get(G_OBJECT(pGmlcGuiSrvTabData->pGmlcMysqlDb), "db_name", &pcDbName, NULL); g_object_get(G_OBJECT(pGmlcGuiSrvTabData->pGmlcMysqlFunc), "name", &pcFuncName, NULL); pcQuery = g_strdup_printf("SELECT `%s`();\n", pcFuncName); gmlc_gui_server_tab_data_open_query(pGmlcGuiSrvTabData, pcQuery, FALSE); g_free(pcQuery); g_free(pcFuncName); g_free(pcDbName); } } static void gmlc_gui_server_tab_data_evt_menu_func_add_activate (GtkWidget *widget, gpointer user_data) { GmlcGuiServerTabData * pGmlcGuiSrvTabData = GMLC_GUI_SERVER_TAB_DATA(user_data); gchar * pcQuery = NULL; UNUSED_VAR(widget); if (pGmlcGuiSrvTabData->pGmlcMysqlFunc != NULL) { pcQuery = gmlc_mysql_structure_get_create(GMLC_MYSQL_STRUCTURE(pGmlcGuiSrvTabData->pGmlcMysqlFunc), FALSE, NULL); } else { pcQuery = gmlc_mysql_database_create_new_function_sql(pGmlcGuiSrvTabData->pGmlcMysqlDb, NULL); } gmlc_gui_server_tab_data_open_query(pGmlcGuiSrvTabData, pcQuery, FALSE); g_free(pcQuery); } static void gmlc_gui_server_tab_data_evt_menu_func_alter_activate (GtkWidget *widget, gpointer user_data) { GmlcGuiServerTabData * pGmlcGuiSrvTabData = GMLC_GUI_SERVER_TAB_DATA(user_data); gchar * pcQuery = NULL; UNUSED_VAR(widget); if (pGmlcGuiSrvTabData->pGmlcMysqlFunc != NULL) { pcQuery = gmlc_mysql_structure_get_alter(GMLC_MYSQL_STRUCTURE(pGmlcGuiSrvTabData->pGmlcMysqlFunc), TRUE, NULL); gmlc_gui_server_tab_data_open_query(pGmlcGuiSrvTabData, pcQuery, FALSE); g_free(pcQuery); } } static void gmlc_gui_server_tab_data_evt_menu_func_remove_activate (GtkWidget *widget, gpointer user_data) { GmlcGuiServerTabData * pGmlcGuiSrvTabData = GMLC_GUI_SERVER_TAB_DATA(user_data); gchar * pcQuery = NULL; UNUSED_VAR(widget); if (pGmlcGuiSrvTabData->pGmlcMysqlFunc != NULL) { pcQuery = gmlc_mysql_structure_get_drop(GMLC_MYSQL_STRUCTURE(pGmlcGuiSrvTabData->pGmlcMysqlFunc), TRUE, NULL); gmlc_gui_server_tab_data_open_query(pGmlcGuiSrvTabData, pcQuery, FALSE); g_free(pcQuery); } } static void gmlc_gui_server_tab_data_evt_menu_func_refresh_activate (GtkWidget *widget, gpointer user_data) { GmlcGuiServerTabData * pGmlcGuiSrvTabData = GMLC_GUI_SERVER_TAB_DATA(user_data); UNUSED_VAR(widget); if (pGmlcGuiSrvTabData->pGmlcMysqlDb != NULL) { gmlc_gui_server_tab_data_fill_functions_list(pGmlcGuiSrvTabData); } } static void gmlc_gui_server_tab_data_evt_menu_func_show_create_activate (GtkWidget *widget, gpointer user_data) { GmlcGuiServerTabData * pGmlcGuiSrvTabData = GMLC_GUI_SERVER_TAB_DATA(user_data); gchar * pcQuery = NULL; UNUSED_VAR(widget); if (pGmlcGuiSrvTabData->pGmlcMysqlFunc != NULL) { pcQuery = gmlc_mysql_structure_get_create(GMLC_MYSQL_STRUCTURE(pGmlcGuiSrvTabData->pGmlcMysqlFunc), TRUE, NULL); gmlc_gui_server_tab_data_open_query(pGmlcGuiSrvTabData, pcQuery, FALSE); g_free(pcQuery); } } gmysqlcc-0.3.0/src/gmlc_mysql_procedure.h0000644000175000017500000000436410755301563015450 00000000000000/* * 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 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 Library 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __GMLC_MYSQL_PROCEDURE_H__ #define __GMLC_MYSQL_PROCEDURE_H__ #include #include #include "gmlc_mysql_database.h" #include "gmlc_mysql_structure.h" #define UNUSED_VAR(x) (x = x) G_BEGIN_DECLS #define GMLC_TYPE_MYSQL_PROCEDURE (gmlc_mysql_procedure_get_type ()) #define GMLC_MYSQL_PROCEDURE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GMLC_TYPE_MYSQL_PROCEDURE, GmlcMysqlProcedure)) #define GMLC_MYSQL_PROCEDURE_CLASS(kls) (G_TYPE_CHECK_CLASS_CAST((kls), GMLC_TYPE_MYSQL_PROCEDURE, GmlcMysqlProcedureClass)) #define GMLC_IS_MYSQL_PROCEDURE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GMLC_TYPE_MYSQL_PROCEDURE)) #define GMLC_IS_MYSQL_PROCEDURE_CLASS(kls) (G_TYPE_CHECK_CLASS_TYPE ((kls), GMLC_TYPE_MYSQL_PROCEDURE)) #define GMLC_MYSQL_PROCEDURE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GMLC_TYPE_MYSQL_PROCEDURE, GmlcMysqlProcedureClass)) #ifndef __GMLC_MYSQL_PROCEDURE_H__TYPE__ #define __GMLC_MYSQL_PROCEDURE_H__TYPE__ typedef struct _GmlcMysqlProcedure GmlcMysqlProcedure; #endif /* __GMLC_MYSQL_PROCEDURE_H__TYPE__ */ typedef struct _GmlcMysqlProcedureClass GmlcMysqlProcedureClass; struct _GmlcMysqlProcedure { GObject parent; GmlcMysqlDatabase * pGmlcMysqlDb; gchar * pcName; gboolean bFlagged; }; struct _GmlcMysqlProcedureClass { GObjectClass parent_class; /* Add Signal Functions Here */ }; GType gmlc_mysql_procedure_get_type(); GmlcMysqlProcedure * gmlc_mysql_procedure_new(GmlcMysqlDatabase * pGmlcMysqlDb, gchar * pcName); G_END_DECLS #endif /* __GMLC_MYSQL_PROCEDURE_H__ */ gmysqlcc-0.3.0/src/gmlc_main.h0000644000175000017500000000266210755301563013156 00000000000000/* * 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 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, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __GMLC_MAIN_H__ #define __GMLC_MAIN_H__ #include #include #include #include "../config.h" #include "gmlc_misc_config.h" #ifdef USE_GTKSOURCEVIEW #include #include #include #include #endif /* USE_GTKSOURCEVIEW */ #ifndef __GMYSQLCC_MAIN_PART__ extern int GiNbrWnd; extern GmlcMiscConfig * GpGmlcMscCfg; extern GtkWidget * GpGmlcGuiCnxns; #ifdef USE_GTKSOURCEVIEW extern GtkSourceLanguageManager * LangManager; #endif /* USE_GTKSOURCEVIEW */ #endif /* __GMYSQLCC_MAIN_PART__ */ #endif /* __GMLC_MAIN_H__ */ gmysqlcc-0.3.0/src/gmlc_misc_config.c0000644000175000017500000007264010755301563014510 00000000000000/* * 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 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, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "gmlc_misc_config.h" struct _s_xml_config_read_state { enum { X_CFG_OUT = 0, X_CFG_IN_GMYSQLCC, /* = 1, */ X_CFG_IN_GMYSQLCC_FONTS, /* = 2, */ X_CFG_IN_GMYSQLCC_FONTS_QUERY, /* = 3, */ X_CFG_IN_GMYSQLCC_FONTS_HELP, /* = 4, */ } state; GString * text; } s_xml_config_read_state; struct _s_xml_servers_read_state { enum { X_OUT_ROOT = 0, X_IN_ROOT = 1, X_IN_SERVER = 2, X_IN_NAME = 3, X_IN_HOST = 4, X_IN_PORT = 5, X_IN_LOGIN = 6, X_IN_PASSWD = 7, X_IN_ALLOWED_DBS = 8, X_IN_LOCAL_SOCK = 9, X_IN_OPTIONS = 10, X_IN_READ_ONLY = 11, X_IN_WRITE_WARNING = 12 } state; GString * name; GString * host; gint port; GString * login; GString * passwd; GString * allowedDbs; GString * localSock; gboolean read_only; gboolean write_warning; } xml_servers_read_state; char * default_gmysqlcc_conf = "" "" "" "" "" "" ""; char * default_servers_conf = "" "" "" "" "" "3306" "" "" "" "" "" "" "" "" "" ""; gboolean gmlc_misc_config_read_config_file (GmlcMiscConfig * pGmlcMscCfg); gboolean gmlc_misc_config_write_config_file (GmlcMiscConfig * pGmlcMscCfg); void xml_config_conf_start (GMarkupParseContext *context, const gchar * element_name, const gchar ** attribute_names, const gchar ** attribute_values, gpointer user_data, GError ** error); void xml_config_conf_end (GMarkupParseContext *context, const gchar * element_name, gpointer user_data, GError ** error); void xml_config_conf_text (GMarkupParseContext *context, const gchar * text, gsize text_len, gpointer user_data, GError ** error); void xml_config_conf_passthrough (GMarkupParseContext *context, const gchar * passthrough_text, gsize text_len, gpointer user_data, GError **error); gboolean gmlc_misc_config_read_servers_file (GmlcMiscConfig * pGmlcMscCfg); gboolean gmlc_misc_config_write_servers_file (GmlcMiscConfig * pGmlcMscCfg); void xml_servers_conf_start (GMarkupParseContext *context, const gchar * element_name, const gchar ** attribute_names, const gchar ** attribute_values, gpointer user_data, GError ** error); void xml_servers_conf_end (GMarkupParseContext *context, const gchar * element_name, gpointer user_data, GError ** error); void xml_servers_conf_text (GMarkupParseContext *context, const gchar * text, gsize text_len, gpointer user_data, GError ** error); void xml_servers_conf_passthrough (GMarkupParseContext *context, const gchar * passthrough_text, gsize text_len, gpointer user_data, GError **error); static void gmlc_misc_config_finalize (GmlcMiscConfig * pGmlcMscCfg); static void gmlc_misc_config_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec); static void gmlc_misc_config_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec); enum { PROP_0, PROP_NAME, PROP_HOST, PROP_PORT, PROP_LOGIN, PROP_PASSWORD, PROP_LOCAL_SOCK, PROP_ALLOWED_DBS, PROP_READ_ONLY, PROP_WRITE_WARNING, PROP_VERSION }; G_DEFINE_TYPE (GmlcMiscConfig, gmlc_misc_config, G_TYPE_OBJECT); static void gmlc_misc_config_class_init (GmlcMiscConfigClass * pClass) { GObjectClass *pObjClass = G_OBJECT_CLASS(pClass); pObjClass->finalize = (GObjectFinalizeFunc) gmlc_misc_config_finalize; pObjClass->get_property = gmlc_misc_config_get_property; pObjClass->set_property = gmlc_misc_config_set_property; /* g_object_class_install_property(pObjClass, PROP_NAME, g_param_spec_string("name", "Server name", "Name (not host) of the mysql server", "", G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); g_object_class_install_property(pObjClass, PROP_HOST, g_param_spec_string("hostname", "Server host name", "Host name of the mysql server", "", G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); g_object_class_install_property(pObjClass, PROP_PORT, g_param_spec_uint("port", "Server port", "Port of the mysql server", 0, 65535, 3306, G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); g_object_class_install_property(pObjClass, PROP_LOGIN, g_param_spec_string("login", "Server login", "Login for the mysql server", "", G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); g_object_class_install_property(pObjClass, PROP_PASSWORD, g_param_spec_string("password", "Server password", "Password for the mysql server", "", G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); g_object_class_install_property(pObjClass, PROP_LOCAL_SOCK, g_param_spec_string("local_socket", "Local socket file name", "Local socket file name used for access to the mysql server", "", G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); g_object_class_install_property(pObjClass, PROP_ALLOWED_DBS, g_param_spec_string("allowed_dbs", "Allowed databases", "Databases allowed to the login for the mysql server", "", G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); g_object_class_install_property(pObjClass, PROP_READ_ONLY, g_param_spec_boolean("read_only", "Read only server", "The mysql server is marked as read only", FALSE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); g_object_class_install_property(pObjClass, PROP_WRITE_WARNING, g_param_spec_boolean("write_warning", "Write warning server", "Display write warning for this mysql server", FALSE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); g_object_class_install_property(pObjClass, PROP_VERSION, g_param_spec_ulong("version", "Server version", "Version of the mysql server", 0, G_MAXULONG, 0, G_PARAM_READABLE)); */ } static void gmlc_misc_config_init (GmlcMiscConfig * pGmlcMscCfg) { pGmlcMscCfg->pcServersFilename = NULL; pGmlcMscCfg->pcConfigFilename = NULL; pGmlcMscCfg->pcQueryFontName = NULL; pGmlcMscCfg->pcHelpFontName = NULL; pGmlcMscCfg->lstServers = NULL; } static void gmlc_misc_config_finalize (GmlcMiscConfig * pGmlcMscCfg) { GList * lstServersIdx; if (pGmlcMscCfg->lstServers != NULL) { lstServersIdx = g_list_first(pGmlcMscCfg->lstServers); while (lstServersIdx != NULL) { g_object_unref(G_OBJECT(lstServersIdx->data)); lstServersIdx = g_list_next(lstServersIdx); } } g_list_free(pGmlcMscCfg->lstServers); g_free(pGmlcMscCfg->pcQueryFontName); g_free(pGmlcMscCfg->pcHelpFontName); g_free(pGmlcMscCfg->pcServersFilename); g_free(pGmlcMscCfg->pcConfigFilename); } static void gmlc_misc_config_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec) { GmlcMiscConfig * pGmlcMscCfg = GMLC_MISC_CONFIG(object); UNUSED_VAR(pGmlcMscCfg); switch (prop_id) { /* case PROP_NAME : g_free(pGmlcMscCfg->pcName); pGmlcMscCfg->pcName = g_value_dup_string(value); break; case PROP_HOST : g_free(pGmlcMscCfg->pcHost); pGmlcMscCfg->pcHost = g_value_dup_string(value); break; case PROP_PORT : pGmlcMscCfg->iPort = g_value_get_uint (value); break; case PROP_LOGIN : g_free(pGmlcMscCfg->pcLogin); pGmlcMscCfg->pcLogin = g_value_dup_string(value); break; case PROP_PASSWORD : g_free(pGmlcMscCfg->pcPassword); pGmlcMscCfg->pcPassword = g_value_dup_string(value); break; case PROP_LOCAL_SOCK : g_free(pGmlcMscCfg->pcLocalSock); pGmlcMscCfg->pcLocalSock = g_value_dup_string(value); break; case PROP_ALLOWED_DBS : g_free(pGmlcMscCfg->pcAllowedDbs); pGmlcMscCfg->pcAllowedDbs = g_value_dup_string(value); break; case PROP_READ_ONLY : pGmlcMscCfg->bReadOnly = g_value_get_boolean(value); break; case PROP_WRITE_WARNING : pGmlcMscCfg->bWriteWarning = g_value_get_boolean(value); break; */ default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); break; } } static void gmlc_misc_config_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec) { GmlcMiscConfig * pGmlcMscCfg = GMLC_MISC_CONFIG(object); UNUSED_VAR(pGmlcMscCfg); switch (prop_id) { /* case PROP_NAME : g_value_set_string(value, pGmlcMscCfg->pcName); break; case PROP_HOST : g_value_set_string(value, pGmlcMscCfg->pcHost); break; case PROP_PORT : g_value_set_uint(value, pGmlcMscCfg->iPort); break; case PROP_LOGIN : g_value_set_string(value, pGmlcMscCfg->pcLogin); break; case PROP_PASSWORD : g_value_set_string(value, pGmlcMscCfg->pcPassword); break; case PROP_LOCAL_SOCK : g_value_set_string(value, pGmlcMscCfg->pcLocalSock); break; case PROP_ALLOWED_DBS : g_value_set_string(value, pGmlcMscCfg->pcAllowedDbs); break; case PROP_READ_ONLY : g_value_set_boolean(value, pGmlcMscCfg->bReadOnly); break; case PROP_WRITE_WARNING : g_value_set_boolean(value, pGmlcMscCfg->bWriteWarning); break; case PROP_VERSION : if (pGmlcMscCfg->lVersion == 0) { GmlcMysqlQuery * pGmlcMysqlQry = NULL; pGmlcMysqlQry = gmlc_mysql_query_new(G_OBJECT(pGmlcMscCfg), NULL); pGmlcMscCfg->lVersion = gmlc_mysql_query_get_version(pGmlcMysqlQry); g_object_unref(G_OBJECT(pGmlcMysqlQry)); } g_value_set_ulong(value, pGmlcMscCfg->lVersion); break; */ default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); break; } } GmlcMiscConfig * gmlc_misc_config_new (void) { return GMLC_MISC_CONFIG(g_object_new (GMLC_TYPE_MISC_CONFIG, NULL)); } gboolean gmlc_misc_config_read (GmlcMiscConfig * pGmlcMscCfg) { if (pGmlcMscCfg == NULL) { return FALSE; } /* Check new config file */ pGmlcMscCfg->pcConfigFilename = g_build_path("/", g_get_user_config_dir(), GMYSQLCC_CONF_DIR, CONFIG_FILE, NULL); if (!g_file_test(pGmlcMscCfg->pcConfigFilename, (G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR))) { g_free(pGmlcMscCfg->pcConfigFilename); pGmlcMscCfg->pcConfigFilename = NULL; } gmlc_misc_config_read_config_file(pGmlcMscCfg); /* Check new servers file */ pGmlcMscCfg->pcServersFilename = g_build_path("/", g_get_user_config_dir(), GMYSQLCC_CONF_DIR, SERVERS_FILE, NULL); if (!g_file_test(pGmlcMscCfg->pcServersFilename, (G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR))) { g_free(pGmlcMscCfg->pcServersFilename); pGmlcMscCfg->pcServersFilename = NULL; } gmlc_misc_config_read_servers_file(pGmlcMscCfg); return TRUE; } gboolean gmlc_misc_config_write (GmlcMiscConfig * pGmlcMscCfg) { gchar * pcFilePath = NULL; if (pGmlcMscCfg == NULL) { return FALSE; } /* Check config directories and create them if needed */ pGmlcMscCfg->pcConfigFilename = g_build_path("/", g_get_user_config_dir(), GMYSQLCC_CONF_DIR, CONFIG_FILE, NULL); pcFilePath = (gchar *)g_get_user_config_dir(); if (!g_file_test(pcFilePath, (G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR))) { mkdir (pcFilePath, 0700); } pcFilePath = g_build_path("/", g_get_user_config_dir(), GMYSQLCC_CONF_DIR, NULL); if (!g_file_test(pcFilePath, (G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR))) { mkdir (pcFilePath, 0700); } g_free(pcFilePath); /* Check new config file */ if (pGmlcMscCfg->pcConfigFilename == NULL) { pGmlcMscCfg->pcConfigFilename = g_build_path("/", g_get_user_config_dir(), GMYSQLCC_CONF_DIR, CONFIG_FILE, NULL); } gmlc_misc_config_write_config_file(pGmlcMscCfg); /* Check new servers file */ if (pGmlcMscCfg->pcServersFilename == NULL) { pGmlcMscCfg->pcServersFilename = g_build_path("/", g_get_user_config_dir(), GMYSQLCC_CONF_DIR, SERVERS_FILE, NULL); } gmlc_misc_config_write_servers_file(pGmlcMscCfg); return TRUE; } gboolean gmlc_misc_config_add_server (GmlcMiscConfig * pGmlcMscCfg, const gchar * name, const gchar * host, const gint port, const gchar * login, const gchar * passwd, const gchar * dbAllowedList, const gchar * localSock, const gboolean read_only, const gboolean write_warning) { GmlcMysqlServer * pGmlcMysqlSrv; pGmlcMysqlSrv = gmlc_misc_config_get_server(pGmlcMscCfg, name); if (pGmlcMysqlSrv != NULL) { return FALSE; } pGmlcMysqlSrv = gmlc_mysql_server_new(); if (pGmlcMysqlSrv == NULL) { return FALSE; } g_object_set(pGmlcMysqlSrv, "name", name, "hostname", host, "port", port, "login", login, "password", passwd, "allowed_dbs", dbAllowedList, "local_socket", localSock, "read_only", read_only, "write_warning", write_warning, NULL); pGmlcMscCfg->lstServers = g_list_append(pGmlcMscCfg->lstServers, pGmlcMysqlSrv); return TRUE; } gboolean gmlc_misc_config_update_server (GmlcMiscConfig * pGmlcMscCfg, const gchar * oldname, const gchar * name, const gchar * host, const gint port, const gchar * login, const gchar * passwd, const gchar * dbAllowedList, const gchar * localSock, const gboolean read_only, const gboolean write_warning) { GmlcMysqlServer * pGmlcMysqlSrv; pGmlcMysqlSrv = gmlc_misc_config_get_server(pGmlcMscCfg, oldname); if (pGmlcMysqlSrv != NULL) { g_object_set(pGmlcMysqlSrv, "name", name, "hostname", host, "port", port, "login", login, "password", passwd, "allowed_dbs", dbAllowedList, "local_socket", localSock, "read_only", read_only, "write_warning", write_warning, NULL); return TRUE; } return FALSE; } gboolean gmlc_misc_config_del_server (GmlcMiscConfig * pGmlcMscCfg, const gchar * name) { GmlcMysqlServer * pGmlcMysqlSrv = NULL; GList * lstServersIdx = NULL; gchar * pcSrvName = NULL; lstServersIdx = g_list_first(pGmlcMscCfg->lstServers); while (lstServersIdx != NULL) { pGmlcMysqlSrv = (GmlcMysqlServer *) lstServersIdx->data; g_object_get(pGmlcMysqlSrv, "name", &pcSrvName, NULL); if (g_ascii_strcasecmp(pcSrvName, name) == 0) { g_object_unref(G_OBJECT(pGmlcMysqlSrv)); pGmlcMscCfg->lstServers = g_list_delete_link(pGmlcMscCfg->lstServers, lstServersIdx); return TRUE; } g_free(pcSrvName); lstServersIdx = g_list_next(lstServersIdx); } return FALSE; } GmlcMysqlServer * gmlc_misc_config_get_server (GmlcMiscConfig * pGmlcMscCfg, const gchar * name) { GmlcMysqlServer * pGmlcMysqlSrv = NULL; GList * lstServersIdx = NULL; gchar * pcSrvName = NULL; lstServersIdx = g_list_first(pGmlcMscCfg->lstServers); while (lstServersIdx != NULL) { pGmlcMysqlSrv = (GmlcMysqlServer *)lstServersIdx->data; g_object_get(pGmlcMysqlSrv, "name", &pcSrvName, NULL); if (g_ascii_strcasecmp(pcSrvName, name) == 0) { return pGmlcMysqlSrv; } g_free(pcSrvName); lstServersIdx = g_list_next(lstServersIdx); } return NULL; } /* xml read structures and datas */ /* xml read functions - Config file */ gboolean gmlc_misc_config_read_config_file (GmlcMiscConfig * pGmlcMscCfg) { GMarkupParser xmlParse; GMarkupParseContext * xmlContext; GError * gErr = NULL; gchar * pcBuffer = NULL; gsize szBuffer = 0; if (pGmlcMscCfg == NULL) { return FALSE; } /* Init XML parser Struct */ xmlParse.start_element = xml_config_conf_start; xmlParse.end_element = xml_config_conf_end; xmlParse.text = NULL; /*xml_config_conf_text;*/ xmlParse.passthrough = xml_config_conf_passthrough; xmlParse.error = NULL; /* Init XML read status struct */ s_xml_config_read_state.state = X_CFG_OUT; s_xml_config_read_state.text = g_string_sized_new(16); /* Create XML Parser */ xmlContext = g_markup_parse_context_new(&xmlParse, 0, (gpointer)pGmlcMscCfg, (GDestroyNotify)NULL); if (pGmlcMscCfg->pcConfigFilename != NULL) { if (!g_file_get_contents(pGmlcMscCfg->pcConfigFilename, &pcBuffer, &szBuffer, &gErr)) { g_printerr("Error config file open : %s. -> read default configuration\n", gErr->message); g_clear_error(&gErr); pcBuffer = g_strdup(default_gmysqlcc_conf); szBuffer = strlen(pcBuffer); } } else { g_printerr("Config file doesn't exist. -> read default configuration\n"); pcBuffer = g_strdup(default_gmysqlcc_conf); szBuffer = strlen(pcBuffer); } g_markup_parse_context_parse(xmlContext, pcBuffer, szBuffer, &gErr); g_markup_parse_context_end_parse (xmlContext, &gErr); g_markup_parse_context_free(xmlContext); return TRUE; } gboolean gmlc_misc_config_write_config_file (GmlcMiscConfig * pGmlcMscCfg) { GString * xmlContent; GError * gErr = NULL; if (pGmlcMscCfg == NULL) { return FALSE; } if (pGmlcMscCfg->pcConfigFilename == NULL) { return FALSE; } xmlContent = g_string_new("\n\n"); g_string_append_printf(xmlContent, "\t\n\t\t\n", pGmlcMscCfg->pcQueryFontName); g_string_append_printf(xmlContent, "\t\t\n\t\n", pGmlcMscCfg->pcHelpFontName); g_string_append(xmlContent, "\n"); if (!g_file_set_contents(pGmlcMscCfg->pcConfigFilename, xmlContent->str, xmlContent->len, &gErr)) { g_printerr("Error can't write config file : %s\n", gErr->message); g_clear_error(&gErr); g_string_free(xmlContent, TRUE); return FALSE; } g_string_free(xmlContent, TRUE); return TRUE; } void xml_config_conf_start (GMarkupParseContext *context, const gchar * element_name, const gchar ** attribute_names, const gchar ** attribute_values, gpointer user_data, GError ** error) { if (g_ascii_strcasecmp(element_name, "gmysqlcc") == 0 && s_xml_config_read_state.state == X_CFG_OUT) { s_xml_config_read_state.state = X_CFG_IN_GMYSQLCC; } else if (g_ascii_strcasecmp(element_name, "fonts") == 0 && s_xml_config_read_state.state == X_CFG_IN_GMYSQLCC) { s_xml_config_read_state.state = X_CFG_IN_GMYSQLCC_FONTS; } else if (g_ascii_strcasecmp(element_name, "query") == 0 && s_xml_config_read_state.state == X_CFG_IN_GMYSQLCC_FONTS) { g_string_erase(s_xml_config_read_state.text, 0, -1); s_xml_config_read_state.state = X_CFG_IN_GMYSQLCC_FONTS_QUERY; } else if (g_ascii_strcasecmp(element_name, "help") == 0 && s_xml_config_read_state.state == X_CFG_IN_GMYSQLCC_FONTS) { g_string_erase(s_xml_config_read_state.text, 0, -1); s_xml_config_read_state.state = X_CFG_IN_GMYSQLCC_FONTS_HELP; } } void xml_config_conf_end (GMarkupParseContext *context, const gchar * element_name, gpointer user_data, GError ** error) { GmlcMiscConfig * pGmlcMscCfg = GMLC_MISC_CONFIG(user_data); if (g_ascii_strcasecmp(element_name, "gmysqlcc") == 0 && s_xml_config_read_state.state == X_CFG_IN_GMYSQLCC) { s_xml_config_read_state.state = X_CFG_OUT; } else if (g_ascii_strcasecmp(element_name, "fonts") == 0 && s_xml_config_read_state.state == X_CFG_IN_GMYSQLCC_FONTS) { s_xml_config_read_state.state = X_CFG_IN_GMYSQLCC; } else if (g_ascii_strcasecmp(element_name, "query") == 0 && s_xml_config_read_state.state == X_CFG_IN_GMYSQLCC_FONTS_QUERY) { pGmlcMscCfg->pcQueryFontName = strdup(s_xml_config_read_state.text->str); /*g_print("+ SET Font query : '%s'\n", gmysqlcc_conf->pcQueryFontName);*/ s_xml_config_read_state.state = X_CFG_IN_GMYSQLCC_FONTS; } else if (g_ascii_strcasecmp(element_name, "help") == 0 && s_xml_config_read_state.state == X_CFG_IN_GMYSQLCC_FONTS_HELP) { pGmlcMscCfg->pcHelpFontName = strdup(s_xml_config_read_state.text->str); /*g_print("+ SET Font help : '%s'\n", gmysqlcc_conf->pcHelpFontName);*/ s_xml_config_read_state.state = X_CFG_IN_GMYSQLCC_FONTS; } } void xml_config_conf_text (GMarkupParseContext *context, const gchar * text, gsize text_len, gpointer user_data, GError ** error) { } void xml_config_conf_passthrough (GMarkupParseContext *context, const gchar * passthrough_text, gsize text_len, gpointer user_data, GError **error) { if (!(g_ascii_strncasecmp(passthrough_text, "", 3) == 0)) { return; } switch (s_xml_config_read_state.state) { case X_CFG_IN_GMYSQLCC_FONTS_QUERY : g_string_append_len(s_xml_config_read_state.text, passthrough_text + 9, text_len - 12); /*g_print("+ Read Font query : '%s'\n", s_xml_config_read_state.text->str);*/ break; case X_CFG_IN_GMYSQLCC_FONTS_HELP : g_string_append_len(s_xml_config_read_state.text, passthrough_text + 9, text_len - 12); /*g_print("+ Read Font help : '%s'\n", s_xml_config_read_state.text->str);*/ break; default : break; } } /* xml read functions - Servers file */ gboolean gmlc_misc_config_read_servers_file (GmlcMiscConfig * pGmlcMscCfg) { GMarkupParser xmlParse; GMarkupParseContext * xmlContext; GError * gErr = NULL; gchar * pcBuffer = NULL; gsize szBuffer = 0; if (pGmlcMscCfg == NULL) { return FALSE; } /* Init XMl parser Struct */ xmlParse.start_element = xml_servers_conf_start; xmlParse.end_element = xml_servers_conf_end; xmlParse.text = xml_servers_conf_text; xmlParse.passthrough = xml_servers_conf_passthrough; xmlParse.error = NULL; /* Init XML read status struct */ xml_servers_read_state.state = X_OUT_ROOT; xml_servers_read_state.name = g_string_sized_new(16); xml_servers_read_state.host = g_string_sized_new(16); xml_servers_read_state.port = 0; xml_servers_read_state.login = g_string_sized_new(16); xml_servers_read_state.passwd = g_string_sized_new(16); xml_servers_read_state.allowedDbs = g_string_sized_new(48); xml_servers_read_state.localSock = g_string_sized_new(48); /* Create XML Parser */ xmlContext = g_markup_parse_context_new(&xmlParse, 0, (gpointer)pGmlcMscCfg, (GDestroyNotify)NULL); if (pGmlcMscCfg->pcServersFilename != NULL) { if (!g_file_get_contents(pGmlcMscCfg->pcServersFilename, &pcBuffer, &szBuffer, &gErr)) { g_printerr("Error servers file open : %s. -> read default configuration\n", gErr->message); g_clear_error(&gErr); pcBuffer = g_strdup(default_servers_conf); szBuffer = strlen(pcBuffer); } } else { g_printerr("Server file doesn't exist. -> read default configuration\n"); pcBuffer = g_strdup(default_servers_conf); szBuffer = strlen(pcBuffer); } g_markup_parse_context_parse(xmlContext, pcBuffer, szBuffer, &gErr); g_markup_parse_context_end_parse (xmlContext, &gErr); g_markup_parse_context_free(xmlContext); return TRUE; } gboolean gmlc_misc_config_write_servers_file (GmlcMiscConfig * pGmlcMscCfg) { GmlcMysqlServer * pGmlcMysqlSrv = NULL; GString * xmlContent = NULL; GList * lstServersIdx = NULL; GError * gErr = NULL; gchar * pcXmlServer = NULL; if (pGmlcMscCfg == NULL) { return FALSE; } if (pGmlcMscCfg->pcServersFilename == NULL) { return FALSE; } xmlContent = g_string_new("\n\n"); lstServersIdx = g_list_first(pGmlcMscCfg->lstServers); while (lstServersIdx != NULL) { pGmlcMysqlSrv = GMLC_MYSQL_SERVER(lstServersIdx->data); pcXmlServer = gmlc_mysql_server_generate_xml_config(pGmlcMysqlSrv); g_string_append(xmlContent, pcXmlServer); g_free(pcXmlServer); lstServersIdx = g_list_next(lstServersIdx); } g_string_append(xmlContent, "\n"); if (!g_file_set_contents(pGmlcMscCfg->pcServersFilename, xmlContent->str, xmlContent->len, &gErr)) { g_printerr("Error can't write servers file : %s\n", gErr->message); g_clear_error(&gErr); g_string_free(xmlContent, TRUE); return FALSE; } g_string_free(xmlContent, TRUE); return TRUE; } void xml_servers_conf_start (GMarkupParseContext *context, const gchar * element_name, const gchar ** attribute_names, const gchar ** attribute_values, gpointer user_data, GError ** error) { if (g_ascii_strcasecmp(element_name, "servers") == 0 && xml_servers_read_state.state == X_OUT_ROOT) { xml_servers_read_state.state = X_IN_ROOT; } else if (g_ascii_strcasecmp(element_name, "server") == 0 && xml_servers_read_state.state == X_IN_ROOT) { g_string_erase(xml_servers_read_state.name, 0, -1); g_string_erase(xml_servers_read_state.host, 0, -1); g_string_erase(xml_servers_read_state.login, 0, -1); g_string_erase(xml_servers_read_state.passwd, 0, -1); g_string_erase(xml_servers_read_state.allowedDbs, 0, -1); g_string_erase(xml_servers_read_state.localSock, 0, -1); xml_servers_read_state.port = 0; xml_servers_read_state.read_only = FALSE; xml_servers_read_state.write_warning = FALSE; xml_servers_read_state.state = X_IN_SERVER; } else if (g_ascii_strcasecmp(element_name, "name") == 0 && xml_servers_read_state.state == X_IN_SERVER) { xml_servers_read_state.state = X_IN_NAME; } else if (g_ascii_strcasecmp(element_name, "host") == 0 && xml_servers_read_state.state == X_IN_SERVER) { xml_servers_read_state.state = X_IN_HOST; } else if (g_ascii_strcasecmp(element_name, "port") == 0 && xml_servers_read_state.state == X_IN_SERVER) { xml_servers_read_state.state = X_IN_PORT; } else if (g_ascii_strcasecmp(element_name, "login") == 0 && xml_servers_read_state.state == X_IN_SERVER) { xml_servers_read_state.state = X_IN_LOGIN; } else if (g_ascii_strcasecmp(element_name, "passwd") == 0 && xml_servers_read_state.state == X_IN_SERVER) { xml_servers_read_state.state = X_IN_PASSWD; } else if (g_ascii_strcasecmp(element_name, "alloweddbs") == 0 && xml_servers_read_state.state == X_IN_SERVER) { xml_servers_read_state.state = X_IN_ALLOWED_DBS; } else if (g_ascii_strcasecmp(element_name, "localsock") == 0 && xml_servers_read_state.state == X_IN_SERVER) { xml_servers_read_state.state = X_IN_LOCAL_SOCK; } else if (g_ascii_strcasecmp(element_name, "options") == 0 && xml_servers_read_state.state == X_IN_SERVER) { xml_servers_read_state.state = X_IN_OPTIONS; } else if (g_ascii_strcasecmp(element_name, "read_only") == 0 && xml_servers_read_state.state == X_IN_OPTIONS) { /* Nothing to do */ } else if (g_ascii_strcasecmp(element_name, "write_warning") == 0 && xml_servers_read_state.state == X_IN_OPTIONS) { /* Nothing to do */ } } void xml_servers_conf_end (GMarkupParseContext *context, const gchar * element_name, gpointer user_data, GError ** error) { GmlcMiscConfig * pGmlcMscCfg = GMLC_MISC_CONFIG(user_data); if (g_ascii_strcasecmp(element_name, "servers") == 0 && xml_servers_read_state.state == X_IN_ROOT) { xml_servers_read_state.state = X_OUT_ROOT; } else if (g_ascii_strcasecmp(element_name, "server") == 0 && xml_servers_read_state.state == X_IN_SERVER) { gmlc_misc_config_add_server(pGmlcMscCfg, xml_servers_read_state.name->str, xml_servers_read_state.host->str, xml_servers_read_state.port, xml_servers_read_state.login->str, xml_servers_read_state.passwd->str, xml_servers_read_state.allowedDbs->str, xml_servers_read_state.localSock->str, xml_servers_read_state.read_only, xml_servers_read_state.write_warning); xml_servers_read_state.state = X_IN_ROOT; } else if (g_ascii_strcasecmp(element_name, "name") == 0 && xml_servers_read_state.state == X_IN_NAME) { xml_servers_read_state.state = X_IN_SERVER; } else if (g_ascii_strcasecmp(element_name, "host") == 0 && xml_servers_read_state.state == X_IN_HOST) { xml_servers_read_state.state = X_IN_SERVER; } else if (g_ascii_strcasecmp(element_name, "port") == 0 && xml_servers_read_state.state == X_IN_PORT) { xml_servers_read_state.state = X_IN_SERVER; } else if (g_ascii_strcasecmp(element_name, "login") == 0 && xml_servers_read_state.state == X_IN_LOGIN) { xml_servers_read_state.state = X_IN_SERVER; } else if (g_ascii_strcasecmp(element_name, "passwd") == 0 && xml_servers_read_state.state == X_IN_PASSWD) { xml_servers_read_state.state = X_IN_SERVER; } else if (g_ascii_strcasecmp(element_name, "alloweddbs") == 0 && xml_servers_read_state.state == X_IN_ALLOWED_DBS) { xml_servers_read_state.state = X_IN_SERVER; } else if (g_ascii_strcasecmp(element_name, "localsock") == 0 && xml_servers_read_state.state == X_IN_LOCAL_SOCK) { xml_servers_read_state.state = X_IN_SERVER; } else if (g_ascii_strcasecmp(element_name, "options") == 0 && xml_servers_read_state.state == X_IN_OPTIONS) { xml_servers_read_state.state = X_IN_SERVER; } else if (g_ascii_strcasecmp(element_name, "read_only") == 0 && xml_servers_read_state.state == X_IN_OPTIONS) { xml_servers_read_state.read_only = TRUE; } else if (g_ascii_strcasecmp(element_name, "write_warning") == 0 && xml_servers_read_state.state == X_IN_OPTIONS) { xml_servers_read_state.write_warning = TRUE; } } void xml_servers_conf_text (GMarkupParseContext *context, const gchar * text, gsize text_len, gpointer user_data, GError ** error) { if (xml_servers_read_state.state == X_IN_PORT) { xml_servers_read_state.port = g_ascii_strtoull(text, NULL, 10); } } void xml_servers_conf_passthrough (GMarkupParseContext *context, const gchar * passthrough_text, gsize text_len, gpointer user_data, GError **error) { if (!(g_ascii_strncasecmp(passthrough_text, "", 3) == 0)) { return; } switch (xml_servers_read_state.state) { case X_IN_NAME : g_string_append_len(xml_servers_read_state.name, passthrough_text + 9, text_len - 12); break; case X_IN_HOST : g_string_append_len(xml_servers_read_state.host, passthrough_text + 9, text_len - 12); break; case X_IN_LOGIN : g_string_append_len(xml_servers_read_state.login, passthrough_text + 9, text_len - 12); break; case X_IN_PASSWD : g_string_append_len(xml_servers_read_state.passwd, passthrough_text + 9, text_len - 12); break; case X_IN_ALLOWED_DBS : g_string_append_len(xml_servers_read_state.allowedDbs, passthrough_text + 9, text_len - 12); break; case X_IN_LOCAL_SOCK : g_string_append_len(xml_servers_read_state.localSock, passthrough_text + 9, text_len - 12); break; default : break; } } gmysqlcc-0.3.0/src/gmlc_mysql_database.h0000644000175000017500000001171010755301563015215 00000000000000/* * 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 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 Library 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __GMLC_MYSQL_DATABASE_H__ #define __GMLC_MYSQL_DATABASE_H__ #include #include #include "gmlc_mysql_server.h" #include "gmlc_mysql_query.h" #ifndef __GMLC_MYSQL_TABLE_H__TYPE__ #define __GMLC_MYSQL_TABLE_H__TYPE__ typedef struct _GmlcMysqlTable GmlcMysqlTable; #endif /* __GMLC_MYSQL_TABLE_H__TYPE__ */ #ifndef __GMLC_MYSQL_VIEW_H__TYPE__ #define __GMLC_MYSQL_VIEW_H__TYPE__ typedef struct _GmlcMysqlView GmlcMysqlView; #endif /* __GMLC_MYSQL_VIEW_H__TYPE__ */ #ifndef __GMLC_MYSQL_FUNCTION_H__TYPE__ #define __GMLC_MYSQL_FUNCTION_H__TYPE__ typedef struct _GmlcMysqlFunction GmlcMysqlFunction; #endif /* __GMLC_MYSQL_FUNCTION_H__TYPE__ */ #ifndef __GMLC_MYSQL_PROCEDURE_H__TYPE__ #define __GMLC_MYSQL_PROCEDURE_H__TYPE__ typedef struct _GmlcMysqlProcedure GmlcMysqlProcedure; #endif /* __GMLC_MYSQL_PROCEDURE_H__TYPE__ */ #include "gmlc_mysql_structure.h" #include "gmlc_mysql_function.h" #include "gmlc_mysql_procedure.h" #include "gmlc_mysql_table.h" #include "gmlc_mysql_view.h" #include "gmlc_mysql_query.h" #define UNUSED_VAR(x) (x = x) G_BEGIN_DECLS #define GMLC_MYSQL_TYPE_DATABASE (gmlc_mysql_database_get_type ()) #define GMLC_MYSQL_DATABASE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GMLC_MYSQL_TYPE_DATABASE, GmlcMysqlDatabase)) #define GMLC_MYSQL_DATABASE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GMLC_MYSQL_TYPE_DATABASE, GmlcMysqlDatabaseClass)) #define GMLC_MYSQL_IS_DATABASE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GMLC_MYSQL_TYPE_DATABASE)) #define GMLC_MYSQL_IS_DATABASE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GMLC_MYSQL_TYPE_DATABASE)) #define GMLC_MYSQL_GET_DATABASE_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GMLC_MYSQL_TYPE_DATABASE, GmlcMysqlDatabaseClass)) #ifndef __GMLC_MYSQL_DATABASE_H__TYPE__ #define __GMLC_MYSQL_DATABASE_H__TYPE__ typedef struct _GmlcMysqlDatabase GmlcMysqlDatabase; #endif /* __GMLC_MYSQL_DATABASE_H__TYPE__ */ typedef struct _GmlcMysqlDatabaseClass GmlcMysqlDatabaseClass; struct _GmlcMysqlDatabase { GObject parent; /* Database identification */ GmlcMysqlServer * pGmlcMysqlSrv; gchar * pcDbName; /* Database information */ GHashTable * htbTables; GHashTable * htbViews; GHashTable * htbFunctions; GHashTable * htbProcedures; /* Extra information */ gboolean bFlagged; }; struct _GmlcMysqlDatabaseClass { GObjectClass parent_class; }; GType gmlc_mysql_database_get_type (void); GmlcMysqlDatabase * gmlc_mysql_database_new(GmlcMysqlServer * pGmlcMysqlSrv, const gchar * pcDbName); GmlcMysqlQuery * gmlc_mysql_database_get_query(GmlcMysqlDatabase * pGmlcMysqlDb); GArray * gmlc_mysql_database_tables_name_list(GmlcMysqlDatabase * pGmlcMysqlDb, gboolean bUpdateList); GmlcMysqlTable * gmlc_mysql_database_get_table(GmlcMysqlDatabase * pGmlcMysqlDb, const gchar * pcName); gboolean gmlc_mysql_database_update_tables_list(GmlcMysqlDatabase * pGmlcMysqlDb); gchar * gmlc_mysql_database_create_new_table_sql(GmlcMysqlDatabase * pGmlcMysqlDb, const gchar * pcOtherName); GArray * gmlc_mysql_database_views_name_list(GmlcMysqlDatabase * pGmlcMysqlDb, gboolean bUpdateList); GmlcMysqlView * gmlc_mysql_database_get_view(GmlcMysqlDatabase * pGmlcMysqlDb, const gchar * pcName); gboolean gmlc_mysql_database_update_views_list(GmlcMysqlDatabase * pGmlcMysqlDb); gchar * gmlc_mysql_database_create_new_view_sql(GmlcMysqlDatabase * pGmlcMysqlDb, const gchar * pcOtherName); GArray * gmlc_mysql_database_functions_name_list(GmlcMysqlDatabase * pGmlcMysqlDb, gboolean bUpdateList); GmlcMysqlFunction * gmlc_mysql_database_get_function(GmlcMysqlDatabase * pGmlcMysqlDb, const gchar * pcName); gboolean gmlc_mysql_database_update_functions_list(GmlcMysqlDatabase * pGmlcMysqlDb); gchar * gmlc_mysql_database_create_new_function_sql(GmlcMysqlDatabase * pGmlcMysqlDb, const gchar * pcOtherName); GArray * gmlc_mysql_database_procedures_name_list(GmlcMysqlDatabase * pGmlcMysqlDb, gboolean bUpdateList); GmlcMysqlProcedure * gmlc_mysql_database_get_procedure(GmlcMysqlDatabase * pGmlcMysqlDb, const gchar * pcName); gboolean gmlc_mysql_database_update_procedures_list(GmlcMysqlDatabase * pGmlcMysqlDb); gchar * gmlc_mysql_database_create_new_procedure_sql(GmlcMysqlDatabase * pGmlcMysqlDb, const gchar * pcOtherName); G_END_DECLS #endif /* __GMLC_MYSQL_DATABASE_H__ */ gmysqlcc-0.3.0/src/gmlc_gui_server_tab.c0000644000175000017500000000320410755301563015216 00000000000000/* * 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 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, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "gmlc_gui_server_tab.h" static void gmlc_gui_server_tab_base_init (gpointer g_class) { static gboolean initialized = FALSE; UNUSED_VAR(g_class); if (!initialized) { /* create interface signals here. */ initialized = TRUE; } } GType gmlc_gui_server_tab_get_type (void) { static GType type = 0; if (type == 0) { static const GTypeInfo info = { sizeof (GmlcGuiServerTabInterface), gmlc_gui_server_tab_base_init, /* base_init */ NULL, /* base_finalize */ NULL, /* class_init */ NULL, /* class_finalize */ NULL, /* class_data */ 0, 0, /* n_preallocs */ NULL /* instance_init */ }; type = g_type_register_static (G_TYPE_INTERFACE, "GmlcGuiServerTab", &info, 0); } return type; } void gmlc_gui_server_tab_update_ui (GmlcGuiServerTab * self, gboolean bShow) { GMLC_GUI_SERVER_TAB_GET_INTERFACE(self)->update_ui(self, bShow); } gmysqlcc-0.3.0/src/gmlc_gui_helpers.c0000644000175000017500000001113010755301563014521 00000000000000/* * 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 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, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "gmlc_gui_helpers.h" void closeAskFilename (GtkWidget *widget, gpointer user_data); GString * askInfo(const gchar * title, const gchar * message, const gchar * defaultValue) { GtkWidget *dialog, *label, *txtValue; GString * retStr; gint ret ; dialog = gtk_dialog_new_with_buttons (title, GTK_WINDOW(NULL), GTK_DIALOG_MODAL, GTK_STOCK_OK, GTK_RESPONSE_OK, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, NULL); label = gtk_label_new (message); gtk_container_add (GTK_CONTAINER (GTK_DIALOG(dialog)->vbox), label); gtk_widget_show(label); txtValue = gtk_entry_new (); if (defaultValue != (gchar *)NULL) { gtk_entry_set_text (GTK_ENTRY(txtValue), defaultValue); } gtk_container_add (GTK_CONTAINER (GTK_DIALOG(dialog)->vbox), txtValue); gtk_widget_show(txtValue); ret = gtk_dialog_run (GTK_DIALOG(dialog)); if (ret == GTK_RESPONSE_OK) { retStr = g_string_new(gtk_entry_get_text(GTK_ENTRY(txtValue))); } else { retStr = (GString *)NULL; } gtk_widget_hide (GTK_WIDGET(dialog)); gtk_widget_destroy (GTK_WIDGET(dialog)); return retStr; } gboolean askConfirmation(const gchar * title, const gchar * message) { GtkWidget *dialog, *label; gboolean retVal; gint ret ; dialog = gtk_dialog_new_with_buttons (title, GTK_WINDOW(NULL), GTK_DIALOG_MODAL, GTK_STOCK_OK, GTK_RESPONSE_OK, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, NULL); label = gtk_label_new (message); gtk_container_add (GTK_CONTAINER (GTK_DIALOG(dialog)->vbox), label); gtk_widget_show(label); ret = gtk_dialog_run (GTK_DIALOG(dialog)); retVal = (ret == GTK_RESPONSE_OK); gtk_widget_hide (GTK_WIDGET(dialog)); gtk_widget_destroy (GTK_WIDGET(dialog)); return retVal; } gboolean askYesno(const gchar * title, const gchar * message) { GtkWidget *dialog, *label; gboolean retVal; gint ret ; dialog = gtk_dialog_new_with_buttons (title, GTK_WINDOW(NULL), GTK_DIALOG_MODAL, GTK_STOCK_YES, GTK_RESPONSE_OK, GTK_STOCK_NO, GTK_RESPONSE_CANCEL, NULL); label = gtk_label_new (message); gtk_container_add (GTK_CONTAINER (GTK_DIALOG(dialog)->vbox), label); gtk_widget_show(label); ret = gtk_dialog_run (GTK_DIALOG(dialog)); retVal = (ret == GTK_RESPONSE_OK); gtk_widget_hide (GTK_WIDGET(dialog)); gtk_widget_destroy (GTK_WIDGET(dialog)); return retVal; } gboolean askFilename(const gchar * title, const gchar * filename, void (*okevent) (GtkWidget *widget, gpointer user_data), gpointer user_data) { p_askFilenameInfos paskFnInf; paskFnInf = (p_askFilenameInfos) g_try_malloc(sizeof(askFilenameInfos)); if (paskFnInf == (p_askFilenameInfos)NULL) { return FALSE; } paskFnInf->userData = user_data; paskFnInf->dialog = gtk_file_selection_new (title); g_signal_connect (GTK_OBJECT (GTK_FILE_SELECTION (paskFnInf->dialog)->ok_button), "clicked", G_CALLBACK (okevent), paskFnInf); /* Ensure that the dialog box is destroyed when the user clicks a button. */ g_signal_connect (GTK_OBJECT (GTK_FILE_SELECTION (paskFnInf->dialog)->ok_button), "clicked", G_CALLBACK (closeAskFilename), paskFnInf); g_signal_connect (GTK_OBJECT (GTK_FILE_SELECTION (paskFnInf->dialog)->cancel_button), "clicked", G_CALLBACK (closeAskFilename), paskFnInf); if (filename != (gchar *)NULL) { gtk_file_selection_set_filename (GTK_FILE_SELECTION (paskFnInf->dialog), filename); } /* Display that dialog */ gtk_widget_show (paskFnInf->dialog); return TRUE; } void closeAskFilename (GtkWidget *widget, gpointer user_data) { p_askFilenameInfos paskFnInf = (p_askFilenameInfos)user_data; gtk_widget_destroy(paskFnInf->dialog); g_free(paskFnInf); } gchar * gmlc_helpers_protect_underscore (const gchar * str) { GString * strRet = NULL; gchar * pcRet = NULL; int i = 0; strRet = g_string_new(str); for (i = 0; i < strRet->len; i++) { if (strRet->str[i] == '_') { g_string_insert_c(strRet, i, '_'); i++; } } pcRet = g_strdup(strRet->str); g_string_free(strRet, TRUE); return pcRet; } gmysqlcc-0.3.0/src/gmlc_gui_server_tab_help.c0000644000175000017500000004512710755301563016240 00000000000000/* * 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 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, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "gmlc_gui_server_tab_help.h" #include "gmlc_gui_server_tab.h" #include "gmlc_mysql_query.h" #include #include static void gmlc_gui_server_tab_help_finalize (GmlcGuiServerTabHelp * pGmlcGuiSrvTabHelp); static void gmlc_gui_server_tab_help_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec); static void gmlc_gui_server_tab_help_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec); static void gmlc_gui_server_tab_help_interface_init (gpointer g_iface, gpointer iface_data); static void gmlc_gui_server_tab_help_update_ui (GmlcGuiServerTabHelp * pGmlcGuiSrvTabHelp, gboolean bShow); void gmlc_gui_server_tab_help_create_widgets (GmlcGuiServerTabHelp * pGmlcGuiSrvTabHelp); void gmlc_gui_server_tab_help_init_widgets (GmlcGuiServerTabHelp * pGmlcGuiSrvTabHelp); void gmlc_gui_server_tab_help_fill_help_category_list(GmlcGuiServerTabHelp * pGmlcGuiSrvTabHelp); void gmlc_gui_server_tab_help_fill_help_topic_list(GmlcGuiServerTabHelp * pGmlcGuiSrvTabHelp); void gmlc_gui_server_tab_help_fill_help_topic_list_from_search(GmlcGuiServerTabHelp * pGmlcGuiSrvTabHelp); void gmlc_gui_server_tab_help_display_help_topic(GmlcGuiServerTabHelp * pGmlcGuiSrvTabHelp); void gmlc_gui_server_tab_help_evt_trvHelpCategories_selected (GtkTreeSelection *selection, gpointer user_data); void gmlc_gui_server_tab_help_evt_trvHelpTopics_selected (GtkTreeSelection *selection, gpointer user_data); void gmlc_gui_server_tab_help_evt_btnHelpSearch_clicked (GtkWidget *widget, gpointer user_data); enum { PROP_0, PROP_SERVER, PROP_SERVER_WINDOW, }; G_DEFINE_TYPE_WITH_CODE (GmlcGuiServerTabHelp, gmlc_gui_server_tab_help, GTK_TYPE_VBOX, G_IMPLEMENT_INTERFACE (GMLC_GUI_TYPE_SERVER_TAB, gmlc_gui_server_tab_help_interface_init)); static void gmlc_gui_server_tab_help_interface_init (gpointer g_iface, gpointer iface_data) { GmlcGuiServerTabInterface *pIface = (GmlcGuiServerTabInterface *)g_iface; pIface->update_ui = (void (*) (GmlcGuiServerTab * self, gboolean bShow))gmlc_gui_server_tab_help_update_ui; } static void gmlc_gui_server_tab_help_class_init (GmlcGuiServerTabHelpClass * pClass) { GObjectClass *pObjClass = G_OBJECT_CLASS(pClass); pObjClass->finalize = (GObjectFinalizeFunc) gmlc_gui_server_tab_help_finalize; pObjClass->get_property = gmlc_gui_server_tab_help_get_property; pObjClass->set_property = gmlc_gui_server_tab_help_set_property; g_object_class_install_property(pObjClass, PROP_SERVER, g_param_spec_object("server", "Server object", "Server object", GMLC_MYSQL_TYPE_SERVER, G_PARAM_READABLE)); g_object_class_install_property(pObjClass, PROP_SERVER_WINDOW, g_param_spec_object("server_window", "Server window object", "Server window object", GMLC_GUI_TYPE_SERVER, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); } static void gmlc_gui_server_tab_help_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec) { GmlcGuiServerTabHelp * pGmlcGuiSrvTabHelp = GMLC_GUI_SERVER_TAB_HELP(object); switch (prop_id) { case PROP_SERVER : g_value_set_object(value, pGmlcGuiSrvTabHelp->pGmlcMysqlSrv); break; case PROP_SERVER_WINDOW : g_value_set_object(value, pGmlcGuiSrvTabHelp->pGmlcGuiSrv); break; default: { G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); break; } } } static void gmlc_gui_server_tab_help_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec) { GmlcGuiServerTabHelp * pGmlcGuiSrvTabHelp = GMLC_GUI_SERVER_TAB_HELP(object); switch (prop_id) { case PROP_SERVER_WINDOW : pGmlcGuiSrvTabHelp->pGmlcGuiSrv = g_value_get_object(value); g_object_get(pGmlcGuiSrvTabHelp->pGmlcGuiSrv, "server", &pGmlcGuiSrvTabHelp->pGmlcMysqlSrv, NULL); gmlc_gui_server_tab_help_create_widgets(pGmlcGuiSrvTabHelp); gmlc_gui_server_tab_help_init_widgets(pGmlcGuiSrvTabHelp); break; default: { G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); break; } } } static void gmlc_gui_server_tab_help_init (GmlcGuiServerTabHelp * pGmlcGuiSrvTabHelp) { pGmlcGuiSrvTabHelp->pGmlcGuiSrv = NULL; pGmlcGuiSrvTabHelp->pGmlcMysqlSrv = NULL; pGmlcGuiSrvTabHelp->iCurrentCategory = 0; pGmlcGuiSrvTabHelp->iCurrentTopic = 0; } static void gmlc_gui_server_tab_help_finalize (GmlcGuiServerTabHelp * pGmlcGuiSrvTabHelp) { UNUSED_VAR(pGmlcGuiSrvTabHelp); } static void gmlc_gui_server_tab_help_update_ui (GmlcGuiServerTabHelp * pGmlcGuiSrvTabHelp, gboolean bShow) { UNUSED_VAR(pGmlcGuiSrvTabHelp); UNUSED_VAR(bShow); } GmlcGuiServerTabHelp * gmlc_gui_server_tab_help_new (GmlcGuiServer * pGmlcGuiSrv) { GmlcGuiServerTabHelp * pGmlcGuiSrvTabHelp = NULL; pGmlcGuiSrvTabHelp = GMLC_GUI_SERVER_TAB_HELP(g_object_new(GMLC_GUI_TYPE_SERVER_TAB_HELP, "server_window", pGmlcGuiSrv, NULL)); return pGmlcGuiSrvTabHelp; } void gmlc_gui_server_tab_help_create_widgets (GmlcGuiServerTabHelp * pGmlcGuiSrvTabHelp) { GtkWidget *label; GtkWidget *hpaned; GtkWidget *vpaned; GtkWidget *table; GtkWidget *scrolledwindow; GtkWidget *btnHelpSearch; GtkTreeSelection *select; PangoFontDescription * pCourierFontDesc = NULL; hpaned = gtk_hpaned_new (); gtk_widget_show (hpaned); gtk_paned_set_position (GTK_PANED (hpaned), 200); /*gtk_container_add(GTK_CONTAINER(pGmlcGuiSrvTabHelp), hpaned);*/ gtk_box_pack_start (GTK_BOX (pGmlcGuiSrvTabHelp), hpaned, TRUE, TRUE, 0); scrolledwindow = gtk_scrolled_window_new (NULL, NULL); gtk_widget_show (scrolledwindow); gtk_paned_pack1 (GTK_PANED (hpaned), scrolledwindow, FALSE, TRUE); gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow), GTK_SHADOW_IN); pGmlcGuiSrvTabHelp->trvHelpCategories = gtk_tree_view_new (); gtk_widget_show (pGmlcGuiSrvTabHelp->trvHelpCategories); gtk_container_add (GTK_CONTAINER (scrolledwindow), pGmlcGuiSrvTabHelp->trvHelpCategories); select = gtk_tree_view_get_selection (GTK_TREE_VIEW (pGmlcGuiSrvTabHelp->trvHelpCategories)); gtk_tree_selection_set_mode (select, GTK_SELECTION_SINGLE); g_signal_connect (G_OBJECT (select), "changed", G_CALLBACK (gmlc_gui_server_tab_help_evt_trvHelpCategories_selected), pGmlcGuiSrvTabHelp); vpaned = gtk_vpaned_new (); gtk_widget_show (vpaned); gtk_paned_pack2 (GTK_PANED (hpaned), vpaned, TRUE, TRUE); gtk_paned_set_position (GTK_PANED (vpaned), 200); table = gtk_table_new (2, 3, FALSE); gtk_widget_show (table); gtk_paned_pack1 (GTK_PANED (vpaned), table, FALSE, TRUE); gtk_container_set_border_width (GTK_CONTAINER (table), 3); gtk_table_set_row_spacings (GTK_TABLE (table), 3); gtk_table_set_col_spacings (GTK_TABLE (table), 3); label = gtk_label_new (_("Search (keyword) :")); gtk_widget_show (label); gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5); pGmlcGuiSrvTabHelp->txtHelpSearchKeyword = gtk_entry_new (); gtk_widget_show (pGmlcGuiSrvTabHelp->txtHelpSearchKeyword); gtk_table_attach (GTK_TABLE (table), pGmlcGuiSrvTabHelp->txtHelpSearchKeyword, 1, 2, 0, 1, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); btnHelpSearch = gtk_button_new_with_mnemonic (_("Search")); gtk_widget_show (btnHelpSearch); gtk_table_attach (GTK_TABLE (table), btnHelpSearch, 2, 3, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); g_signal_connect (G_OBJECT (btnHelpSearch), "clicked", G_CALLBACK (gmlc_gui_server_tab_help_evt_btnHelpSearch_clicked), pGmlcGuiSrvTabHelp); scrolledwindow = gtk_scrolled_window_new (NULL, NULL); gtk_widget_show (scrolledwindow); gtk_table_attach (GTK_TABLE (table), scrolledwindow, 0, 3, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow), GTK_SHADOW_IN); pGmlcGuiSrvTabHelp->trvHelpTopics = gtk_tree_view_new (); gtk_widget_show (pGmlcGuiSrvTabHelp->trvHelpTopics); gtk_container_add (GTK_CONTAINER (scrolledwindow), pGmlcGuiSrvTabHelp->trvHelpTopics); select = gtk_tree_view_get_selection (GTK_TREE_VIEW (pGmlcGuiSrvTabHelp->trvHelpTopics)); gtk_tree_selection_set_mode (select, GTK_SELECTION_SINGLE); g_signal_connect (G_OBJECT (select), "changed", G_CALLBACK (gmlc_gui_server_tab_help_evt_trvHelpTopics_selected), pGmlcGuiSrvTabHelp); scrolledwindow = gtk_scrolled_window_new (NULL, NULL); gtk_widget_show (scrolledwindow); gtk_paned_pack2 (GTK_PANED (vpaned), scrolledwindow, TRUE, TRUE); gtk_container_set_border_width (GTK_CONTAINER (scrolledwindow), 3); gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow), GTK_SHADOW_IN); pGmlcGuiSrvTabHelp->txvHelpTopic = gtk_text_view_new (); pCourierFontDesc = pango_font_description_from_string(GpGmlcMscCfg->pcHelpFontName); gtk_widget_modify_font(pGmlcGuiSrvTabHelp->txvHelpTopic, pCourierFontDesc); gtk_widget_show (pGmlcGuiSrvTabHelp->txvHelpTopic); gtk_container_add (GTK_CONTAINER (scrolledwindow), pGmlcGuiSrvTabHelp->txvHelpTopic); gtk_text_view_set_editable (GTK_TEXT_VIEW (pGmlcGuiSrvTabHelp->txvHelpTopic), FALSE); pango_font_description_free(pCourierFontDesc); } void gmlc_gui_server_tab_help_init_widgets (GmlcGuiServerTabHelp * pGmlcGuiSrvTabHelp) { GtkTreeViewColumn * currCol; GtkCellRenderer * renderer; GtkListStore * lstEmpty; GtkTreeStore * treEmpty; /* Generate columns for all tree views */ renderer = gtk_cell_renderer_text_new (); /* Databases columns */ currCol = gtk_tree_view_column_new_with_attributes (_("Categories"), renderer, "text", 0, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (pGmlcGuiSrvTabHelp->trvHelpCategories), currCol); treEmpty = gtk_tree_store_new(2, G_TYPE_STRING, G_TYPE_INT); gtk_tree_view_set_model(GTK_TREE_VIEW(pGmlcGuiSrvTabHelp->trvHelpCategories), GTK_TREE_MODEL(treEmpty)); g_object_unref (G_OBJECT (treEmpty)); /* Table columns */ currCol = gtk_tree_view_column_new_with_attributes (_("Topic name"), renderer, "text", 0, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (pGmlcGuiSrvTabHelp->trvHelpTopics), currCol); lstEmpty = gtk_list_store_new(2, G_TYPE_STRING, G_TYPE_INT); gtk_tree_view_set_model(GTK_TREE_VIEW(pGmlcGuiSrvTabHelp->trvHelpTopics), GTK_TREE_MODEL(lstEmpty)); g_object_unref (G_OBJECT (lstEmpty)); gmlc_gui_server_tab_help_fill_help_category_list(pGmlcGuiSrvTabHelp); } void gmlc_gui_server_tab_help_fill_help_category_list(GmlcGuiServerTabHelp * pGmlcGuiSrvTabHelp) { GmlcMysqlQuery * pGmlcMysqlQry = NULL; GtkTreeStore * treCategories = NULL; GtkTreeIter * pIter = NULL, * pIterParent = NULL; GtkTreePath * pPath = NULL; GHashTable * htCategories = NULL; GArray * arRow = NULL; gchar * pcName = NULL; gint * piKey = 0, iParentId = 0; treCategories = gtk_tree_store_new(2, G_TYPE_STRING, G_TYPE_INT); htCategories = g_hash_table_new_full(g_int_hash, g_int_equal, g_free, g_free); pGmlcMysqlQry = gmlc_mysql_query_new(pGmlcGuiSrvTabHelp->pGmlcMysqlSrv, "mysql"); if (gmlc_mysql_query_execute(pGmlcMysqlQry, "SELECT * FROM `mysql`.`help_category` ORDER BY parent_category_id, name;", 72, FALSE)) { arRow = gmlc_mysql_query_next_record(pGmlcMysqlQry); while (arRow != (GArray *)NULL) { pIter = (GtkTreeIter *) g_try_malloc(sizeof(GtkTreeIter)); piKey = (gint *) g_try_malloc(sizeof(gint)); *piKey = atoi(g_array_index(arRow, gchar *, 0)); pcName = g_array_index(arRow, gchar *, 1); iParentId = atoi(g_array_index(arRow, gchar *, 2)); if (iParentId == 0) { pIterParent = NULL; } else { pIterParent = g_hash_table_lookup(htCategories, &iParentId); } gtk_tree_store_append (treCategories, pIter, pIterParent); gtk_tree_store_set (treCategories, pIter, 0, pcName, 1, *piKey, -1); if (iParentId == 0) { pPath = gtk_tree_model_get_path(GTK_TREE_MODEL(treCategories), pIter); } g_hash_table_insert(htCategories, piKey, pIter); g_array_free(arRow, TRUE); arRow = gmlc_mysql_query_next_record(pGmlcMysqlQry); } } gtk_tree_view_set_model(GTK_TREE_VIEW(pGmlcGuiSrvTabHelp->trvHelpCategories), GTK_TREE_MODEL(treCategories)); g_object_unref (G_OBJECT (treCategories)); if (pPath != NULL) { gtk_tree_view_expand_to_path(GTK_TREE_VIEW(pGmlcGuiSrvTabHelp->trvHelpCategories), pPath); gtk_tree_path_free(pPath); } g_hash_table_destroy(htCategories); g_object_unref(G_OBJECT(pGmlcMysqlQry)); } void gmlc_gui_server_tab_help_fill_help_topic_list(GmlcGuiServerTabHelp * pGmlcGuiSrvTabHelp) { GmlcMysqlQuery * pGmlcMysqlQry = NULL; GtkListStore * lstTopics = NULL; GtkTreeIter iter; GArray * arRow = NULL; gchar * pcName = NULL, * pcSql = NULL; gint iKey = 0; lstTopics = gtk_list_store_new(2, G_TYPE_STRING, G_TYPE_INT); pGmlcMysqlQry = gmlc_mysql_query_new(pGmlcGuiSrvTabHelp->pGmlcMysqlSrv, "mysql"); pcSql = g_strdup_printf("SELECT * FROM `mysql`.`help_topic` WHERE help_category_id = %d ORDER BY name", pGmlcGuiSrvTabHelp->iCurrentCategory); if (gmlc_mysql_query_execute(pGmlcMysqlQry, pcSql, strlen(pcSql), FALSE)) { arRow = gmlc_mysql_query_next_record(pGmlcMysqlQry); while (arRow != NULL) { iKey = atoi(g_array_index(arRow, gchar *, 0)); pcName = g_array_index(arRow, gchar *, 1); gtk_list_store_append (lstTopics, &iter); gtk_list_store_set (lstTopics, &iter, 0, pcName, 1, iKey, -1); gmlc_mysql_query_free_record_content(arRow); arRow = gmlc_mysql_query_next_record(pGmlcMysqlQry); } } gtk_tree_view_set_model(GTK_TREE_VIEW(pGmlcGuiSrvTabHelp->trvHelpTopics), GTK_TREE_MODEL(lstTopics)); g_object_unref (G_OBJECT (lstTopics)); g_free(pcSql); g_object_unref(G_OBJECT(pGmlcMysqlQry)); } void gmlc_gui_server_tab_help_fill_help_topic_list_from_search(GmlcGuiServerTabHelp * pGmlcGuiSrvTabHelp) { GmlcMysqlQuery * pGmlcMysqlQry = NULL; GtkListStore * lstTopics = NULL; GtkTreeIter iter; GString * strSql = NULL; GArray * arRow = NULL; gchar * pcName = NULL, * pcSearchedText = NULL, ** ppcSplitedSearchedText = NULL; gint iKey = 0, iIdx = 0; pcSearchedText = gtk_editable_get_chars(GTK_EDITABLE(pGmlcGuiSrvTabHelp->txtHelpSearchKeyword), 0, -1); if (strlen(pcSearchedText) == 0) { g_free(pcSearchedText); return; } ppcSplitedSearchedText = g_strsplit(pcSearchedText, " ", 0); strSql = g_string_new("SELECT * FROM `mysql`.`help_topic` WHERE"); while (ppcSplitedSearchedText[iIdx] != NULL) { if (iIdx == 0) { g_string_append_printf (strSql, " (description LIKE '%%%s%%' OR example LIKE '%%%s%%')", ppcSplitedSearchedText[iIdx], ppcSplitedSearchedText[iIdx]); } else { g_string_append_printf (strSql, " AND (description LIKE '%%%s%%' OR example LIKE '%%%s%%')", ppcSplitedSearchedText[iIdx], ppcSplitedSearchedText[iIdx]); } iIdx ++; } g_string_append (strSql, " ORDER BY name"); g_strfreev(ppcSplitedSearchedText); g_free(pcSearchedText); lstTopics = gtk_list_store_new(2, G_TYPE_STRING, G_TYPE_INT); pGmlcMysqlQry = gmlc_mysql_query_new(pGmlcGuiSrvTabHelp->pGmlcMysqlSrv, "mysql"); if (gmlc_mysql_query_execute(pGmlcMysqlQry, strSql->str, strSql->len, FALSE)) { arRow = gmlc_mysql_query_next_record(pGmlcMysqlQry); while (arRow != (GArray *)NULL) { iKey = atoi(g_array_index(arRow, gchar *, 0)); pcName = g_array_index(arRow, gchar *, 1); gtk_list_store_append (lstTopics, &iter); gtk_list_store_set (lstTopics, &iter, 0, pcName, 1, iKey, -1); gmlc_mysql_query_free_record_content(arRow); arRow = gmlc_mysql_query_next_record(pGmlcMysqlQry); } } gtk_tree_view_set_model(GTK_TREE_VIEW(pGmlcGuiSrvTabHelp->trvHelpTopics), GTK_TREE_MODEL(lstTopics)); g_object_unref (G_OBJECT (lstTopics)); g_string_free(strSql, TRUE); g_object_unref(G_OBJECT(pGmlcMysqlQry)); } void gmlc_gui_server_tab_help_display_help_topic(GmlcGuiServerTabHelp * pGmlcGuiSrvTabHelp) { GmlcMysqlQuery * pGmlcMysqlQry = NULL; GtkTextBuffer * txtBuffer = NULL; GArray * arRow = NULL; gchar * pcSql = NULL, * pcTopic = NULL; gchar * pcName = NULL, * pcDescription = NULL, * pcSample = NULL, * pcUrl = NULL; pGmlcMysqlQry = gmlc_mysql_query_new(pGmlcGuiSrvTabHelp->pGmlcMysqlSrv, "mysql"); pcSql = g_strdup_printf("SELECT * FROM `mysql`.`help_topic` WHERE help_topic_id = %d", pGmlcGuiSrvTabHelp->iCurrentTopic); if (gmlc_mysql_query_execute(pGmlcMysqlQry, pcSql, strlen(pcSql), FALSE)) { arRow = gmlc_mysql_query_next_record(pGmlcMysqlQry); pcName = g_array_index(arRow, gchar *, 1); pcDescription = g_array_index(arRow, gchar *, 3); pcSample = g_array_index(arRow, gchar *, 4); pcUrl = g_array_index(arRow, gchar *, 5); pcTopic = g_strdup_printf(_("Name : %s\n\nDescription :\n\n%s\n\nSample :\n\n%s\n\nUrl : %s\n"), pcName, pcDescription, pcSample, pcUrl); txtBuffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(pGmlcGuiSrvTabHelp->txvHelpTopic)); gtk_text_buffer_set_text(txtBuffer, pcTopic, -1); gmlc_mysql_query_free_record_content(arRow); g_free(pcTopic); } g_free(pcSql); g_object_unref(G_OBJECT(pGmlcMysqlQry)); } void gmlc_gui_server_tab_help_evt_trvHelpCategories_selected (GtkTreeSelection *selection, gpointer user_data) { GmlcGuiServerTabHelp * pGmlcGuiSrvTabHelp = GMLC_GUI_SERVER_TAB_HELP(user_data); GtkTreeIter iter; GtkTreeModel *model; if (gtk_tree_selection_get_selected (selection, &model, &iter)) { gtk_tree_model_get (model, &iter, 1, &pGmlcGuiSrvTabHelp->iCurrentCategory, -1); gmlc_gui_server_tab_help_fill_help_topic_list(pGmlcGuiSrvTabHelp); } } void gmlc_gui_server_tab_help_evt_trvHelpTopics_selected (GtkTreeSelection *selection, gpointer user_data) { GmlcGuiServerTabHelp * pGmlcGuiSrvTabHelp = GMLC_GUI_SERVER_TAB_HELP(user_data); GtkTreeIter iter; GtkTreeModel *model; if (gtk_tree_selection_get_selected (selection, &model, &iter)) { gtk_tree_model_get (model, &iter, 1, &pGmlcGuiSrvTabHelp->iCurrentTopic, -1); gmlc_gui_server_tab_help_display_help_topic(pGmlcGuiSrvTabHelp); } } void gmlc_gui_server_tab_help_evt_btnHelpSearch_clicked (GtkWidget *widget, gpointer user_data) { GmlcGuiServerTabHelp * pGmlcGuiSrvTabHelp = GMLC_GUI_SERVER_TAB_HELP(user_data); gmlc_gui_server_tab_help_fill_help_topic_list_from_search(pGmlcGuiSrvTabHelp); } gmysqlcc-0.3.0/src/gmlc_misc_hashtable.c0000644000175000017500000000363510755301563015174 00000000000000/* * 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 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, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "gmlc_misc_hashtable.h" gboolean gmlc_misc_hash_table_set_flag(GHashTable * htbLstObjects, gpointer pValue, gboolean bNewValue) { GObject * oDataItem = NULL; oDataItem = g_hash_table_lookup(htbLstObjects, pValue); g_object_set(oDataItem, "flagged", bNewValue, NULL); return TRUE; } gboolean gmlc_misc_hash_table_set_all_flag(GHashTable * htbLstObjects, gboolean bNewValue) { void internal_gmlc_misc_hash_table_set_flag (gpointer key, gpointer value, gpointer user_data) { GObject * oDataItem = G_OBJECT(value); gboolean bFlag = *((gboolean *)user_data); g_object_set(oDataItem, "flagged", bFlag, NULL); } g_hash_table_foreach(htbLstObjects, &internal_gmlc_misc_hash_table_set_flag, &bNewValue); return TRUE; } gboolean gmlc_misc_hash_table_remove_unflag_object(GHashTable * htbLstObjects) { gboolean internal_gmlc_misc_hash_table_remove_unflag_object (gpointer key, gpointer value, gpointer user_data) { GObject * oDataItem = G_OBJECT(value); gboolean bFlag = FALSE; g_object_get(oDataItem, "flagged", &bFlag, NULL); return !bFlag; } g_hash_table_foreach_remove(htbLstObjects, &internal_gmlc_misc_hash_table_remove_unflag_object, NULL); return TRUE; } gmysqlcc-0.3.0/ChangeLog0000644000175000017500000006306410755301562012044 00000000000000------------------------------------------------------------------------ r147 | pozer | 2007-07-26 18:02:00 +0200 (Thu, 26 Jul 2007) | 5 lines Update version number of gmysqlcc (to 0.3.0) Remove ES language ------------------------------------------------------------------------ r146 | pozer | 2007-07-26 17:57:49 +0200 (Thu, 26 Jul 2007) | 4 lines Update GPL Licence tag ------------------------------------------------------------------------ r145 | pozer | 2007-07-26 17:56:57 +0200 (Thu, 26 Jul 2007) | 4 lines Update translations files (only UK & FR) ------------------------------------------------------------------------ r144 | pozer | 2007-06-26 17:53:37 +0200 (Tue, 26 Jun 2007) | 4 lines * Activate context menus for views/functions/procedures ------------------------------------------------------------------------ r143 | pozer | 2007-06-26 16:17:50 +0200 (Tue, 26 Jun 2007) | 4 lines * If some text is selected, use it as SQL to execute or to duplicate ------------------------------------------------------------------------ r142 | pozer | 2007-06-26 15:53:19 +0200 (Tue, 26 Jun 2007) | 4 lines * Update function that test if there is a write command in the list of query ------------------------------------------------------------------------ r141 | pozer | 2007-06-25 16:25:05 +0200 (Mon, 25 Jun 2007) | 4 lines * Update list of files for translations ------------------------------------------------------------------------ r140 | pozer | 2007-06-25 11:00:31 +0200 (Mon, 25 Jun 2007) | 7 lines * Result tabs are now scrollable * Tables actions is now working * Tables list refresh tables infos * Update table/view/procedure/function objects to return SQL to create/alter/drop ------------------------------------------------------------------------ r139 | pozer | 2007-06-15 18:07:39 +0200 (Fri, 15 Jun 2007) | 4 lines * Prepare the dump feature and add action about database (add, alter,drop) by opening a tab with the sql order inside ------------------------------------------------------------------------ r138 | pozer | 2007-06-15 11:33:01 +0200 (Fri, 15 Jun 2007) | 5 lines * Replace toolbars of the server window by hboxes with buttons to control the position of the buttons * Bug corrected : When a sql error append in the 2nd (or after), it stop to work silently and not display any error message box ------------------------------------------------------------------------ r137 | pozer | 2007-06-15 08:45:46 +0200 (Fri, 15 Jun 2007) | 3 lines * Add Interface to generate create, alter and drop sql commands ------------------------------------------------------------------------ r136 | pozer | 2007-06-14 10:41:15 +0200 (Thu, 14 Jun 2007) | 4 lines * Remove references to gmlc_gui_query.h ------------------------------------------------------------------------ r135 | pozer | 2007-06-13 15:41:13 +0200 (Wed, 13 Jun 2007) | 1 line * Remove old source files ------------------------------------------------------------------------ r134 | pozer | 2007-06-13 15:38:41 +0200 (Wed, 13 Jun 2007) | 1 line * Remove query window (we use tabs now) ------------------------------------------------------------------------ r133 | pozer | 2007-06-13 15:36:33 +0200 (Wed, 13 Jun 2007) | 4 lines * 'Close tab' button into query toolbar ------------------------------------------------------------------------ r132 | pozer | 2007-06-13 08:37:02 +0200 (Wed, 13 Jun 2007) | 3 lines * tabs are scrollable and can be reorganized ------------------------------------------------------------------------ r131 | pozer | 2007-06-12 18:25:22 +0200 (Tue, 12 Jun 2007) | 5 lines * Now, we didn't open a new window for each query but we add a new tab in the server window * Next step, add a close button for query tabs and add reorderable and scrollable notebook ------------------------------------------------------------------------ r130 | pozer | 2007-06-12 08:39:28 +0200 (Tue, 12 Jun 2007) | 3 lines * Adding skeleton object for the query tab ------------------------------------------------------------------------ r129 | pozer | 2007-06-11 18:07:19 +0200 (Mon, 11 Jun 2007) | 7 lines * Create an interface gmlc_gui_server_tab to manage the common toolbar * Rewrite each tab as an object that implement the interface gmlc_gui_server_tab * Rewrite server window code to use new objects * Now toolbar buttons 'Sql' and 'Sql file' are displayed only when the tab 'Database' is selected ------------------------------------------------------------------------ r128 | pozer | 2007-06-06 18:21:02 +0200 (Wed, 06 Jun 2007) | 5 lines * Hide connexion window when a server is choosed * Show connexion window with toolbar buttons ------------------------------------------------------------------------ r127 | pozer | 2007-04-16 23:35:18 +0200 (Mon, 16 Apr 2007) | 3 lines Update project information ------------------------------------------------------------------------ r126 | pozer | 2007-04-16 23:33:18 +0200 (Mon, 16 Apr 2007) | 4 lines * Display Tables/Views/Procedures/Functions in separate lists if mysql version >= 5.0.1 * For tables, call correctly query window ------------------------------------------------------------------------ r125 | pozer | 2007-02-02 08:50:49 +0100 (Fri, 02 Feb 2007) | 3 lines Query window work correctly ------------------------------------------------------------------------ r124 | pozer | 2007-01-21 11:37:08 +0100 (Sun, 21 Jan 2007) | 1 line Last step before display results into GUI part ------------------------------------------------------------------------ r123 | pozer | 2007-01-07 20:18:39 +0100 (Sun, 07 Jan 2007) | 4 lines Complete rewrite of gmysqlcc but not complete. For now only config read/write and server list work no query execution yet ------------------------------------------------------------------------ r122 | pozer | 2007-01-07 20:13:40 +0100 (Sun, 07 Jan 2007) | 3 lines Very minor fix :) ------------------------------------------------------------------------ r121 | pozer | 2007-01-07 20:12:09 +0100 (Sun, 07 Jan 2007) | 3 lines very minor fix :) ------------------------------------------------------------------------ r120 | pozer | 2006-09-24 22:07:45 +0200 (Sun, 24 Sep 2006) | 2 lines Update version value ------------------------------------------------------------------------ r119 | pozer | 2006-09-24 22:07:24 +0200 (Sun, 24 Sep 2006) | 2 lines Add managment of the font for help text view and query text views ------------------------------------------------------------------------ r118 | pozer | 2006-09-24 22:06:23 +0200 (Sun, 24 Sep 2006) | 2 lines Update calculation method of server version number ------------------------------------------------------------------------ r117 | pozer | 2006-09-24 22:02:08 +0200 (Sun, 24 Sep 2006) | 3 lines Updating language files ------------------------------------------------------------------------ r116 | pozer | 2006-03-01 14:35:34 +0100 (Wed, 01 Mar 2006) | 4 lines Hidding List server window when connecting to a server Adding a toolbar button to display the List server window in server window and in query window ------------------------------------------------------------------------ r115 | pozer | 2006-03-01 14:27:24 +0100 (Wed, 01 Mar 2006) | 3 lines Using glib gnu gettext library ------------------------------------------------------------------------ r114 | pozer | 2005-10-26 15:05:45 +0200 (Wed, 26 Oct 2005) | 3 lines Reorganize server window and add help tab for server > 4.1.0 ------------------------------------------------------------------------ r113 | pozer | 2005-10-26 06:17:55 +0200 (Wed, 26 Oct 2005) | 3 lines Add icons and desktop files for gmysqlcc (Ok the icon is just a sample ... :)) ------------------------------------------------------------------------ r112 | pozer | 2005-10-25 10:43:54 +0200 (Tue, 25 Oct 2005) | 3 lines Move glade files in a directory ------------------------------------------------------------------------ r111 | pozer | 2005-10-20 15:31:58 +0200 (Thu, 20 Oct 2005) | 3 lines Correct bug when you refresh database list ------------------------------------------------------------------------ r110 | pozer | 2005-09-06 14:41:10 +0200 (Tue, 06 Sep 2005) | 4 lines Remove intl directory I put an empty directory and an empty makefile to remove compilation errors ------------------------------------------------------------------------ r109 | pozer | 2005-09-06 14:39:36 +0200 (Tue, 06 Sep 2005) | 3 lines Remove 'fuzzy' tag on 2 spanish translations ------------------------------------------------------------------------ r108 | pozer | 2005-09-06 13:42:32 +0200 (Tue, 06 Sep 2005) | 3 lines Update spanish transaltion ------------------------------------------------------------------------ r107 | pozer | 2005-08-25 16:40:41 +0200 (Thu, 25 Aug 2005) | 4 lines Update list of translated strings UK and FR country updated ------------------------------------------------------------------------ r106 | pozer | 2005-08-25 15:50:39 +0200 (Thu, 25 Aug 2005) | 3 lines Remove last warnings ------------------------------------------------------------------------ r105 | pozer | 2005-08-25 15:23:00 +0200 (Thu, 25 Aug 2005) | 3 lines Remove IO_Channel warnings ------------------------------------------------------------------------ r104 | pozer | 2005-08-23 16:54:56 +0200 (Tue, 23 Aug 2005) | 3 lines Prepare new version ------------------------------------------------------------------------ r103 | pozer | 2005-08-23 16:54:25 +0200 (Tue, 23 Aug 2005) | 3 lines Add apply button for max_xx fields and ssl fields ------------------------------------------------------------------------ r102 | pozer | 2005-08-12 17:07:17 +0200 (Fri, 12 Aug 2005) | 4 lines Add es in linguas var to access to spanish translation Update selected value in ssl_type combo box in sll tab sll ------------------------------------------------------------------------ r101 | pozer | 2005-08-11 17:01:56 +0200 (Thu, 11 Aug 2005) | 5 lines Limit right edition to user and database (too complex not usable to edit table and column rights) Split user rights in two tabs (to easyly edit ssl/x509 fields) ------------------------------------------------------------------------ r100 | pozer | 2005-08-11 16:59:41 +0200 (Thu, 11 Aug 2005) | 4 lines Adding Spanish translation from mariodebian ------------------------------------------------------------------------ r99 | pozer | 2005-06-16 16:53:30 +0200 (Thu, 16 Jun 2005) | 3 lines Correct Delete database rights segfault Add Table rights features (Add, Update, Delete) ------------------------------------------------------------------------ r98 | pozer | 2005-06-10 17:19:43 +0200 (Fri, 10 Jun 2005) | 4 lines Create new database rights for a user Update database rigths Delete database rights (segfault) ------------------------------------------------------------------------ r97 | pozer | 2005-06-08 17:34:32 +0200 (Wed, 08 Jun 2005) | 4 lines Move mysql_user_list functions in mysql_user Add object to store all types of rights Display databases rights of a user ------------------------------------------------------------------------ r96 | pozer | 2005-06-07 15:36:36 +0200 (Tue, 07 Jun 2005) | 1 line Update GUI to manage all types of rights (user, database, table, column) ------------------------------------------------------------------------ r95 | pozer | 2005-06-03 10:22:20 +0200 (Fri, 03 Jun 2005) | 2 lines now you can update user rights ------------------------------------------------------------------------ r94 | pozer | 2005-06-02 17:17:27 +0200 (Thu, 02 Jun 2005) | 3 lines Add Basic update and delete for users ------------------------------------------------------------------------ r93 | pozer | 2005-06-02 00:26:51 +0200 (Thu, 02 Jun 2005) | 2 lines Basic add user work ------------------------------------------------------------------------ r92 | pozer | 2005-06-01 17:23:06 +0200 (Wed, 01 Jun 2005) | 3 lines Modifying list filling method ... NOT WORK : First version of basic add user features ------------------------------------------------------------------------ r91 | pozer | 2005-05-31 16:42:46 +0200 (Tue, 31 May 2005) | 1 line Rename data list files ------------------------------------------------------------------------ r90 | pozer | 2005-05-31 16:27:54 +0200 (Tue, 31 May 2005) | 1 line data_list structure should be ok now ... ------------------------------------------------------------------------ r89 | pozer | 2005-05-30 09:58:33 +0200 (Mon, 30 May 2005) | 2 lines Update ignored file and remove old CVS ignore file ------------------------------------------------------------------------ r88 | pozer | 2005-05-30 00:44:03 +0200 (Mon, 30 May 2005) | 3 lines add base system to manage MySQL users Just listing now ... ------------------------------------------------------------------------ r86 | pozer | 2005-05-22 22:46:37 +0200 (Sun, 22 May 2005) | 1 line Update version number ------------------------------------------------------------------------ r85 | pozer | 2005-05-22 22:41:37 +0200 (Sun, 22 May 2005) | 1 line seg fault bug - ticket:10 ------------------------------------------------------------------------ r83 | pozer | 2005-05-09 14:22:22 +0200 (Mon, 09 May 2005) | 1 line Update doc for version 0.2.4 ------------------------------------------------------------------------ r82 | pozer | 2005-05-06 23:24:11 +0200 (Fri, 06 May 2005) | 1 line Update translations ------------------------------------------------------------------------ r81 | pozer | 2005-05-06 14:18:47 +0200 (Fri, 06 May 2005) | 1 line Display bad infos in table list - ticket:9 ------------------------------------------------------------------------ r80 | pozer | 2005-05-03 15:34:41 +0200 (Tue, 03 May 2005) | 1 line Force lists in bicolor mode - ticket:4 ------------------------------------------------------------------------ r79 | pozer | 2005-04-18 13:42:31 +0200 (Mon, 18 Apr 2005) | 3 lines - correct exec from text bug - Remove thread code ------------------------------------------------------------------------ r78 | pozer | 2005-04-08 15:48:57 +0200 (Fri, 08 Apr 2005) | 2 lines Merge with 0.2.3 branch (bis) ------------------------------------------------------------------------ r77 | pozer | 2005-04-08 09:45:43 +0200 (Fri, 08 Apr 2005) | 2 lines Merge with 0.2.3 branch ------------------------------------------------------------------------ r70 | pozer | 2005-03-15 16:38:38 +0100 (Tue, 15 Mar 2005) | 2 lines Correct some bugs and try to use gthread ------------------------------------------------------------------------ r69 | pozer | 2005-03-09 08:21:01 +0100 (Wed, 09 Mar 2005) | 2 lines Rewrite all dump code and add system to execute SQL file ------------------------------------------------------------------------ r68 | pozer | 2005-02-08 00:54:23 +0100 (Tue, 08 Feb 2005) | 2 lines readd gtk_tooltips_new call - I dont know I remove this line :( ------------------------------------------------------------------------ r67 | pozer | 2005-02-07 14:43:18 +0100 (Mon, 07 Feb 2005) | 2 lines Correct bug about servers list refresh ------------------------------------------------------------------------ r66 | pozer | 2005-01-11 18:02:33 +0100 (Tue, 11 Jan 2005) | 2 lines reenable display structure features - WARNING Bug ------------------------------------------------------------------------ r65 | pozer | 2005-01-10 17:44:18 +0100 (Mon, 10 Jan 2005) | 2 lines Add toolbar button to show/hide the servers edition part ------------------------------------------------------------------------ r64 | pozer | 2005-01-07 11:21:09 +0100 (Fri, 07 Jan 2005) | 2 lines Manage completly read_only and write warning Flags ------------------------------------------------------------------------ r63 | pozer | 2005-01-05 17:48:17 +0100 (Wed, 05 Jan 2005) | 2 lines Add server read_only and write_warning flags in configuration ------------------------------------------------------------------------ r62 | pozer | 2005-01-05 12:05:04 +0100 (Wed, 05 Jan 2005) | 2 lines New path for config files : /home/xxx/.config/gmysqlcc/ ------------------------------------------------------------------------ r61 | pozer | 2005-01-01 20:29:00 +0100 (Sat, 01 Jan 2005) | 2 lines Normalize functions and files names ------------------------------------------------------------------------ r60 | pozer | 2004-12-08 14:14:41 +0100 (Wed, 08 Dec 2004) | 2 lines Replace gmysqlcc.c by gmysqlcc_main.c ------------------------------------------------------------------------ r59 | pozer | 2004-12-06 17:40:00 +0100 (Mon, 06 Dec 2004) | 2 lines BROKEN - Use Dialog instead of a window for the dump ------------------------------------------------------------------------ r58 | pozer | 2004-12-03 16:53:57 +0100 (Fri, 03 Dec 2004) | 2 lines Rewrite all dump code ------------------------------------------------------------------------ r56 | pozer | 2004-12-03 16:38:17 +0100 (Fri, 03 Dec 2004) | 2 lines Update version number ------------------------------------------------------------------------ r55 | pozer | 2004-11-30 10:30:27 +0100 (Tue, 30 Nov 2004) | 2 lines use right parameters for mysql cflags ------------------------------------------------------------------------ r54 | pozer | 2004-11-29 17:25:49 +0100 (Mon, 29 Nov 2004) | 2 lines Add slackware package infos ------------------------------------------------------------------------ r53 | pozer | 2004-11-29 16:50:18 +0100 (Mon, 29 Nov 2004) | 2 lines Add debian package infos ------------------------------------------------------------------------ r52 | pozer | 2004-11-29 15:22:05 +0100 (Mon, 29 Nov 2004) | 2 lines Update lib mysql client detection - using mysql_config ------------------------------------------------------------------------ r51 | pozer | 2004-10-26 15:28:48 +0200 (Tue, 26 Oct 2004) | 2 lines Modify system to open query window from server window ------------------------------------------------------------------------ r49 | pozer | 2004-10-20 14:00:11 +0200 (Wed, 20 Oct 2004) | 2 lines Correct core dump (double g_free :)) and disable Dump in XML and CVS format (only dump in SQL) ------------------------------------------------------------------------ r48 | pozer | 2004-10-20 13:44:22 +0200 (Wed, 20 Oct 2004) | 2 lines Update locale files ------------------------------------------------------------------------ r47 | pozer | 2004-10-20 13:44:03 +0200 (Wed, 20 Oct 2004) | 2 lines locale work again ------------------------------------------------------------------------ r46 | pozer | 2004-10-12 17:37:23 +0200 (Tue, 12 Oct 2004) | 2 lines Add icon on buttons in server window ------------------------------------------------------------------------ r45 | pozer | 2004-10-08 14:28:23 +0200 (Fri, 08 Oct 2004) | 2 lines Correct segfault bug ------------------------------------------------------------------------ r44 | pozer | 2004-09-28 13:19:31 +0200 (Tue, 28 Sep 2004) | 2 lines Remove big memory leak ------------------------------------------------------------------------ r43 | pozer | 2004-09-21 17:46:01 +0200 (Tue, 21 Sep 2004) | 2 lines Display DB structure ------------------------------------------------------------------------ r42 | pozer | 2004-09-21 15:51:58 +0200 (Tue, 21 Sep 2004) | 2 lines Update version to 0.2.2 ------------------------------------------------------------------------ r41 | pozer | 2004-09-21 15:05:21 +0200 (Tue, 21 Sep 2004) | 2 lines Add Dislpay database strucure function ------------------------------------------------------------------------ r40 | pozer | 2004-09-13 17:54:20 +0200 (Mon, 13 Sep 2004) | 2 lines add user list function to the server object ------------------------------------------------------------------------ r39 | pozer | 2004-09-13 17:53:44 +0200 (Mon, 13 Sep 2004) | 2 lines Correct bug about table dump ------------------------------------------------------------------------ r38 | pozer | 2004-09-13 17:53:22 +0200 (Mon, 13 Sep 2004) | 2 lines Correct bug about iconv translation ------------------------------------------------------------------------ r37 | pozer | 2004-09-13 17:52:31 +0200 (Mon, 13 Sep 2004) | 2 lines update call about xml dump ------------------------------------------------------------------------ r36 | pozer | 2004-09-13 17:52:07 +0200 (Mon, 13 Sep 2004) | 2 lines update call about xml dump and add user list function to the server object ------------------------------------------------------------------------ r35 | pozer | 2004-09-13 17:49:44 +0200 (Mon, 13 Sep 2004) | 2 lines Add GtkSourceView control ------------------------------------------------------------------------ r34 | pozer | 2004-09-13 17:48:33 +0200 (Mon, 13 Sep 2004) | 2 lines use GTK+ 2.4 Save file dialog and update call about xml dump ------------------------------------------------------------------------ r33 | pozer | 2004-09-13 17:43:07 +0200 (Mon, 13 Sep 2004) | 2 lines Add GtkSourceView control ------------------------------------------------------------------------ r32 | pozer | 2004-08-05 14:54:39 +0200 (Thu, 05 Aug 2004) | 2 lines Update GUI glade file ------------------------------------------------------------------------ r31 | pozer | 2004-08-05 14:53:53 +0200 (Thu, 05 Aug 2004) | 2 lines Update file list ------------------------------------------------------------------------ r30 | pozer | 2004-08-05 14:52:43 +0200 (Thu, 05 Aug 2004) | 2 lines Add Text window to display SHOW CREATE TABLE content ------------------------------------------------------------------------ r29 | pozer | 2004-08-04 13:56:48 +0200 (Wed, 04 Aug 2004) | 2 lines Add context menu to display table structure ------------------------------------------------------------------------ r28 | pozer | 2004-08-03 16:38:50 +0200 (Tue, 03 Aug 2004) | 2 lines Update mysql_query_execute_query call and merge all GUI include into gmysql_gui.h ------------------------------------------------------------------------ r27 | pozer | 2004-08-03 16:37:25 +0200 (Tue, 03 Aug 2004) | 2 lines Add user object ------------------------------------------------------------------------ r25 | pozer | 2004-07-02 13:06:52 +0200 (Fri, 02 Jul 2004) | 2 lines Add Default Local socket ------------------------------------------------------------------------ r24 | pozer | 2004-07-02 13:05:56 +0200 (Fri, 02 Jul 2004) | 2 lines Remove compilation warning ------------------------------------------------------------------------ r23 | pozer | 2004-07-02 09:34:55 +0200 (Fri, 02 Jul 2004) | 2 lines add config.h.in ------------------------------------------------------------------------ r22 | pozer | 2004-06-28 17:58:48 +0200 (Mon, 28 Jun 2004) | 2 lines Update translations ------------------------------------------------------------------------ r21 | pozer | 2004-06-25 16:49:36 +0200 (Fri, 25 Jun 2004) | 2 lines Update toolbar code ------------------------------------------------------------------------ r20 | pozer | 2004-06-25 16:46:00 +0200 (Fri, 25 Jun 2004) | 2 lines Correct typo ------------------------------------------------------------------------ r19 | pozer | 2004-06-25 11:18:03 +0200 (Fri, 25 Jun 2004) | 2 lines set Gettext charset ------------------------------------------------------------------------ r18 | pozer | 2004-06-22 17:45:18 +0200 (Tue, 22 Jun 2004) | 2 lines Using anjuta to manage the project and use gettext ------------------------------------------------------------------------ r17 | pozer | 2004-06-22 17:44:33 +0200 (Tue, 22 Jun 2004) | 2 lines Add display charset for query window, add output charset for dump window, add _() for gettext ------------------------------------------------------------------------ r16 | pozer | 2004-06-09 17:56:50 +0200 (Wed, 09 Jun 2004) | 2 lines Choose dump output charset ------------------------------------------------------------------------ r15 | pozer | 2004-06-09 17:56:09 +0200 (Wed, 09 Jun 2004) | 2 lines Small bug about socket file name ------------------------------------------------------------------------ r14 | pozer | 2004-06-09 12:43:10 +0200 (Wed, 09 Jun 2004) | 2 lines Modify fileSelector title for Dump ------------------------------------------------------------------------ r13 | pozer | 2004-06-09 12:42:22 +0200 (Wed, 09 Jun 2004) | 2 lines Add basic localhost socket support (does not check in mysql config) ------------------------------------------------------------------------ r12 | pozer | 2004-06-09 12:41:31 +0200 (Wed, 09 Jun 2004) | 2 lines Move fieldTypeCapabilities functions into gmysql_utils files ------------------------------------------------------------------------ r11 | pozer | 2004-06-07 10:00:58 +0200 (Mon, 07 Jun 2004) | 2 lines include header files ------------------------------------------------------------------------ r9 | pozer | 2004-06-04 15:32:27 +0200 (Fri, 04 Jun 2004) | 2 lines Scrolling follow selected server when you move up/down it in the list ------------------------------------------------------------------------ r8 | pozer | 2004-06-04 15:22:14 +0200 (Fri, 04 Jun 2004) | 2 lines ignore autoconf/automake files ------------------------------------------------------------------------ r7 | pozer | 2004-06-04 13:55:51 +0200 (Fri, 04 Jun 2004) | 2 lines Remove unneeded file ------------------------------------------------------------------------ r6 | pozer | 2004-06-04 13:53:45 +0200 (Fri, 04 Jun 2004) | 2 lines Update documentations ------------------------------------------------------------------------ r5 | pozer | 2004-06-04 13:31:24 +0200 (Fri, 04 Jun 2004) | 2 lines Update documentations ------------------------------------------------------------------------ r2 | pozer | 2004-06-04 13:05:35 +0200 (Fri, 04 Jun 2004) | 2 lines Initial revision ------------------------------------------------------------------------ r1 | (no author) | 2004-06-04 13:05:35 +0200 (Fri, 04 Jun 2004) | 1 line New repository initialized by cvs2svn. ------------------------------------------------------------------------ gmysqlcc-0.3.0/depcomp0000755000175000017500000004224610755301563011647 00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2006-10-15.18 # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006 Free Software # Foundation, Inc. # 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. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by `PROGRAMS ARGS'. object Object file output by `PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputing dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the `deleted header file' problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' ' ' < "$tmpdepfile" | ## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as ## well. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like `#:fec' to the end of the # dependency line. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' ' ' ' >> $depfile echo >> $depfile # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> $depfile else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts `$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'` tmpdepfile="$stripped.u" if test "$libtool" = yes; then "$@" -Wc,-M else "$@" -M fi stat=$? if test -f "$tmpdepfile"; then : else stripped=`echo "$stripped" | sed 's,^.*/,,'` tmpdepfile="$stripped.u" fi if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi if test -f "$tmpdepfile"; then outname="$stripped.o" # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; icc) # Intel's C compiler understands `-MD -MF file'. However on # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h # which is wrong. We want: # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using \ : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" # Add `dependent.h:' lines. sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in `foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then # With Tru64 cc, shared objects can also be used to make a # static library. This mechanism is used in libtool 1.4 series to # handle both shared and static libraries in a single compilation. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # # With libtool 1.5 this exception was removed, and libtool now # generates 2 separate objects for the 2 libraries. These two # compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 tmpdepfile2=$dir$base.o.d # libtool 1.5 tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.o.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d tmpdepfile4=$dir$base.d "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for `:' # in the target name. This is to cope with DOS-style filenames: # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. "$@" $dashmflag | sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # X makedepend shift cleared=no for arg in "$@"; do case $cleared in no) set ""; shift cleared=yes ;; esac case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix="`echo $object | sed 's/^.*\././'`" touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o, # because we must use -o when running libtool. "$@" || exit $? IFS=" " for arg do case "$arg" in "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: gmysqlcc-0.3.0/INSTALL0000644000175000017500000000133510755301562011314 00000000000000Installation of gmysqlcc from source * Download from site To download gmysqlcc from site, go to download section. http://gmysqlcc.thepozer.org/cgi-bin/trac.cgi/wiki/EnDownloadArea * Download from Subversion To download gmysqlcc via Subversion, type these commands in a terminal : $ svn co http://gmysqlcc.thepozer.org/svn/trunk gmysqlcc * Compile and Install If you have got source from CVS, you need to do some steps before in gmysqlcc directory : $ aclocale $ automake -a -c $ autoconf These steps generate the configure script. If you have downloaded the source package, start here. Now it's generics configure's steps : $ ./configure $ make To install gmysqlcc, you need to be root. Just type : $ make install gmysqlcc-0.3.0/ltmain.sh0000644000175000017500000054701010755301562012110 00000000000000# ltmain.sh - Provide generalized library-building support services. # NOTE: Changing this file will not affect anything until you rerun configure. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004 # Free Software Foundation, Inc. # Originally by Gordon Matzigkeit , 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 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, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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. basename="s,^.*/,,g" # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh # is ksh but when the shell is invoked as "sh" and the current value of # the _XPG environment variable is not equal to 1 (one), the special # positional parameter $0, within a function call, is the name of the # function. progpath="$0" # The name of this program: progname=`echo "$progpath" | $SED $basename` modename="$progname" # Global variables: EXIT_SUCCESS=0 EXIT_FAILURE=1 PROGRAM=ltmain.sh PACKAGE=libtool VERSION=1.5.6 TIMESTAMP=" (1.1220.2.95 2004/04/11 05:50:42) Debian$Rev: 123 $" # Check that we have a working $echo. if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then # Yippee, $echo works! : else # Restart under the correct shell, and then maybe $echo will work. exec $SHELL "$progpath" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat <&2 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 exit $EXIT_FAILURE fi # Global variables. mode=$default_mode nonopt= prev= prevopt= run= show="$echo" show_help= execute_dlfiles= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" ##################################### # Shell function definitions: # This seems to be the best place for them # func_win32_libid arg # return the library type of file 'arg' # # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. func_win32_libid () { win32_libid_type="unknown" win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \ $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then win32_nmres=`eval $NM -f posix -A $1 | \ sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'` if test "X$win32_nmres" = "Ximport" ; then win32_libid_type="x86 archive import" else win32_libid_type="x86 archive static" fi fi ;; *DLL*) win32_libid_type="x86 DLL" ;; *executable*) # but shell scripts are "executable" too... case $win32_fileres in *MS\ Windows\ PE\ Intel*) win32_libid_type="x86 DLL" ;; esac ;; esac $echo $win32_libid_type } # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. # Only attempt this if the compiler in the base compile # command doesn't match the default compiler. # arg is usually of the form 'gcc ...' func_infer_tag () { if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac CC_quoted="$CC_quoted $arg" done case $@ in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) for z in $available_tags; do if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac CC_quoted="$CC_quoted $arg" done case "$@ " in " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. tagname=$z break ;; esac fi done # If $tagname still isn't set, then no tagged configuration # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then $echo "$modename: unable to infer tagged configuration" $echo "$modename: specify a tag with \`--tag'" 1>&2 exit $EXIT_FAILURE # else # $echo "$modename: using $tagname tagged configuration" fi ;; esac fi } # End of Shell function definitions ##################################### # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Parse our command line options once, thoroughly. while test "$#" -gt 0 do arg="$1" shift case $arg in -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; *) optarg= ;; esac # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in execute_dlfiles) execute_dlfiles="$execute_dlfiles $arg" ;; tag) tagname="$arg" preserve_args="${preserve_args}=$arg" # Check whether tagname contains only valid characters case $tagname in *[!-_A-Za-z0-9,/]*) $echo "$progname: invalid tag name: $tagname" 1>&2 exit $EXIT_FAILURE ;; esac case $tagname in CC) # Don't test for the "default" C tag, as we know, it's there, but # not specially marked. ;; *) if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then taglist="$taglist $tagname" # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`" else $echo "$progname: ignoring unknown tag $tagname" 1>&2 fi ;; esac ;; *) eval "$prev=\$arg" ;; esac prev= prevopt= continue fi # Have we seen a non-optional argument yet? case $arg in --help) show_help=yes ;; --version) $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP" $echo $echo "Copyright (C) 2003 Free Software Foundation, Inc." $echo "This is free software; see the source for copying conditions. There is NO" $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." exit $EXIT_SUCCESS ;; --config) ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath # Now print the configurations for the tags. for tagname in $taglist; do ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath" done exit $EXIT_SUCCESS ;; --debug) $echo "$progname: enabling shell trace mode" set -x preserve_args="$preserve_args $arg" ;; --dry-run | -n) run=: ;; --features) $echo "host: $host" if test "$build_libtool_libs" = yes; then $echo "enable shared libraries" else $echo "disable shared libraries" fi if test "$build_old_libs" = yes; then $echo "enable static libraries" else $echo "disable static libraries" fi exit $EXIT_SUCCESS ;; --finish) mode="finish" ;; --mode) prevopt="--mode" prev=mode ;; --mode=*) mode="$optarg" ;; --preserve-dup-deps) duplicate_deps="yes" ;; --quiet | --silent) show=: preserve_args="$preserve_args $arg" ;; --tag) prevopt="--tag" prev=tag ;; --tag=*) set tag "$optarg" ${1+"$@"} shift prev=tag preserve_args="$preserve_args --tag" ;; -dlopen) prevopt="-dlopen" prev=execute_dlfiles ;; -*) $echo "$modename: unrecognized option \`$arg'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; *) nonopt="$arg" break ;; esac done if test -n "$prevopt"; then $echo "$modename: option \`$prevopt' requires an argument" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # If this variable is set in any of the actions, the command in it # will be execed at the end. This prevents here-documents from being # left over by shells. exec_cmd= if test -z "$show_help"; then # Infer the operation mode. if test -z "$mode"; then $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2 $echo "*** Future versions of Libtool will require -mode=MODE be specified." 1>&2 case $nonopt in *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*) mode=link for arg do case $arg in -c) mode=compile break ;; esac done ;; *db | *dbx | *strace | *truss) mode=execute ;; *install*|cp|mv) mode=install ;; *rm) mode=uninstall ;; *) # If we have no mode, but dlfiles were specified, then do execute mode. test -n "$execute_dlfiles" && mode=execute # Just use the default operation mode. if test -z "$mode"; then if test -n "$nonopt"; then $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2 else $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2 fi fi ;; esac fi # Only execute mode is allowed to have -dlopen flags. if test -n "$execute_dlfiles" && test "$mode" != execute; then $echo "$modename: unrecognized option \`-dlopen'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help="$help" help="Try \`$modename --help --mode=$mode' for more information." # These modes are in order of execution frequency so that they run quickly. case $mode in # libtool compile mode compile) modename="$modename: compile" # Get the compilation command and the source file. base_compile= srcfile="$nonopt" # always keep a non-empty value in "srcfile" suppress_opt=yes suppress_output= arg_mode=normal libobj= later= for arg do case "$arg_mode" in arg ) # do not "continue". Instead, add this to base_compile lastarg="$arg" arg_mode=normal ;; target ) libobj="$arg" arg_mode=normal continue ;; normal ) # Accept any command-line options. case $arg in -o) if test -n "$libobj" ; then $echo "$modename: you cannot specify \`-o' more than once" 1>&2 exit $EXIT_FAILURE fi arg_mode=target continue ;; -static | -prefer-pic | -prefer-non-pic) later="$later $arg" continue ;; -no-suppress) suppress_opt=no continue ;; -Xcompiler) arg_mode=arg # the next one goes into the "base_compile" arg list continue # The current "srcfile" will either be retained or ;; # replaced later. I would guess that would be a bug. -Wc,*) args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` lastarg= save_ifs="$IFS"; IFS=',' for arg in $args; do IFS="$save_ifs" # Double-quote args containing other shell metacharacters. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac lastarg="$lastarg $arg" done IFS="$save_ifs" lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"` # Add the arguments to base_compile. base_compile="$base_compile $lastarg" continue ;; * ) # Accept the current argument as the source file. # The previous "srcfile" becomes the current argument. # lastarg="$srcfile" srcfile="$arg" ;; esac # case $arg ;; esac # case $arg_mode # Aesthetically quote the previous argument. lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` case $lastarg in # Double-quote args containing other shell metacharacters. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") lastarg="\"$lastarg\"" ;; esac base_compile="$base_compile $lastarg" done # for arg case $arg_mode in arg) $echo "$modename: you must specify an argument for -Xcompile" exit $EXIT_FAILURE ;; target) $echo "$modename: you must specify a target with \`-o'" 1>&2 exit $EXIT_FAILURE ;; *) # Get the name of the library object. [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo xform='[cCFSifmso]' case $libobj in *.ada) xform=ada ;; *.adb) xform=adb ;; *.ads) xform=ads ;; *.asm) xform=asm ;; *.c++) xform=c++ ;; *.cc) xform=cc ;; *.ii) xform=ii ;; *.class) xform=class ;; *.cpp) xform=cpp ;; *.cxx) xform=cxx ;; *.f90) xform=f90 ;; *.for) xform=for ;; *.java) xform=java ;; esac libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` case $libobj in *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; *) $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 exit $EXIT_FAILURE ;; esac func_infer_tag $base_compile for arg in $later; do case $arg in -static) build_old_libs=yes continue ;; -prefer-pic) pic_mode=yes continue ;; -prefer-non-pic) pic_mode=no continue ;; esac done objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$obj"; then xdir= else xdir=$xdir/ fi lobj=${xdir}$objdir/$objname if test -z "$base_compile"; then $echo "$modename: you must specify a compilation command" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Delete any leftover library objects. if test "$build_old_libs" = yes; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi $run $rm $removelist trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2*) pic_mode=default ;; esac if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c if test "$compiler_c_o" = no; then output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} lockfile="$output_obj.lock" removelist="$removelist $output_obj $lockfile" trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 else output_obj= need_locks=no lockfile= fi # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test "$need_locks" = yes; then until $run ln "$progpath" "$lockfile" 2>/dev/null; do $show "Waiting for $lockfile to be removed" sleep 2 done elif test "$need_locks" = warn; then if test -f "$lockfile"; then $echo "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $run $rm $removelist exit $EXIT_FAILURE fi $echo $srcfile > "$lockfile" fi if test -n "$fix_srcfile_path"; then eval srcfile=\"$fix_srcfile_path\" fi $run $rm "$libobj" "${libobj}T" # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. test -z "$run" && cat > ${libobj}T </dev/null`" != "X$srcfile"; then $echo "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $run $rm $removelist exit $EXIT_FAILURE fi # Just move the object if needed, then go on to compile the next one if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then $show "$mv $output_obj $lobj" if $run $mv $output_obj $lobj; then : else error=$? $run $rm $removelist exit $error fi fi # Append the name of the PIC object to the libtool object file. test -z "$run" && cat >> ${libobj}T <> ${libobj}T </dev/null`" != "X$srcfile"; then $echo "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $run $rm $removelist exit $EXIT_FAILURE fi # Just move the object if needed if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then $show "$mv $output_obj $obj" if $run $mv $output_obj $obj; then : else error=$? $run $rm $removelist exit $error fi fi # Append the name of the non-PIC object the libtool object file. # Only append if the libtool object file exists. test -z "$run" && cat >> ${libobj}T <> ${libobj}T <&2 fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi else if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi fi build_libtool_libs=no build_old_libs=yes prefer_static_libs=yes break ;; esac done # See if our shared archives depend on static archives. test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do arg="$1" shift case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test ;; *) qarg=$arg ;; esac libtool_args="$libtool_args $qarg" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) compile_command="$compile_command @OUTPUT@" finalize_command="$finalize_command @OUTPUT@" ;; esac case $prev in dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. compile_command="$compile_command @SYMFILE@" finalize_command="$finalize_command @SYMFILE@" preload=yes fi case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test "$dlself" = no; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test "$prev" = dlprefiles; then dlself=yes elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test "$prev" = dlfiles; then dlfiles="$dlfiles $arg" else dlprefiles="$dlprefiles $arg" fi prev= continue ;; esac ;; expsyms) export_symbols="$arg" if test ! -f "$arg"; then $echo "$modename: symbol file \`$arg' does not exist" exit $EXIT_FAILURE fi prev= continue ;; expsyms_regex) export_symbols_regex="$arg" prev= continue ;; inst_prefix) inst_prefix_dir="$arg" prev= continue ;; precious_regex) precious_files_regex="$arg" prev= continue ;; release) release="-$arg" prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat $save_arg` do # moreargs="$moreargs $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then pic_object= non_pic_object= # Read the .lo file # If there is no directory component, then add one. case $arg in */* | *\\*) . $arg ;; *) . ./$arg ;; esac if test -z "$pic_object" || \ test -z "$non_pic_object" || test "$pic_object" = none && \ test "$non_pic_object" = none; then $echo "$modename: cannot find name of object for \`$arg'" 1>&2 exit $EXIT_FAILURE fi # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then dlfiles="$dlfiles $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. dlprefiles="$dlprefiles $pic_object" prev= fi # A PIC object. libobjs="$libobjs $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object non_pic_objects="$non_pic_objects $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi fi else # Only an error if not doing a dry-run. if test -z "$run"; then $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 exit $EXIT_FAILURE else # Dry-run case. # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` libobjs="$libobjs $pic_object" non_pic_objects="$non_pic_objects $non_pic_object" fi fi done else $echo "$modename: link input file \`$save_arg' does not exist" exit $EXIT_FAILURE fi arg=$save_arg prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) $echo "$modename: only absolute run-paths are allowed" 1>&2 exit $EXIT_FAILURE ;; esac if test "$prev" = rpath; then case "$rpath " in *" $arg "*) ;; *) rpath="$rpath $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) xrpath="$xrpath $arg" ;; esac fi prev= continue ;; xcompiler) compiler_flags="$compiler_flags $qarg" prev= compile_command="$compile_command $qarg" finalize_command="$finalize_command $qarg" continue ;; xlinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $wl$qarg" prev= compile_command="$compile_command $wl$qarg" finalize_command="$finalize_command $wl$qarg" continue ;; xcclinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $qarg" prev= compile_command="$compile_command $qarg" finalize_command="$finalize_command $qarg" continue ;; shrext) shrext_cmds="$arg" prev= continue ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac fi # test -n "$prev" prevarg="$arg" case $arg in -all-static) if test -n "$link_static_flag"; then compile_command="$compile_command $link_static_flag" finalize_command="$finalize_command $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2 continue ;; -avoid-version) avoid_version=yes continue ;; -dlopen) prev=dlfiles continue ;; -dlpreopen) prev=dlprefiles continue ;; -export-dynamic) export_dynamic=yes continue ;; -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then $echo "$modename: more than one -exported-symbols argument is not allowed" exit $EXIT_FAILURE fi if test "X$arg" = "X-export-symbols"; then prev=expsyms else prev=expsyms_regex fi continue ;; -inst-prefix-dir) prev=inst_prefix continue ;; # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* # so, if we see these flags be careful not to treat them like -L -L[A-Z][A-Z]*:*) case $with_gcc/$host in no/*-*-irix* | /*-*-irix*) compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" ;; esac continue ;; -L*) dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 exit $EXIT_FAILURE fi dir="$absdir" ;; esac case "$deplibs " in *" -L$dir "*) ;; *) deplibs="$deplibs -L$dir" lib_search_path="$lib_search_path $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) case :$dllsearchpath: in *":$dir:"*) ;; *) dllsearchpath="$dllsearchpath:$dir";; esac ;; esac continue ;; -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in *-*-cygwin* | *-*-pw32* | *-*-beos*) # These systems don't actually have a C or math library (as such) continue ;; *-*-mingw* | *-*-os2*) # These systems don't actually have a C library (as such) test "X$arg" = "X-lc" && continue ;; *-*-openbsd* | *-*-freebsd*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework deplibs="$deplibs -framework System" continue esac elif test "X$arg" = "X-lc_r"; then case $host in *-*-openbsd* | *-*-freebsd*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi deplibs="$deplibs $arg" continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) deplibs="$deplibs $arg" continue ;; -module) module=yes continue ;; # gcc -m* arguments should be passed to the linker via $compiler_flags # in order to pass architecture information to the linker # (e.g. 32 vs 64-bit). This may also be accomplished via -Wl,-mfoo # but this is not reliable with gcc because gcc may use -mfoo to # select a different linker, different libraries, etc, while # -Wl,-mfoo simply passes -mfoo to the linker. -m*) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" if test "$with_gcc" = "yes" ; then compiler_flags="$compiler_flags $arg" fi continue ;; -shrext) prev=shrext continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) # The PATH hackery in wrapper scripts is required on Windows # in order for the loader to find any dlls it needs. $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) $echo "$modename: only absolute run-paths are allowed" 1>&2 exit $EXIT_FAILURE ;; esac case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac continue ;; -static) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects # would be equivalent was wrong. It would break on at least # Digital Unix and AIX. continue ;; -thread-safe) thread_safe=yes continue ;; -version-info) prev=vinfo continue ;; -version-number) prev=vinfo vinfo_number=yes continue ;; -Wc,*) args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'` arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" case $flag in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") flag="\"$flag\"" ;; esac arg="$arg $wl$flag" compiler_flags="$compiler_flags $flag" done IFS="$save_ifs" arg=`$echo "X$arg" | $Xsed -e "s/^ //"` ;; -Wl,*) args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'` arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" case $flag in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") flag="\"$flag\"" ;; esac arg="$arg $wl$flag" compiler_flags="$compiler_flags $wl$flag" linker_flags="$linker_flags $flag" done IFS="$save_ifs" arg=`$echo "X$arg" | $Xsed -e "s/^ //"` ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # Some other compiler flag. -* | +*) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac ;; *.$objext) # A standard object. objs="$objs $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then pic_object= non_pic_object= # Read the .lo file # If there is no directory component, then add one. case $arg in */* | *\\*) . $arg ;; *) . ./$arg ;; esac if test -z "$pic_object" || \ test -z "$non_pic_object" || test "$pic_object" = none && \ test "$non_pic_object" = none; then $echo "$modename: cannot find name of object for \`$arg'" 1>&2 exit $EXIT_FAILURE fi # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then dlfiles="$dlfiles $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. dlprefiles="$dlprefiles $pic_object" prev= fi # A PIC object. libobjs="$libobjs $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object non_pic_objects="$non_pic_objects $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi fi else # Only an error if not doing a dry-run. if test -z "$run"; then $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 exit $EXIT_FAILURE else # Dry-run case. # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` libobjs="$libobjs $pic_object" non_pic_objects="$non_pic_objects $non_pic_object" fi fi ;; *.$libext) # An archive. deplibs="$deplibs $arg" old_deplibs="$old_deplibs $arg" continue ;; *.la) # A libtool-controlled library. if test "$prev" = dlfiles; then # This library was specified with -dlopen. dlfiles="$dlfiles $arg" prev= elif test "$prev" = dlprefiles; then # The library was specified with -dlpreopen. dlprefiles="$dlprefiles $arg" prev= else deplibs="$deplibs $arg" fi continue ;; # Some other compiler argument. *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" fi done # argument parsing loop if test -n "$prev"; then $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" fi oldlibs= # calculate the name of the file, without its directory outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` libobjs_save="$libobjs" if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` if test "X$output_objdir" = "X$output"; then output_objdir="$objdir" else output_objdir="$output_objdir/$objdir" fi # Create the object directory. if test ! -d "$output_objdir"; then $show "$mkdir $output_objdir" $run $mkdir $output_objdir status=$? if test "$status" -ne 0 && test ! -d "$output_objdir"; then exit $status fi fi # Determine the type of output case $output in "") $echo "$modename: you must specify an output file" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. esac case $host in *cygwin* | *mingw* | *pw32*) # don't eliminate duplications in $postdeps and $predeps duplicate_compiler_generated_deps=yes ;; *) duplicate_compiler_generated_deps=$duplicate_deps ;; esac specialdeplibs= libs= # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do if test "X$duplicate_deps" = "Xyes" ; then case "$libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi libs="$libs $deplib" done if test "$linkmode" = lib; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps # $postdeps and mark them as special (i.e., whose duplicates are # not to be eliminated). pre_post_deps= if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; esac pre_post_deps="$pre_post_deps $pre_post_dep" done fi pre_post_deps= fi deplibs= newdependency_libs= newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries notinst_path= # paths that contain not-installed libtool libraries case $linkmode in lib) passes="conv link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 exit $EXIT_FAILURE ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=no newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan"; then libs="$deplibs" deplibs= fi if test "$linkmode" = prog; then case $pass in dlopen) libs="$dlfiles" ;; dlpreopen) libs="$dlprefiles" ;; link) libs="$deplibs %DEPLIBS%" test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" ;; esac fi if test "$pass" = dlopen; then # Collect dlpreopened libraries save_deplibs="$deplibs" deplibs= fi for deplib in $libs; do lib= found=no case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" fi continue ;; -l*) if test "$linkmode" != lib && test "$linkmode" != prog; then $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2 continue fi if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library lib="$searchdir/lib${name}${search_ext}" if test -f "$lib"; then if test "$search_ext" = ".la"; then found=yes else found=no fi break 2 fi done done if test "$found" != yes; then # deplib doesn't seem to be a libtool library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue else # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $deplib "*) if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then library_names= old_library= case $lib in */* | *\\*) . $lib ;; *) . ./$lib ;; esac for l in $old_library $library_names; do ll="$l" done if test "X$ll" = "X$old_library" ; then # only static version available found=no ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` test "X$ladir" = "X$lib" && ladir="." lib=$ladir/$old_library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi fi ;; # -l -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` ;; prog) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi if test "$pass" = scan; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` ;; *) $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2 ;; esac # linkmode continue ;; # -L -R*) if test "$pass" = link; then dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'` # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) lib="$deplib" ;; *.$libext) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) if test "$deplibs_check_method" != pass_all; then $echo $echo "*** Warning: Trying to link with static lib archive $deplib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have" $echo "*** because the file extensions .$libext of this argument makes me believe" $echo "*** that it is just a static archive that I should not used here." else $echo $echo "*** Warning: Linking the shared library $output against the" $echo "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" fi continue ;; prog) if test "$pass" != link; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test "$pass" = conv; then deplibs="$deplib $deplibs" elif test "$linkmode" = prog; then if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlopen support or we're linking statically, # we need to preload. newdlprefiles="$newdlprefiles $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else newdlfiles="$newdlfiles $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=yes continue ;; esac # case $deplib if test "$found" = yes || test -f "$lib"; then : else $echo "$modename: cannot find the library \`$lib'" 1>&2 exit $EXIT_FAILURE fi # Check to see that this really is a libtool archive. if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` test "X$ladir" = "X$lib" && ladir="." dlname= dlopen= dlpreopen= libdir= library_names= old_library= # If the library was installed with an old release of libtool, # it will not redefine variables installed, or shouldnotlink installed=yes shouldnotlink=no # Read the .la file case $lib in */* | *\\*) . $lib ;; *) . ./$lib ;; esac if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan" || { test "$linkmode" != prog && test "$linkmode" != lib; }; then test -n "$dlopen" && dlfiles="$dlfiles $dlopen" test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" fi if test "$pass" = conv; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 exit $EXIT_FAILURE fi # It is a libtool convenience library, so add in its objects. convenience="$convenience $ladir/$objdir/$old_library" old_convenience="$old_convenience $ladir/$objdir/$old_library" tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if test "X$duplicate_deps" = "Xyes" ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done elif test "$linkmode" != prog && test "$linkmode" != lib; then $echo "$modename: \`$lib' is not a convenience library" 1>&2 exit $EXIT_FAILURE fi continue fi # $pass = conv # Get the name of the library we link against. linklib= for l in $old_library $library_names; do linklib="$l" done if test -z "$linklib"; then $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 exit $EXIT_FAILURE fi # This library was specified with -dlopen. if test "$pass" = dlopen; then if test -z "$libdir"; then $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2 exit $EXIT_FAILURE fi if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. dlprefiles="$dlprefiles $lib $dependency_libs" else newdlfiles="$newdlfiles $lib" fi continue fi # $pass = dlopen # We need an absolute path. case $ladir in [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2 $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 abs_ladir="$ladir" fi ;; esac laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` # Find the relevant object directory and library name. if test "X$installed" = Xyes; then if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then $echo "$modename: warning: library \`$lib' was moved." 1>&2 dir="$ladir" absdir="$abs_ladir" libdir="$abs_ladir" else dir="$libdir" absdir="$libdir" fi else dir="$ladir/$objdir" absdir="$abs_ladir/$objdir" # Remove this search path later notinst_path="$notinst_path $abs_ladir" fi # $installed = yes name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` # This library was specified with -dlpreopen. if test "$pass" = dlpreopen; then if test -z "$libdir"; then $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 exit $EXIT_FAILURE fi # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then newdlprefiles="$newdlprefiles $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then newdlprefiles="$newdlprefiles $dir/$dlname" else newdlprefiles="$newdlprefiles $dir/$linklib" fi fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test "$linkmode" = lib; then deplibs="$dir/$old_library $deplibs" elif test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else deplibs="$lib $deplibs" # used for prog,scan pass fi continue fi if test "$linkmode" = prog && test "$pass" != link; then newlib_search_path="$newlib_search_path $ladir" deplibs="$lib $deplibs" linkalldeplibs=no if test "$link_all_deplibs" != no || test -z "$library_names" || test "$build_libtool_libs" = no; then linkalldeplibs=yes fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test esac # Need to link against all dependency_libs? if test "$linkalldeplibs" = yes; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if test "X$duplicate_deps" = "Xyes" ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done # for deplib continue fi # $linkmode = prog... if test "$linkmode,$pass" = "prog,link"; then if test -n "$library_names" && { test "$prefer_static_libs" = no || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var"; then # Make sure the rpath contains only unique directories. case "$temp_rpath " in *" $dir "*) ;; *" $absdir "*) ;; *) temp_rpath="$temp_rpath $dir" ;; esac fi # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) compile_rpath="$compile_rpath $absdir" esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" esac ;; esac fi # $linkmode,$pass = prog,link... if test "$alldeplibs" = yes && { test "$deplibs_check_method" = pass_all || { test "$build_libtool_libs" = yes && test -n "$library_names"; }; }; then # We only need to search for static libraries continue fi fi link_static=no # Whether the deplib will be linked statically if test -n "$library_names" && { test "$prefer_static_libs" = no || test -z "$old_library"; }; then if test "$installed" = no; then notinst_deplibs="$notinst_deplibs $lib" need_relink=yes fi # This is a shared library # Warn about portability, can't link against -module's on # some systems (darwin) if test "$shouldnotlink" = yes && test "$pass" = link ; then $echo if test "$linkmode" = prog; then $echo "*** Warning: Linking the executable $output against the loadable module" else $echo "*** Warning: Linking the shared library $output against the loadable module" fi $echo "*** $linklib is not portable!" fi if test "$linkmode" = lib && test "$hardcode_into_libs" = yes; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) compile_rpath="$compile_rpath $absdir" esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names realname="$2" shift; shift libname=`eval \\$echo \"$libname_spec\"` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then soname="$dlname" elif test -n "$soname_spec"; then # bleh windows case $host in *cygwin* | mingw*) major=`expr $current - $age` versuffix="-$major" ;; esac eval soname=\"$soname_spec\" else soname="$realname" fi # Make a new name for the extract_expsyms_cmds to use soroot="$soname" soname=`$echo $soroot | ${SED} -e 's/^.*\///'` newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a" # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else $show "extracting exported symbol list from \`$soname'" save_ifs="$IFS"; IFS='~' cmds=$extract_expsyms_cmds for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else $show "generating import library for \`$soname'" save_ifs="$IFS"; IFS='~' cmds=$old_archive_from_expsyms_cmds for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi # make sure the library variables are pointing to the new library dir=$output_objdir linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" if test "$linkmode" = prog || test "$mode" != relink; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test "$hardcode_direct" = no; then add="$dir/$linklib" case $host in *-*-sco3.2v5* ) add_dir="-L$dir" ;; *-*-darwin* ) # if the lib is a module then we can not link against # it, someone is ignoring the new warnings I added if /usr/bin/file -L $add 2> /dev/null | $EGREP "bundle" >/dev/null ; then $echo "** Warning, lib $linklib is a module, not a shared library" if test -z "$old_library" ; then $echo $echo "** And there doesn't seem to be a static archive available" $echo "** The link will probably fail, sorry" else add="$dir/$old_library" fi fi esac elif test "$hardcode_minus_L" = no; then case $host in *-*-sunos*) add_shlibpath="$dir" ;; esac add_dir="-L$dir" add="-l$name" elif test "$hardcode_shlibpath_var" = no; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; relink) if test "$hardcode_direct" = yes; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$dir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case "$libdir" in [\\/]*) add_dir="$add_dir -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; *) lib_linked=no ;; esac if test "$lib_linked" != yes; then $echo "$modename: configuration error: unsupported hardcode properties" exit $EXIT_FAILURE fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; esac fi if test "$linkmode" = prog; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" if test "$hardcode_direct" != yes && \ test "$hardcode_minus_L" != yes && \ test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; esac fi fi fi if test "$linkmode" = prog || test "$mode" = relink; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test "$hardcode_direct" = yes; then add="$libdir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$libdir" add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; esac add="-l$name" elif test "$hardcode_automatic" = yes; then if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then add="$inst_prefix_dir$libdir/$linklib" else add="$libdir/$linklib" fi else # We cannot seem to hardcode it, guess we'll fake it. add_dir="-L$libdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case "$libdir" in [\\/]*) add_dir="$add_dir -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" fi if test "$linkmode" = prog; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" fi fi elif test "$linkmode" = prog; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. if test "$hardcode_direct" != unsupported; then test -n "$old_library" && linklib="$old_library" compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi elif test "$build_libtool_libs" = yes; then # Not a shared library if test "$deplibs_check_method" != pass_all; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. $echo $echo "*** Warning: This system can not link to static lib archive $lib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have." if test "$module" = yes; then $echo "*** But as you try to build a module library, libtool will still create " $echo "*** a static module, that should work as long as the dlopening application" $echo "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then $echo $echo "*** However, this would only work if libtool was able to extract symbol" $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" $echo "*** not find such a program. So, this module is probably useless." $echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi else convenience="$convenience $dir/$old_library" old_convenience="$old_convenience $dir/$old_library" deplibs="$dir/$old_library $deplibs" link_static=yes fi fi # link shared/static library? if test "$linkmode" = lib; then if test -n "$dependency_libs" && { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes || test "$link_static" = yes; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'` case " $xrpath " in *" $temp_xrpath "*) ;; *) xrpath="$xrpath $temp_xrpath";; esac;; *) temp_deplibs="$temp_deplibs $libdir";; esac done dependency_libs="$temp_deplibs" fi newlib_search_path="$newlib_search_path $absdir" # Link against this library test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" if test "X$duplicate_deps" = "Xyes" ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done if test "$link_all_deplibs" != no; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do case $deplib in -L*) path="$deplib" ;; *.la) dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$deplib" && dir="." # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 absdir="$dir" fi ;; esac if grep "^installed=no" $deplib > /dev/null; then path="$absdir/$objdir" else eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` if test -z "$libdir"; then $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi if test "$absdir" != "$libdir"; then $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 fi path="$absdir" fi depdepl= case $host in *-*-darwin*) # we do not want to link against static libs, # but need to link against shared eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names" ; then for tmp in $deplibrary_names ; do depdepl=$tmp done if test -f "$path/$depdepl" ; then depdepl="$path/$depdepl" fi # do not add paths which are already there case " $newlib_search_path " in *" $path "*) ;; *) newlib_search_path="$newlib_search_path $path";; esac fi path="" ;; *) path="-L$path" ;; esac ;; -l*) case $host in *-*-darwin*) # Again, we only want to link against shared libraries eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"` for tmp in $newlib_search_path ; do if test -f "$tmp/lib$tmp_libs.dylib" ; then eval depdepl="$tmp/lib$tmp_libs.dylib" break fi done path="" ;; *) continue ;; esac ;; *) continue ;; esac case " $deplibs " in *" $depdepl "*) ;; *) deplibs="$depdepl $deplibs" ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$deplibs $path" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs dependency_libs="$newdependency_libs" if test "$pass" = dlpreopen; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test "$pass" != dlopen; then if test "$pass" != conv; then # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; *) lib_search_path="$lib_search_path $dir" ;; esac done newlib_search_path= fi if test "$linkmode,$pass" != "prog,link"; then vars="deplibs" else vars="compile_deplibs finalize_deplibs" fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order eval tmp_libs=\"\$$var\" new_libs= for deplib in $tmp_libs; do # FIXME: Pedantically, this is the right thing to do, so # that some nasty dependency loop isn't accidentally # broken: #new_libs="$deplib $new_libs" # Pragmatically, this seems to cause very few problems in # practice: case $deplib in -L*) new_libs="$deplib $new_libs" ;; -R*) ;; *) # And here is the reason: when a library appears more # than once as an explicit dependence of a library, or # is implicitly linked in more than once by the # compiler, it is considered special, and multiple # occurrences thereof are not removed. Compare this # with having the same library being listed as a # dependency of multiple other libraries: in this case, # we know (pedantically, we assume) the library does not # need to be listed more than once, so we keep only the # last copy. This is not always right, but it is rare # enough that we require users that really mean to play # such unportable linking tricks to link the library # using -Wl,-lname, so that libtool does not consider it # for duplicate removal. case " $specialdeplibs " in *" $deplib "*) new_libs="$deplib $new_libs" ;; *) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$deplib $new_libs" ;; esac ;; esac ;; esac done tmp_libs= for deplib in $new_libs; do case $deplib in -L*) case " $tmp_libs " in *" $deplib "*) ;; *) tmp_libs="$tmp_libs $deplib" ;; esac ;; *) tmp_libs="$tmp_libs $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= for i in $dependency_libs ; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) i="" ;; esac if test -n "$i" ; then tmp_libs="$tmp_libs $i" fi done dependency_libs=$tmp_libs done # for pass if test "$linkmode" = prog; then dlfiles="$newdlfiles" dlprefiles="$newdlprefiles" fi case $linkmode in oldlib) if test -n "$deplibs"; then $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 fi if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 fi if test -n "$rpath"; then $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 fi if test -n "$xrpath"; then $echo "$modename: warning: \`-R' is ignored for archives" 1>&2 fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for archives" 1>&2 fi if test -n "$export_symbols" || test -n "$export_symbols_regex"; then $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2 fi # Now set the variables for building old libraries. build_libtool_libs=no oldlibs="$output" objs="$objs$old_deplibs" ;; lib) # Make sure we only generate libraries of the form `libNAME.la'. case $outputname in lib*) name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) if test "$module" = no; then $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test "$need_lib_prefix" != no; then # Add the "lib" prefix for modules if required name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` fi ;; esac if test -n "$objs"; then if test "$deplibs_check_method" != pass_all; then $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1 exit $EXIT_FAILURE else $echo $echo "*** Warning: Linking the shared library $output against the non-libtool" $echo "*** objects $objs is not portable!" libobjs="$libobjs $objs" fi fi if test "$dlself" != no; then $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2 fi set dummy $rpath if test "$#" -gt 2; then $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 fi install_libdir="$2" oldlibs= if test -z "$rpath"; then if test "$build_libtool_libs" = yes; then # Building a libtool convenience library. # Some compilers have problems with a `.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2 fi else # Parse the version information argument. save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 IFS="$save_ifs" if test -n "$8"; then $echo "$modename: too many parameters to \`-version-info'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts # to make the code below a bit more comprehensible case $vinfo_number in yes) number_major="$2" number_minor="$3" number_revision="$4" # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix # which has an extra 1 added just for fun # case $version_type in darwin|linux|osf|windows) current=`expr $number_major + $number_minor` age="$number_minor" revision="$number_revision" ;; freebsd-aout|freebsd-elf|sunos) current="$number_major" revision="$number_minor" age="0" ;; irix|nonstopux) current=`expr $number_major + $number_minor - 1` age="$number_minor" revision="$number_minor" ;; esac ;; no) current="$2" revision="$3" age="$4" ;; esac # Check that each of the things are valid numbers. case $current in 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; *) $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE ;; esac case $revision in 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; *) $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE ;; esac case $age in 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; *) $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE ;; esac if test "$age" -gt "$current"; then $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE fi # Calculate the version variables. major= versuffix= verstring= case $version_type in none) ;; darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header major=.`expr $current - $age` versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... minor_current=`expr $current + 1` verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; freebsd-aout) major=".$current" versuffix=".$current.$revision"; ;; freebsd-elf) major=".$current" versuffix=".$current"; ;; irix | nonstopux) major=`expr $current - $age + 1` case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac verstring="$verstring_prefix$major.$revision" # Add in all the interfaces that we are compatible with. loop=$revision while test "$loop" -ne 0; do iface=`expr $revision - $loop` loop=`expr $loop - 1` verstring="$verstring_prefix$major.$iface:$verstring" done # Before this point, $major must not contain `.'. major=.$major versuffix="$major.$revision" ;; linux) major=.`expr $current - $age` versuffix="$major.$age.$revision" ;; osf) major=.`expr $current - $age` versuffix=".$current.$age.$revision" verstring="$current.$age.$revision" # Add in all the interfaces that we are compatible with. loop=$age while test "$loop" -ne 0; do iface=`expr $current - $loop` loop=`expr $loop - 1` verstring="$verstring:${iface}.0" done # Make executables depend on our current version. verstring="$verstring:${current}.0" ;; sunos) major=".$current" versuffix=".$current.$revision" ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 filesystems. major=`expr $current - $age` versuffix="-$major" ;; *) $echo "$modename: unknown library version type \`$version_type'" 1>&2 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 exit $EXIT_FAILURE ;; esac # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= case $version_type in darwin) # we can't check for "0.0" in archive_cmds due to quoting # problems, so we reset it completely verstring= ;; *) verstring="0.0" ;; esac if test "$need_version" = no; then versuffix= else versuffix=".0.0" fi fi # Remove version info from name if versioning should be avoided if test "$avoid_version" = yes && test "$need_version" = no; then major= versuffix= verstring="" fi # Check to see if the archive will have undefined symbols. if test "$allow_undefined" = yes; then if test "$allow_undefined_flag" = unsupported; then $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2 build_libtool_libs=no build_old_libs=yes fi else # Don't allow undefined symbols. allow_undefined_flag="$no_undefined_flag" fi fi if test "$mode" != relink; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= tempremovelist=`$echo "$output_objdir/*"` for p in $tempremovelist; do case $p in *.$objext) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) if test "X$precious_files_regex" != "X"; then if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi removelist="$removelist $p" ;; *) ;; esac done if test -n "$removelist"; then $show "${rm}r $removelist" $run ${rm}r $removelist fi fi # Now set the variables for building old libraries. if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then oldlibs="$oldlibs $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` fi # Eliminate all temporary directories. for path in $notinst_path; do lib_search_path=`$echo "$lib_search_path " | ${SED} -e 's% $path % %g'` deplibs=`$echo "$deplibs " | ${SED} -e 's% -L$path % %g'` dependency_libs=`$echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'` done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do temp_xrpath="$temp_xrpath -R$libdir" case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" ;; esac done if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened old_dlfiles="$dlfiles" dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; *) dlfiles="$dlfiles $lib" ;; esac done # Make sure dlprefiles contains only unique files old_dlprefiles="$dlprefiles" dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; *) dlprefiles="$dlprefiles $lib" ;; esac done if test "$build_libtool_libs" = yes; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework deplibs="$deplibs -framework System" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; *-*-openbsd* | *-*-freebsd*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; *) # Add libc to deplibs on all other systems if necessary. if test "$build_libtool_need_lc" = "yes"; then deplibs="$deplibs -lc" fi ;; esac fi # Transform deplibs into only deplibs that can be linked in shared. name_save=$name libname_save=$libname release_save=$release versuffix_save=$versuffix major_save=$major # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? release="" versuffix="" major="" newdeplibs= droppeddeps=no case $deplibs_check_method in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check # whether the library exists or not. But this is on # osf3 & osf4 and I'm not really sure... Just # implementing what was already the behavior. newdeplibs=$deplibs ;; test_compile) # This code stresses the "libraries are programs" paradigm to its # limits. Maybe even breaks it. We compile a program, linking it # against the deplibs as a proxy for the library. Then we can check # whether they linked in statically or dynamically with ldd. $rm conftest.c cat > conftest.c </dev/null` for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null \ | grep " -> " >/dev/null; then continue fi # The statement above tries to avoid entering an # endless loop below, in case of cyclic links. # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? potlib="$potent_lib" while test -h "$potlib" 2>/dev/null; do potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ | ${SED} 10q \ | $EGREP "$file_magic_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes $echo $echo "*** Warning: linker path does not have real file for library $a_deplib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have" $echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $echo "*** with $libname but no candidates were found. (...for file magic test)" else $echo "*** with $libname and none of the candidates passed a file format test" $echo "*** using a file magic. Last file checked: $potlib" fi fi else # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" fi done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` for a_deplib in $deplibs; do name="`expr $a_deplib : '-l\(.*\)'`" # If $name is empty we are operating on a -L argument. if test -n "$name" && test "$name" != "0"; then if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) newdeplibs="$newdeplibs $a_deplib" a_deplib="" ;; esac fi if test -n "$a_deplib" ; then libname=`eval \\$echo \"$libname_spec\"` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib="$potent_lib" # see symlink-check above in file_magic test if eval $echo \"$potent_lib\" 2>/dev/null \ | ${SED} 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes $echo $echo "*** Warning: linker path does not have real file for library $a_deplib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have" $echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $echo "*** with $libname but no candidates were found. (...for regex pattern test)" else $echo "*** with $libname and none of the candidates passed a file format test" $echo "*** using a regex pattern. Last file checked: $potlib" fi fi else # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" fi done # Gone through all deplibs. ;; none | unknown | *) newdeplibs="" tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \ -e 's/ -[LR][^ ]*//g'` if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then for i in $predeps $postdeps ; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"` done fi if $echo "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' \ | grep . >/dev/null; then $echo if test "X$deplibs_check_method" = "Xnone"; then $echo "*** Warning: inter-library dependencies are not supported in this platform." else $echo "*** Warning: inter-library dependencies are not known to be supported." fi $echo "*** All declared inter-library dependencies are being dropped." droppeddeps=yes fi ;; esac versuffix=$versuffix_save major=$major_save release=$release_save libname=$libname_save name=$name_save case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'` ;; esac if test "$droppeddeps" = yes; then if test "$module" = yes; then $echo $echo "*** Warning: libtool could not satisfy all declared inter-library" $echo "*** dependencies of module $libname. Therefore, libtool will create" $echo "*** a static module, that should work as long as the dlopening" $echo "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then $echo $echo "*** However, this would only work if libtool was able to extract symbol" $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" $echo "*** not find such a program. So, this module is probably useless." $echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi else $echo "*** The inter-library dependencies that have been dropped here will be" $echo "*** automatically added whenever a program is linked with this library" $echo "*** or is declared to -dlopen it." if test "$allow_undefined" = no; then $echo $echo "*** Since this library must not contain undefined symbols," $echo "*** because either the platform does not support them or" $echo "*** it was explicitly requested with -no-undefined," $echo "*** libtool will only create a static version of it." if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi fi fi # Done checking deplibs! deplibs=$newdeplibs fi # All the library-specific variables (install_libdir is set above). library_names= old_library= dlname= # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath="$finalize_rpath" test "$mode" != relink && rpath="$compile_rpath$rpath" for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" dep_rpath="$dep_rpath $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) perm_rpath="$perm_rpath $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" if test -n "$hardcode_libdir_flag_spec_ld"; then eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" else eval dep_rpath=\"$hardcode_libdir_flag_spec\" fi fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do rpath="$rpath$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi shlibpath="$finalize_shlibpath" test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi # Get the real and link names of the library. eval shared_ext=\"$shrext_cmds\" eval library_names=\"$library_names_spec\" set dummy $library_names realname="$2" shift; shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname="$realname" fi if test -z "$dlname"; then dlname=$soname fi lib="$output_objdir/$realname" for link do linknames="$linknames $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` # Prepare the list of exported symbols if test -z "$export_symbols"; then if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then $show "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $run $rm $export_symbols cmds=$export_symbols_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" if len=`expr "X$cmd" : ".*"` && test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then $show "$cmd" $run eval "$cmd" || exit $? skipped_export=false else # The command line is too long to execute in one step. $show "using reloadable object file for export list..." skipped_export=: fi done IFS="$save_ifs" if test -n "$export_symbols_regex"; then $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"" $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' $show "$mv \"${export_symbols}T\" \"$export_symbols\"" $run eval '$mv "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"' fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) tmp_deplibs="$tmp_deplibs $test_deplib" ;; esac done deplibs="$tmp_deplibs" if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" else gentop="$output_objdir/${outputname}x" $show "${rm}r $gentop" $run ${rm}r "$gentop" $show "$mkdir $gentop" $run $mkdir "$gentop" status=$? if test "$status" -ne 0 && test ! -d "$gentop"; then exit $status fi generated="$generated $gentop" for xlib in $convenience; do # Extract the objects. case $xlib in [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; *) xabs=`pwd`"/$xlib" ;; esac xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` xdir="$gentop/$xlib" $show "${rm}r $xdir" $run ${rm}r "$xdir" $show "$mkdir $xdir" $run $mkdir "$xdir" status=$? if test "$status" -ne 0 && test ! -d "$xdir"; then exit $status fi # We will extract separately just the conflicting names and we will no # longer touch any unique names. It is faster to leave these extract # automatically by $AR in one run. $show "(cd $xdir && $AR x $xabs)" $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then : else $echo "$modename: warning: object name conflicts; renaming object files" 1>&2 $echo "$modename: warning: to ensure that they will not overwrite" 1>&2 $AR t "$xabs" | sort | uniq -cd | while read -r count name do i=1 while test "$i" -le "$count" do # Put our $i before any first dot (extension) # Never overwrite any file name_to="$name" while test "X$name_to" = "X$name" || test -f "$xdir/$name_to" do name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"` done $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')" $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $? i=`expr $i + 1` done done fi libobjs="$libobjs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` done fi fi if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" linker_flags="$linker_flags $flag" fi # Make a backup of the uninstalled library when relinking if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds else eval test_cmds=\"$module_cmds\" cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval test_cmds=\"$archive_expsym_cmds\" cmds=$archive_expsym_cmds else eval test_cmds=\"$archive_cmds\" cmds=$archive_cmds fi fi if test "X$skipped_export" != "X:" && len=`expr "X$test_cmds" : ".*"` && test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise. $echo "creating reloadable object files..." # Save the value of $output and $libobjs because we want to # use them later. If we have whole_archive_flag_spec, we # want to use save_libobjs as it was before # whole_archive_flag_spec was expanded, because we can't # assume the linker understands whole_archive_flag_spec. # This may have to be revisited, in case too many # convenience libraries get linked in and end up exceeding # the spec. if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then save_libobjs=$libobjs fi save_output=$output # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= delfiles= last_robj= k=1 output=$output_objdir/$save_output-${k}.$objext # Loop over the list of objects to be linked. for obj in $save_libobjs do eval test_cmds=\"$reload_cmds $objlist $last_robj\" if test "X$objlist" = X || { len=`expr "X$test_cmds" : ".*"` && test "$len" -le "$max_cmd_len"; }; then objlist="$objlist $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test "$k" -eq 1 ; then # The first file doesn't have a previous command to add. eval concat_cmds=\"$reload_cmds $objlist $last_robj\" else # All subsequent reloadable object files will link in # the last one created. eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\" fi last_robj=$output_objdir/$save_output-${k}.$objext k=`expr $k + 1` output=$output_objdir/$save_output-${k}.$objext objlist=$obj len=1 fi done # Handle the remaining objects by creating one last # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" if ${skipped_export-false}; then $show "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $run $rm $export_symbols libobjs=$output # Append the command to create the export file. eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\" fi # Set up a command to remove the reloadale object files # after they are used. i=0 while test "$i" -lt "$k" do i=`expr $i + 1` delfiles="$delfiles $output_objdir/$save_output-${i}.$objext" done $echo "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. save_ifs="$IFS"; IFS='~' for cmd in $concat_cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" libobjs=$output # Restore the value of output. output=$save_output if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then cmds=$archive_expsym_cmds else cmds=$archive_cmds fi fi # Append the command to remove the reloadable object files # to the just-reset $cmds. eval cmds=\"\$cmds~\$rm $delfiles\" fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" # Restore the uninstalled library and exit if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $? exit $EXIT_SUCCESS fi # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)" $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $? fi done # If -module or -export-dynamic was specified, set the dlname. if test "$module" = yes || test "$export_dynamic" = yes; then # On all known operating systems, these are identical. dlname="$soname" fi fi ;; obj) if test -n "$deplibs"; then $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 fi if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2 fi if test -n "$rpath"; then $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2 fi if test -n "$xrpath"; then $echo "$modename: warning: \`-R' is ignored for objects" 1>&2 fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 fi case $output in *.lo) if test -n "$objs$old_deplibs"; then $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 exit $EXIT_FAILURE fi libobj="$output" obj=`$echo "X$output" | $Xsed -e "$lo2o"` ;; *) libobj= obj="$output" ;; esac # Delete the old objects. $run $rm $obj $libobj # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create # different ones for PIC/non-PIC, this we'll have to duplicate # the extraction. reload_conv_objs= gentop= # reload_cmds runs $LD directly, so let us get rid of # -Wl from whole_archive_flag_spec wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\" else gentop="$output_objdir/${obj}x" $show "${rm}r $gentop" $run ${rm}r "$gentop" $show "$mkdir $gentop" $run $mkdir "$gentop" status=$? if test "$status" -ne 0 && test ! -d "$gentop"; then exit $status fi generated="$generated $gentop" for xlib in $convenience; do # Extract the objects. case $xlib in [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; *) xabs=`pwd`"/$xlib" ;; esac xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` xdir="$gentop/$xlib" $show "${rm}r $xdir" $run ${rm}r "$xdir" $show "$mkdir $xdir" $run $mkdir "$xdir" status=$? if test "$status" -ne 0 && test ! -d "$xdir"; then exit $status fi # We will extract separately just the conflicting names and we will no # longer touch any unique names. It is faster to leave these extract # automatically by $AR in one run. $show "(cd $xdir && $AR x $xabs)" $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then : else $echo "$modename: warning: object name conflicts; renaming object files" 1>&2 $echo "$modename: warning: to ensure that they will not overwrite" 1>&2 $AR t "$xabs" | sort | uniq -cd | while read -r count name do i=1 while test "$i" -le "$count" do # Put our $i before any first dot (extension) # Never overwrite any file name_to="$name" while test "X$name_to" = "X$name" || test -f "$xdir/$name_to" do name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"` done $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')" $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $? i=`expr $i + 1` done done fi reload_conv_objs="$reload_objs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` done fi fi # Create the old-style object. reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test output="$obj" cmds=$reload_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi exit $EXIT_SUCCESS fi if test "$build_libtool_libs" != yes; then if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. # $show "echo timestamp > $libobj" # $run eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS fi if test -n "$pic_flag" || test "$pic_mode" != default; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output="$libobj" cmds=$reload_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;; esac if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for programs" 1>&2 fi if test "$preload" = yes; then if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown && test "$dlopen_self_static" = unknown; then $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support." fi fi case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'` finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'` ;; esac case $host in *darwin*) # Don't allow lazy linking, it breaks C++ global constructors if test "$tagname" = CXX ; then compile_command="$compile_command ${wl}-bind_at_load" finalize_command="$finalize_command ${wl}-bind_at_load" fi ;; esac compile_command="$compile_command $compile_deplibs" finalize_command="$finalize_command $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. for libdir in $rpath $xrpath; do # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" ;; esac done fi # Now hardcode the library paths rpath= hardcode_libdirs= for libdir in $compile_rpath $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" rpath="$rpath $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) perm_rpath="$perm_rpath $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) case :$dllsearchpath: in *":$libdir:"*) ;; *) dllsearchpath="$dllsearchpath:$libdir";; esac ;; esac done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi compile_rpath="$rpath" rpath= hardcode_libdirs= for libdir in $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" rpath="$rpath $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi finalize_rpath="$rpath" if test -n "$libobjs" && test "$build_old_libs" = yes; then # Transform all the library objects into standard objects. compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` fi dlsyms= if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then if test -n "$NM" && test -n "$global_symbol_pipe"; then dlsyms="${outputname}S.c" else $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2 fi fi if test -n "$dlsyms"; then case $dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist="$output_objdir/${outputname}.nm" $show "$rm $nlist ${nlist}S ${nlist}T" $run $rm "$nlist" "${nlist}S" "${nlist}T" # Parse the name list into a source file. $show "creating $output_objdir/$dlsyms" test -z "$run" && $echo > "$output_objdir/$dlsyms" "\ /* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */ /* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */ #ifdef __cplusplus extern \"C\" { #endif /* Prevent the only kind of declaration conflicts we can make. */ #define lt_preloaded_symbols some_other_symbol /* External symbol declarations for the compiler. */\ " if test "$dlself" = yes; then $show "generating symbol list for \`$output'" test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` for arg in $progfiles; do $show "extracting global C symbols from \`$arg'" $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' $run eval '$mv "$nlist"T "$nlist"' fi if test -n "$export_symbols_regex"; then $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' $run eval '$mv "$nlist"T "$nlist"' fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols="$output_objdir/$output.exp" $run $rm $export_symbols $run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' else $run eval "${SED} -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"' $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T' $run eval 'mv "$nlist"T "$nlist"' fi fi for arg in $dlprefiles; do $show "extracting global C symbols from \`$arg'" name=`$echo "$arg" | ${SED} -e 's%^.*/%%'` $run eval '$echo ": $name " >> "$nlist"' $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" done if test -z "$run"; then # Make sure we have at least an empty file. test -f "$nlist" || : > "$nlist" if test -n "$exclude_expsyms"; then $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T $mv "$nlist"T "$nlist" fi # Try sorting and uniquifying the output. if grep -v "^: " < "$nlist" | if sort -k 3 /dev/null 2>&1; then sort -k 3 else sort +2 fi | uniq > "$nlist"S; then : else grep -v "^: " < "$nlist" > "$nlist"S fi if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"' else $echo '/* NONE */' >> "$output_objdir/$dlsyms" fi $echo >> "$output_objdir/$dlsyms" "\ #undef lt_preloaded_symbols #if defined (__STDC__) && __STDC__ # define lt_ptr void * #else # define lt_ptr char * # define const #endif /* The mapping between symbol names and symbols. */ const struct { const char *name; lt_ptr address; } lt_preloaded_symbols[] = {\ " eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms" $echo >> "$output_objdir/$dlsyms" "\ {0, (lt_ptr) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " fi pic_flag_for_symtable= case $host in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) case "$compile_command " in *" -static "*) ;; *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";; esac;; *-*-hpux*) case "$compile_command " in *" -static "*) ;; *) pic_flag_for_symtable=" $pic_flag";; esac esac # Now compile the dynamic symbol file. $show "(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" $run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? # Clean up the generated files. $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" # Transform the symbol file into the correct name. compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` ;; *) $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 exit $EXIT_FAILURE ;; esac else # We keep going just in case the user didn't refer to # lt_preloaded_symbols. The linker will fail if global_symbol_pipe # really was required. # Nullify the symbol file. compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` fi if test "$need_relink" = no || test "$build_libtool_libs" != yes; then # Replace the output file specification. compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. $show "$link_command" $run eval "$link_command" status=$? # Delete the generated files. if test -n "$dlsyms"; then $show "$rm $output_objdir/${outputname}S.${objext}" $run $rm "$output_objdir/${outputname}S.${objext}" fi exit $status fi if test -n "$shlibpath_var"; then # We should set the shlibpath_var rpath= for dir in $temp_rpath; do case $dir in [\\/]* | [A-Za-z]:[\\/]*) # Absolute path. rpath="$rpath$dir:" ;; *) # Relative path: add a thisdir entry. rpath="$rpath\$thisdir/$dir:" ;; esac done temp_rpath="$rpath" fi if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi if test -n "$finalize_shlibpath"; then finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" fi compile_var= finalize_var= if test -n "$runpath_var"; then if test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do rpath="$rpath$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi if test -n "$finalize_perm_rpath"; then # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do rpath="$rpath$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test "$no_install" = yes; then # We don't need to create a wrapper script. link_command="$compile_var$compile_command$compile_rpath" # Replace the output file specification. link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $run $rm $output # Link the executable and exit $show "$link_command" $run eval "$link_command" || exit $? exit $EXIT_SUCCESS fi if test "$hardcode_action" = relink; then # Fast installation is not supported link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2 $echo "$modename: \`$output' will be relinked during installation" 1>&2 else if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` else # fast_install is set to needless relink_command= fi else link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" fi fi # Replace the output file specification. link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname $show "$link_command" $run eval "$link_command" || exit $? # Now create the wrapper script. $show "creating $output" # Quote the relink command for shipping. if test -n "$relink_command"; then # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` relink_command="$var=\"$var_value\"; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` fi # Quote $echo for shipping. if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then case $progpath in [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; esac qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"` else qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"` fi # Only actually do things if our run command is non-null. if test -z "$run"; then # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) cwrappersource=`$echo ${objdir}/lt-${output}.c` cwrapper=`$echo ${output}.exe` $rm $cwrappersource $cwrapper trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 cat > $cwrappersource <> $cwrappersource<<"EOF" #include #include #include #include #include #include #if defined(PATH_MAX) # define LT_PATHMAX PATH_MAX #elif defined(MAXPATHLEN) # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef DIR_SEPARATOR #define DIR_SEPARATOR '/' #endif #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ defined (__OS2__) #define HAVE_DOS_BASED_FILE_SYSTEM #ifndef DIR_SEPARATOR_2 #define DIR_SEPARATOR_2 '\\' #endif #endif #ifndef DIR_SEPARATOR_2 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) #else /* DIR_SEPARATOR_2 */ # define IS_DIR_SEPARATOR(ch) \ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free ((void *) stale); stale = 0; } \ } while (0) const char *program_name = NULL; void * xmalloc (size_t num); char * xstrdup (const char *string); char * basename (const char *name); char * fnqualify(const char *path); char * strendzap(char *str, const char *pat); void lt_fatal (const char *message, ...); int main (int argc, char *argv[]) { char **newargz; int i; program_name = (char *) xstrdup ((char *) basename (argv[0])); newargz = XMALLOC(char *, argc+2); EOF cat >> $cwrappersource <> $cwrappersource <<"EOF" newargz[1] = fnqualify(argv[0]); /* we know the script has the same name, without the .exe */ /* so make sure newargz[1] doesn't end in .exe */ strendzap(newargz[1],".exe"); for (i = 1; i < argc; i++) newargz[i+1] = xstrdup(argv[i]); newargz[argc+1] = NULL; EOF cat >> $cwrappersource <> $cwrappersource <<"EOF" } void * xmalloc (size_t num) { void * p = (void *) malloc (num); if (!p) lt_fatal ("Memory exhausted"); return p; } char * xstrdup (const char *string) { return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL ; } char * basename (const char *name) { const char *base; #if defined (HAVE_DOS_BASED_FILE_SYSTEM) /* Skip over the disk name in MSDOS pathnames. */ if (isalpha (name[0]) && name[1] == ':') name += 2; #endif for (base = name; *name; name++) if (IS_DIR_SEPARATOR (*name)) base = name + 1; return (char *) base; } char * fnqualify(const char *path) { size_t size; char *p; char tmp[LT_PATHMAX + 1]; assert(path != NULL); /* Is it qualified already? */ #if defined (HAVE_DOS_BASED_FILE_SYSTEM) if (isalpha (path[0]) && path[1] == ':') return xstrdup (path); #endif if (IS_DIR_SEPARATOR (path[0])) return xstrdup (path); /* prepend the current directory */ /* doesn't handle '~' */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal ("getcwd failed"); size = strlen(tmp) + 1 + strlen(path) + 1; /* +2 for '/' and '\0' */ p = XMALLOC(char, size); sprintf(p, "%s%c%s", tmp, DIR_SEPARATOR, path); return p; } char * strendzap(char *str, const char *pat) { size_t len, patlen; assert(str != NULL); assert(pat != NULL); len = strlen(str); patlen = strlen(pat); if (patlen <= len) { str += len - patlen; if (strcmp(str, pat) == 0) *str = '\0'; } return str; } static void lt_error_core (int exit_status, const char * mode, const char * message, va_list ap) { fprintf (stderr, "%s: %s: ", program_name, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, "FATAL", message, ap); va_end (ap); } EOF # we should really use a build-platform specific compiler # here, but OTOH, the wrappers (shell script and this C one) # are only useful if you want to execute the "real" binary. # Since the "real" binary is built for $host, then this # wrapper might as well be built for $host, too. $run $LTCC -s -o $cwrapper $cwrappersource ;; esac $rm $output trap "$rm $output; exit $EXIT_FAILURE" 1 2 15 $echo > $output "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # # This wrapper script should never be moved out of the build directory. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='${SED} -e 1s/^X//' sed_quote_subst='$sed_quote_subst' # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variable: notinst_deplibs='$notinst_deplibs' else # When we are sourced in execute mode, \$file and \$echo are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then echo=\"$qecho\" file=\"\$0\" # Make sure echo works. if test \"X\$1\" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then # Yippee, \$echo works! : else # Restart under the correct shell, and then maybe \$echo will work. exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} fi fi\ " $echo >> $output "\ # Find the directory that this script lives in. thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` done # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test "$fast_install" = yes; then $echo >> $output "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || \\ { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" if test ! -d \"\$progdir\"; then $mkdir \"\$progdir\" else $rm \"\$progdir/\$file\" fi" $echo >> $output "\ # relink executable if necessary if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else $echo \"\$relink_command_output\" >&2 $rm \"\$progdir/\$file\" exit $EXIT_FAILURE fi fi $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $rm \"\$progdir/\$program\"; $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; } $rm \"\$progdir/\$file\" fi" else $echo >> $output "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $echo >> $output "\ if test -f \"\$progdir/\$program\"; then" # Export our shlibpath_var if we have one. if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $echo >> $output "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` export $shlibpath_var " fi # fixup the dll searchpath if we need to. if test -n "$dllsearchpath"; then $echo >> $output "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi $echo >> $output "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2*) $echo >> $output "\ exec \$progdir\\\\\$program \${1+\"\$@\"} " ;; *) $echo >> $output "\ exec \$progdir/\$program \${1+\"\$@\"} " ;; esac $echo >> $output "\ \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\" exit $EXIT_FAILURE fi else # The program doesn't exist. \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2 \$echo \"This script is just a wrapper for \$program.\" 1>&2 $echo \"See the $PACKAGE documentation for more information.\" 1>&2 exit $EXIT_FAILURE fi fi\ " chmod +x $output fi exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do if test "$build_libtool_libs" = convenience; then oldobjs="$libobjs_save" addlibs="$convenience" build_libtool_libs=no else if test "$build_libtool_libs" = module; then oldobjs="$libobjs_save" build_libtool_libs=no else oldobjs="$old_deplibs $non_pic_objects" fi addlibs="$old_convenience" fi if test -n "$addlibs"; then gentop="$output_objdir/${outputname}x" $show "${rm}r $gentop" $run ${rm}r "$gentop" $show "$mkdir $gentop" $run $mkdir "$gentop" status=$? if test "$status" -ne 0 && test ! -d "$gentop"; then exit $status fi generated="$generated $gentop" # Add in members from convenience archives. for xlib in $addlibs; do # Extract the objects. case $xlib in [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; *) xabs=`pwd`"/$xlib" ;; esac xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` xdir="$gentop/$xlib" $show "${rm}r $xdir" $run ${rm}r "$xdir" $show "$mkdir $xdir" $run $mkdir "$xdir" status=$? if test "$status" -ne 0 && test ! -d "$xdir"; then exit $status fi # We will extract separately just the conflicting names and we will no # longer touch any unique names. It is faster to leave these extract # automatically by $AR in one run. $show "(cd $xdir && $AR x $xabs)" $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then : else $echo "$modename: warning: object name conflicts; renaming object files" 1>&2 $echo "$modename: warning: to ensure that they will not overwrite" 1>&2 $AR t "$xabs" | sort | uniq -cd | while read -r count name do i=1 while test "$i" -le "$count" do # Put our $i before any first dot (extension) # Never overwrite any file name_to="$name" while test "X$name_to" = "X$name" || test -f "$xdir/$name_to" do name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"` done $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')" $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $? i=`expr $i + 1` done done fi oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP` done fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then cmds=$old_archive_from_new_cmds else eval cmds=\"$old_archive_cmds\" if len=`expr "X$cmds" : ".*"` && test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts $echo "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$oldobjs # GNU ar 2.10+ was changed to match POSIX; thus no paths are # encoded into archives. This makes 'ar r' malfunction in # this piecewise linking case whenever conflicting object # names appear in distinct ar calls; check, warn and compensate. if (for obj in $save_oldobjs do $echo "X$obj" | $Xsed -e 's%^.*/%%' done | sort | sort -uc >/dev/null 2>&1); then : else $echo "$modename: warning: object name conflicts; overriding AR_FLAGS to 'cq'" 1>&2 $echo "$modename: warning: to ensure that POSIX-compatible ar will work" 1>&2 AR_FLAGS=cq fi # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do last_oldobj=$obj done for obj in $save_oldobjs do oldobjs="$objlist $obj" objlist="$objlist $obj" eval test_cmds=\"$old_archive_cmds\" if len=`expr "X$test_cmds" : ".*"` && test "$len" -le "$max_cmd_len"; then : else # the above command should be used before it gets too long oldobjs=$objlist if test "$obj" = "$last_oldobj" ; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" objlist= fi done RANLIB=$save_RANLIB oldobjs=$objlist if test "X$oldobjs" = "X" ; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do eval cmd=\"$cmd\" IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" done if test -n "$generated"; then $show "${rm}r$generated" $run ${rm}r$generated fi # Now create the libtool archive. case $output in *.la) old_library= test "$build_old_libs" = yes && old_library="$libname.$libext" $show "creating $output" # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` relink_command="$var=\"$var_value\"; export $var; $relink_command" fi done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` if test "$hardcode_automatic" = yes ; then relink_command= fi # Only create the output if not a dry run. if test -z "$run"; then for installed in no yes; do if test "$installed" = yes; then if test -z "$install_libdir"; then break fi output="$output_objdir/$outputname"i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` if test -z "$libdir"; then $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi newdependency_libs="$newdependency_libs $libdir/$name" ;; *) newdependency_libs="$newdependency_libs $deplib" ;; esac done dependency_libs="$newdependency_libs" newdlfiles= for lib in $dlfiles; do name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` if test -z "$libdir"; then $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi newdlfiles="$newdlfiles $libdir/$name" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` if test -z "$libdir"; then $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi newdlprefiles="$newdlprefiles $libdir/$name" done dlprefiles="$newdlprefiles" else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac newdlfiles="$newdlfiles $abs" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac newdlprefiles="$newdlprefiles $abs" done dlprefiles="$newdlprefiles" fi $rm $output # place dlname in correct position for cygwin tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; esac $echo > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='$tdlname' # Names of this library. library_names='$library_names' # The name of the static archive. old_library='$old_library' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # Should we warn about portability when linking against -modules? shouldnotlink=$module # Files to dlopen/dlpreopen dlopen='$dlfiles' dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" if test "$installed" = no && test "$need_relink" = yes; then $echo >> $output "\ relink_command=\"$relink_command\"" fi done fi # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $? ;; esac exit $EXIT_SUCCESS ;; # libtool install mode install) modename="$modename: install" # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || # Allow the use of GNU shtool's install command. $echo "X$nonopt" | $Xsed | grep shtool > /dev/null; then # Aesthetically quote it. arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) arg="\"$arg\"" ;; esac install_prog="$arg " arg="$1" shift else install_prog= arg="$nonopt" fi # The real first argument should be the name of the installation program. # Aesthetically quote it. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) arg="\"$arg\"" ;; esac install_prog="$install_prog$arg" # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=no stripme= for arg do if test -n "$dest"; then files="$files $dest" dest="$arg" continue fi case $arg in -d) isdir=yes ;; -f) prev="-f" ;; -g) prev="-g" ;; -m) prev="-m" ;; -o) prev="-o" ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then prev= else dest="$arg" continue fi ;; esac # Aesthetically quote the argument. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) arg="\"$arg\"" ;; esac install_prog="$install_prog $arg" done if test -z "$install_prog"; then $echo "$modename: you must specify an install program" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test -n "$prev"; then $echo "$modename: the \`$prev' option requires an argument" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test -z "$files"; then if test -z "$dest"; then $echo "$modename: no file or destination specified" 1>&2 else $echo "$modename: you must specify a destination" 1>&2 fi $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Strip any trailing slash from the destination. dest=`$echo "X$dest" | $Xsed -e 's%/$%%'` # Check to see that the destination is a directory. test -d "$dest" && isdir=yes if test "$isdir" = yes; then destdir="$dest" destname= else destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'` test "X$destdir" = "X$dest" && destdir=. destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'` # Not a directory, so check to see that there is only one file specified. set dummy $files if test "$#" -gt 2; then $echo "$modename: \`$dest' is not a directory" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; esac done ;; esac # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" staticlibs= future_libdirs= current_libdirs= for file in $files; do # Do each installation. case $file in *.$libext) # Do the static libraries later. staticlibs="$staticlibs $file" ;; *.la) # Check to see that this really is a libtool archive. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi library_names= old_library= relink_command= # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) current_libdirs="$current_libdirs $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) future_libdirs="$future_libdirs $libdir" ;; esac fi dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/ test "X$dir" = "X$file/" && dir= dir="$dir$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that # are installed to the same prefix. # At present, this check doesn't affect windows .dll's that # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. if test "$inst_prefix_dir" = "$destdir"; then $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 exit $EXIT_FAILURE fi if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi $echo "$modename: warning: relinking \`$file'" 1>&2 $show "$relink_command" if $run eval "$relink_command"; then : else $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 exit $EXIT_FAILURE fi fi # See the names of the shared library. set dummy $library_names if test -n "$2"; then realname="$2" shift shift srcname="$realname" test -n "$relink_command" && srcname="$realname"T # Install the shared library and build the symlinks. $show "$install_prog $dir/$srcname $destdir/$realname" $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $? if test -n "$stripme" && test -n "$striplib"; then $show "$striplib $destdir/$realname" $run eval "$striplib $destdir/$realname" || exit $? fi if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. for linkname do if test "$linkname" != "$realname"; then $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)" $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)" fi done fi # Do each command in the postinstall commands. lib="$destdir/$realname" cmds=$postinstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi # Install the pseudo-library for information purposes. name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` instname="$dir/$name"i $show "$install_prog $instname $destdir/$name" $run eval "$install_prog $instname $destdir/$name" || exit $? # Maybe install the static library, too. test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" ;; *.lo) # Install (i.e. copy) a libtool object. # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` destfile="$destdir/$destfile" fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"` ;; *.$objext) staticdest="$destfile" destfile= ;; *) $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; esac # Install the libtool object if requested. if test -n "$destfile"; then $show "$install_prog $file $destfile" $run eval "$install_prog $file $destfile" || exit $? fi # Install the old object if enabled. if test "$build_old_libs" = yes; then # Deduce the name of the old-style object file. staticobj=`$echo "X$file" | $Xsed -e "$lo2o"` $show "$install_prog $staticobj $staticdest" $run eval "$install_prog \$staticobj \$staticdest" || exit $? fi exit $EXIT_SUCCESS ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` destfile="$destdir/$destfile" fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install stripped_ext="" case $file in *.exe) if test ! -f "$file"; then file=`$echo $file|${SED} 's,.exe$,,'` stripped_ext=".exe" fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin*|*mingw*) wrapper=`$echo $file | ${SED} -e 's,.exe$,,'` ;; *) wrapper=$file ;; esac if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then notinst_deplibs= relink_command= # To insure that "foo" is sourced, and not "foo.exe", # finese the cygwin/MSYS system by explicitly sourcing "foo." # which disallows the automatic-append-.exe behavior. case $build in *cygwin* | *mingw*) wrapperdot=${wrapper}. ;; *) wrapperdot=${wrapper} ;; esac # If there is no directory component, then add one. case $file in */* | *\\*) . ${wrapperdot} ;; *) . ./${wrapperdot} ;; esac # Check the variables that should have been set. if test -z "$notinst_deplibs"; then $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2 exit $EXIT_FAILURE fi finalize=yes for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then # If there is no directory component, then add one. case $lib in */* | *\\*) . $lib ;; *) . ./$lib ;; esac fi libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 finalize=no fi done relink_command= # To insure that "foo" is sourced, and not "foo.exe", # finese the cygwin/MSYS system by explicitly sourcing "foo." # which disallows the automatic-append-.exe behavior. case $build in *cygwin* | *mingw*) wrapperdot=${wrapper}. ;; *) wrapperdot=${wrapper} ;; esac # If there is no directory component, then add one. case $file in */* | *\\*) . ${wrapperdot} ;; *) . ./${wrapperdot} ;; esac outputname= if test "$fast_install" = no && test -n "$relink_command"; then if test "$finalize" = yes && test -z "$run"; then tmpdir="/tmp" test -n "$TMPDIR" && tmpdir="$TMPDIR" tmpdir="$tmpdir/libtool-$$" save_umask=`umask` umask 0077 if $mkdir "$tmpdir"; then umask $save_umask else umask $save_umask $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2 continue fi file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` outputname="$tmpdir/$file" # Replace the output file specification. relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` $show "$relink_command" if $run eval "$relink_command"; then : else $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 ${rm}r "$tmpdir" continue fi file="$outputname" else $echo "$modename: warning: cannot relink \`$file'" 1>&2 fi else # Install the binary that we compiled earlier. file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyways case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'` ;; esac ;; esac $show "$install_prog$stripme $file $destfile" $run eval "$install_prog\$stripme \$file \$destfile" || exit $? test -n "$outputname" && ${rm}r "$tmpdir" ;; esac done for file in $staticlibs; do name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` # Set up the ranlib parameters. oldlib="$destdir/$name" $show "$install_prog $file $oldlib" $run eval "$install_prog \$file \$oldlib" || exit $? if test -n "$stripme" && test -n "$old_striplib"; then $show "$old_striplib $oldlib" $run eval "$old_striplib $oldlib" || exit $? fi # Do each command in the postinstall commands. cmds=$old_postinstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" done if test -n "$future_libdirs"; then $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 fi if test -n "$current_libdirs"; then # Maybe just do a dry run. test -n "$run" && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi ;; # libtool finish mode finish) modename="$modename: finish" libdirs="$nonopt" admincmds= if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for dir do libdirs="$libdirs $dir" done for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. cmds=$finish_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || admincmds="$admincmds $cmd" done IFS="$save_ifs" fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $run eval "$cmds" || admincmds="$admincmds $cmds" fi done fi # Exit here if they wanted silent mode. test "$show" = : && exit $EXIT_SUCCESS $echo "----------------------------------------------------------------------" $echo "Libraries have been installed in:" for libdir in $libdirs; do $echo " $libdir" done $echo $echo "If you ever happen to want to link against installed libraries" $echo "in a given directory, LIBDIR, you must either use libtool, and" $echo "specify the full pathname of the library, or use the \`-LLIBDIR'" $echo "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then $echo " - add LIBDIR to the \`$shlibpath_var' environment variable" $echo " during execution" fi if test -n "$runpath_var"; then $echo " - add LIBDIR to the \`$runpath_var' environment variable" $echo " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" $echo " - use the \`$flag' linker flag" fi if test -n "$admincmds"; then $echo " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" fi $echo $echo "See any operating system documentation about shared libraries for" $echo "more information, such as the ld(1) and ld.so(8) manual pages." $echo "----------------------------------------------------------------------" exit $EXIT_SUCCESS ;; # libtool execute mode execute) modename="$modename: execute" # The first argument is the command name. cmd="$nonopt" if test -z "$cmd"; then $echo "$modename: you must specify a COMMAND" 1>&2 $echo "$help" exit $EXIT_FAILURE fi # Handle -dlopen flags immediately. for file in $execute_dlfiles; do if test ! -f "$file"; then $echo "$modename: \`$file' is not a file" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi dir= case $file in *.la) # Check to see that this really is a libtool archive. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Read the libtool library. dlname= library_names= # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'" continue fi dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$file" && dir=. if test -f "$dir/$objdir/$dlname"; then dir="$dir/$objdir" else $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 exit $EXIT_FAILURE fi ;; *.lo) # Just add the directory containing the .lo file. dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$file" && dir=. ;; *) $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` test -n "$absdir" && dir="$absdir" # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then eval "$shlibpath_var=\"\$dir\"" else eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" fi done # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. libtool_execute_magic="$magic" # Check if any of the arguments is a wrapper script. args= for file do case $file in -*) ;; *) # Do a test to see if this is really a libtool program. if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Transform arg to wrapped name. file="$progdir/$program" fi ;; esac # Quote arguments (to preserve shell metacharacters). file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"` args="$args \"$file\"" done if test -z "$run"; then if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables if test "${save_LC_ALL+set}" = set; then LC_ALL="$save_LC_ALL"; export LC_ALL fi if test "${save_LANG+set}" = set; then LANG="$save_LANG"; export LANG fi # Now prepare to actually exec the command. exec_cmd="\$cmd$args" else # Display what would be done. if test -n "$shlibpath_var"; then eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" $echo "export $shlibpath_var" fi $echo "$cmd$args" exit $EXIT_SUCCESS fi ;; # libtool clean and uninstall mode clean | uninstall) modename="$modename: $mode" rm="$nonopt" files= rmforce= exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" for arg do case $arg in -f) rm="$rm $arg"; rmforce=yes ;; -*) rm="$rm $arg" ;; *) files="$files $arg" ;; esac done if test -z "$rm"; then $echo "$modename: you must specify an RM program" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi rmdirs= origobjdir="$objdir" for file in $files; do dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` if test "X$dir" = "X$file"; then dir=. objdir="$origobjdir" else objdir="$dir/$origobjdir" fi name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` test "$mode" = uninstall && objdir="$dir" # Remember objdir for removal later, being careful to avoid duplicates if test "$mode" = clean; then case " $rmdirs " in *" $objdir "*) ;; *) rmdirs="$rmdirs $objdir" ;; esac fi # Don't error if the file doesn't exist and rm -f was used. if (test -L "$file") >/dev/null 2>&1 \ || (test -h "$file") >/dev/null 2>&1 \ || test -f "$file"; then : elif test -d "$file"; then exit_status=1 continue elif test "$rmforce" = yes; then continue fi rmfiles="$file" case $name in *.la) # Possibly a libtool archive, so verify it. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then . $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do rmfiles="$rmfiles $objdir/$n" done test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" test "$mode" = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" if test "$mode" = uninstall; then if test -n "$library_names"; then # Do each command in the postuninstall commands. cmds=$postuninstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" if test "$?" -ne 0 && test "$rmforce" != yes; then exit_status=1 fi done IFS="$save_ifs" fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. cmds=$old_postuninstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" if test "$?" -ne 0 && test "$rmforce" != yes; then exit_status=1 fi done IFS="$save_ifs" fi # FIXME: should reinstall the best remaining shared library. fi fi ;; *.lo) # Possibly a libtool object, so verify it. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then # Read the .lo file . $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" \ && test "$pic_object" != none; then rmfiles="$rmfiles $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" \ && test "$non_pic_object" != none; then rmfiles="$rmfiles $dir/$non_pic_object" fi fi ;; *) if test "$mode" = clean ; then noexename=$name case $file in *.exe) file=`$echo $file|${SED} 's,.exe$,,'` noexename=`$echo $name|${SED} 's,.exe$,,'` # $file with .exe has already been added to rmfiles, # add $file without .exe rmfiles="$rmfiles $file" ;; esac # Do a test to see if this is a libtool program. if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then relink_command= . $dir/$noexename # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" if test "$fast_install" = yes && test -n "$relink_command"; then rmfiles="$rmfiles $objdir/lt-$name" fi if test "X$noexename" != "X$name" ; then rmfiles="$rmfiles $objdir/lt-${noexename}.c" fi fi fi ;; esac $show "$rm $rmfiles" $run $rm $rmfiles || exit_status=1 done objdir="$origobjdir" # Try to remove the ${objdir}s in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then $show "rmdir $dir" $run rmdir $dir >/dev/null 2>&1 fi done exit $exit_status ;; "") $echo "$modename: you must specify a MODE" 1>&2 $echo "$generic_help" 1>&2 exit $EXIT_FAILURE ;; esac if test -z "$exec_cmd"; then $echo "$modename: invalid operation mode \`$mode'" 1>&2 $echo "$generic_help" 1>&2 exit $EXIT_FAILURE fi fi # test -z "$show_help" if test -n "$exec_cmd"; then eval exec $exec_cmd exit $EXIT_FAILURE fi # We need to display help for each of the modes. case $mode in "") $echo \ "Usage: $modename [OPTION]... [MODE-ARG]... Provide generalized library-building support services. --config show all configuration variables --debug enable verbose shell tracing -n, --dry-run display commands without modifying any files --features display basic configuration information and exit --finish same as \`--mode=finish' --help display this help message and exit --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] --quiet same as \`--silent' --silent don't print informational messages --tag=TAG use configuration variables from tag TAG --version print version information MODE must be one of the following: clean remove files from the build directory compile compile a source file into a libtool object execute automatically set library path, then run a program finish complete the installation of libtool libraries install install libraries or executables link create a library or an executable uninstall remove libraries from an installed directory MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for a more detailed description of MODE. Report bugs to ." exit $EXIT_SUCCESS ;; clean) $echo \ "Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE... Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; compile) $echo \ "Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE Compile a source file into a libtool library object. This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -prefer-pic try to building PIC objects only -prefer-non-pic try to building non-PIC objects only -static always build a \`.o' file suitable for static linking COMPILE-COMMAND is a command to be used in creating a \`standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from SOURCEFILE, then substituting the C source code suffix \`.c' with the library object suffix, \`.lo'." ;; execute) $echo \ "Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]... Automatically set library path, then run a program. This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path This mode sets the library path environment variable according to \`-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated into their corresponding uninstalled binary, and any of their required library directories are added to the library path. Then, COMMAND is executed, with ARGS as arguments." ;; finish) $echo \ "Usage: $modename [OPTION]... --mode=finish [LIBDIR]... Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use the \`--dry-run' option if you just want to see what would be executed." ;; install) $echo \ "Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND... Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be either the \`install' or \`cp' program. The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $echo \ "Usage: $modename [OPTION]... --mode=link LINK-COMMAND... Link object files or libraries together to form another library, or to create an executable program. LINK-COMMAND is a command using the C compiler that you would use to create a program from several object files. The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened -no-fast-install disable the fast-install mode -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -objectlist FILE Use a list of object files found in FILE to specify objects -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -static do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] All other options (arguments beginning with \`-') are ignored. Every other argument is treated as a filename. Files ending in \`.la' are treated as uninstalled libtool libraries, other files are standard or library object files. If the OUTPUT-FILE ends in \`.la', then a libtool library is created, only library objects (\`.lo' files) may be specified, and \`-rpath' is required, except when creating a convenience library. If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created using \`ar' and \`ranlib', or on Windows using \`lib'. If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file is created, otherwise an executable program is created." ;; uninstall) $echo \ "Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) $echo "$modename: invalid operation mode \`$mode'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; esac $echo $echo "Try \`$modename --help' for more information about other modes." exit $EXIT_SUCCESS # The TAGs below are defined such that we never get into a situation # in which we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support # them. This is particularly important on AIX, because we don't # support having both static and shared libraries enabled at the same # time on that platform, so we default to a shared-only configuration. # If a disable-shared tag is given, we'll fallback to a static-only # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared build_libtool_libs=no build_old_libs=yes # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static build_old_libs=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac` # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: gmysqlcc-0.3.0/po/0000777000175000017500000000000010760516433010764 500000000000000gmysqlcc-0.3.0/po/uk.gmo0000644000175000017500000001154410755301563012030 00000000000000Ok     2 @Mj      ";N ` j v%$" ? I e      5 , + B I T f            3 : F S X _ j o { ( C qU     . @ N[x     0I\ n x %$ 0 MWs5, /:Q Xcu    (/B I Ubg ny ~()R,>.8 2O+-'!LJB06/%F=C $# " ;:&HG@ EK<9N1?IMA3)54 (7D*Add a databaseAdd a functionAdd a procedureAdd a tableAdd a viewAlter a databaseAlter a functionAlter a procedureAlter a tableAlter a viewCan't delete this server !!!Can't move down more !!!Can't move up more !!!CategoriesCloseClose tabClose windowConnect to a serverConnectionDatabasesDisplay all create structuresDisplay create structureDisplay edit server partDisplay table dataDisplay view dataDuplicateEdit ServerError during the query : (%d) %sExecuteExecute SQL fileExecute a functionExecute a procedureExecute an SQL file on a MySQL serverField %s can only contain digits !!!Field %s cannot be empty !!!FunctionsGMySQLcc - Connections listGMySQLcc - Server window : %sHelpHost :Load sql fileLocal socket file :NameName :Name : %s Description : %s Sample : %s Url : %s Name already taken ! Please set another one.Password :Please select a serverPort :ProceduresQuery - db : '%s'Query ok. Affected row : %dRead only serverRefreshRemove a databaseRemove a functionRemove a procedureRemove a tableRemove a viewResult %dRowsSQLSQL FileSave sql fileSearchSearch (keyword) :ServerServer nameServers listSizeTablesTopic nameTypeUser name :ViewsWarning !!! This server has been marked with Write Warning flags !!! It is dangerous for the data ... :) Do you want force the execution of the query ?Warning about write query on this serverWrite Warning !!!Project-Id-Version: gmysqlcc 0.2.1 Report-Msgid-Bugs-To: POT-Creation-Date: 2008-01-14 09:42+0100 PO-Revision-Date: 2007-12-21 13:29+0100 Last-Translator: Didier Prolhac Language-Team: French MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=2; plural=(n > 1); Add a databaseAdd a functionAdd a procedureAdd a tableAdd a viewAlter a databaseAlter a functionAlter a procedureAlter a tableAlter a viewCan't delete this server !!!Can't move down more !!!Can't move up more !!!CategoriesCloseClose tabClose windowConnect to a serverConnectionDatabasesDisplay all create structuresDisplay create structureDisplay edit server partDisplay table dataDisplay view dataDuplicateEdit ServerError during the query : (%d) %sExecuteExecute SQL FileExecute a functionExecute a procedureExecute an SQL file on a MySQL serverField %s can only contain digits !!!Field %s cannot be empty !!!FunctionsGMySQLcc - Connections listGMySQLcc - Server window : %sHelpHost :Local sql fileLocal socket file :NameName :Name : %s Description : %s Sample : %s Url : %s Name already taken ! Please set another one.Password :Please select a serverPort :ProceduresQuery - db : '%s'Query ok. Affected row : %dRead only serverRefreshRemove a databaseRemove a functionRemove a procedureRemove a tableRemove a viewResult %dRowsSQLSQL FileSave sql fileSearchSearch (keyword) :ServerServer nameServers listSizeTablesTopic nameTypeUser name :ViewsWarning !!! This server has been marked with Write Warning flags !!! It is dangerous for the data ... :) Do you want force the execution of the query ?Warning about write query on this serverWrite Warning !!!gmysqlcc-0.3.0/po/es.po0000644000175000017500000003106510755301563011654 00000000000000# translation of es-nuevo.po to # This file is distributed under the same license as the PACKAGE package. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER, 2005. # msgid "" msgstr "" "Project-Id-Version: gmysqlcc(0.3.0)\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2008-01-14 09:42+0100\n" "PO-Revision-Date: 2007-12-21 13:31+0100\n" "Last-Translator: Didier Prolhac \n" "Language-Team: spanish \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: KBabel 1.9.1\n" #: src/gmlc_gui_connexions.c:58 msgid "GMySQLcc - Connections list" msgstr "GMySQLcc - Lista de conexiones :" #: src/gmlc_gui_connexions.c:117 msgid "Connection" msgstr "Conexión" #: src/gmlc_gui_connexions.c:123 msgid "Connect to a server" msgstr "Conectar a un servidor" #: src/gmlc_gui_connexions.c:127 msgid "Edit Server" msgstr "Editar Servidor" #: src/gmlc_gui_connexions.c:133 msgid "Display edit server part" msgstr "Mostrar edición del servidor" #: src/gmlc_gui_connexions.c:137 msgid "Execute SQL file" msgstr "Ejecutar archivo SQL" #: src/gmlc_gui_connexions.c:143 msgid "Execute an SQL file on a MySQL server" msgstr "Ejecutar archivo SQL en un servidor MySQL" #: src/gmlc_gui_connexions.c:147 msgid "Close" msgstr "Cerrar" #: src/gmlc_gui_connexions.c:153 msgid "Close window" msgstr "Cerrar ventana" #: src/gmlc_gui_connexions.c:203 msgid "Server" msgstr "Servidor" #: src/gmlc_gui_connexions.c:218 msgid "Name :" msgstr "Nombre :" #: src/gmlc_gui_connexions.c:232 msgid "Host :" msgstr "Servidor :" #: src/gmlc_gui_connexions.c:246 msgid "Port :" msgstr "Puerto :" #: src/gmlc_gui_connexions.c:261 msgid "User name :" msgstr "Nombre de usuario :" #: src/gmlc_gui_connexions.c:275 msgid "Password :" msgstr "Contraseña :" #: src/gmlc_gui_connexions.c:289 msgid "Local socket file :" msgstr "Archivo de «socket» local :" #: src/gmlc_gui_connexions.c:303 msgid "Read only server" msgstr "Servidor unicamente de lectura" #: src/gmlc_gui_connexions.c:312 msgid "Warning about write query on this server" msgstr "Advertencia sobre consulta de modificación en este servidor" #: src/gmlc_gui_connexions.c:356 msgid "Server name" msgstr "Nombre del servidor" #. check if not empty #: src/gmlc_gui_connexions.c:487 src/gmlc_gui_connexions.c:553 #, c-format msgid "Field %s cannot be empty !!!" msgstr "¡¡¡ El campo %s no puede estar vacío !!!" #: src/gmlc_gui_connexions.c:494 src/gmlc_gui_connexions.c:560 #, c-format msgid "Field %s can only contain digits !!!" msgstr "¡¡¡ El campo %s sólo puede contener números !!!" #: src/gmlc_gui_connexions.c:505 src/gmlc_gui_connexions.c:572 msgid "" "Name already taken !\n" "Please set another one." msgstr "" "¡ El nombre ya ha sido tomado !\n" "Por favor, seleccione otro." #: src/gmlc_gui_connexions.c:534 src/gmlc_gui_connexions.c:604 #: src/gmlc_gui_connexions.c:715 msgid "Please select a server" msgstr "Por favor seleccione un servidor" #: src/gmlc_gui_connexions.c:597 msgid "Can't delete this server !!!" msgstr "¡¡¡ No se puede borrar este servidor !!!" #: src/gmlc_gui_connexions.c:640 msgid "Can't move up more !!!" msgstr "¡¡¡ No se puede subir más !!!" #: src/gmlc_gui_connexions.c:676 msgid "Can't move down more !!!" msgstr "¡¡¡ No se puede bajar más !!!" #: src/gmlc_gui_server_tab_help.c:177 msgid "Search (keyword) :" msgstr "Búsqueda(palabra clave) :" #: src/gmlc_gui_server_tab_help.c:190 msgid "Search" msgstr "Busqueda" #. Databases columns #: src/gmlc_gui_server_tab_help.c:238 msgid "Categories" msgstr "Categorías" #. Table columns #: src/gmlc_gui_server_tab_help.c:246 #, fuzzy msgid "Topic name" msgstr "Nombre de la tabla" #: src/gmlc_gui_server_tab_help.c:430 #, c-format msgid "" "Name : %s\n" "\n" "Description :\n" "\n" "%s\n" "\n" "Sample :\n" "\n" "%s\n" "\n" "Url : %s\n" msgstr "" "Nombre : %s\n" "\n" "Descripción :\n" "\n" "%s\n" "\n" "Ejemplo :\n" "\n" "%s\n" "\n" "URL : %s\n" #: src/gmlc_gui_server.c:90 src/gmlc_gui_server.c:112 #, c-format msgid "GMySQLcc - Server window : %s" msgstr "GMySQLcc - Ventana de Servidores : %s" #: src/gmlc_gui_server.c:163 msgid "Servers list" msgstr "Lista de servidores" #: src/gmlc_gui_server.c:193 msgid "Help" msgstr "Ayuda" #. Databases columns #: src/gmlc_gui_server.c:206 src/gmlc_gui_server_tab_data.c:583 msgid "Databases" msgstr "Bases de datos" #: src/gmlc_gui_server.c:229 #, c-format msgid "Query - db : '%s'" msgstr "Consulta - bd : '%s'" #: src/gmlc_gui_server_tab_query.c:200 msgid "Execute" msgstr "Ejecutar" #: src/gmlc_gui_server_tab_query.c:209 msgid "Duplicate" msgstr "Duplicar" #: src/gmlc_gui_server_tab_query.c:229 msgid "Close tab" msgstr "Cerrar pestaña" #: src/gmlc_gui_server_tab_query.c:336 msgid "Write Warning !!!" msgstr "¡¡¡ Escribir advertencia !!!" #: src/gmlc_gui_server_tab_query.c:336 msgid "" "Warning !!! This server has been marked with Write Warning flags !!!\n" "It is dangerous for the data ... :)\n" "\n" "Do you want force the execution of the query ?" msgstr "" "¡¡¡ Advertencia !!! ¡¡¡ Este servidor ha sido marcado con la etiqueta de " "advertencias de escritura !!!\n" "Esto es peligroso para los datos ... :)\n" "¿Quiere forzar la ejecución de la consulta?" #. Query Not Ok #. It is really an error #. Query Not Ok #: src/gmlc_gui_server_tab_query.c:339 src/gmlc_gui_server_tab_query.c:351 #: src/gmlc_gui_server_tab_query.c:393 #, c-format msgid "Error during the query : (%d) %s" msgstr "Error al ejecutar consulta : (%d) %s" #: src/gmlc_gui_server_tab_query.c:433 src/gmlc_gui_server_tab_query.c:555 #, c-format msgid "Result %d" msgstr "Resultado %d" #: src/gmlc_gui_server_tab_query.c:576 #, c-format msgid "" "Query ok.\n" "Affected row : %d" msgstr "" "Consulta ok \n" "Filas afectadas : %d" #: src/gmlc_gui_server_tab_query.c:626 msgid "Load sql file" msgstr "Cargar archivo sql" #: src/gmlc_gui_server_tab_query.c:675 msgid "Save sql file" msgstr "Guardar archivo sql" #: src/gmlc_gui_server_tab_data.c:200 msgid "SQL" msgstr "SQL" #: src/gmlc_gui_server_tab_data.c:209 msgid "SQL File" msgstr "Archivo SQL" #: src/gmlc_gui_server_tab_data.c:254 src/gmlc_gui_server_tab_data.c:319 #: src/gmlc_gui_server_tab_data.c:389 src/gmlc_gui_server_tab_data.c:458 #: src/gmlc_gui_server_tab_data.c:527 msgid "Refresh" msgstr "Refrescar" #: src/gmlc_gui_server_tab_data.c:263 msgid "Add a database" msgstr "Añadir una base de datos" #: src/gmlc_gui_server_tab_data.c:268 msgid "Alter a database" msgstr "Añadir una base de datos" #: src/gmlc_gui_server_tab_data.c:273 msgid "Remove a database" msgstr "Borrar una base de datos" #: src/gmlc_gui_server_tab_data.c:282 msgid "Display all create structures" msgstr "Mostrar todas las estructuras creadas" #: src/gmlc_gui_server_tab_data.c:293 #, fuzzy msgid "Tables" msgstr "Tabla :" #: src/gmlc_gui_server_tab_data.c:328 #, fuzzy msgid "Display table data" msgstr "Mostrar edición del servidor" #: src/gmlc_gui_server_tab_data.c:337 msgid "Add a table" msgstr "Añadir una tabla" #: src/gmlc_gui_server_tab_data.c:342 msgid "Alter a table" msgstr "Alterar una tabla" #: src/gmlc_gui_server_tab_data.c:347 msgid "Remove a table" msgstr "Borrar una tabla" #: src/gmlc_gui_server_tab_data.c:356 src/gmlc_gui_server_tab_data.c:426 #: src/gmlc_gui_server_tab_data.c:495 src/gmlc_gui_server_tab_data.c:564 msgid "Display create structure" msgstr "Mostrar estructura creada" #: src/gmlc_gui_server_tab_data.c:363 msgid "Views" msgstr "Vistas" #: src/gmlc_gui_server_tab_data.c:398 #, fuzzy msgid "Display view data" msgstr "Mostrar edición del servidor" #: src/gmlc_gui_server_tab_data.c:407 msgid "Add a view" msgstr "Agregar una vista" #: src/gmlc_gui_server_tab_data.c:412 msgid "Alter a view" msgstr "Alterar una vista" #: src/gmlc_gui_server_tab_data.c:417 msgid "Remove a view" msgstr "Borrar una vista" #: src/gmlc_gui_server_tab_data.c:432 msgid "Procedures" msgstr "Procedimientos" #: src/gmlc_gui_server_tab_data.c:467 #, fuzzy msgid "Execute a procedure" msgstr "Alterar un procedimiento" #: src/gmlc_gui_server_tab_data.c:476 msgid "Add a procedure" msgstr "Agregar un procedimiento" #: src/gmlc_gui_server_tab_data.c:481 msgid "Alter a procedure" msgstr "Alterar un procedimiento" #: src/gmlc_gui_server_tab_data.c:486 msgid "Remove a procedure" msgstr "Borrar un procedimiento" #: src/gmlc_gui_server_tab_data.c:501 msgid "Functions" msgstr "Funciones" #: src/gmlc_gui_server_tab_data.c:536 #, fuzzy msgid "Execute a function" msgstr "Alterar una función" #: src/gmlc_gui_server_tab_data.c:545 msgid "Add a function" msgstr "Agregar una función" #: src/gmlc_gui_server_tab_data.c:550 msgid "Alter a function" msgstr "Alterar una función" #: src/gmlc_gui_server_tab_data.c:555 msgid "Remove a function" msgstr "Borrar una función" #. Table columns #. View columns #. Procedure columns #. Function columns #: src/gmlc_gui_server_tab_data.c:591 src/gmlc_gui_server_tab_data.c:606 #: src/gmlc_gui_server_tab_data.c:614 src/gmlc_gui_server_tab_data.c:622 msgid "Name" msgstr "Nombre" #: src/gmlc_gui_server_tab_data.c:593 msgid "Rows" msgstr "Filas" #: src/gmlc_gui_server_tab_data.c:595 msgid "Size" msgstr "Tamaño" #: src/gmlc_gui_server_tab_data.c:597 msgid "Type" msgstr "Tipo" #~ msgid "Dump" #~ msgstr "Volcar" #~ msgid "Dump Query" #~ msgstr "Volcar consulta" #~ msgid "-" #~ msgstr "-" #~ msgid "Server name :" #~ msgstr "Nombre del servidor :" #~ msgid "Database name :" #~ msgstr "Nombre de la base de datos :" #~ msgid "Table name :" #~ msgstr "Nombre de la tabla :" #~ msgid "SQL query :" #~ msgstr "Consulta SQL:" #~ msgid "Selection :" #~ msgstr "Selección :" #~ msgid "One file per database" #~ msgstr "Un archivo por cada base de datos" #~ msgid "All files in a directory" #~ msgstr "Todos los archivos de un directorio" #~ msgid "Drop database if exist" #~ msgstr "Borrar base de datos si existe" #~ msgid "Drop table if exist" #~ msgstr "Borrar tabla si existe" #~ msgid "Complete inserts" #~ msgstr "Comandos inserts completos" #~ msgid "Structure" #~ msgstr "Estructura" #~ msgid "Structure and data" #~ msgstr "Estructura y datos" #~ msgid "Data only" #~ msgstr "Datos sólo" #~ msgid "Options :" #~ msgstr "Opciones :" #~ msgid "File name :" #~ msgstr "Nombre del archivo:" #~ msgid "..." #~ msgstr "..." #~ msgid "Format :" #~ msgstr "Formato :" #~ msgid "Charset :" #~ msgstr "Codificación :" #~ msgid "Output :" #~ msgstr "Salida :" #~ msgid "CSV" #~ msgstr "CSV" #~ msgid "XML" #~ msgstr "XML" #~ msgid "Dump file name" #~ msgstr "Volcar salida a archivo" #~ msgid "_Up" #~ msgstr "_Arriba" #~ msgid "_Down" #~ msgstr "A_bajo" #~ msgid "_New" #~ msgstr "_Nuevo" #~ msgid "_Add" #~ msgstr "_Añadir" #~ msgid "_Modify" #~ msgstr "_Modificar" #~ msgid "D_elete" #~ msgstr "B_orrar" #~ msgid "SQL Request - %s - %s" #~ msgstr "Consulta SQL - %s - %s" #~ msgid "Execute SQL query" #~ msgstr "Ejecutar consulta SQL" #~ msgid "Select output charset" #~ msgstr "Seleccione codificación de salida" #~ msgid "Duplicate SQL Windows" #~ msgstr "Duplicar ventanas SQL" #~ msgid "Dump with current query" #~ msgstr "Volcar la consulta actual" #~ msgid "Records : %d" #~ msgstr "Registros : %d" #~ msgid "Can't use the charset : '%s'" #~ msgstr "No se puede usar el juego de caracteres : '%s'" #~ msgid "Server : %s" #~ msgstr "Servidor : %s" #~ msgid "Exec SQL Query" #~ msgstr "Ejecutar consulta SQL" #~ msgid "Exec SQL File" #~ msgstr "Ejecutar archivo SQL" #~ msgid "Text Window - File name : %s" #~ msgstr "Ventana de texto - Nombre del archivo : %s" #~ msgid "Text Window" #~ msgstr "Ventana de texto" #~ msgid "Open" #~ msgstr "Abrir" #~ msgid "Save" #~ msgstr "Guardar" #~ msgid "Execute sql file" #~ msgstr "Ejecutar archivo sql" #~ msgid "Add" #~ msgstr "Añadir" #~ msgid "Delete" #~ msgstr "Borrar" #~ msgid "Modify" #~ msgstr "Modificar" #~ msgid "User informations :" #~ msgstr "Información de usuarios :" #~ msgid "Login :" #~ msgstr "Nombre de usuario :" #~ msgid "Already encrypted password" #~ msgstr "Contraseña ya encriptada" #~ msgid "Max" #~ msgstr "Max" #~ msgid "Queries :" #~ msgstr "Consultas :" #~ msgid "Updates :" #~ msgstr "Actualizaciones :" #~ msgid "User" #~ msgstr "Usuario" #~ msgid "SSL type :" #~ msgstr "Tipo SSL :" #~ msgid "SSL cypher :" #~ msgstr "Cifrado SSL :" #~ msgid "x509 issuer :" #~ msgstr "Emisor x509 :" #~ msgid "x509 subject :" #~ msgstr "Asunto x509 :" #~ msgid "Ssl" #~ msgstr "Ssl" #~ msgid "Database rights :" #~ msgstr "Privilegios de la base de datos :" #~ msgid "Database" #~ msgstr "Base de datos" #~ msgid "Rights :" #~ msgstr "Privilegios :" #~ msgid "Users" #~ msgstr "Usuarios" #~ msgid "In construction" #~ msgstr "En construcción" #~ msgid "Value" #~ msgstr "Valor" gmysqlcc-0.3.0/po/uk.po0000644000175000017500000003027210755301563011663 00000000000000# French translations for gmysqlcc package. # Copyright (C) 2004 THE gmysqlcc'S COPYRIGHT HOLDER # This file is distributed under the same license as the gmysqlcc package. # Debian User , 2004. # msgid "" msgstr "" "Project-Id-Version: gmysqlcc 0.2.1\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2008-01-14 09:42+0100\n" "PO-Revision-Date: 2007-12-21 13:29+0100\n" "Last-Translator: Didier Prolhac \n" "Language-Team: French \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO-8859-1\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" #: src/gmlc_gui_connexions.c:58 msgid "GMySQLcc - Connections list" msgstr "GMySQLcc - Connections list" #: src/gmlc_gui_connexions.c:117 msgid "Connection" msgstr "Connection" #: src/gmlc_gui_connexions.c:123 msgid "Connect to a server" msgstr "Connect to a server" #: src/gmlc_gui_connexions.c:127 msgid "Edit Server" msgstr "Edit Server" #: src/gmlc_gui_connexions.c:133 msgid "Display edit server part" msgstr "Display edit server part" #: src/gmlc_gui_connexions.c:137 msgid "Execute SQL file" msgstr "Execute SQL File" #: src/gmlc_gui_connexions.c:143 msgid "Execute an SQL file on a MySQL server" msgstr "Execute an SQL file on a MySQL server" #: src/gmlc_gui_connexions.c:147 msgid "Close" msgstr "Close" #: src/gmlc_gui_connexions.c:153 msgid "Close window" msgstr "Close window" #: src/gmlc_gui_connexions.c:203 msgid "Server" msgstr "Server" #: src/gmlc_gui_connexions.c:218 msgid "Name :" msgstr "Name :" #: src/gmlc_gui_connexions.c:232 msgid "Host :" msgstr "Host :" #: src/gmlc_gui_connexions.c:246 msgid "Port :" msgstr "Port :" #: src/gmlc_gui_connexions.c:261 msgid "User name :" msgstr "User name :" #: src/gmlc_gui_connexions.c:275 msgid "Password :" msgstr "Password :" #: src/gmlc_gui_connexions.c:289 msgid "Local socket file :" msgstr "Local socket file :" #: src/gmlc_gui_connexions.c:303 msgid "Read only server" msgstr "Read only server" #: src/gmlc_gui_connexions.c:312 msgid "Warning about write query on this server" msgstr "Warning about write query on this server" #: src/gmlc_gui_connexions.c:356 msgid "Server name" msgstr "Server name" #. check if not empty #: src/gmlc_gui_connexions.c:487 src/gmlc_gui_connexions.c:553 #, c-format msgid "Field %s cannot be empty !!!" msgstr "Field %s cannot be empty !!!" #: src/gmlc_gui_connexions.c:494 src/gmlc_gui_connexions.c:560 #, c-format msgid "Field %s can only contain digits !!!" msgstr "Field %s can only contain digits !!!" #: src/gmlc_gui_connexions.c:505 src/gmlc_gui_connexions.c:572 msgid "" "Name already taken !\n" "Please set another one." msgstr "" "Name already taken !\n" "Please set another one." #: src/gmlc_gui_connexions.c:534 src/gmlc_gui_connexions.c:604 #: src/gmlc_gui_connexions.c:715 msgid "Please select a server" msgstr "Please select a server" #: src/gmlc_gui_connexions.c:597 msgid "Can't delete this server !!!" msgstr "Can't delete this server !!!" #: src/gmlc_gui_connexions.c:640 msgid "Can't move up more !!!" msgstr "Can't move up more !!!" #: src/gmlc_gui_connexions.c:676 msgid "Can't move down more !!!" msgstr "Can't move down more !!!" #: src/gmlc_gui_server_tab_help.c:177 msgid "Search (keyword) :" msgstr "Search (keyword) :" #: src/gmlc_gui_server_tab_help.c:190 msgid "Search" msgstr "Search" #. Databases columns #: src/gmlc_gui_server_tab_help.c:238 msgid "Categories" msgstr "Categories" #. Table columns #: src/gmlc_gui_server_tab_help.c:246 msgid "Topic name" msgstr "Topic name" #: src/gmlc_gui_server_tab_help.c:430 #, c-format msgid "" "Name : %s\n" "\n" "Description :\n" "\n" "%s\n" "\n" "Sample :\n" "\n" "%s\n" "\n" "Url : %s\n" msgstr "" "Name : %s\n" "\n" "Description :\n" "\n" "%s\n" "\n" "Sample :\n" "\n" "%s\n" "\n" "Url : %s\n" #: src/gmlc_gui_server.c:90 src/gmlc_gui_server.c:112 #, c-format msgid "GMySQLcc - Server window : %s" msgstr "GMySQLcc - Server window : %s" #: src/gmlc_gui_server.c:163 msgid "Servers list" msgstr "Servers list" #: src/gmlc_gui_server.c:193 msgid "Help" msgstr "Help" #. Databases columns #: src/gmlc_gui_server.c:206 src/gmlc_gui_server_tab_data.c:583 msgid "Databases" msgstr "Databases" #: src/gmlc_gui_server.c:229 #, c-format msgid "Query - db : '%s'" msgstr "Query - db : '%s'" #: src/gmlc_gui_server_tab_query.c:200 msgid "Execute" msgstr "Execute" #: src/gmlc_gui_server_tab_query.c:209 msgid "Duplicate" msgstr "Duplicate" #: src/gmlc_gui_server_tab_query.c:229 msgid "Close tab" msgstr "Close tab" #: src/gmlc_gui_server_tab_query.c:336 msgid "Write Warning !!!" msgstr "Write Warning !!!" #: src/gmlc_gui_server_tab_query.c:336 msgid "" "Warning !!! This server has been marked with Write Warning flags !!!\n" "It is dangerous for the data ... :)\n" "\n" "Do you want force the execution of the query ?" msgstr "" "Warning !!! This server has been marked with Write Warning flags !!!\n" "It is dangerous for the data ... :)\n" "\n" "Do you want force the execution of the query ?" #. Query Not Ok #. It is really an error #. Query Not Ok #: src/gmlc_gui_server_tab_query.c:339 src/gmlc_gui_server_tab_query.c:351 #: src/gmlc_gui_server_tab_query.c:393 #, c-format msgid "Error during the query : (%d) %s" msgstr "Error during the query : (%d) %s" #: src/gmlc_gui_server_tab_query.c:433 src/gmlc_gui_server_tab_query.c:555 #, c-format msgid "Result %d" msgstr "Result %d" #: src/gmlc_gui_server_tab_query.c:576 #, c-format msgid "" "Query ok.\n" "Affected row : %d" msgstr "" "Query ok.\n" "Affected row : %d" #: src/gmlc_gui_server_tab_query.c:626 msgid "Load sql file" msgstr "Local sql file" #: src/gmlc_gui_server_tab_query.c:675 msgid "Save sql file" msgstr "Save sql file" #: src/gmlc_gui_server_tab_data.c:200 msgid "SQL" msgstr "SQL" #: src/gmlc_gui_server_tab_data.c:209 msgid "SQL File" msgstr "SQL File" #: src/gmlc_gui_server_tab_data.c:254 src/gmlc_gui_server_tab_data.c:319 #: src/gmlc_gui_server_tab_data.c:389 src/gmlc_gui_server_tab_data.c:458 #: src/gmlc_gui_server_tab_data.c:527 msgid "Refresh" msgstr "Refresh" #: src/gmlc_gui_server_tab_data.c:263 msgid "Add a database" msgstr "Add a database" #: src/gmlc_gui_server_tab_data.c:268 msgid "Alter a database" msgstr "Alter a database" #: src/gmlc_gui_server_tab_data.c:273 msgid "Remove a database" msgstr "Remove a database" #: src/gmlc_gui_server_tab_data.c:282 msgid "Display all create structures" msgstr "Display all create structures" #: src/gmlc_gui_server_tab_data.c:293 msgid "Tables" msgstr "Tables" #: src/gmlc_gui_server_tab_data.c:328 msgid "Display table data" msgstr "Display table data" #: src/gmlc_gui_server_tab_data.c:337 msgid "Add a table" msgstr "Add a table" #: src/gmlc_gui_server_tab_data.c:342 msgid "Alter a table" msgstr "Alter a table" #: src/gmlc_gui_server_tab_data.c:347 msgid "Remove a table" msgstr "Remove a table" #: src/gmlc_gui_server_tab_data.c:356 src/gmlc_gui_server_tab_data.c:426 #: src/gmlc_gui_server_tab_data.c:495 src/gmlc_gui_server_tab_data.c:564 msgid "Display create structure" msgstr "Display create structure" #: src/gmlc_gui_server_tab_data.c:363 msgid "Views" msgstr "Views" #: src/gmlc_gui_server_tab_data.c:398 msgid "Display view data" msgstr "Display view data" #: src/gmlc_gui_server_tab_data.c:407 msgid "Add a view" msgstr "Add a view" #: src/gmlc_gui_server_tab_data.c:412 msgid "Alter a view" msgstr "Alter a view" #: src/gmlc_gui_server_tab_data.c:417 msgid "Remove a view" msgstr "Remove a view" #: src/gmlc_gui_server_tab_data.c:432 msgid "Procedures" msgstr "Procedures" #: src/gmlc_gui_server_tab_data.c:467 msgid "Execute a procedure" msgstr "Execute a procedure" #: src/gmlc_gui_server_tab_data.c:476 msgid "Add a procedure" msgstr "Add a procedure" #: src/gmlc_gui_server_tab_data.c:481 msgid "Alter a procedure" msgstr "Alter a procedure" #: src/gmlc_gui_server_tab_data.c:486 msgid "Remove a procedure" msgstr "Remove a procedure" #: src/gmlc_gui_server_tab_data.c:501 msgid "Functions" msgstr "Functions" #: src/gmlc_gui_server_tab_data.c:536 msgid "Execute a function" msgstr "Execute a function" #: src/gmlc_gui_server_tab_data.c:545 msgid "Add a function" msgstr "Add a function" #: src/gmlc_gui_server_tab_data.c:550 msgid "Alter a function" msgstr "Alter a function" #: src/gmlc_gui_server_tab_data.c:555 msgid "Remove a function" msgstr "Remove a function" #. Table columns #. View columns #. Procedure columns #. Function columns #: src/gmlc_gui_server_tab_data.c:591 src/gmlc_gui_server_tab_data.c:606 #: src/gmlc_gui_server_tab_data.c:614 src/gmlc_gui_server_tab_data.c:622 msgid "Name" msgstr "Name" #: src/gmlc_gui_server_tab_data.c:593 msgid "Rows" msgstr "Rows" #: src/gmlc_gui_server_tab_data.c:595 msgid "Size" msgstr "Size" #: src/gmlc_gui_server_tab_data.c:597 msgid "Type" msgstr "Type" #~ msgid "Dump" #~ msgstr "Dump" #~ msgid "Dump Query" #~ msgstr "Dump Query" #~ msgid "-" #~ msgstr "-" #~ msgid "Server name :" #~ msgstr "Server name :" #~ msgid "Database name :" #~ msgstr "Database name :" #~ msgid "Table name :" #~ msgstr "Table name :" #~ msgid "SQL query :" #~ msgstr "SQL query :" #~ msgid "Selection :" #~ msgstr "Selection :" #~ msgid "One file per database" #~ msgstr "One file per database" #~ msgid "All files in a directory" #~ msgstr "All files in a directory" #~ msgid "Drop database if exist" #~ msgstr "Drop database if exist" #~ msgid "Drop table if exist" #~ msgstr "Drop table if exist" #~ msgid "Complete inserts" #~ msgstr "Complete inserts" #~ msgid "Structure" #~ msgstr "Structure" #~ msgid "Structure and data" #~ msgstr "Structure and data" #~ msgid "Data only" #~ msgstr "Data only" #~ msgid "Options :" #~ msgstr "Options :" #~ msgid "File name :" #~ msgstr "File name :" #~ msgid "..." #~ msgstr "..." #~ msgid "Format :" #~ msgstr "Format :" #~ msgid "Charset :" #~ msgstr "Charset :" #~ msgid "Output :" #~ msgstr "Output :" #~ msgid "CSV" #~ msgstr "CSV" #~ msgid "XML" #~ msgstr "XML" #~ msgid "Dump file name" #~ msgstr "Dump file name" #~ msgid "_Up" #~ msgstr "_Up" #~ msgid "_Down" #~ msgstr "_Down" #~ msgid "_New" #~ msgstr "_New" #~ msgid "_Add" #~ msgstr "_Add" #~ msgid "_Modify" #~ msgstr "_Modify" #~ msgid "D_elete" #~ msgstr "D_elete" #~ msgid "SQL Request - %s - %s" #~ msgstr "SQL Request - %s - %s" #~ msgid "Execute SQL query" #~ msgstr "Execute SQL query" #~ msgid "Select output charset" #~ msgstr "Select output charset" #~ msgid "Duplicate SQL Windows" #~ msgstr "Duplicate SQL Windows" #~ msgid "Dump with current query" #~ msgstr "Dump with current query" #~ msgid "Records : %d" #~ msgstr "Records : %d" #~ msgid "Can't use the charset : '%s'" #~ msgstr "Can't use the charset : '%s'" #~ msgid "Server : %s" #~ msgstr "Server : %s" #~ msgid "Exec SQL Query" #~ msgstr "Exec SQL Query" #~ msgid "Exec SQL File" #~ msgstr "Exec SQL File" #~ msgid "Text Window - File name : %s" #~ msgstr "Text Window - File name : %s" #~ msgid "Text Window" #~ msgstr "Text window" #~ msgid "Open" #~ msgstr "Open" #~ msgid "Save" #~ msgstr "Save" #~ msgid "Execute sql file" #~ msgstr "Execute sql file" #~ msgid "Add" #~ msgstr "Add" #~ msgid "Delete" #~ msgstr "Delete" #~ msgid "Modify" #~ msgstr "Modify" #~ msgid "User informations :" #~ msgstr "User informations :" #~ msgid "Login :" #~ msgstr "Login :" #~ msgid "Already encrypted password" #~ msgstr "Already encrypted password" #~ msgid "Max" #~ msgstr "Max" #~ msgid "Queries :" #~ msgstr "Queries :" #~ msgid "Updates :" #~ msgstr "Updates" #~ msgid "User" #~ msgstr "User" #~ msgid "SSL type :" #~ msgstr "SSL type :" #~ msgid "SSL cypher :" #~ msgstr "SSL cypher :" #~ msgid "x509 issuer :" #~ msgstr "x509 issuer :" #~ msgid "x509 subject :" #~ msgstr "x509 subject :" #~ msgid "Ssl" #~ msgstr "Ssl" #~ msgid "Database rights :" #~ msgstr "Database rights :" #~ msgid "Database" #~ msgstr "Database" #~ msgid "Rights :" #~ msgstr "Rights :" #~ msgid "Users" #~ msgstr "Users" #~ msgid "In construction" #~ msgstr "In construction" #~ msgid "Value" #~ msgstr "Value" #~ msgid "Database '%s' created !" #~ msgstr "Database '%s' created !" #~ msgid "Can't create database '%s' !" #~ msgstr "Can't create database '%s'" #~ msgid "Database '%s' deleted !" #~ msgstr "Database '%s' deleted !" #~ msgid "Are you sure ?" #~ msgstr "Are you sure ?" #~ msgid "Table '%s'.'%s' deleted !" #~ msgstr "Table '%s'.'%s' deleted !" gmysqlcc-0.3.0/po/fr.po0000644000175000017500000003214410755301563011653 00000000000000# French translations for gmysqlcc package. # Copyright (C) 2004 THE gmysqlcc'S COPYRIGHT HOLDER # This file is distributed under the same license as the gmysqlcc package. # Debian User , 2004. # msgid "" msgstr "" "Project-Id-Version: gmysqlcc 0.3.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2008-01-14 09:42+0100\n" "PO-Revision-Date: 2007-12-21 13:30+0100\n" "Last-Translator: Didier Prolhac \n" "Language-Team: French \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" "X-Poedit-Language: French\n" "X-Poedit-SourceCharset: utf-8\n" #: src/gmlc_gui_connexions.c:58 msgid "GMySQLcc - Connections list" msgstr "GMySQLcc - Liste des connexions" #: src/gmlc_gui_connexions.c:117 msgid "Connection" msgstr "Connexion" #: src/gmlc_gui_connexions.c:123 msgid "Connect to a server" msgstr "Connexion a un serveur" #: src/gmlc_gui_connexions.c:127 msgid "Edit Server" msgstr "Edite Serveur" #: src/gmlc_gui_connexions.c:133 msgid "Display edit server part" msgstr "Affiche la partie d'édition des serveurs" #: src/gmlc_gui_connexions.c:137 msgid "Execute SQL file" msgstr "Exécute un fichier SQL" #: src/gmlc_gui_connexions.c:143 msgid "Execute an SQL file on a MySQL server" msgstr "Exécute un fichier SQL dans un serveur MySQL" #: src/gmlc_gui_connexions.c:147 msgid "Close" msgstr "Fermer" #: src/gmlc_gui_connexions.c:153 msgid "Close window" msgstr "Fermer la fenêtre" #: src/gmlc_gui_connexions.c:203 msgid "Server" msgstr "Serveur" #: src/gmlc_gui_connexions.c:218 msgid "Name :" msgstr "Nom :" #: src/gmlc_gui_connexions.c:232 msgid "Host :" msgstr "Nom de la machine :" #: src/gmlc_gui_connexions.c:246 msgid "Port :" msgstr "Port :" #: src/gmlc_gui_connexions.c:261 msgid "User name :" msgstr "Nom de l'utilisateur :" #: src/gmlc_gui_connexions.c:275 msgid "Password :" msgstr "Mot de passe :" #: src/gmlc_gui_connexions.c:289 msgid "Local socket file :" msgstr "Fichier socket local :" #: src/gmlc_gui_connexions.c:303 msgid "Read only server" msgstr "Serveur en lecture seule" #: src/gmlc_gui_connexions.c:312 msgid "Warning about write query on this server" msgstr "Préviens en cas de requète modifiant des données sur le serveur" #: src/gmlc_gui_connexions.c:356 msgid "Server name" msgstr "Nom du serveur" #. check if not empty #: src/gmlc_gui_connexions.c:487 src/gmlc_gui_connexions.c:553 #, c-format msgid "Field %s cannot be empty !!!" msgstr "Le champ %s ne peut pas être vide !!!" #: src/gmlc_gui_connexions.c:494 src/gmlc_gui_connexions.c:560 #, c-format msgid "Field %s can only contain digits !!!" msgstr "Le champ %s ne peut contenir que des chiffres !!!" #: src/gmlc_gui_connexions.c:505 src/gmlc_gui_connexions.c:572 msgid "" "Name already taken !\n" "Please set another one." msgstr "" "Ce nom est déjà pris !\n" "Choisissez en un autre." #: src/gmlc_gui_connexions.c:534 src/gmlc_gui_connexions.c:604 #: src/gmlc_gui_connexions.c:715 msgid "Please select a server" msgstr "Sélectionnez un serveur de base de donnée" #: src/gmlc_gui_connexions.c:597 msgid "Can't delete this server !!!" msgstr "Impossible de supprimer ce serveur !!!" #: src/gmlc_gui_connexions.c:640 msgid "Can't move up more !!!" msgstr "Impossible d'aller plus haut !!!" #: src/gmlc_gui_connexions.c:676 msgid "Can't move down more !!!" msgstr "Impossible d'aller plus bas !!!" #: src/gmlc_gui_server_tab_help.c:177 msgid "Search (keyword) :" msgstr "Recherche (Mots clés) :" #: src/gmlc_gui_server_tab_help.c:190 msgid "Search" msgstr "Recherche" #. Databases columns #: src/gmlc_gui_server_tab_help.c:238 msgid "Categories" msgstr "Catégories" #. Table columns #: src/gmlc_gui_server_tab_help.c:246 msgid "Topic name" msgstr "Noms des sujets" #: src/gmlc_gui_server_tab_help.c:430 #, c-format msgid "" "Name : %s\n" "\n" "Description :\n" "\n" "%s\n" "\n" "Sample :\n" "\n" "%s\n" "\n" "Url : %s\n" msgstr "" "Nom : %s\n" "\n" "Description :\n" "\n" "%s\n" "\n" "Exemple :\n" "\n" "%s\n" "\n" "Url : %s\n" #: src/gmlc_gui_server.c:90 src/gmlc_gui_server.c:112 #, c-format msgid "GMySQLcc - Server window : %s" msgstr "GMySQLcc - Fenêtre du serveur : %s" #: src/gmlc_gui_server.c:163 msgid "Servers list" msgstr "Liste des serveurs" #: src/gmlc_gui_server.c:193 msgid "Help" msgstr "Aide" #. Databases columns #: src/gmlc_gui_server.c:206 src/gmlc_gui_server_tab_data.c:583 msgid "Databases" msgstr "Bases de données" #: src/gmlc_gui_server.c:229 #, c-format msgid "Query - db : '%s'" msgstr "Requête - base : '%s'" #: src/gmlc_gui_server_tab_query.c:200 msgid "Execute" msgstr "Exécuter" #: src/gmlc_gui_server_tab_query.c:209 msgid "Duplicate" msgstr "Dupliquer" #: src/gmlc_gui_server_tab_query.c:229 msgid "Close tab" msgstr "Fermer Onglet" #: src/gmlc_gui_server_tab_query.c:336 msgid "Write Warning !!!" msgstr "Protection contre la modofication !!!" #: src/gmlc_gui_server_tab_query.c:336 msgid "" "Warning !!! This server has been marked with Write Warning flags !!!\n" "It is dangerous for the data ... :)\n" "\n" "Do you want force the execution of the query ?" msgstr "" "Attention !!! Ce serveur a été marqué avec comme étant à ne pas " "modifier !!!\n" "Ce serait dangereux pour les données ... :)\n" "\n" "Voulez-vous forcer l'exécution de cette requête ?" #. Query Not Ok #. It is really an error #. Query Not Ok #: src/gmlc_gui_server_tab_query.c:339 src/gmlc_gui_server_tab_query.c:351 #: src/gmlc_gui_server_tab_query.c:393 #, c-format msgid "Error during the query : (%d) %s" msgstr "Erreur durant l'exécution de la requête : (%d) %s" #: src/gmlc_gui_server_tab_query.c:433 src/gmlc_gui_server_tab_query.c:555 #, c-format msgid "Result %d" msgstr "Résultat %d" #: src/gmlc_gui_server_tab_query.c:576 #, c-format msgid "" "Query ok.\n" "Affected row : %d" msgstr "" "Requête ok.\n" "Lignes modifiées : %d" #: src/gmlc_gui_server_tab_query.c:626 msgid "Load sql file" msgstr "Lire le fichier SQL" #: src/gmlc_gui_server_tab_query.c:675 msgid "Save sql file" msgstr "Enregistrer le fichier SQL" #: src/gmlc_gui_server_tab_data.c:200 msgid "SQL" msgstr "SQL" #: src/gmlc_gui_server_tab_data.c:209 msgid "SQL File" msgstr "Fichier SQL" #: src/gmlc_gui_server_tab_data.c:254 src/gmlc_gui_server_tab_data.c:319 #: src/gmlc_gui_server_tab_data.c:389 src/gmlc_gui_server_tab_data.c:458 #: src/gmlc_gui_server_tab_data.c:527 msgid "Refresh" msgstr "Rafraichir" #: src/gmlc_gui_server_tab_data.c:263 msgid "Add a database" msgstr "Ajouter une base de donnée" #: src/gmlc_gui_server_tab_data.c:268 msgid "Alter a database" msgstr "Modifier une base de donnée" #: src/gmlc_gui_server_tab_data.c:273 msgid "Remove a database" msgstr "Supprimer une base de donnée" #: src/gmlc_gui_server_tab_data.c:282 msgid "Display all create structures" msgstr "Afficher la structure de la base de données" #: src/gmlc_gui_server_tab_data.c:293 msgid "Tables" msgstr "Tables" #: src/gmlc_gui_server_tab_data.c:328 msgid "Display table data" msgstr "Affiche les données de la table" #: src/gmlc_gui_server_tab_data.c:337 msgid "Add a table" msgstr "Ajouter une table" #: src/gmlc_gui_server_tab_data.c:342 msgid "Alter a table" msgstr "Modifie une table" #: src/gmlc_gui_server_tab_data.c:347 msgid "Remove a table" msgstr "Supprimer une table" #: src/gmlc_gui_server_tab_data.c:356 src/gmlc_gui_server_tab_data.c:426 #: src/gmlc_gui_server_tab_data.c:495 src/gmlc_gui_server_tab_data.c:564 msgid "Display create structure" msgstr "Afficher la structure de la table" #: src/gmlc_gui_server_tab_data.c:363 msgid "Views" msgstr "Vues" #: src/gmlc_gui_server_tab_data.c:398 msgid "Display view data" msgstr "Affiche les données de la vue" #: src/gmlc_gui_server_tab_data.c:407 msgid "Add a view" msgstr "Ajouter une vue" #: src/gmlc_gui_server_tab_data.c:412 msgid "Alter a view" msgstr "Modifier une vue" #: src/gmlc_gui_server_tab_data.c:417 msgid "Remove a view" msgstr "Supprimer une vue" #: src/gmlc_gui_server_tab_data.c:432 msgid "Procedures" msgstr "Procédures" #: src/gmlc_gui_server_tab_data.c:467 msgid "Execute a procedure" msgstr "Exécute la procédure" #: src/gmlc_gui_server_tab_data.c:476 msgid "Add a procedure" msgstr "Ajouter une procédure" #: src/gmlc_gui_server_tab_data.c:481 msgid "Alter a procedure" msgstr "Modifier une procédure" #: src/gmlc_gui_server_tab_data.c:486 msgid "Remove a procedure" msgstr "Supprimer une procédure" #: src/gmlc_gui_server_tab_data.c:501 msgid "Functions" msgstr "Fonctions" #: src/gmlc_gui_server_tab_data.c:536 msgid "Execute a function" msgstr "Exécute la fonction" #: src/gmlc_gui_server_tab_data.c:545 msgid "Add a function" msgstr "Ajouter une fonction" #: src/gmlc_gui_server_tab_data.c:550 msgid "Alter a function" msgstr "Modifier une fonction" #: src/gmlc_gui_server_tab_data.c:555 msgid "Remove a function" msgstr "Supprimer une fonction" #. Table columns #. View columns #. Procedure columns #. Function columns #: src/gmlc_gui_server_tab_data.c:591 src/gmlc_gui_server_tab_data.c:606 #: src/gmlc_gui_server_tab_data.c:614 src/gmlc_gui_server_tab_data.c:622 msgid "Name" msgstr "Nom" #: src/gmlc_gui_server_tab_data.c:593 msgid "Rows" msgstr "Nbr Lignes" #: src/gmlc_gui_server_tab_data.c:595 msgid "Size" msgstr "Taille" #: src/gmlc_gui_server_tab_data.c:597 msgid "Type" msgstr "Type" #~ msgid "Dump" #~ msgstr "Dump" #~ msgid "Dump Query" #~ msgstr "Export SQL" #~ msgid "-" #~ msgstr "-" #~ msgid "Server name :" #~ msgstr "Nom du serveur :" #~ msgid "Database name :" #~ msgstr "Nom de la base de donnée :" #~ msgid "Table name :" #~ msgstr "Nom de la table :" #~ msgid "SQL query :" #~ msgstr "Requête SQL :" #~ msgid "Selection :" #~ msgstr "Selection :" #~ msgid "One file per database" #~ msgstr "Un fichier par base de donnée" #~ msgid "All files in a directory" #~ msgstr "Tous les fichiers dans un répertoire" #~ msgid "Drop database if exist" #~ msgstr "Effacer la base de donnée si elle existe" #~ msgid "Drop table if exist" #~ msgstr "Effacer la table si elle existe" #~ msgid "Complete inserts" #~ msgstr "Insertions complètes" #~ msgid "Structure" #~ msgstr "Structure" #~ msgid "Structure and data" #~ msgstr "Structure et données" #~ msgid "Data only" #~ msgstr "Données seulement" #~ msgid "Options :" #~ msgstr "Options :" #~ msgid "File name :" #~ msgstr "Nom du fichier :" #~ msgid "..." #~ msgstr "..." #~ msgid "Format :" #~ msgstr "Format :" #~ msgid "Charset :" #~ msgstr "Charset de sortie :" #~ msgid "Output :" #~ msgstr "Export :" #~ msgid "CSV" #~ msgstr "CSV" #~ msgid "XML" #~ msgstr "XML" #~ msgid "Dump file name" #~ msgstr "Nom du fichier de sauvegarde" #~ msgid "_Up" #~ msgstr "Haut" #~ msgid "_Down" #~ msgstr "Bas" #~ msgid "_New" #~ msgstr "Nouveau" #~ msgid "_Add" #~ msgstr "Ajouter" #~ msgid "_Modify" #~ msgstr "Modifier" #~ msgid "D_elete" #~ msgstr "Supprimer" #~ msgid "SQL Request - %s - %s" #~ msgstr "Requête SQL - %s - %s" #~ msgid "Execute SQL query" #~ msgstr "Exécute une requete SQL" #~ msgid "Select output charset" #~ msgstr "Charset de sortie :" #~ msgid "Duplicate SQL Windows" #~ msgstr "Duplique la fenêtre courante" #~ msgid "Dump with current query" #~ msgstr "Sauvegarde en utilisant la requête courante" #~ msgid "Records : %d" #~ msgstr "Enregistrements : %d" #~ msgid "Can't use the charset : '%s'" #~ msgstr "Impossible d'utiliser ce charset : '%s'" #~ msgid "Server : %s" #~ msgstr "Serveur : %s" #~ msgid "Exec SQL Query" #~ msgstr "Exécute une requête SQL" #~ msgid "Exec SQL File" #~ msgstr "Exécute un fichier SQL" #~ msgid "Text Window - File name : %s" #~ msgstr "Fenêtre de texte - Nom du fichier : %s" #~ msgid "Text Window" #~ msgstr "Fenêtre de texte" #~ msgid "Open" #~ msgstr "Ouvrir" #~ msgid "Save" #~ msgstr "Enregistrer" #~ msgid "Execute sql file" #~ msgstr "Exécute un fichier sql" #~ msgid "Add" #~ msgstr "Ajouter" #~ msgid "Delete" #~ msgstr "Supprimer" #~ msgid "Modify" #~ msgstr "Modifier" #~ msgid "User informations :" #~ msgstr "Informations sur l'utilisateur :" #~ msgid "Login :" #~ msgstr "Login :" #~ msgid "Already encrypted password" #~ msgstr "Mot de passe déjà crypté" #~ msgid "Max" #~ msgstr "Max" #~ msgid "Queries :" #~ msgstr "Requête SQL :" #~ msgid "Updates :" #~ msgstr "Mise à jour :" #~ msgid "User" #~ msgstr "Utilisateur" #~ msgid "SSL type :" #~ msgstr "Type de connexions sécurisés :" #~ msgid "SSL cypher :" #~ msgstr "SSL cypher :" #~ msgid "x509 issuer :" #~ msgstr "x509 issuer :" #~ msgid "x509 subject :" #~ msgstr "x509 subject :" #~ msgid "Ssl" #~ msgstr "Ssl" #~ msgid "Database rights :" #~ msgstr "Droits pour les bases de données" #~ msgid "Database" #~ msgstr "Base de données" #~ msgid "Rights :" #~ msgstr "Droits :" #~ msgid "Users" #~ msgstr "Utilisateurs" #~ msgid "In construction" #~ msgstr "En construction" #~ msgid "Value" #~ msgstr "Valeur" #~ msgid "Database '%s' created !" #~ msgstr "Base de données '%s' crée !" #~ msgid "Can't create database '%s' !" #~ msgstr "Impossible de créer la base de donnée : '%s'" #~ msgid "Database '%s' deleted !" #~ msgstr "Base de données '%s' supprimée !" #~ msgid "Are you sure ?" #~ msgstr "Etes-vous sur ?" #~ msgid "Table '%s'.'%s' deleted !" #~ msgstr "Table '%s'.'%s' supprimée !" gmysqlcc-0.3.0/po/es.gmo0000644000175000017500000001167610755301563012026 00000000000000Ida01@O _ kv    # -: N Yc   %$)N ku 5, L W n u          % * . 7 E L _ f r    (4 ] bo     , > X m   + ! ! &-=L cm%|$!)64`,  % $7U\9e<   #!8Z y   !*ENbv~<a*/EC) F6:8-+;3D5@%H'AG" &2#( <,.7I$?091 !=B >4 Add a databaseAdd a functionAdd a procedureAdd a tableAdd a viewAlter a databaseAlter a functionAlter a procedureAlter a tableAlter a viewCan't delete this server !!!Can't move down more !!!Can't move up more !!!CategoriesCloseClose tabClose windowConnect to a serverConnectionDatabasesDisplay all create structuresDisplay create structureDisplay edit server partDuplicateEdit ServerError during the query : (%d) %sExecuteExecute SQL fileExecute an SQL file on a MySQL serverField %s can only contain digits !!!Field %s cannot be empty !!!FunctionsGMySQLcc - Connections listGMySQLcc - Server window : %sHelpHost :Load sql fileLocal socket file :NameName :Name : %s Description : %s Sample : %s Url : %s Name already taken ! Please set another one.Password :Please select a serverPort :ProceduresQuery - db : '%s'Query ok. Affected row : %dRead only serverRefreshRemove a databaseRemove a functionRemove a procedureRemove a tableRemove a viewResult %dRowsSQLSQL FileSave sql fileSearchSearch (keyword) :ServerServer nameServers listSizeTypeUser name :ViewsWarning !!! This server has been marked with Write Warning flags !!! It is dangerous for the data ... :) Do you want force the execution of the query ?Warning about write query on this serverWrite Warning !!!Project-Id-Version: gmysqlcc(0.3.0) Report-Msgid-Bugs-To: POT-Creation-Date: 2008-01-14 09:42+0100 PO-Revision-Date: 2007-12-21 13:31+0100 Last-Translator: Didier Prolhac Language-Team: spanish MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Generator: KBabel 1.9.1 Añadir una base de datosAgregar una funciónAgregar un procedimientoAñadir una tablaAgregar una vistaAñadir una base de datosAlterar una funciónAlterar un procedimientoAlterar una tablaAlterar una vista¡¡¡ No se puede borrar este servidor !!!¡¡¡ No se puede bajar más !!!¡¡¡ No se puede subir más !!!CategoríasCerrarCerrar pestañaCerrar ventanaConectar a un servidorConexiónBases de datosMostrar todas las estructuras creadasMostrar estructura creadaMostrar edición del servidorDuplicarEditar ServidorError al ejecutar consulta : (%d) %sEjecutarEjecutar archivo SQLEjecutar archivo SQL en un servidor MySQL¡¡¡ El campo %s sólo puede contener números !!!¡¡¡ El campo %s no puede estar vacío !!!FuncionesGMySQLcc - Lista de conexiones :GMySQLcc - Ventana de Servidores : %sAyudaServidor :Cargar archivo sqlArchivo de «socket» local :NombreNombre :Nombre : %s Descripción : %s Ejemplo : %s URL : %s ¡ El nombre ya ha sido tomado ! Por favor, seleccione otro.Contraseña :Por favor seleccione un servidorPuerto :ProcedimientosConsulta - bd : '%s'Consulta ok Filas afectadas : %dServidor unicamente de lecturaRefrescarBorrar una base de datosBorrar una funciónBorrar un procedimientoBorrar una tablaBorrar una vistaResultado %dFilasSQLArchivo SQLGuardar archivo sqlBusquedaBúsqueda(palabra clave) :ServidorNombre del servidorLista de servidoresTamañoTipoNombre de usuario :Vistas¡¡¡ Advertencia !!! ¡¡¡ Este servidor ha sido marcado con la etiqueta de advertencias de escritura !!! Esto es peligroso para los datos ... :) ¿Quiere forzar la ejecución de la consulta?Advertencia sobre consulta de modificación en este servidor¡¡¡ Escribir advertencia !!!gmysqlcc-0.3.0/po/POTFILES.in0000644000175000017500000000230210755301563012452 00000000000000# List of source files containing translatable strings. ## Created by Anjuta - will be overwritten ## If you don't want it to overwrite it, ## Please disable it in the Anjuta project configuration # Source files ./src/gmlc_mysql_structure.h ./src/gmlc_mysql_structure.c ./src/gmlc_mysql_query.c ./src/gmlc_mysql_server.h ./src/gmlc_mysql_database.h ./src/gmlc_mysql_database.c ./src/gmlc_mysql_server.c ./src/gmlc_mysql_query.h ./src/gmlc_misc_config.c ./src/gmlc_main.h ./src/gmlc_misc_config.h ./src/gmlc_main.c ./src/gmlc_gui_connexions.c ./src/gmlc_gui_connexions.h ./src/gmlc_test_main.c ./src/gmlc_gui_helpers.h ./src/gmlc_gui_helpers.c ./src/gmlc_misc_hashtable.h ./src/gmlc_misc_hashtable.c ./src/gmlc_mysql_procedure.h ./src/gmlc_mysql_view.h ./src/gmlc_mysql_view.c ./src/gmlc_mysql_function.c ./src/gmlc_mysql_procedure.c ./src/gmlc_mysql_table.h ./src/gmlc_mysql_table.c ./src/gmlc_gui_server_tab_data.h ./src/gmlc_mysql_function.h ./src/gmlc_gui_server_tab_help.c ./src/gmlc_gui_server.c ./src/gmlc_gui_server_tab_help.h ./src/gmlc_gui_server_tab_query.c ./src/gmlc_gui_server.h ./src/gmlc_gui_server_tab_query.h ./src/gmlc_gui_server_tab_data.c ./src/gmlc_gui_server_tab.c ./src/gmlc_gui_server_tab.h gmysqlcc-0.3.0/po/ChangeLog0000644000175000017500000000000010755301563012440 00000000000000gmysqlcc-0.3.0/po/fr.gmo0000644000175000017500000001261310755301563012016 00000000000000Ok     2 @Mj      ";N ` j v%$" ? I e      5 , + B I T f            3 : F S X _ j o { ( C U  *ASc&  :F M[n ,!) ; Z d3r -1"&T {# 50M~+ # +I`y     /6=MRinB"%e,>.8 2O+-'!LJB06/%F=C $# " ;:&HG@ EK<9N1?IMA3)54 (7D*Add a databaseAdd a functionAdd a procedureAdd a tableAdd a viewAlter a databaseAlter a functionAlter a procedureAlter a tableAlter a viewCan't delete this server !!!Can't move down more !!!Can't move up more !!!CategoriesCloseClose tabClose windowConnect to a serverConnectionDatabasesDisplay all create structuresDisplay create structureDisplay edit server partDisplay table dataDisplay view dataDuplicateEdit ServerError during the query : (%d) %sExecuteExecute SQL fileExecute a functionExecute a procedureExecute an SQL file on a MySQL serverField %s can only contain digits !!!Field %s cannot be empty !!!FunctionsGMySQLcc - Connections listGMySQLcc - Server window : %sHelpHost :Load sql fileLocal socket file :NameName :Name : %s Description : %s Sample : %s Url : %s Name already taken ! Please set another one.Password :Please select a serverPort :ProceduresQuery - db : '%s'Query ok. Affected row : %dRead only serverRefreshRemove a databaseRemove a functionRemove a procedureRemove a tableRemove a viewResult %dRowsSQLSQL FileSave sql fileSearchSearch (keyword) :ServerServer nameServers listSizeTablesTopic nameTypeUser name :ViewsWarning !!! This server has been marked with Write Warning flags !!! It is dangerous for the data ... :) Do you want force the execution of the query ?Warning about write query on this serverWrite Warning !!!Project-Id-Version: gmysqlcc 0.3.0 Report-Msgid-Bugs-To: POT-Creation-Date: 2008-01-14 09:42+0100 PO-Revision-Date: 2007-12-21 13:30+0100 Last-Translator: Didier Prolhac Language-Team: French MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=2; plural=(n > 1); X-Poedit-Language: French X-Poedit-SourceCharset: utf-8 Ajouter une base de donnéeAjouter une fonctionAjouter une procédureAjouter une tableAjouter une vueModifier une base de donnéeModifier une fonctionModifier une procédureModifie une tableModifier une vueImpossible de supprimer ce serveur !!!Impossible d'aller plus bas !!!Impossible d'aller plus haut !!!CatégoriesFermerFermer OngletFermer la fenêtreConnexion a un serveurConnexionBases de donnéesAfficher la structure de la base de donnéesAfficher la structure de la tableAffiche la partie d'édition des serveursAffiche les données de la tableAffiche les données de la vueDupliquerEdite ServeurErreur durant l'exécution de la requête : (%d) %sExécuterExécute un fichier SQLExécute la fonctionExécute la procédureExécute un fichier SQL dans un serveur MySQLLe champ %s ne peut contenir que des chiffres !!!Le champ %s ne peut pas être vide !!!FonctionsGMySQLcc - Liste des connexionsGMySQLcc - Fenêtre du serveur : %sAideNom de la machine :Lire le fichier SQLFichier socket local :NomNom :Nom : %s Description : %s Exemple : %s Url : %s Ce nom est déjà pris ! Choisissez en un autre.Mot de passe :Sélectionnez un serveur de base de donnéePort :ProcéduresRequête - base : '%s'Requête ok. Lignes modifiées : %dServeur en lecture seuleRafraichirSupprimer une base de donnéeSupprimer une fonctionSupprimer une procédureSupprimer une tableSupprimer une vueRésultat %dNbr LignesSQLFichier SQLEnregistrer le fichier SQLRechercheRecherche (Mots clés) :ServeurNom du serveurListe des serveursTailleTablesNoms des sujetsTypeNom de l'utilisateur :VuesAttention !!! Ce serveur a été marqué avec comme étant à ne pas modifier !!! Ce serait dangereux pour les données ... :) Voulez-vous forcer l'exécution de cette requête ?Préviens en cas de requète modifiant des données sur le serveurProtection contre la modofication !!!gmysqlcc-0.3.0/po/Makefile.in.in0000644000175000017500000001771410755301563013364 00000000000000# Makefile for program source directory in GNU NLS utilities package. # Copyright (C) 1995, 1996, 1997 by Ulrich Drepper # # This file file be copied and used freely without restrictions. It can # be used in projects which are not available under the GNU Public License # but which still want to provide support for the GNU gettext functionality. # Please note that the actual code is *not* freely available. # # - Modified by Owen Taylor to use GETTEXT_PACKAGE # instead of PACKAGE and to look for po2tbl in ./ not in intl/ # # - Modified by jacob berkman to install # Makefile.in.in and po2tbl.sed.in for use with glib-gettextize GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ PACKAGE = @PACKAGE@ VERSION = @VERSION@ SHELL = /bin/sh @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ datarootdir = @datarootdir@ datadir = @datadir@ libdir = @libdir@ localedir = $(libdir)/locale gnulocaledir = $(datadir)/locale gettextsrcdir = $(datadir)/glib-2.0/gettext/po subdir = po INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ MKINSTALLDIRS = $(top_srcdir)/@MKINSTALLDIRS@ CC = @CC@ GENCAT = @GENCAT@ GMSGFMT = @GMSGFMT@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ XGETTEXT = @XGETTEXT@ MSGMERGE = msgmerge DEFS = @DEFS@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ INCLUDES = -I.. -I$(top_srcdir)/intl COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) SOURCES = POFILES = @POFILES@ GMOFILES = @GMOFILES@ DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(GETTEXT_PACKAGE).pot \ $(POFILES) $(GMOFILES) $(SOURCES) POTFILES = \ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ INSTOBJEXT = @INSTOBJEXT@ .SUFFIXES: .SUFFIXES: .c .o .po .pox .gmo .mo .msg .cat .c.o: $(COMPILE) $< .po.pox: $(MAKE) $(GETTEXT_PACKAGE).pot $(MSGMERGE) $< $(srcdir)/$(GETTEXT_PACKAGE).pot -o $*.pox .po.mo: $(MSGFMT) -o $@ $< .po.gmo: file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \ && rm -f $$file && $(GMSGFMT) $(MSGFMT_OPTS) -o $$file $< .po.cat: sed -f ../intl/po2msg.sed < $< > $*.msg \ && rm -f $@ && $(GENCAT) $@ $*.msg all: all-@USE_NLS@ all-yes: $(CATALOGS) all-no: $(srcdir)/$(GETTEXT_PACKAGE).pot: $(POTFILES) $(XGETTEXT) --default-domain=$(GETTEXT_PACKAGE) --directory=$(top_srcdir) \ --add-comments --keyword=_ --keyword=N_ \ --flag=g_strdup_printf:1:c-format \ --flag=g_string_printf:2:c-format \ --flag=g_string_append_printf:2:c-format \ --flag=g_error_new:3:c-format \ --flag=g_set_error:4:c-format \ --flag=g_markup_printf_escaped:1:c-format \ --flag=g_log:3:c-format \ --flag=g_print:1:c-format \ --flag=g_printerr:1:c-format \ --flag=g_printf:1:c-format \ --flag=g_fprintf:2:c-format \ --flag=g_sprintf:2:c-format \ --flag=g_snprintf:3:c-format \ --flag=g_scanner_error:2:c-format \ --flag=g_scanner_warn:2:c-format \ --files-from=$(srcdir)/POTFILES.in \ && test ! -f $(GETTEXT_PACKAGE).po \ || ( rm -f $(srcdir)/$(GETTEXT_PACKAGE).pot \ && mv $(GETTEXT_PACKAGE).po $(srcdir)/$(GETTEXT_PACKAGE).pot ) install: install-exec install-data install-exec: install-data: install-data-@USE_NLS@ install-data-no: all install-data-yes: all if test -r "$(MKINSTALLDIRS)"; then \ $(MKINSTALLDIRS) $(DESTDIR)$(datadir); \ else \ $(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(datadir); \ fi @catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ case "$$cat" in \ *.gmo) destdir=$(gnulocaledir);; \ *) destdir=$(localedir);; \ esac; \ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ dir=$(DESTDIR)$$destdir/$$lang/LC_MESSAGES; \ if test -r "$(MKINSTALLDIRS)"; then \ $(MKINSTALLDIRS) $$dir; \ else \ $(SHELL) $(top_srcdir)/mkinstalldirs $$dir; \ fi; \ if test -r $$cat; then \ $(INSTALL_DATA) $$cat $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \ echo "installing $$cat as $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT)"; \ else \ $(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \ echo "installing $(srcdir)/$$cat as" \ "$$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT)"; \ fi; \ if test -r $$cat.m; then \ $(INSTALL_DATA) $$cat.m $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \ echo "installing $$cat.m as $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m"; \ else \ if test -r $(srcdir)/$$cat.m ; then \ $(INSTALL_DATA) $(srcdir)/$$cat.m \ $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \ echo "installing $(srcdir)/$$cat as" \ "$$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m"; \ else \ true; \ fi; \ fi; \ done if test "$(PACKAGE)" = "glib"; then \ if test -r "$(MKINSTALLDIRS)"; then \ $(MKINSTALLDIRS) $(DESTDIR)$(gettextsrcdir); \ else \ $(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(gettextsrcdir); \ fi; \ $(INSTALL_DATA) $(srcdir)/Makefile.in.in \ $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \ else \ : ; \ fi # Define this as empty until I found a useful application. installcheck: uninstall: catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \ rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \ rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \ rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \ done if test "$(PACKAGE)" = "glib"; then \ rm -f $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \ fi check: all dvi info tags TAGS ID: mostlyclean: rm -f core core.* *.pox $(GETTEXT_PACKAGE).po *.old.po cat-id-tbl.tmp rm -fr *.o clean: mostlyclean distclean: clean rm -f Makefile Makefile.in POTFILES *.mo *.msg *.cat *.cat.m maintainer-clean: distclean @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." rm -f $(GMOFILES) distdir = ../$(GETTEXT_PACKAGE)-$(VERSION)/$(subdir) dist distdir: update-po $(DISTFILES) dists="$(DISTFILES)"; \ for file in $$dists; do \ ln $(srcdir)/$$file $(distdir) 2> /dev/null \ || cp -p $(srcdir)/$$file $(distdir); \ done update-po: Makefile $(MAKE) $(GETTEXT_PACKAGE).pot tmpdir=`pwd`; \ cd $(srcdir); \ catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ echo "$$lang:"; \ if $(MSGMERGE) $$lang.po $(GETTEXT_PACKAGE).pot -o $$tmpdir/$$lang.new.po; then \ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ rm -f $$tmpdir/$$lang.new.po; \ else \ if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ :; \ else \ echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ rm -f $$tmpdir/$$lang.new.po; \ exit 1; \ fi; \ fi; \ else \ echo "msgmerge for $$cat failed!"; \ rm -f $$tmpdir/$$lang.new.po; \ fi; \ done # POTFILES is created from POTFILES.in by stripping comments, empty lines # and Intltool tags (enclosed in square brackets), and appending a full # relative path to them POTFILES: POTFILES.in ( if test 'x$(srcdir)' != 'x.'; then \ posrcprefix='$(top_srcdir)/'; \ else \ posrcprefix="../"; \ fi; \ rm -f $@-t $@ \ && (sed -e '/^#/d' \ -e "s/^\[.*\] +//" \ -e '/^[ ]*$$/d' \ -e "s@.*@ $$posrcprefix& \\\\@" < $(srcdir)/$@.in \ | sed -e '$$s/\\$$//') > $@-t \ && chmod a-w $@-t \ && mv $@-t $@ ) Makefile: Makefile.in.in ../config.status POTFILES cd .. \ && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \ $(SHELL) ./config.status # Tell versions [3.59,3.63) of GNU make not to export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gmysqlcc-0.3.0/po/gmysqlcc.pot0000644000175000017500000001626610755301563013261 00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2008-01-14 09:42+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" #: src/gmlc_gui_connexions.c:58 msgid "GMySQLcc - Connections list" msgstr "" #: src/gmlc_gui_connexions.c:117 msgid "Connection" msgstr "" #: src/gmlc_gui_connexions.c:123 msgid "Connect to a server" msgstr "" #: src/gmlc_gui_connexions.c:127 msgid "Edit Server" msgstr "" #: src/gmlc_gui_connexions.c:133 msgid "Display edit server part" msgstr "" #: src/gmlc_gui_connexions.c:137 msgid "Execute SQL file" msgstr "" #: src/gmlc_gui_connexions.c:143 msgid "Execute an SQL file on a MySQL server" msgstr "" #: src/gmlc_gui_connexions.c:147 msgid "Close" msgstr "" #: src/gmlc_gui_connexions.c:153 msgid "Close window" msgstr "" #: src/gmlc_gui_connexions.c:203 msgid "Server" msgstr "" #: src/gmlc_gui_connexions.c:218 msgid "Name :" msgstr "" #: src/gmlc_gui_connexions.c:232 msgid "Host :" msgstr "" #: src/gmlc_gui_connexions.c:246 msgid "Port :" msgstr "" #: src/gmlc_gui_connexions.c:261 msgid "User name :" msgstr "" #: src/gmlc_gui_connexions.c:275 msgid "Password :" msgstr "" #: src/gmlc_gui_connexions.c:289 msgid "Local socket file :" msgstr "" #: src/gmlc_gui_connexions.c:303 msgid "Read only server" msgstr "" #: src/gmlc_gui_connexions.c:312 msgid "Warning about write query on this server" msgstr "" #: src/gmlc_gui_connexions.c:356 msgid "Server name" msgstr "" #. check if not empty #: src/gmlc_gui_connexions.c:487 src/gmlc_gui_connexions.c:553 #, c-format msgid "Field %s cannot be empty !!!" msgstr "" #: src/gmlc_gui_connexions.c:494 src/gmlc_gui_connexions.c:560 #, c-format msgid "Field %s can only contain digits !!!" msgstr "" #: src/gmlc_gui_connexions.c:505 src/gmlc_gui_connexions.c:572 msgid "" "Name already taken !\n" "Please set another one." msgstr "" #: src/gmlc_gui_connexions.c:534 src/gmlc_gui_connexions.c:604 #: src/gmlc_gui_connexions.c:715 msgid "Please select a server" msgstr "" #: src/gmlc_gui_connexions.c:597 msgid "Can't delete this server !!!" msgstr "" #: src/gmlc_gui_connexions.c:640 msgid "Can't move up more !!!" msgstr "" #: src/gmlc_gui_connexions.c:676 msgid "Can't move down more !!!" msgstr "" #: src/gmlc_gui_server_tab_help.c:177 msgid "Search (keyword) :" msgstr "" #: src/gmlc_gui_server_tab_help.c:190 msgid "Search" msgstr "" #. Databases columns #: src/gmlc_gui_server_tab_help.c:238 msgid "Categories" msgstr "" #. Table columns #: src/gmlc_gui_server_tab_help.c:246 msgid "Topic name" msgstr "" #: src/gmlc_gui_server_tab_help.c:430 #, c-format msgid "" "Name : %s\n" "\n" "Description :\n" "\n" "%s\n" "\n" "Sample :\n" "\n" "%s\n" "\n" "Url : %s\n" msgstr "" #: src/gmlc_gui_server.c:90 src/gmlc_gui_server.c:112 #, c-format msgid "GMySQLcc - Server window : %s" msgstr "" #: src/gmlc_gui_server.c:163 msgid "Servers list" msgstr "" #: src/gmlc_gui_server.c:193 msgid "Help" msgstr "" #. Databases columns #: src/gmlc_gui_server.c:206 src/gmlc_gui_server_tab_data.c:583 msgid "Databases" msgstr "" #: src/gmlc_gui_server.c:229 #, c-format msgid "Query - db : '%s'" msgstr "" #: src/gmlc_gui_server_tab_query.c:200 msgid "Execute" msgstr "" #: src/gmlc_gui_server_tab_query.c:209 msgid "Duplicate" msgstr "" #: src/gmlc_gui_server_tab_query.c:229 msgid "Close tab" msgstr "" #: src/gmlc_gui_server_tab_query.c:336 msgid "Write Warning !!!" msgstr "" #: src/gmlc_gui_server_tab_query.c:336 msgid "" "Warning !!! This server has been marked with Write Warning flags !!!\n" "It is dangerous for the data ... :)\n" "\n" "Do you want force the execution of the query ?" msgstr "" #. Query Not Ok #. It is really an error #. Query Not Ok #: src/gmlc_gui_server_tab_query.c:339 src/gmlc_gui_server_tab_query.c:351 #: src/gmlc_gui_server_tab_query.c:393 #, c-format msgid "Error during the query : (%d) %s" msgstr "" #: src/gmlc_gui_server_tab_query.c:433 src/gmlc_gui_server_tab_query.c:555 #, c-format msgid "Result %d" msgstr "" #: src/gmlc_gui_server_tab_query.c:576 #, c-format msgid "" "Query ok.\n" "Affected row : %d" msgstr "" #: src/gmlc_gui_server_tab_query.c:626 msgid "Load sql file" msgstr "" #: src/gmlc_gui_server_tab_query.c:675 msgid "Save sql file" msgstr "" #: src/gmlc_gui_server_tab_data.c:200 msgid "SQL" msgstr "" #: src/gmlc_gui_server_tab_data.c:209 msgid "SQL File" msgstr "" #: src/gmlc_gui_server_tab_data.c:254 src/gmlc_gui_server_tab_data.c:319 #: src/gmlc_gui_server_tab_data.c:389 src/gmlc_gui_server_tab_data.c:458 #: src/gmlc_gui_server_tab_data.c:527 msgid "Refresh" msgstr "" #: src/gmlc_gui_server_tab_data.c:263 msgid "Add a database" msgstr "" #: src/gmlc_gui_server_tab_data.c:268 msgid "Alter a database" msgstr "" #: src/gmlc_gui_server_tab_data.c:273 msgid "Remove a database" msgstr "" #: src/gmlc_gui_server_tab_data.c:282 msgid "Display all create structures" msgstr "" #: src/gmlc_gui_server_tab_data.c:293 msgid "Tables" msgstr "" #: src/gmlc_gui_server_tab_data.c:328 msgid "Display table data" msgstr "" #: src/gmlc_gui_server_tab_data.c:337 msgid "Add a table" msgstr "" #: src/gmlc_gui_server_tab_data.c:342 msgid "Alter a table" msgstr "" #: src/gmlc_gui_server_tab_data.c:347 msgid "Remove a table" msgstr "" #: src/gmlc_gui_server_tab_data.c:356 src/gmlc_gui_server_tab_data.c:426 #: src/gmlc_gui_server_tab_data.c:495 src/gmlc_gui_server_tab_data.c:564 msgid "Display create structure" msgstr "" #: src/gmlc_gui_server_tab_data.c:363 msgid "Views" msgstr "" #: src/gmlc_gui_server_tab_data.c:398 msgid "Display view data" msgstr "" #: src/gmlc_gui_server_tab_data.c:407 msgid "Add a view" msgstr "" #: src/gmlc_gui_server_tab_data.c:412 msgid "Alter a view" msgstr "" #: src/gmlc_gui_server_tab_data.c:417 msgid "Remove a view" msgstr "" #: src/gmlc_gui_server_tab_data.c:432 msgid "Procedures" msgstr "" #: src/gmlc_gui_server_tab_data.c:467 msgid "Execute a procedure" msgstr "" #: src/gmlc_gui_server_tab_data.c:476 msgid "Add a procedure" msgstr "" #: src/gmlc_gui_server_tab_data.c:481 msgid "Alter a procedure" msgstr "" #: src/gmlc_gui_server_tab_data.c:486 msgid "Remove a procedure" msgstr "" #: src/gmlc_gui_server_tab_data.c:501 msgid "Functions" msgstr "" #: src/gmlc_gui_server_tab_data.c:536 msgid "Execute a function" msgstr "" #: src/gmlc_gui_server_tab_data.c:545 msgid "Add a function" msgstr "" #: src/gmlc_gui_server_tab_data.c:550 msgid "Alter a function" msgstr "" #: src/gmlc_gui_server_tab_data.c:555 msgid "Remove a function" msgstr "" #. Table columns #. View columns #. Procedure columns #. Function columns #: src/gmlc_gui_server_tab_data.c:591 src/gmlc_gui_server_tab_data.c:606 #: src/gmlc_gui_server_tab_data.c:614 src/gmlc_gui_server_tab_data.c:622 msgid "Name" msgstr "" #: src/gmlc_gui_server_tab_data.c:593 msgid "Rows" msgstr "" #: src/gmlc_gui_server_tab_data.c:595 msgid "Size" msgstr "" #: src/gmlc_gui_server_tab_data.c:597 msgid "Type" msgstr "" gmysqlcc-0.3.0/NEWS0000644000175000017500000000624410755301562010766 00000000000000# 2005-05-06 First news, I use subversion now and the address of tyhe server is now : http://gmysqlcc.thepozer.org/svn. Look on EnInstall to see how to get source with subversion. I will stop the cvs server in few days. Second news, I have changed of domain, now it's http://gmysqlcc.thepozer.org/ ... And I have changed of site : I use Trac to give you a subversion source browser and a simple bug tracker with the ticket system. New version (Version : 0.2.4) I have added a system to execute SQL file directly and corrected some small problems. # 2005-03-25 New version (Version : 0.2.3) I have rewrote all internal dump code ... Now you can really dump in SQL/CSV/XML from a Server/Database/Table/Query. I have ortogonalized GUI code, add a button to show and hide edit part in the server list window and some few other modifications ... I have added 2 flags in in the server management : read only and warning. With these flags, you can deny any data update on a server or simply warn you when try to update datas. Last point, I have changed the hostname of the cvs server ... now it's cvs.thepozer.org ... look to the install part. # 2004-12-01 New version (Version : 0.2.2a) Small update to compile on Fedora Core ... Thx to Nuno :) # 2004-10-26 New version (Version : 0.2.2) I have integrated the GNOME widget GtkSourceView to have a better syntax highlight (but it's facultative ...). I have corrected a some bugs (and a big one about memory ... :) ). I have disable XML and CSV dump format (I rewriting all code code about dump ...). # 2004-07-02 New version again (And I don't stop now ;)) (Version : 0.2.1) I have added internationalisation (Now French and English). Send your translations to me. You can choose the charset used to display data queries and to do the dump. You can set the path of the local socket file to access to your local server. # 2004-06-07 Oups ... I have forgotten something in the tar.gz ... (score : configure : 1 - Me : 0) :( I have updated that (version : 0.2.0a) ... Thx to Chris :) And a good news for Mandrake user, you have now a packaged version (src & i586). Thx to Zdenko Podobný # 2004-06-04 Less than 1 month between 2 versions, it's great ... :) (Version : 0.2.0) Gmysqlcc use configure now, so the compilation method has changed. I have modified dump system, Now it write datas directly to the disk, not store them in memory ... I have also corrected a small bug in the structure dump (bad tables name). You can dump data in SQL or CVS, XML format will come soon. Another corrected bug, you can see and edit values with accents or other things. I do a convertion into server charset for each query ... # 2004-05-09 Yes a new version ... 4 month after (I try to reduce the tim between 2 version next time ... ;)) (Version : 0.1.0) I have rewrited completly access to mysql database, add dump to file function, and now you can edit value directly in the reslut table. # 2004-01-14 Yes a new version ... 3 month after :( (Version : 0.0.2) Now you can execute a SQL file but not manage it yet ... (next version :) ) # 2003-09-03 First public version (Version : 0.0.1 :) )