[AD] patch for allegro-config: libdir, includedir

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Guilt from IRC noticed that allegro-config does not respect --libdir nor --includedir from the configure script. This patch( made by him ) fixes this by replacing $include_prefix with $include_path and adding $lib_path.
Index: allegro-config.in
===================================================================
--- allegro-config.in	(revision 7764)
+++ allegro-config.in	(working copy)
@@ -15,6 +15,9 @@
 exec_prefix=$prefix
 exec_prefix_set=no
 include_prefix=@INCLUDE_PREFIX@
+include_path=@includedir@
+lib_path=@libdir@
+bin_path=@bindir@
 
 static_libs=@LINK_WITH_STATIC_LIBS@
 lib_type=@LIB_TO_LINK@
@@ -163,7 +166,7 @@
 
 if test "$echo_cflags" = "yes"; then
    if test -n "$include_prefix"; then
-      echo -I${include_prefix}/include $allegro_cflags
+      echo -I${include_path} $allegro_cflags
    else
       echo $allegro_cflags
    fi
@@ -171,14 +174,14 @@
 
 if test "$echo_cppflags" = "yes"; then
    if test -n "$include_prefix"; then
-      echo -I${include_prefix}/include $allegro_cppflags
+      echo -I${include_path} $allegro_cppflags
    else
       echo $allegro_cppflags
    fi
 fi
 
 if test "$echo_libs" = "yes"; then
-   libdirs=-L${exec_prefix}/lib
+   libdirs=-L${lib_path}
    if test "$static_libs" = "yes"; then
       echo $libdirs $allegro_ldflags -l${lib_type} $allegro_libs
    else
@@ -191,11 +194,11 @@
 fi
 
 if test "$echo_env" = "yes"; then
-   echo "export PATH=\$PATH:$prefix/bin"
-   echo "export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:$prefix/lib"
-   echo "export LIBRARY_PATH=\$LIBRARY_PATH:$prefix/lib"
-   echo "export C_INCLUDE_PATH=\$C_INCLUDE_PATH:$prefix/include"
-   echo "export CPLUS_INCLUDE_PATH=\$CPLUS_INCLUDE_PATH:$prefix/include"
-   echo "export OBJC_INCLUDE_PATH=\$OBJC_INCLUDE_PATH:$prefix/include"
+   echo "export PATH=\$PATH:$bin_path"
+   echo "export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:$lib_path"
+   echo "export LIBRARY_PATH=\$LIBRARY_PATH:$lib_path"
+   echo "export C_INCLUDE_PATH=\$C_INCLUDE_PATH:$include_path"
+   echo "export CPLUS_INCLUDE_PATH=\$CPLUS_INCLUDE_PATH:$include_path"
+   echo "export OBJC_INCLUDE_PATH=\$OBJC_INCLUDE_PATH:$include_path"
 fi
 


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/