2005-08-26 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+ * tests/standalone.at, tests/template.at: Do not compare
+ output because of EOL issues. Resolve warnings, make cross-
+ compilation aware.
+ Reported by Peter Ekberg <peda@axentia.se>.
+
* libltdl/m4/libtool.m4 (_LT_SYS_DYNAMIC_LINKER)
(_LT_LINKER_SHLIBS): Double-quote unsafe tag variable
descriptions: they are literals.
AT_SETUP([linking libltdl without autotools])
AT_DATA([module.c],
-[[char *
+[[const char *
hello (void)
{
return "Hello!";
main (int argc, char **argv)
{
lt_dlhandle handle;
- char *(*func) (void) = 0;
+ const char *(*func) (void) = 0;
int status = 1;
LTDL_SET_PRELOADED_SYMBOLS();
goto finish;
}
- func = (char *(*)(void)) lt_dlsym (handle, "hello");
+ func = (const char *(*)(void)) lt_dlsym (handle, "hello");
if (!func) {
fprintf (stderr, "error fetching func: %s\n", lt_dlerror());
goto finish;
${MAKE-make} CC="$CC" LIBTOOLFLAGS="$LIBTOOLFLAGS" CPPFLAGS="$CPPFLAGS" \
CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS"
-AT_DATA([expout],
-[[Hello!
-]])
-
-AT_CHECK([./ltdldemo], 0, expout)
+LT_AT_EXEC_CHECK([./ltdldemo], 0, [ignore])
AT_CLEANUP
cout << "a sample prog" << endl;
cout << "f(3) = " << f(3) << endl;
cout << "cf(3) = " << cf(3) << endl;
- return 0;
+ return (f(3) + 3 - cf(3) != 0);
}
]])
AT_CHECK($CXX -I. $CPPFLAGS $CXXFLAGS -c -o prog.o prog.cpp, [0], [ignore], [ignore])
AT_CHECK($LIBTOOL --tag=CXX --mode=link $CXX $CPPFLAGS $CXXFLAGS -o prog prog.o libalib.la, [0], [ignore], [ignore])
-LT_AT_EXEC_CHECK([./prog], [0], [a sample prog
-f(3) = 6
-cf(3) = 9
-], [ignore])
+LT_AT_EXEC_CHECK([./prog], [0], [ignore], [ignore])
dnl with autoreconf, use: