fi
}
+
+# func_lalib_p file
+# True iff FILE is a libtool `.la' library.
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_lalib_p ()
+{
+ $SED -e 4q "$1" 2>/dev/null \
+ | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1
+}
+
+
+# func_ltwrapper_p file
+# True iff FILE is a libtool wrapper script.
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_p ()
+{
+ func_lalib_p "$1"
+}
+
+
# func_win32_libid arg
# return the library type of file 'arg'
#
case $file in
*.la)
# Check to see that this really is a libtool archive.
- (${SED} -e '2q' $file | $GREP "^# Generated by .*$PACKAGE") >/dev/null 2>&1 || \
+ func_lalib_p "$file" \ ||
func_fatal_help "\`$lib' is not a valid libtool archive"
# Read the libtool library.
-*) ;;
*)
# Do a test to see if this is really a libtool program.
- if (${SED} -e '4q' $file | $GREP "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+ if func_lalib_p "$file"; then
# If there is no directory component, then add one.
case $file in
*/* | *\\*) . $file ;;
*.la)
# Check to see that this really is a libtool archive.
- (${SED} -e '2q' $file | $GREP "^# Generated by ltmain.sh ") >/dev/null 2>&1 || \
+ func_lalib_p "$file" || \
func_fatal_help "\`$file' is not a valid libtool archive"
library_names=
wrapper=$file
;;
esac
- if (${SED} -e '4q' $wrapper | $GREP "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then
+ if func_ltwrapper_p "$wrapper"; then
notinst_deplibs=
relink_command=
# A libtool-controlled object.
# Check to see that this really is a libtool object.
- if (${SED} -e '2q' $arg | $GREP "^# Generated by ltmain.sh ") >/dev/null 2>&1; then
+ if func_lalib_p "$arg"; then
pic_object=
non_pic_object=
# A libtool-controlled object.
# Check to see that this really is a libtool object.
- if (${SED} -e '2q' $arg | $GREP "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+ if func_lalib_p "$arg"; then
pic_object=
non_pic_object=
if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
case " $predeps $postdeps " in
*" $deplib "*)
- if (${SED} -e '2q' $lib |
- $GREP "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+ if func_lalib_p "$lib"; then
library_names=
old_library=
case $lib in
fi
# Check to see that this really is a libtool archive.
- if (${SED} -e '2q' $lib | $GREP "^# Generated by ltmain.sh ") >/dev/null 2>&1; then :
- else
+ func_lalib_p "$lib" || \
func_fatal_error "\`$lib' is not a valid libtool archive"
- fi
ladir=`$ECHO "X$lib" | $Xsed -e 's%/[[^/]]*$%%'`
test "X$ladir" = "X$lib" && ladir="."
case $name in
*.la)
# Possibly a libtool archive, so verify it.
- if (${SED} -e '2q' $file | $GREP "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+ if func_lalib_p "$file"; then
. $dir/$name
# Delete the libtool libraries and symlinks.
*.lo)
# Possibly a libtool object, so verify it.
- if (${SED} -e '2q' $file | $GREP "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+ if func_lalib_p "$file"; then
# Read the .lo file
. $dir/$name
;;
esac
# Do a test to see if this is a libtool program.
- if (${SED} -e '4q' $file | $GREP "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+ if func_ltwrapper_p "$file"; then
relink_command=
. $dir/$noexename