--- platform_build/bsd_ant/build.xml.orig	2019-12-10 20:24:26
+++ platform_build/bsd_ant/build.xml
@@ -4,8 +4,8 @@
 	<property name="native" location="../../src/native"/>
 	<property name="libname32" value="liblwjgl.so"/>
 	<property name="libname64" value="liblwjgl64.so"/>
-	<property name="libs32" value="-L/usr/X11R6/lib -L/usr/local/lib -lm -lX11 -lXext -lXcursor -lXrandr -pthread -L${java.home}/lib/i386 -ljawt" />
-	<property name="libs64" value="-L/usr/X11R6/lib -L/usr/local/lib -lm -lX11 -lXext -lXcursor -lXrandr -lXxf86vm -pthread -L${java.home}/lib/amd64 -ljawt" />
+	<property name="libs32" value="-LPREFIX/lib -lm -lX11 -lXext -lXcursor -lXrandr -pthread -L${java.home}/lib/i386 -ljawt" />
+	<property name="libs64" value="-LPREFIX/lib -lm -lX11 -lXext -lXcursor -lXrandr -lXxf86vm -pthread -L${java.home}/lib/amd64 -ljawt" />
     <property name="cflags32" value="-O2 -Wall -c -fPIC -std=c99 -Wunused"/>
 
 	<target name="clean">
@@ -39,7 +39,7 @@
     		<os name="SunOS" />
     	</condition>
 
-		<property name="linker_flags32" value="${version_script_flags32} -shared -O2 -Wall -o ${libname32} ${libs32} ${xf86vm_lib}"/>
+		<property name="linker_flags32" value="${version_script_flags32} -shared -O2 -Wall -z notext -o ${libname32} ${libs32} ${xf86vm_lib}"/>
 		<property name="linker_flags64" value="${version_script_flags64} -shared -O2 -Wall -o ${libname64} ${libs64} ${xf86vm_lib}"/>
 
     	<condition property="build.32bit.only">
