]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Changes needed to build correctly, tested under linux, please let me know how other...
authorJames Green <james.green@stealthnet.net>
Thu, 14 Sep 2006 14:48:26 +0000 (14:48 +0000)
committerJames Green <james.green@stealthnet.net>
Thu, 14 Sep 2006 14:48:26 +0000 (14:48 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2701 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/languages/mod_mono/Makefile
src/mod/languages/mod_mono/mod_mono.c

index d63a4b911ca5b06d491d9be3af9250789c9d25db..e8ae691ed4169f9481f640861dff6e1bfcbd6695 100644 (file)
@@ -1,19 +1,25 @@
 VERSION = mono-1.1.13.8
 TARBALL = mono-1.1.13.8.tar.gz
-CFLAGS += `pkg-config --cflags mono`
-LDFLAGS += `pkg-config --libs mono` 
+GLIB_TARBALL = glib-2.12.3.tar.gz
+GETTEXT_TARBALL = gettext-0.15.tar.gz
+PKGCONFIG_TARBALL = pkg-config-0.21.tar.gz
+CFLAGS += `$(PREFIX)/bin/pkg-config --cflags mono`
+LDFLAGS += `$(PREFIX)/bin/pkg-config --libs mono` 
 
 all:   depends $(MODNAME).$(DYNAMIC_LIB_EXTEN)
 
 depends:
-       MAKE=$(MAKE) $(BASE)/build/buildlib.sh $(BASE) install $(TARBALL) --prefix=$(PREFIX) --with-pic
+       MAKE=$(MAKE) $(BASE)/build/buildlib.sh $(BASE) install $(GETTEXT_TARBALL) --prefix=$(PREFIX) --with-pic
+       MAKE=$(MAKE) $(BASE)/build/buildlib.sh $(BASE) install $(PKGCONFIG_TARBALL) --prefix=$(PREFIX) --with-pic
+       export PKG_CONFIG=$(PREFIX)/bin/pkg-config; export MSGFMT=$(PREFIX)/bin/; MAKE=$(MAKE) $(BASE)/build/buildlib.sh $(BASE) install $(GLIB_TARBALL) --prefix=$(PREFIX) --with-pic
+       export PATH=$(PATH):$(PREFIX)/bin/; MAKE=$(MAKE) $(BASE)/build/buildlib.sh $(BASE) install $(TARBALL) --prefix=$(PREFIX) --with-pic
 
 %.o:  %.c
        $(CC) -fPIC $(CFLAGS) -c -o $@ $<
 
 $(MODNAME).$(DYNAMIC_LIB_EXTEN): $(MODNAME).c
        $(CC) $(CFLAGS) -fPIC -c $(MODNAME).c -o $(MODNAME).o 
-       $(LINKER) $(SOLINK) -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(MODNAME).o $(LDFLAGS)
+       $(CC) $(SOLINK) $(MODNAME).o -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(LDFLAGS)
 
 clean:
        rm -fr *.$(DYNAMIC_LIB_EXTEN) *.o *~
index e294563317e18dff589346db7ff9b71e5356654d..7e3d6d401212660e085a07a488cdfff547d35d18 100755 (executable)
 #include <mono/metadata/debug-helpers.h>
 #include <mono/metadata/image.h>
 #include <mono/metadata/threads.h>
-#include <gc/gc.h>
+//#include <gc/gc.h>
 #include <switch.h>
 
 #define SWITCH_MONO_MODULES  "mono/" 
 #define SWITCH_MONO_LIBDIR   "lib/"
-#define SWITCH_MONO_ASSEMBLY "Freeswitch.dll"
+#define SWITCH_MONO_ASSEMBLY "FreeSwitch.dll"
 
 /* Module functions */
 switch_status_t mod_mono_load_modules(const char *module_dir);
@@ -90,7 +90,7 @@ SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_mod
                return SWITCH_STATUS_FALSE;
        }               
        
-       /* Construct the path to the Freeswitch assembly, then check to make sure it exists */
+       /* Construct the path to the FreeSwitch assembly, then check to make sure it exists */
        switch_size_t assembly_dir_len  = strlen(SWITCH_GLOBAL_dirs.base_dir) + strlen(SWITCH_MONO_LIBDIR) + 2; /* Account for / and \0 */
        switch_size_t assembly_file_len = assembly_dir_len + strlen(SWITCH_MONO_ASSEMBLY);
        char *assembly_dir  = (char *) switch_core_alloc(mono_pool, assembly_dir_len);
@@ -102,11 +102,11 @@ SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_mod
        snprintf(assembly_file, assembly_file_len, "%s/%s%s", SWITCH_GLOBAL_dirs.base_dir, SWITCH_MONO_LIBDIR, SWITCH_MONO_ASSEMBLY);
 
        if (apr_stat(finfo, assembly_file, 0, mono_pool) != SWITCH_STATUS_SUCCESS) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Could not find Freeswitch.NET assembly");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Could not find FreeSwitch.NET assembly\n");
                return SWITCH_STATUS_FALSE;
        }
 
-       /* Mono wants to know where it will be able to find the Freeswitch assembly if it's not in the GAC */
+       /* Mono wants to know where it will be able to find the FreeSwitch assembly if it's not in the GAC */
        if (getenv("MONO_PATH") != NULL) {
                switch_size_t mono_path_len = strlen(getenv("MONO_PATH")) + strlen(assembly_dir) + 2; /* Account for : and \0 */ 
                char *mono_path = (char *) switch_core_alloc(mono_pool, mono_path_len);
@@ -144,7 +144,7 @@ SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_mod
 
        for (p = switch_hash_first(mono_pool, globals.plugins); p; p = switch_hash_next(p)) {
                mono_plugin *plugin = (mono_plugin *) switch_core_alloc(mono_pool, sizeof(*plugin));
-               switch_size_t *key_length = NULL;
+               apr_ssize_t *key_length = NULL;
                const void *key = NULL;
                void *value = NULL;