autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

excaping the , seperator


From: Glenn McGrath
Subject: excaping the , seperator
Date: Tue, 5 Feb 2002 15:16:43 +1100

Im trying to modify dmalloc's configure.in to use gcc as a linker
instead of ld.

I added the lines
        if (gcc -shared -Wl,-soname conftest.so -o conftest.so.t conftest.a)
2>&5; then              ac_cv_shared_link_args='gcc -shared -Wl,-soname,$@ 
$(LIBRARY)
-o address@hidden'      (other conditions)

The output for that line in configure becomes
ac_cv_shared_link_args='gcc -shared -Wl

I think autoconf is using the comas as seperators

anyone know an easy way to get around this problem

The full modified section of code is 

AC_CACHE_CHECK("shared library link args", ac_cv_shared_link_args,
        rm -f conftest.a conftest.so.t conftest.so
        # HACK: create a dummy .c file and then compile it
        cat > conftest.$ac_ext << EOF
                int foo(int val) { return val + 1; }
EOF
        # try and compile it and then try and create an archive from it
        (eval $ac_compile) 2>&5
        ar cr conftest.a conftest.o 2>&5
        # see which ld commands work
        if (gcc -shared -Wl,-soname conftest.so -o conftest.so.t conftest.a)
2>&5; then              ac_cv_shared_link_args='gcc -shared -Wl,-soname,$@ 
$(LIBRARY)
-o address@hidden'      elif (ld -shared --whole-archive -soname conftest.so -o
conftest.so.t conftest.a) 2>&5; then            ac_cv_shared_link_args='ld
-shared --whole-archive -soname $@ $(LIBRARY) -o address@hidden'        elif 
(ld -shared
-all -none -lc -soname conftest.so -o conftest.so.t conftest.a) 2>&5;
then            ac_cv_shared_link_args='ld -shared -all -none -lc -soname $@
$(LIBRARY) -o address@hidden'   else
                # oh well, toss an error
                ac_cv_shared_link_args='# Could not configure shlib linking'
                enable_shlib=no
        fi
        rm -f conftest*
)
shlinkargs="$ac_cv_shared_link_args"
AC_SUBST(shlinkargs)



Thanks

Glenn



reply via email to

[Prev in Thread] Current Thread [Next in Thread]