Clean up use of dlname variable.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7400 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Kevin Ruland 2005-08-29 11:11:48 +00:00
commit e974e259b7

View file

@ -288,7 +288,7 @@ public:
Printf(f_make, "CXX_SOURCES=%s\n", withcxx ); Printf(f_make, "CXX_SOURCES=%s\n", withcxx );
Printf(f_make, "C_SOURCES=%s\n", withc ); Printf(f_make, "C_SOURCES=%s\n", withc );
Printf(f_make, "OBJS=%s_wrap.o $(C_SOURCES:.c=.o) $(CXX_SOURCES:.cxx=.o)\n", module ); Printf(f_make, "OBJS=%s_wrap.o $(C_SOURCES:.c=.o) $(CXX_SOURCES:.cxx=.o)\n", module );
Printf(f_make, "PROG=php_%s.so\n", module); Printf(f_make, "PROG=%s\n", dlname);
Printf(f_make, "CFLAGS=-fpic\n" ); Printf(f_make, "CFLAGS=-fpic\n" );
Printf(f_make, "LDFLAGS=-shared\n"); Printf(f_make, "LDFLAGS=-shared\n");
Printf(f_make, "PHP_INC=`php-config --includes`\n"); Printf(f_make, "PHP_INC=`php-config --includes`\n");
@ -559,9 +559,9 @@ public:
/* Set the dlname */ /* Set the dlname */
if (!dlname) { if (!dlname) {
#if defined(_WIN32) || defined(__WIN32__) #if defined(_WIN32) || defined(__WIN32__)
dlname = NewStringf("%s.dll", module); dlname = NewStringf("php_%s.dll", module);
#else #else
dlname = NewStringf("%s.so", module); dlname = NewStringf("php_%s.so", module);
#endif #endif
} }
@ -585,7 +585,7 @@ public:
Printf(f_phpcode,"$%s_LOADED__ = true;\n\n", cap_module); Printf(f_phpcode,"$%s_LOADED__ = true;\n\n", cap_module);
Printf(f_phpcode,"/* if our extension has not been loaded, do what we can */\n"); Printf(f_phpcode,"/* if our extension has not been loaded, do what we can */\n");
Printf(f_phpcode,"if (!extension_loaded(\"php_%s\")) {\n", module); Printf(f_phpcode,"if (!extension_loaded(\"php_%s\")) {\n", module);
Printf(f_phpcode," if (!dl(\"php_%s\")) return;\n", dlname); Printf(f_phpcode," if (!dl(\"%s\")) return;\n", dlname);
Printf(f_phpcode,"}\n\n"); Printf(f_phpcode,"}\n\n");