- Timestamp:
- Aug 4, 2011, 2:16:11 PM (13 years ago)
- Location:
- trunk/zoo-kernel
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/zoo-kernel/Makefile.in
r284 r297 10 10 JAVA_FILE=@JAVA_FILE@ 11 11 12 CFLAGS=${MACOS_CFLAGS} -I../thirds/cgic206 -I. -DLINUX_FREE_ISSUE #-DDEBUG #-DDEBUG_SERVICE_CONF 12 MS_CFLAGS=@MS_CFLAGS@ 13 MS_LDFLAGS=@MS_LIBS@ 14 MS_FILE=@MS_FILE@ 15 16 CFLAGS=${MACOS_CFLAGS} ${MS_CFLAGS} -I../thirds/cgic206 -I. -DLINUX_FREE_ISSUE #-DDEBUG #-DDEBUG_SERVICE_CONF 17 LDFLAGS=-lcurl -L../thirds/cgic206 -lcgic ${GDAL_LIBS} ${XML2LDFLAGS} ${PYTHONLDFLAGS} ${PERLLDFLAGS} ${PHPLDFLAGS} ${JAVALDFLAGS} ${JSLDFLAGS} -lfcgi -lcrypto ${MS_LDFLAGS} ${MACOS_LD_FLAGS} 13 18 14 19 PHPCFLAGS=@PHP_CPPFLAGS@ … … 72 77 gcc ${JS_ENABLED} ${JSCFLAGS} ${XML2CFLAGS} ${CFLAGS} -fPIC -c service_internal.c 73 78 79 service_internal_ms.o: service_internal_ms.c 80 gcc ${JS_ENABLED} ${JSCFLAGS} ${XML2CFLAGS} ${CFLAGS} -fPIC -c service_internal_ms.c 81 74 82 service_internal_python.o: service_internal_python.c service.h 75 83 g++ ${XML2CFLAGS} ${PYTHONCFLAGS} ${CFLAGS} -c service_internal_python.c … … 95 103 g++ -g -O2 ${XML2CFLAGS} ${CFLAGS} ${PYTHONCFLAGS} ${JAVACFLAGS} ${JSCFLAGS} ${PERLCFLAGS} ${PHPCFLAGS} ${PYTHON_ENABLED} ${JS_ENABLED} ${PHP_ENABLED} ${PERL_ENABLED} ${JAVA_ENABLED} -c zoo_service_loader.c -fno-common -DPIC -o zoo_service_loader.o 96 104 97 zoo_loader.cgi: zoo_loader.c zoo_service_loader.o ulinet.o service.h lex.sr.o service_conf.tab.o service_conf.y ulinet.o main_conf_read.tab.o lex.cr.o service_internal.o ${ PYTHON_FILE}${PHP_FILE} ${JAVA_FILE} ${JS_FILE} ${PERL_FILE}105 zoo_loader.cgi: zoo_loader.c zoo_service_loader.o ulinet.o service.h lex.sr.o service_conf.tab.o service_conf.y ulinet.o main_conf_read.tab.o lex.cr.o service_internal.o ${MS_FILE} ${PYTHON_FILE} ${PHP_FILE} ${JAVA_FILE} ${JS_FILE} ${PERL_FILE} 98 106 g++ -g -O2 ${JSCFLAGS} ${PHPCFLAGS} ${PERLCFLAGS} ${JAVACFLAGS} ${XML2CFLAGS} ${PYTHONCFLAGS} ${CFLAGS} -c zoo_loader.c -fno-common -DPIC -o zoo_loader.o 99 g++ ${JSCFLAGS} ${GDAL_CFLAGS} ${XML2CFLAGS} ${PHPCFLAGS} ${PERLCFLAGS} ${JAVACFLAGS} ${PYTHONCFLAGS} ${CFLAGS} zoo_loader.o zoo_service_loader.o service_internal.o ${ PYTHON_FILE} ${PERL_FILE} ${PHP_FILE} ${JS_FILE} ${JAVA_FILE} ulinet.o lex.cr.o lex.sr.o service_conf.tab.o main_conf_read.tab.o -o zoo_loader.cgi -lcurl -L../thirds/cgic206 -lcgic -lcurl ${GDAL_LIBS} ${XML2LDFLAGS} ${PYTHONLDFLAGS} ${PERLLDFLAGS} ${PHPLDFLAGS} ${JAVALDFLAGS} ${JSLDFLAGS} -lfcgi -lcrypto ${MACOS_LD_FLAGS}107 g++ ${JSCFLAGS} ${GDAL_CFLAGS} ${XML2CFLAGS} ${PHPCFLAGS} ${PERLCFLAGS} ${JAVACFLAGS} ${PYTHONCFLAGS} ${CFLAGS} zoo_loader.o zoo_service_loader.o service_internal.o ${MS_FILE} ${PYTHON_FILE} ${PERL_FILE} ${PHP_FILE} ${JS_FILE} ${JAVA_FILE} ulinet.o lex.cr.o lex.sr.o service_conf.tab.o main_conf_read.tab.o -o zoo_loader.cgi ${LDFLAGS} 100 108 101 109 install: -
trunk/zoo-kernel/configure.ac
r288 r297 1 AC_INIT([ZOO Kernel], [1. 2.0], [bugs@zoo-project.org])1 AC_INIT([ZOO Kernel], [1.3.0], [bugs@zoo-project.org]) 2 2 3 3 # Checks for programs. … … 113 113 AC_SUBST([XML2_CPPFLAGS]) 114 114 AC_SUBST([XML2_LDFLAGS]) 115 116 #============================================================================ 117 # Detect if mapserver is installed 118 #============================================================================ 119 120 AC_ARG_WITH([mapserver], 121 [AS_HELP_STRING([--with-mapserver=PATH], [specify the path for MapServer compiled source tree])], 122 [MS_SRC_PATH="$withval"], [MS_SRC_PATH=""]) 123 if test -z $MS_SRC_PATH; 124 then 125 AC_PATH_PROG([MS_SRC_PATH], [mapserver]) 126 if test "x$MS_SRC_PATH" = "xmacos"; 127 then 128 AC_MSG_RESULT([Using MacOSX Framework for MapServer]) 129 else 130 if test -d $MS_SRC_PATH; 131 then 132 AC_MSG_ERROR([could not find the MapServer source tree. You may need to try re-running configure with a --with-mapserver parameter.]) 133 fi 134 fi 135 else 136 if test "x$MS_SRC_PATH" = "xmacos"; 137 then 138 MS_LDFLAGS="/Library/Frameworks/MapServer.framework//Versions/6.0/MapServer -lintl" 139 MS_CPPFLAGS="-DUSE_MS `/Library/Frameworks/MapServer.framework/Programs/mapserver-config --includes` -I/Library/Frameworks/MapServer.framework/Versions/Current/Headers/ -I../mapserver " 140 AC_MSG_WARN([Please make sure that ../mapserver exists and contains MapServer source tree]) 141 AC_MSG_RESULT([Using MacOS X Framework for MapServer]) 142 else 143 if test -d $MS_SRC_PATH; then 144 MS_LDFLAGS="-L$MS_SRC_PATH -lmapserver `$MS_SRC_PATH/mapserver-config --libs`" 145 MS_CPPFLAGS="-DUSE_MS `$MS_SRC_PATH/mapserver-config --includes` `$MS_SRC_PATH/mapserver-config --cflags` -I$MS_SRC_PATH " 146 147 AC_MSG_RESULT([Using user-specified MapServer src path: $MS_SRC_PATH]) 148 else 149 AC_MSG_ERROR([the user-specified mapserver-config file $MS_SRC_PATH does not exist]) 150 fi 151 fi 152 MS_FILE="service_internal_ms.o" 153 fi 154 155 MS_CFLAGS="$MS_CPPFLAGS" 156 MS_LIBS="$MS_LDFLAGS" 157 158 AC_SUBST([MS_CFLAGS]) 159 AC_SUBST([MS_LIBS]) 160 AC_SUBST([MS_FILE]) 115 161 116 162 # =========================================================================== -
trunk/zoo-kernel/service_internal.c
r296 r297 1534 1534 } 1535 1535 tmp=m->content; 1536 #ifdef USE_MS 1537 map* testMap=getMap(tmp,"requestedMimeType"); 1538 #endif 1536 1539 while(tmp!=NULL){ 1537 1540 if(strcasecmp(tmp->name,"mimeType")==0 || … … 1540 1543 strcasecmp(tmp->name,"datatype")==0 || 1541 1544 strcasecmp(tmp->name,"uom")==0) 1545 #ifdef USE_MS 1546 if(testMap==NULL || (testMap!=NULL && strncasecmp(testMap->value,"text/xml",8)==0)) 1547 #endif 1542 1548 xmlNewProp(nc3,BAD_CAST tmp->name,BAD_CAST tmp->value); 1549 #ifdef USE_MS 1550 if(strcasecmp(tmp->name,"mimeType")==0) 1551 if(testMap!=NULL) 1552 xmlNewProp(nc3,BAD_CAST tmp->name,BAD_CAST testMap->value); 1553 else 1554 xmlNewProp(nc3,BAD_CAST tmp->name,BAD_CAST tmp->value); 1555 #endif 1543 1556 tmp=tmp->next; 1544 1557 xmlAddChild(nc2,nc3); … … 1557 1570 else 1558 1571 tmp=NULL; 1572 #ifdef USE_MS 1573 /** 1574 * In case of OGC WebServices output use, as the data was requested 1575 * with asReference=false we have to download the resulting OWS request 1576 * stored in the Reference map value. 1577 */ 1578 map* testMap=getMap(m->content,"requestedMimeType"); 1579 if(testMap!=NULL){ 1580 HINTERNET hInternet; 1581 hInternet=InternetOpen( 1582 #ifndef WIN32 1583 (LPCTSTR) 1584 #endif 1585 "ZooWPSClient\0", 1586 INTERNET_OPEN_TYPE_PRECONFIG, 1587 NULL,NULL, 0); 1588 testMap=getMap(m->content,"Reference"); 1589 loadRemoteFile(m,m->content,hInternet,testMap->value); 1590 InternetCloseHandle(hInternet); 1591 } 1592 #endif 1559 1593 map* tmp1=getMap(m->content,"encoding"); 1560 1594 map* tmp2=getMap(m->content,"mimeType"); … … 1603 1637 } 1604 1638 else{ 1639 tmpMap=getMap(m->content,"Reference"); 1605 1640 nc3=nc2=xmlNewNode(ns_wps, BAD_CAST "Reference"); 1606 1641 if(strcasecmp(type,"Output")==0) … … 1609 1644 xmlNewNsProp(nc3,ns_xlink,BAD_CAST "href",BAD_CAST tmpMap->value); 1610 1645 tmp=m->content; 1646 #ifdef USE_MS 1647 map* testMap=getMap(tmp,"requestedMimeType"); 1648 #endif 1611 1649 while(tmp!=NULL){ 1612 1650 if(strcasecmp(tmp->name,"mimeType")==0 || … … 1615 1653 strcasecmp(tmp->name,"datatype")==0 || 1616 1654 strcasecmp(tmp->name,"uom")==0) 1655 #ifdef USE_MS 1656 if(testMap!=NULL && strncasecmp(testMap->value,"text/xml",8)!=0){ 1657 if(strcasecmp(tmp->name,"mimeType")==0) 1658 xmlNewProp(nc3,BAD_CAST tmp->name,BAD_CAST testMap->value); 1659 } 1660 else 1661 #endif 1617 1662 xmlNewProp(nc3,BAD_CAST tmp->name,BAD_CAST tmp->value); 1618 1663 tmp=tmp->next; … … 1784 1829 maps* tmpI=request_outputs; 1785 1830 while(tmpI!=NULL){ 1831 #ifdef USE_MS 1832 map* testMap=getMap(tmpI->content,"useMapserver"); 1833 #endif 1786 1834 toto=getMap(tmpI->content,"asReference"); 1835 #ifdef USE_MS 1836 if(toto!=NULL && strcasecmp(toto->value,"true")==0 && testMap==NULL){ 1837 #else 1787 1838 if(toto!=NULL && strcasecmp(toto->value,"true")==0){ 1839 #endif 1788 1840 elements* in=getElements(s->outputs,tmpI->name); 1789 1841 char *format=NULL; … … 1853 1905 free(file_url); 1854 1906 } 1907 #ifdef USE_MS 1908 else{ 1909 if(testMap!=NULL){ 1910 setReferenceUrl(m,tmpI); 1911 } 1912 } 1913 #endif 1855 1914 tmpI=tmpI->next; 1856 1915 } … … 2136 2195 tmpContent=tmpContent->next; 2137 2196 } 2197 #ifdef USE_MS 2198 /** 2199 * check for useMapServer presence 2200 */ 2201 map* tmpCheck=getMap(tmpIoType->content,"useMapServer"); 2202 if(tmpCheck!=NULL){ 2203 // Get the default value 2204 tmpIoType=getIoTypeFromElement(tmpInputs,tmpInputs->name,NULL); 2205 tmpCheck=getMap(tmpMaps->content,"mimeType"); 2206 addToMap(tmpMaps->content,"requestedMimeType",tmpCheck->value); 2207 map* cursor=tmpIoType->content; 2208 while(cursor!=NULL){ 2209 addToMap(tmpMaps->content,cursor->name,cursor->value); 2210 cursor=cursor->next; 2211 } 2212 2213 cursor=tmpInputs->content; 2214 while(cursor!=NULL){ 2215 if(strcasecmp(cursor->name,"Title")==0 || 2216 strcasecmp(cursor->name,"Abstract")==0) 2217 addToMap(tmpMaps->content,cursor->name,cursor->value); 2218 cursor=cursor->next; 2219 } 2220 } 2221 #endif 2138 2222 } 2139 2223 if(tmpMaps->content==NULL)
Note: See TracChangeset
for help on using the changeset viewer.