aboutsummaryrefslogtreecommitdiff
path: root/debian/patches/0612_nxproxy_use-MAKEDEPEND-in-path.full+lite.patch
blob: c43788c9c33841a31dcb337ffdf5d14e3bc448ca (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
Description: Discover makedepend in $PATH. Especially important for MacPorts (OS X.)
Author: Clemens Lang <cal@macports.org>
        v2: Mihai Moldovan <ionic@ionic.de>

--- a/nxproxy/configure.in
+++ b/nxproxy/configure.in
@@ -167,18 +167,15 @@ fi
 dnl Find makedepend somewhere.
 
 AC_SUBST(MAKEDEPEND)
+MAKEDEPEND="$(which makedepend)"
 
-if test -x "../nx-X11/config/makedepend/makedepend" ; then
-  MAKEDEPEND=../nx-X11/config/makedepend/makedepend
-else
-  if test -x "/usr/X11R6/bin/makedepend" ; then
-    MAKEDEPEND=/usr/X11R6/bin/makedepend
-  else
-    if test -x "/usr/openwin/bin/makedepend" ; then
-      MAKEDEPEND=/usr/openwin/bin/makedepend
-    else
-      MAKEDEPEND=makedepend
-    fi
+# Try to desperately find makedepend.
+# Set MAKEDEPEND to the shipped makedepend binary. This will not
+# exist in nx-libs-lite, though, in which case MAKEDEPEND
+# will stay empty.
+if test -z "${MAKEDEPEND}"; then
+  if test -x "../nx-X11/config/makedepend/makedepend"; then
+    MAKEDEPEND="../nx-X11/config/makedepend/makedepend"
   fi
 fi
 
--- a/nxproxy/Makefile.in
+++ b/nxproxy/Makefile.in
@@ -80,9 +80,9 @@ depends:	depend.status
 depend:		depend.status
 
 depend.status:	
-		if [ -x $(MAKEDEPEND) ] ; then \
+		if [ -n "$(MAKEDEPEND)" ] && [ -x "$(MAKEDEPEND)" ] ; then \
 			$(MAKEDEPEND) $(CXXINCLUDES) $(CCINCLUDES) \
-                        $(DEPENDINCLUDES) -f Makefile $(MSRC) $(CSRC) $(CXXSRC) 2>/dev/null; \
+			$(DEPENDINCLUDES) -f Makefile $(MSRC) $(CSRC) $(CXXSRC) 2>/dev/null; \
 		fi
 		touch depend.status