summaryrefslogtreecommitdiff
path: root/x11/fltk/patches/patch-ab
blob: 5e8a22b3377cfc9ac210be7d66371b37916fcb84 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
$NetBSD: patch-ab,v 1.7 2003/12/01 16:35:51 ben Exp $

--- configure.in.orig	2001-05-07 07:34:22.000000000 -0700
+++ configure.in
@@ -30,6 +30,9 @@ AC_INIT(src/Fl.cxx)
 AC_PROG_RANLIB
 
 LIBNAME="libfltk.a"
+LIBRARY="../lib/\$(LIBNAME)"
+LIBFLTK="../lib/\$(LIBNAME)"
+LINKFLTK="-L../lib -lfltk"
 if test "$RANLIB" != ":"; then
   LIBCOMMAND="ar cr"
 else
@@ -58,8 +61,17 @@ AC_ARG_ENABLE(debug, [  --enable-debug  
   DEBUGFLAG="-g "
 fi])
 AC_ARG_ENABLE(gl, [  --enable-gl             turn on OpenGL support [default=yes]])
-AC_ARG_ENABLE(shared, [  --enable-shared         turn on shared libraries [default=no]],[
-if eval "test x$enable_shared = xyes"; then
+AC_ARG_ENABLE(shared, [  --enable-shared         turn on shared libraries [default=no]])
+AC_ARG_ENABLE(libtool, [  --enable-libtool=LIBTOOL_PATH
+                          turn on building with libtool [default=no]],[
+if eval "test x$enable_libtool != xno"; then
+    LIBTOOL="$enable_libtool"
+    enable_shared=no
+else
+    LIBTOOL=""
+fi])
+
+if test "$enable_shared" = "yes"; then
   PICFLAG=1
   case $uname in
       SunOS* | UNIX_S*)
@@ -95,7 +107,14 @@ if eval "test x$enable_shared = xyes"; t
           DSOCOMMAND="\$(CXX) -Wl,-soname,libfltk.so.1 \$(LDLIBS) -shared $DEBUGFLAG -o"
 	  ;;
   esac
-fi])
+fi
+
+if test "x$LIBTOOL" != "x"; then
+    LIBNAME="libfltk.la"
+    LIBRARY="\$(LIBNAME)"
+    LIBFLTK="../src/\$(LIBNAME)"
+    LINKFLTK="../src/\$(LIBNAME)"
+fi
 
 AC_PROG_CC
 AC_PROG_CXX
@@ -262,7 +281,7 @@ MAKEDEPEND="\$(CXX) -M"
 if test -n "$GXX"; then
     # Use gcc instead of c++ or g++, since we don't need the C++
     # library to depend on...
-    CXX="$CC"
+#    CXX="$CC"
     CFLAGS="-Wall $CFLAGS"
     CXXFLAGS="-Wall $CXXFLAGS"
     if test -z "$DEBUGFLAG"; then
@@ -375,7 +394,11 @@ CXXFLAGS="$DEBUGFLAG $CXXFLAGS"
 AC_SUBST(DSONAME)
 AC_SUBST(DSOCOMMAND)
 AC_SUBST(LIBNAME)
+AC_SUBST(LIBRARY)
+AC_SUBST(LIBFLTK)
+AC_SUBST(LINKFLTK)
 AC_SUBST(LIBCOMMAND)
+AC_SUBST(LIBTOOL)
 AC_SUBST(MAKEDEPEND)
 AC_CONFIG_HEADER(config.h:configh.in)
 AC_OUTPUT(makeinclude)