summaryrefslogtreecommitdiff
blob: 9d118e362d4c9e9942d9567e637b5f59f835990a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
diff --git a/m4/path.cb.m4 b/m4/path.cb.m4
index 7e38708..b5675b1 100644
--- a/m4/path.cb.m4
+++ b/m4/path.cb.m4
@@ -10,9 +10,17 @@ dnl
 AC_ARG_WITH(cg-prefix,[  --with-cg-prefix=PFX  Prefix where Cg is installed (optional)],
 	    cg_prefix="$withval", cg_prefix="")
 
+AC_ARG_WITH(cg-libdir, [  --with-cg-libdir=PATH Directory where Cg libraries are installed (optional)],
+	    cg_libdir="$withval", cg_libdir="")
+
   if test x$cg_prefix != x ; then
     CG_CXXFLAGS="-I$cg_prefix/include"
-    CG_LDFLAGS="-L$cg_prefix/lib -lGL -lCg -lCgGL -lGLU -lpthread -lglut"
+    if test x$cg_libdir != x; then
+       CG_LDFLAGS="-L$cg_libdir"
+    else
+       CG_LDFLAGS="-L$cg_prefix/lib"
+    fi
+    CG_LDFLAGS="$CG_LDFLAGS -lGL -lCg -lCgGL -lGLU -lpthread -lglut"
   else
     case $host_os in
       darwin*)