openbsd-ports/x11/fleditor/patches/patch-configure
wilfried 900b07feb6 update to fleditor-0.4.3
*  Will reject attempts to LoadFrom(char *) with a null pointer.

*  Now puts a null byte in the tail end of the buffer during a
   SaveTo(char *) even if the editor buffers are empty.  Will
   refuse to save to a null pointer.
2001-10-26 23:36:17 +00:00

186 lines
5.3 KiB
Plaintext

$OpenBSD: patch-configure,v 1.4 2001/10/26 23:36:17 wilfried Exp $
--- configure.orig Wed Aug 29 21:13:56 2001
+++ configure Sat Oct 27 01:24:21 2001
@@ -998,7 +998,7 @@ else
fi
-LDFLAGS="$CXXFLAGS"
+#LDFLAGS="$CXXFLAGS"
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
@@ -1348,33 +1348,12 @@ if test "${enable_shared+set}" = set; th
enableval="$enable_shared"
if eval "test x$enable_shared = xyes"; then
- PICFLAG=1
+ CFLAGS="$CFLAGS -fPIC"
+ CXXFLAGS="$CXXFLAGS -fPIC"
ac_fltk_dso="-lfltk"
DSOLIBNAME="libfleditor"
- case $uname in
- SunOS* | UNIX_S*)
- DSOEXT=".so.1"
- DSOCOMMAND="\$(CXX) -Wl,-h,\$@ \$(LDLIBS) -G $DEBUGFLAG -o"
- ;;
- HP-UX*)
- DSOEXT=".s1.1"
- DSOCOMMAND="ld -b -z +h \$@ $DEBUGFLAG -o"
- ;;
- OSF1*)
- DSOEXT=".so.1"
- DSOCOMMAND="\$(CXX) -Wl,-soname,\$@ \$(LDLIBS) -shared $DEBUGFLAG -o"
-cd ;;
- IRIX*)
- DSOEXT=".so.1"
- DSOCOMMAND="\$(CXX) -soname \$@ \$(LDLIBS) -shared $DEBUGFLAG -o"
- ;;
- *)
- echo "Warning: shared libraries may not be supported. Trying -shared"
- echo " option with compiler."
- DSOEXT=".so.1"
- DSOCOMMAND="\$(CXX) -Wl,-soname,\$@ -shared $DEBUGFLAG -o"
- ;;
- esac
+ DSOEXT=".so.1.1"
+ DSOCOMMAND="\$(CXX) -Wl,-soname,\$@ \$(LDLIBS) -fPIC -shared $DEBUGFLAG -o"
fi
else
@@ -1399,15 +1378,16 @@ else
fi
+ac_fltk2="-DFL_MAJOR_VERSION=1"
# Check whether --with-fltk2 or --without-fltk2 was given.
if test "${with_fltk2+set}" = set; then
withval="$with_fltk2"
- if test " x$withval = xyes"; then ac_fltk2="-DFLTK2"; fi
+ if test x$withval = xyes; then ac_fltk2="-DFL_MAJOR_VERSION=2"; fi
fi
echo $ac_n "checking for numericsort in -lfltk""... $ac_c" 1>&6
-echo "configure:1411: checking for numericsort in -lfltk" >&5
+echo "configure:1391: checking for numericsort in -lfltk" >&5
ac_lib_var=`echo fltk'_'numericsort | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1415,7 +1395,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lfltk $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1419 "configure"
+#line 1399 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -1426,7 +1406,7 @@ int main() {
numericsort()
; return 0; }
EOF
-if { (eval echo configure:1430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -1451,97 +1431,6 @@ EOF
else
echo "$ac_t""no" 1>&6
-fi
-
-
-GLLIB=
-echo $ac_n "checking for glXMakeCurrent in -lGL""... $ac_c" 1>&6
-echo "configure:1460: checking for glXMakeCurrent in -lGL" >&5
-ac_lib_var=`echo GL'_'glXMakeCurrent | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_save_LIBS="$LIBS"
-LIBS="-lGL \
- -lX11 -lXext $X_EXTRA_LIBS -lm $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 1469 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char glXMakeCurrent();
-
-int main() {
-glXMakeCurrent()
-; return 0; }
-EOF
-if { (eval echo configure:1480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<\EOF
-#define HAVE_GL 1
-EOF
- GLLIB=" -lGLU -lGL"
-else
- echo "$ac_t""no" 1>&6
-\
- echo $ac_n "checking for glXMakeCurrent in -lMesaGL""... $ac_c" 1>&6
-echo "configure:1503: checking for glXMakeCurrent in -lMesaGL" >&5
-ac_lib_var=`echo MesaGL'_'glXMakeCurrent | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_save_LIBS="$LIBS"
-LIBS="-lMesaGL \
- -lX11 -lXext $X_EXTRA_LIBS -lm $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 1512 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char glXMakeCurrent();
-
-int main() {
-glXMakeCurrent()
-; return 0; }
-EOF
-if { (eval echo configure:1523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<\EOF
-#define HAVE_GL 1
-EOF
- GLLIB=" -lMesaGLU -lMesaGL"
-else
- echo "$ac_t""no" 1>&6
-fi
-
fi