Hi,
the following patch modifies the MySQL source distribution to create
a file "mysql_config". This file should become a part of the MySQL-devel
distribution. It's task is the transport of information from the
MySQL developer to the MySQL client developer. For example, when
running
mysql_config --libs
it emits something like
-lnsl -lm -lz -lcrypt
This allows the client developer to choose appropriate settings for
linking a MySQL client.
I'd beg to apply this patch to the source distribution ASAP.
Thanks,
Jochen
*** mysql-3.23.20-beta/scripts/mysql_config.sh.orig Sun Jul 2 16:40:21 2000
--- mysql-3.23.20-beta/scripts/mysql_config.sh Sun Jul 2 16:40:07 2000
***************
*** 0 ****
--- 1,35 ----
+ #!/bin/sh
+
+ CHARSET="@default_charset@"
+ AVAILABLE_CHARSETS="@CHARSET_OBJS@"
+ CLIENTLIBS="@CLIENT_LIBS@"
+ TCPPORT="@MYSQL_TCP_PORT@"
+ UNIXSOCK="@MYSQL_UNIX_ADDR@"
+
+ case "x$1" in
+ x--available-charsets)
+ echo $AVAILABLE_CHARSETS
+ ;;
+ x--charset)
+ echo $CHARSET
+ ;;
+ x--libs)
+ echo $CLIENTLIBS
+ ;;
+ x--tcpport)
+ echo $TCPPORT
+ ;;
+ x--unixsock)
+ echo $UNIXSOCK
+ ;;
+ *)
+ echo "Usage: $0 <option>"
+ echo ""
+ echo "Possible options are:"
+ echo " --charset Print default charset"
+ echo " --libs List required client libraries"
+ echo " --tcpport Print default TCP port"
+ echo " --unixsock Print default Unix socket"
+ exit 1
+ ;;
+ esac
*** mysql-3.23.20/scripts/Makefile.am.config Tue Jun 27 04:29:12 2000
--- mysql-3.23.20/scripts/Makefile.am Sun Jul 2 19:41:11 2000
***************
*** 20,25 ****
--- 20,26 ----
bin_SCRIPTS = @server_scripts@ \
msql2mysql \
mysql_fix_privilege_tables \
+ mysql_config \
mysql_setpermission \
mysql_zap \
mysqlaccess \
***************
*** 31,36 ****
--- 32,38 ----
EXTRA_SCRIPTS = make_binary_distribution.sh \
msql2mysql.sh \
mysql_fix_privilege_tables.sh \
+ mysql_config.sh \
mysql_install_db.sh \
mysql_setpermission.sh \
mysql_zap.sh \
***************
*** 53,58 ****
--- 55,61 ----
make_binary_distribution \
msql2mysql \
mysql_fix_privilege_tables \
+ mysql_config \
mysql_setpermission \
mysql_zap \
mysqlaccess \
***************
*** 94,99 ****
--- 97,106 ----
-e 's!@''IS_LINUX''@!@IS_LINUX@!' \
-e "s!@""CONF_COMMAND""@!@CONF_COMMAND@!" \
-e 's!@''MYSQLD_USER''@!@MYSQLD_USER@!' \
+ -e 's!@''default_charset''@!@default_charset@!' \
+ -e 's!@''CHARSET_OBJS''@!@CHARSET_OBJS@!' \
+ -e 's!@''CLIENT_LIBS''@!@CLIENT_LIBS@!' \
+ -e 's!@''MYSQL_TCP_PORT''@!@MYSQL_TCP_PORT@!' \
$< > $@-t
@CHMOD@ +x $@-t
@MV@ $@-t $@
*** mysql-3.23.20/scripts/Makefile.in.config Thu Jun 29 01:30:07 2000
--- mysql-3.23.20/scripts/Makefile.in Sun Jul 2 19:40:54 2000
***************
*** 161,170 ****
sql_server_dirs = @sql_server_dirs@
uname_prog = @uname_prog@
! bin_SCRIPTS = @server_scripts@ msql2mysql mysql_fix_privilege_tables mysql_setpermission mysql_zap mysqlaccess mysqlbug mysql_convert_table_format mysql_find_rows mysqlhotcopy
! EXTRA_SCRIPTS = make_binary_distribution.sh msql2mysql.sh mysql_fix_privilege_tables.sh mysql_install_db.sh mysql_setpermission.sh mysql_zap.sh mysqlaccess.sh mysqlbug.sh mysql_convert_table_format.sh mysql_find_rows.sh mysqlhotcopy.sh safe_mysqld.sh
EXTRA_DIST = $(EXTRA_SCRIPTS) mysqlaccess.conf mysqlbug
--- 163,172 ----
sql_server_dirs = @sql_server_dirs@
uname_prog = @uname_prog@
! bin_SCRIPTS = @server_scripts@ msql2mysql mysql_fix_privilege_tables mysql_config mysql_setpermission mysql_zap mysqlaccess mysqlbug mysql_convert_table_format mysql_find_rows mysqlhotcopy
! EXTRA_SCRIPTS = make_binary_distribution.sh msql2mysql.sh mysql_fix_privilege_tables.sh mysql_config.sh mysql_install_db.sh mysql_setpermission.sh mysql_zap.sh mysqlaccess.sh mysqlbug.sh mysql_convert_table_format.sh mysql_find_rows.sh mysqlhotcopy.sh safe_mysqld.sh
EXTRA_DIST = $(EXTRA_SCRIPTS) mysqlaccess.conf mysqlbug
***************
*** 174,180 ****
# mysqlbug should be distributed built so that people can report build
# failures with it.
! CLEANFILES = @server_scripts@ make_binary_distribution msql2mysql mysql_fix_privilege_tables mysql_setpermission mysql_zap mysqlaccess mysql_convert_table_format mysql_find_rows
SUPERCLEANFILES = mysqlbug
--- 176,182 ----
# mysqlbug should be distributed built so that people can report build
# failures with it.
! CLEANFILES = @server_scripts@ make_binary_distribution msql2mysql mysql_fix_privilege_tables mysql_config mysql_setpermission mysql_zap mysqlaccess mysql_convert_table_format mysql_find_rows
SUPERCLEANFILES = mysqlbug
***************
*** 357,362 ****
--- 364,373 ----
-e 's!@''IS_LINUX''@!@IS_LINUX@!' \
-e "s!@""CONF_COMMAND""@!@CONF_COMMAND@!" \
-e 's!@''MYSQLD_USER''@!@MYSQLD_USER@!' \
+ -e 's!@''default_charset''@!@default_charset@!' \
+ -e 's!@''CHARSET_OBJS''@!@CHARSET_OBJS@!' \
+ -e 's!@''CLIENT_LIBS''@!@CLIENT_LIBS@!' \
+ -e 's!@''MYSQL_TCP_PORT''@!@MYSQL_TCP_PORT@!' \
$< > $@-t
@CHMOD@ +x $@-t
@MV@ $@-t $@
| Thread |
|---|
| • PATCH: MySQL client configuration | Jochen Wiedmann | 2 Jul |