Menu

[21d594]: / src / c / config  Maximize  Restore  History

Download this file

71 lines (58 with data), 2.1 kB

ngx_addon_name=ngx_http_clojure_module

CLOJURE_SRCS="$ngx_addon_dir/ngx_http_clojure_mem.c \
    $ngx_addon_dir/ngx_http_clojure_jvm.c \
    $ngx_addon_dir/ngx_http_clojure_module.c \
    $ngx_addon_dir/ngx_http_clojure_socket.c \
    $ngx_addon_dir/ngx_http_clojure_shared_map.c \
    $ngx_addon_dir/ngx_http_clojure_shared_map_hashmap.c \
    $ngx_addon_dir/ngx_http_clojure_shared_map_tinymap.c \
"
CLOJURE_DEPS="$NGX_ADDON_DEPS \
      $ngx_addon_dir/ngx_http_clojure_jvm.h \
      $ngx_addon_dir/ngx_http_clojure_mem.h \
      $ngx_addon_dir/ngx_http_clojure_socket.h \
      $ngx_addon_dir/ngx_http_clojure_shared_map.h \
      $ngx_addon_dir/ngx_http_clojure_shared_map_hashmap.h \
      $ngx_addon_dir/ngx_http_clojure_shared_map_tinymap.h \
"

if test -n "$ngx_module_link"; then
    ngx_module_type=HTTP_AUX_FILTER
    ngx_module_name=ngx_http_clojure_module
    ngx_module_srcs=$CLOJURE_SRCS
    ngx_module_deps=$CLOJURE_DEPS

    . auto/module
else
  HTTP_AUX_FILTER_MODULES="$HTTP_AUX_FILTER_MODULES ngx_http_clojure_module"
  #HTTP_MODULES="$HTTP_MODULES ngx_http_clojure_module"
  NGX_ADDON_SRCS="$NGX_ADDON_SRCS $CLOJURE_SRCS"
  NGX_ADDON_DEPS="$NGX_ADDON_DEPS $CLOJURE_DEPS"
fi
HTTP_INCS="$HTTP_INCS $ngx_addon_dir"

USE_SHA1=YES

if [ "$JNI_INCS_INCLUDED" != "YES" ]; then
	if [ -z "$JNI_INCS" ]; then
		##check jdk
		if ! type javac; then
			echo "javac not found, please put it in your PATH"
			exit 1
		fi
		
		if ! type java; then
			echo "java not found, please put it in your PATH"
			exit 1
		fi
		
		mkdir /tmp/nc-DiscoverJvm
		javac $ngx_addon_dir/../java/nginx/clojure/DiscoverJvm.java -d /tmp/nc-DiscoverJvm
		
		if [ -z $JNI_INCS ]; then
		  JNI_INCS=`java -classpath /tmp/nc-DiscoverJvm nginx.clojure.DiscoverJvm getJniIncludes`;
		fi
		
		rm -rf /tmp/nc-DiscoverJvm
	fi
	CFLAGS="$JNI_INCS $CFLAGS"
fi

CFLAGS="-DNGX_CLOJURE_BE_SILENT_WITHOUT_JVM $CFLAGS"

#for easy debug on linux or macosx  
#CFLAGS="$CFLAGS -g -O0 "

if [ "$NGX_PLATFORM" != win32 -a "$NGX_SYSTEM" != FreeBSD ]; then
echo "append -ldl for $NGX_PLATFORM"
CORE_LIBS="$CORE_LIBS -ldl";
fi
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.