提交 4d62a1ad authored 作者: Anthony Minessale's avatar Anthony Minessale

add core ODBC

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4846 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 ed0cfa9f
......@@ -103,6 +103,11 @@ CORE_CFLAGS += $(RESAMPLE_CFLAGS)
CORE_LIBS = libs/apr/libapr-1.la libs/apr-util/libaprutil-1.la
CORE_LIBS += libs/sqlite/libsqlite3.la libs/pcre/libpcre.la
CORE_LIBS += libs/srtp/libsrtp.la $(RESAMPLE_LIB)
if ADD_ODBC
libfreeswitch_la_SOURCES += src/switch_odbc.c
library_include_HEADERS += src/include/switch_odbc.h
CORE_LIBS += -lodbc
endif
lib_LTLIBRARIES = libfreeswitch.la
libfreeswitch_la_CFLAGS = $(CORE_CFLAGS) $(AM_CFLAGS)
......
......@@ -314,10 +314,14 @@ AC_SUBST(LIBCURL_DEPS)
AC_ARG_ENABLE(crash-protection,
[ --enable-crash-protection Compile with CRASH Protection],,[enable_crash_prot="no"])
AC_ARG_ENABLE(core-odbc-support,
[ --enable-core-odbc-support Compile with ODBC Support],,[enable_core_odbc_support="no"])
#AX_LIB_MYSQL([MINIMUM-VERSION])
AX_LIB_MYSQL
AM_CONDITIONAL([CRASHPROT],[test "x$enable_crash_prot" != "xno"])
AM_CONDITIONAL([ADD_ODBC],[test "x$enable_core_odbc_support" != "xno"])
AM_CONDITIONAL([HAVE_MYSQL],[test "$have_mysql" = "yes"])
AC_CONFIG_FILES([Makefile
......
/*
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
* Copyright (C) 2005/2006, Anthony Minessale II <anthmct@yahoo.com>
*
* Version: MPL 1.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
*
* The Initial Developer of the Original Code is
* Anthony Minessale II <anthmct@yahoo.com>
* Portions created by the Initial Developer are Copyright (C)
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Anthony Minessale II <anthmct@yahoo.com>
*
* switch_odbc.h -- ODBC
*
*/
#ifndef SWITCH_ODBC_H
#define SWITCH_ODBC_H
#include <switch.h>
#include <sql.h>
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable:4201)
#include <sqlext.h>
#pragma warning(pop)
#else
#include <sqlext.h>
#endif
#include <sqltypes.h>
SWITCH_BEGIN_EXTERN_C struct switch_odbc_handle;
typedef enum {
SWITCH_ODBC_STATE_INIT,
SWITCH_ODBC_STATE_DOWN,
SWITCH_ODBC_STATE_CONNECTED,
SWITCH_ODBC_STATE_ERROR
} switch_odbc_state_t;
typedef struct switch_odbc_handle switch_odbc_handle_t;
typedef enum {
SWITCH_ODBC_SUCCESS = 0,
SWITCH_ODBC_FAIL = -1
} switch_odbc_status_t;
SWITCH_DECLARE(switch_odbc_handle_t) * switch_odbc_handle_new(char *dsn, char *username, char *password);
SWITCH_DECLARE(switch_odbc_status_t) switch_odbc_handle_disconnect(switch_odbc_handle_t *handle);
SWITCH_DECLARE(switch_odbc_status_t) switch_odbc_handle_connect(switch_odbc_handle_t *handle);
SWITCH_DECLARE(void) switch_odbc_handle_destroy(switch_odbc_handle_t **handlep);
SWITCH_DECLARE(switch_odbc_state_t) switch_odbc_handle_get_state(switch_odbc_handle_t *handle);
SWITCH_DECLARE(switch_odbc_status_t) switch_odbc_handle_exec(switch_odbc_handle_t *handle, char *sql, SQLHSTMT * rstmt);
SWITCH_DECLARE(switch_odbc_status_t) switch_odbc_handle_callback_exec(switch_odbc_handle_t *handle,
char *sql, switch_core_db_callback_func_t callback, void *pdata);
SWITCH_DECLARE(char *) switch_odbc_handle_get_error(switch_odbc_handle_t *handle, SQLHSTMT stmt);
SWITCH_END_EXTERN_C
#endif
/* For Emacs:
* Local Variables:
* mode:c
* indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
* For VIM:
* vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
*/
......@@ -12,6 +12,8 @@ LOCAL_CFLAGS += -I$(SOFIAUA_DIR)/sdp -I$(SOFIAUA_DIR)/sip
LOCAL_CFLAGS += -I$(SOFIAUA_DIR)/soa -I$(SOFIAUA_DIR)/sresolv
LOCAL_CFLAGS += -I$(SOFIAUA_DIR)/stun -I$(SOFIAUA_DIR)/su
LOCAL_CFLAGS += -I$(SOFIAUA_DIR)/tport -I$(SOFIAUA_DIR)/url
LOCAL_CFLAGS += `if test -f $(BASE)/.libs/libfreeswitch_la-switch_odbc.o ; then echo -DSWITCH_HAVE_ODBC; fi ;`
LOCAL_OBJS=sofia.o sofia_glue.o sofia_presence.o sofia_reg.o
LOCAL_SOURCES=sofia.c sofia_glue.c sofia_presense.c sofia_reg.c mod_sofia.c
......
......@@ -40,6 +40,9 @@
#define HAVE_APR
#include <switch.h>
#ifdef SWITCH_HAVE_ODBC
#include <switch_odbc.h>
#endif
static const char modname[] = "mod_sofia";
static const switch_state_handler_table_t noop_state_handler = { 0 };
......@@ -221,6 +224,13 @@ struct sofia_profile {
su_home_t *home;
switch_hash_t *profile_hash;
switch_hash_t *chat_hash;
switch_core_db_t *master_db;
#ifdef SWITCH_HAVE_ODBC
char *odbc_dsn;
char *odbc_user;
char *odbc_pass;
switch_odbc_handle_t *master_odbc;
#endif
};
......@@ -328,8 +338,6 @@ switch_status_t sofia_glue_do_invite(switch_core_session_t *session);
uint8_t negotiate_sdp(switch_core_session_t *session, sdp_session_t * sdp);
char *sofia_reg_get_auth_data(char *dbname, char *nonce, char *npassword, size_t len, switch_mutex_t * mutex);
void sofia_presence_establish_presence(sofia_profile_t * profile);
void sofia_handle_sip_i_state(int status,
......@@ -387,8 +395,8 @@ void sofia_presence_handle_sip_i_subscribe(int status,
sofia_profile_t *sofia_glue_find_profile(char *key);
void sofia_glue_add_profile(char *key, sofia_profile_t * profile);
void sofia_glue_execute_sql(char *dbname, char *sql, switch_mutex_t * mutex);
void sofia_reg_check_expire(switch_core_db_t *db, sofia_profile_t * profile, time_t now);
void sofia_glue_execute_sql(sofia_profile_t *profile, switch_bool_t master, char *sql, switch_mutex_t *mutex);
void sofia_reg_check_expire(sofia_profile_t * profile, time_t now);
void sofia_reg_check_gateway(sofia_profile_t * profile, time_t now);
void sofia_reg_unregister(sofia_profile_t * profile);
switch_status_t sofia_glue_ext_address_lookup(char **ip, switch_port_t *port, char *sourceip, switch_memory_pool_t *pool);
......@@ -404,3 +412,12 @@ void sofia_presence_set_chat_hash(private_object_t * tech_pvt, sip_t const *sip)
switch_status_t sofia_on_hangup(switch_core_session_t *session);
char *sofia_glue_get_url_from_contact(char *buf, uint8_t to_dup);
void sofia_presence_set_hash_key(char *hash_key, int32_t len, sip_t const *sip);
void sofia_glue_sql_close(sofia_profile_t *profile);
int sofia_glue_init_sql(sofia_profile_t *profile);
switch_bool_t sofia_glue_execute_sql_callback(sofia_profile_t *profile,
switch_bool_t master,
switch_mutex_t *mutex,
char *sql,
switch_core_db_callback_func_t callback,
void *pdata);
char *sofia_glue_execute_sql2str(sofia_profile_t *profile, switch_mutex_t *mutex, char *sql, char *resbuf, size_t len);
......@@ -36,41 +36,6 @@
extern su_log_t tport_log[];
static char reg_sql[] =
"CREATE TABLE sip_registrations (\n"
" user VARCHAR(255),\n"
" host VARCHAR(255),\n"
" contact VARCHAR(1024),\n"
" status VARCHAR(255),\n"
" rpid VARCHAR(255),\n"
" expires INTEGER(8)" ");\n";
static char sub_sql[] =
"CREATE TABLE sip_subscriptions (\n"
" proto VARCHAR(255),\n"
" user VARCHAR(255),\n"
" host VARCHAR(255),\n"
" sub_to_user VARCHAR(255),\n"
" sub_to_host VARCHAR(255),\n"
" event VARCHAR(255),\n"
" contact VARCHAR(1024),\n"
" call_id VARCHAR(255),\n"
" full_from VARCHAR(255),\n"
" full_via VARCHAR(255),\n"
" expires INTEGER(8)" ");\n";
static char auth_sql[] =
"CREATE TABLE sip_authentication (\n"
" user VARCHAR(255),\n"
" host VARCHAR(255),\n"
" passwd VARCHAR(255),\n"
" nonce VARCHAR(255),\n"
" expires INTEGER(8)"
");\n";
void sofia_event_callback(nua_event_t event,
int status,
char const *phrase,
......@@ -253,7 +218,7 @@ void event_handler(switch_event_t *event)
}
if (sql) {
sofia_glue_execute_sql(profile->dbname, sql, profile->ireg_mutex);
sofia_glue_execute_sql(profile, SWITCH_FALSE, sql, profile->ireg_mutex);
switch_safe_free(sql);
sql = NULL;
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Propagating registration for %s@%s->%s\n", from_user, from_host, contact_str);
......@@ -272,7 +237,6 @@ void *SWITCH_THREAD_FUNC sofia_profile_thread_run(switch_thread_t * thread, void
sip_alias_node_t *node;
uint32_t ireg_loops = 0;
uint32_t gateway_loops = 0;
switch_core_db_t *db;
switch_event_t *s_event;
profile->s_root = su_root_create(NULL);
......@@ -320,11 +284,7 @@ void *SWITCH_THREAD_FUNC sofia_profile_thread_run(switch_thread_t * thread, void
}
if ((db = switch_core_db_open_file(profile->dbname))) {
switch_core_db_test_reactive(db, "select contact from sip_registrations", reg_sql);
switch_core_db_test_reactive(db, "select contact from sip_subscriptions", sub_sql);
switch_core_db_test_reactive(db, "select * from sip_authentication", auth_sql);
} else {
if (!sofia_glue_init_sql(profile)) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Cannot Open SQL Database!\n");
return NULL;
}
......@@ -362,7 +322,7 @@ void *SWITCH_THREAD_FUNC sofia_profile_thread_run(switch_thread_t * thread, void
while (mod_sofia_globals.running == 1) {
if (++ireg_loops >= IREG_SECONDS) {
sofia_reg_check_expire(db, profile, time(NULL));
sofia_reg_check_expire(profile, time(NULL));
ireg_loops = 0;
}
......@@ -373,8 +333,9 @@ void *SWITCH_THREAD_FUNC sofia_profile_thread_run(switch_thread_t * thread, void
su_root_step(profile->s_root, 1000);
}
sofia_glue_sql_close(profile);
switch_core_db_close(db);
sofia_reg_unregister(profile);
su_home_unref(profile->home);
......@@ -496,6 +457,7 @@ switch_status_t config_sofia(int reload)
profile->name = switch_core_strdup(profile->pool, xprofilename);
snprintf(url, sizeof(url), "sofia_reg_%s", xprofilename);
profile->dbname = switch_core_strdup(profile->pool, url);
switch_core_hash_init(&profile->chat_hash, profile->pool);
......@@ -510,6 +472,22 @@ switch_status_t config_sofia(int reload)
profile->debug = atoi(val);
} else if (!strcasecmp(var, "use-rtp-timer") && switch_true(val)) {
switch_set_flag(profile, TFLAG_TIMER);
} else if (!strcasecmp(var, "odbc-dsn")) {
#ifdef SWITCH_HAVE_ODBC
profile->odbc_dsn = switch_core_strdup(profile->pool, val);
if ((profile->odbc_user = strchr(profile->odbc_dsn, ':'))) {
*profile->odbc_user++ = '\0';
}
if ((profile->odbc_pass = strchr(profile->odbc_user, ':'))) {
*profile->odbc_pass++ = '\0';
}
#else
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "ODBC IS NOT AVAILABLE!\n");
#endif
} else if (!strcasecmp(var, "inbound-no-media") && switch_true(val)) {
switch_set_flag(profile, TFLAG_INB_NOMEDIA);
} else if (!strcasecmp(var, "inbound-late-negotiation") && switch_true(val)) {
......
......@@ -1119,7 +1119,91 @@ void sofia_glue_add_profile(char *key, sofia_profile_t * profile)
switch_mutex_unlock(mod_sofia_globals.hash_mutex);
}
void sofia_glue_execute_sql(char *dbname, char *sql, switch_mutex_t * mutex)
int sofia_glue_init_sql(sofia_profile_t *profile)
{
char reg_sql[] =
"CREATE TABLE sip_registrations (\n"
" user VARCHAR(255),\n"
" host VARCHAR(255),\n"
" contact VARCHAR(1024),\n"
" status VARCHAR(255),\n"
" rpid VARCHAR(255),\n"
" expires INTEGER(8)" ");\n";
char sub_sql[] =
"CREATE TABLE sip_subscriptions (\n"
" proto VARCHAR(255),\n"
" user VARCHAR(255),\n"
" host VARCHAR(255),\n"
" sub_to_user VARCHAR(255),\n"
" sub_to_host VARCHAR(255),\n"
" event VARCHAR(255),\n"
" contact VARCHAR(1024),\n"
" call_id VARCHAR(255),\n"
" full_from VARCHAR(255),\n"
" full_via VARCHAR(255),\n"
" expires INTEGER(8)" ");\n";
char auth_sql[] =
"CREATE TABLE sip_authentication (\n"
" user VARCHAR(255),\n"
" host VARCHAR(255),\n"
" passwd VARCHAR(255),\n"
" nonce VARCHAR(255),\n"
" expires INTEGER(8)"
");\n";
#ifdef SWITCH_HAVE_ODBC
if (profile->odbc_dsn) {
if (!(profile->master_odbc = switch_odbc_handle_new(profile->odbc_dsn, profile->odbc_user, profile->odbc_pass))) {
return 0;
}
if (switch_odbc_handle_connect(profile->master_odbc) != SWITCH_ODBC_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error Connecting ODBC DSN: %s\n", profile->odbc_dsn);
return 0;
}
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Connected ODBC DSN: %s\n", profile->odbc_dsn);
switch_odbc_handle_exec(profile->master_odbc, reg_sql, NULL);
switch_odbc_handle_exec(profile->master_odbc, sub_sql, NULL);
switch_odbc_handle_exec(profile->master_odbc, auth_sql, NULL);
} else {
#endif
if (!(profile->master_db = switch_core_db_open_file(profile->dbname))) {
return 0;
}
switch_core_db_test_reactive(profile->master_db, "select contact from sip_registrations", reg_sql);
switch_core_db_test_reactive(profile->master_db, "select contact from sip_subscriptions", sub_sql);
switch_core_db_test_reactive(profile->master_db, "select * from sip_authentication", auth_sql);
#ifdef SWITCH_HAVE_ODBC
}
#endif
return 1;
}
void sofia_glue_sql_close(sofia_profile_t *profile)
{
#ifdef SWITCH_HAVE_ODBC
if (profile->odbc_dsn) {
switch_odbc_handle_destroy(&profile->master_odbc);
} else {
#endif
switch_core_db_close(profile->master_db);
#ifdef SWITCH_HAVE_ODBC
}
#endif
}
void sofia_glue_execute_sql(sofia_profile_t *profile, switch_bool_t master, char *sql, switch_mutex_t *mutex)
{
switch_core_db_t *db;
......@@ -1127,12 +1211,38 @@ void sofia_glue_execute_sql(char *dbname, char *sql, switch_mutex_t * mutex)
switch_mutex_lock(mutex);
}
if (!(db = switch_core_db_open_file(dbname))) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error Opening DB %s\n", dbname);
goto end;
#ifdef SWITCH_HAVE_ODBC
if (profile->odbc_dsn) {
SQLHSTMT stmt;
if (switch_odbc_handle_exec(profile->master_odbc, sql, &stmt) != SWITCH_ODBC_SUCCESS) {
char *err_str;
err_str = switch_odbc_handle_get_error(profile->master_odbc, stmt);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "ERR: [%s]\n[%s]\n", sql, switch_str_nil(err_str));
switch_safe_free(err_str);
}
SQLFreeHandle(SQL_HANDLE_STMT, stmt);
} else {
#endif
if (master) {
db = profile->master_db;
} else {
if (!(db = switch_core_db_open_file(profile->dbname))) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error Opening DB %s\n", profile->dbname);
goto end;
}
}
switch_core_db_persistant_execute(db, sql, 25);
switch_core_db_close(db);
if (!master) {
switch_core_db_close(db);
}
#ifdef SWITCH_HAVE_ODBC
}
#endif
end:
if (mutex) {
......@@ -1141,6 +1251,159 @@ void sofia_glue_execute_sql(char *dbname, char *sql, switch_mutex_t * mutex)
}
switch_bool_t sofia_glue_execute_sql_callback(sofia_profile_t *profile,
switch_bool_t master,
switch_mutex_t *mutex,
char *sql,
switch_core_db_callback_func_t callback,
void *pdata)
{
switch_bool_t ret = SWITCH_FALSE;
switch_core_db_t *db;
char *errmsg = NULL;
if (mutex) {
switch_mutex_lock(mutex);
}
#ifdef SWITCH_HAVE_ODBC
if (profile->odbc_dsn) {
switch_odbc_handle_callback_exec(profile->master_odbc, sql, callback, pdata);
} else {
#endif
if (master) {
db = profile->master_db;
} else {
if (!(db = switch_core_db_open_file(profile->dbname))) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error Opening DB %s\n", profile->dbname);
goto end;
}
}
switch_core_db_exec(db, sql, callback, pdata, &errmsg);
if (errmsg) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "SQL ERR: [%s] %s\n", sql, errmsg);
free(errmsg);
}
if (!master && db) {
switch_core_db_close(db);
}
#ifdef SWITCH_HAVE_ODBC
}
#endif
end:
if (mutex) {
switch_mutex_unlock(mutex);
}
return ret;
}
#ifdef SWITCH_HAVE_ODBC
static char *sofia_glue_execute_sql2str_odbc(sofia_profile_t *profile, switch_mutex_t *mutex, char *sql, char *resbuf, size_t len)
{
char *ret = NULL;
SQLHSTMT stmt;
SQLCHAR name[1024];
SQLINTEGER m = 0;
if (switch_odbc_handle_exec(profile->master_odbc, sql, &stmt) == SWITCH_ODBC_SUCCESS) {
SQLSMALLINT NameLength, DataType, DecimalDigits, Nullable;
SQLUINTEGER ColumnSize;
SQLRowCount(stmt, &m);
if (m <= 0) {
return NULL;
}
if (SQLFetch(stmt) != SQL_SUCCESS) {
return NULL;
}
SQLDescribeCol(stmt, 1, name, sizeof(name), &NameLength, &DataType, &ColumnSize, &DecimalDigits, &Nullable);
SQLGetData(stmt, 1, SQL_C_CHAR, (SQLCHAR *)resbuf, len, NULL);
SQLFreeHandle(SQL_HANDLE_STMT, stmt);
ret = resbuf;
}
return ret;
}
#endif
char *sofia_glue_execute_sql2str(sofia_profile_t *profile, switch_mutex_t *mutex, char *sql, char *resbuf, size_t len)
{
switch_core_db_t *db;
switch_core_db_stmt_t *stmt;
char *ret = NULL;
#ifdef SWITCH_HAVE_ODBC
if (profile->odbc_dsn) {
return sofia_glue_execute_sql2str_odbc(profile, mutex, sql, resbuf, len);
}
#endif
if (mutex) {
switch_mutex_lock(mutex);
}
if (!(db = switch_core_db_open_file(profile->dbname))) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error Opening DB %s\n", profile->dbname);
goto end;
}
if (switch_core_db_prepare(db, sql, -1, &stmt, 0)) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Statement Error!\n");
goto fail;
} else {
int running = 1;
int colcount;
while (running < 5000) {
int result = switch_core_db_step(stmt);
if (result == SWITCH_CORE_DB_ROW) {
if ((colcount = switch_core_db_column_count(stmt))) {
switch_copy_string(resbuf, (char *) switch_core_db_column_text(stmt, 0), len);
ret = resbuf;
}
break;
} else if (result == SWITCH_CORE_DB_BUSY) {
running++;
switch_yield(1000);
continue;
}
break;
}
switch_core_db_finalize(stmt);
}
fail:
switch_core_db_close(db);
end:
if (mutex) {
switch_mutex_unlock(mutex);
}
return ret;
}
int sofia_glue_get_user_host(char *in, char **user, char **host)
{
char *p, *h, *u = in;
......
......@@ -2761,16 +2761,19 @@ static void message_query_handler(switch_event_t *event)
char *account = switch_event_get_header(event, "message-account");
if (account) {
char *text;
char *path, *cmd;
text = switch_mprintf("%s%smwi.js", SWITCH_GLOBAL_dirs.script_dir, SWITCH_PATH_SEPARATOR);
assert(text != NULL);
path = switch_mprintf("%s%smwi.js", SWITCH_GLOBAL_dirs.script_dir, SWITCH_PATH_SEPARATOR);
assert(path != NULL);
if (switch_file_exists(text) == SWITCH_STATUS_SUCCESS) {
js_thread_launch(text);
if (switch_file_exists(path) == SWITCH_STATUS_SUCCESS) {
cmd = switch_mprintf("%s %s", path, account);
assert(cmd != NULL);
js_thread_launch(cmd);
switch_safe_free(cmd);
}
free(text);
switch_safe_free(path);
}
}
......
switch_srcdir=../../../..
ODBC=unixODBC-2.2.12
ODBC_DIR=$(switch_srcdir)/libs/$(ODBC)
ODBCLA=libodbc.la
UNINST_ODBCLA=$(ODBC_DIR)/DriverManager/$(ODBCLA)
INST_ODBCLA=$(DESTDIR)$(PREFIX)/lib/$(ODBCLA)
LOCAL_CFLAGS=-I$(ODBC_DIR)/include
LOCAL_LDFLAGS=
LOCAL_LIBADD=$(UNINST_ODBCLA)
include ../mod_spidermonkey/sm.mak
$(ODBC_DIR):
$(GETLIB) $(ODBC).tar.gz
cd $(ODBC_DIR) && ./configure --prefix=$(PREFIX) --disable-gui --without-x --with-pic
$(UNINST_ODBCLA): $(ODBC_DIR)
cd $(ODBC_DIR) && $(MAKE)
$(TOUCH_TARGET)
depend_install: $(INST_ODBCLA)
$(INST_ODBCLA): $(UNINST_ODBCLA)
cd $(ODBC_DIR) && $(MAKE) install
@$(TOUCH_TARGET)
差异被折叠。
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论