I used the wrong name in the grab_next variable when designating to grab the next includedir and libdir.
There is also a mistake where I was copying the destination_prefix onto itself.
elif [[ $p == "-B" || $p == "--bindir" ]] ; then
grab_next=bindir
elif [[ $p == "-I" || $p == "--includedir" ]] ; then
- grab_next=includes
+ grab_next=includedir
elif [[ $p == "-L" || $p == "--libdir" ]] ; then
- grab_next=libraries
+ grab_next=libdir
elif [[ $p == "--enable-shared" ]] ; then
enable_shared="yes"
elif [[ $p == "--disable-shared" ]] ; then
fi
if [[ $destination_prefix != "" ]] ; then
- if [[ $(echo $destination_prefix | grep -o '^/') == "" ]] ; then
- destination_prefix="$destination_prefix$destination_prefix"
- fi
-
if [[ $(echo $destination_programs | grep -o '^/') == "" ]] ; then
destination_programs="$destination_prefix$destination_programs"
fi