s3:configure: use correct SONAMEFLAG on Solaris depending on which linker is being...
authorBjörn Jacke <bj@sernet.de>
Fri, 7 May 2010 09:56:38 +0000 (11:56 +0200)
committerKarolin Seeger <kseeger@samba.org>
Tue, 11 May 2010 12:46:10 +0000 (14:46 +0200)
(cherry picked from commit 358a3855c20153d7fe742ca2e6b9bd8a9c92e525)

Fix bug #7385 (Can't compile. Undefined symbol 'main').

source3/configure.in

index 9672c93411736c89f44ee03f52f1eba6f08902fa..74a2479f4820f990819ca5c2634d08947b31021f 100644 (file)
@@ -1519,11 +1519,15 @@ DSO_EXPORTS=""
                                LDSHFLAGS="-shared"
                        else
                                PICFLAG="-KPIC"
-                               SONAMEFLAG="-h "
                                ## ${CFLAGS} added for building 64-bit shared
                                ## libs using Sun's Compiler
                                LDSHFLAGS="-G \${CFLAGS}"
                        fi
+                       if test "$ac_cv_prog_gnu_ld" = "yes"; then
+                               SONAMEFLAG="-Wl,-soname="
+                       else
+                               SONAMEFLAG="-Wl,-h,"
+                       fi
                        AC_DEFINE(STAT_ST_BLOCKSIZE,512,[The size of a block])
                        AC_DEFINE(BROKEN_GETGRNAM,1,[Does getgrnam work correctly])
                        ;;