Bug 574 - PICSUFFIX not used consistently
PICSUFFIX not used consistently
Status: CLOSED FIXED
Product: Samba 3.0
Classification: Unclassified
Component: Build environment
3.0.0
Other other
: P3 normal
: none
Assigned To: Tim Potter
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2003-10-06 08:06 UTC by Joachim Schmitz
Modified: 2005-08-24 10:16 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joachim Schmitz 2003-10-06 08:06:09 UTC
Hi there

In an attempt to port samba to OSS, the POSIX personality of NonStop Kernel, 
I'm having a problem with my compuler driver (c89) not to accept *.po as it's 
input when creating an *.so. A problem with compilers not being able to create 
*.po seems to have been fixed with the help of PICSUFFIX and/or POBAD_CC and/or 
BROKEN_CC, but this doesn't help in my situation. I've modified Makefile.in and 
configure.in as per the attached diff and this solved my problem and should 
still work for the other problem.
Furthermore PICFLAG is set in various places, but PICFLAGS gets echoed.
And on out platform the super users ID is 65535, so that's what the last chunk 
is fixing

Bye, Jojo

--- source/Makefile.in.orig 2003-09-24 19:16:13.000000000 +0200
+++ source/Makefile.in      2003-10-06 15:27:44.000000000 +0200
@@ -446,7 +446,7 @@
             $(LIBADS_OBJ) $(SECRETS_OBJ) $(POPT_LIB_OBJ) \
             $(SMBLDAP_OBJ) $(DCUTIL_OBJ) lib/dummyroot.o

-PAM_WINBIND_PICOBJ = nsswitch/pam_winbind.po nsswitch/wb_common.po lib/replace1
.po lib/snprintf.po
+PAM_WINBIND_PICOBJ = nsswitch/pam_winbind.@PICSUFFIX@ nsswitch/wb_common.@PICSU
FFIX@ lib/replace1.@PICSUFFIX@ lib/snprintf.@PICSUFFIX@

 SMBW_OBJ1 = smbwrapper/smbw.o \
                smbwrapper/smbw_dir.o smbwrapper/smbw_stat.o \
@@ -474,7 +474,7 @@
        $(LIBSMB_OBJ) $(LIBMSRPC_OBJ) $(RPC_PARSE_OBJ) $(PASSDB_OBJ) \
        $(GROUPDB_OBJ) $(KRBCLIENT_OBJ) $(SMBLDAP_OBJ) lib/dummyroot.o

-LIBBIGBALLOFMUD_PICOBJS = $(LIBBIGBALLOFMUD_OBJ:.o=.po)
+LIBBIGBALLOFMUD_PICOBJS = $(LIBBIGBALLOFMUD_OBJ:.o=.@PICSUFFIX@)

 CLIENT_OBJ1 = client/client.o client/clitar.o

@@ -578,17 +578,17 @@
 WINBIND_WINS_NSS_OBJ = nsswitch/wins.o $(PARAM_OBJ) $(UBIQX_OBJ) \
        $(LIBSMB_OBJ) $(LIB_OBJ) $(NSSWINS_OBJ) $(KRBCLIENT_OBJ)

-WINBIND_WINS_NSS_PICOBJS = $(WINBIND_WINS_NSS_OBJ:.o=.po)
+WINBIND_WINS_NSS_PICOBJS = $(WINBIND_WINS_NSS_OBJ:.o=.@PICSUFFIX@)

-PICOBJS = $(SMBWRAPPER_OBJ:.o=.po)
-LIBSMBCLIENT_PICOBJS = $(LIBSMBCLIENT_OBJ:.o=.po)
+PICOBJS = $(SMBWRAPPER_OBJ:.o=.@PICSUFFIX@)
+LIBSMBCLIENT_PICOBJS = $(LIBSMBCLIENT_OBJ:.o=.@PICSUFFIX@)

 PAM_SMBPASS_OBJ_0 = pam_smbpass/pam_smb_auth.o pam_smbpass/pam_smb_passwd.o \
                pam_smbpass/pam_smb_acct.o pam_smbpass/support.o \
                lib/dummyroot.o $(PARAM_OBJ) $(LIB_OBJ) $(PASSDB_OBJ) $(GROUPDB_
OBJ) \
                $(SECRETS_OBJ) $(UBIQX_OBJ) $(SMBLDAP_OBJ) $(LIBSAMBA_OBJ)

-PAM_SMBPASS_PICOOBJ = $(PAM_SMBPASS_OBJ_0:.o=.po)
+PAM_SMBPASS_PICOOBJ = $(PAM_SMBPASS_OBJ_0:.o=.@PICSUFFIX@)

 IDMAP_OBJ     = sam/idmap.o sam/idmap_util.o @IDMAP_STATIC@

@@ -621,7 +621,7 @@

 WINBIND_NSS_OBJ = nsswitch/wb_common.o lib/replace1.o @WINBIND_NSS_EXTRA_OBJS@

-WINBIND_NSS_PICOBJS = $(WINBIND_NSS_OBJ:.o=.po) lib/snprintf.po
+WINBIND_NSS_PICOBJS = $(WINBIND_NSS_OBJ:.o=.@PICSUFFIX@) lib/snprintf.@PICSUFFI
X@

 POPT_OBJS=popt/findme.o popt/popt.o popt/poptconfig.o \
           popt/popthelp.o popt/poptparse.o
@@ -679,7 +679,7 @@
        $(EVERYTHING_PROGS)

 .SUFFIXES:
-.SUFFIXES: .c .o .po .lo
+.SUFFIXES: .c .o .@PICSUFFIX@ .lo

 SHOWFLAGS:
        @echo "Using FLAGS = $(FLAGS)"
@@ -713,25 +713,25 @@
        @echo Compiling $*.c
        @$(CC) $(FLAGS) $(PATH_FLAGS) -c $< -o $@

-dynconfig.po: dynconfig.c Makefile
+dynconfig.@PICSUFFIX@: dynconfig.c Makefile
        @if (: >> $@ || : > $@) >/dev/null 2>&1; then rm -f $@; else \
          dir=`echo $@ | sed 's,/[^/]*$$,,;s,^$$,.,'` $(MAKEDIR); fi
        @echo Compiling $*.c with @PICFLAG@
        @$(CC) -I. -I$(srcdir) $(FLAGS) $(PATH_FLAGS) @PICFLAG@ -c $< -o $*.@PIC
SUFFIX@
-@BROKEN_CC@    -mv `echo $@ | sed -e 's%^.*/%%g' -e 's%\.po$$%.o%'` $@
-@POBAD_CC@     @mv $*.po.o $@
+@BROKEN_CC@    -mv `echo $@ | sed -e 's%^.*/%%g' -e 's%\.@PICSUFFIX@$$%.o%'` $@
+@POBAD_CC@     @mv $*.@PICSUFFIX@ $@

 lib/version.o: lib/version.c include/version.h
        @echo Compiling $*.c
        @$(CC) -I. -I$(srcdir) $(FLAGS) $(PATH_FLAGS) -c $< -o $@

-lib/version.po: lib/version.c include/version.h
+lib/version.@PICSUFFIX@: lib/version.c include/version.h
        @if (: >> $@ || : > $@) >/dev/null 2>&1; then rm -f $@; else \
          dir=`echo $@ | sed 's,/[^/]*$$,,;s,^$$,.,'` $(MAKEDIR); fi
        @echo Compiling $*.c with @PICFLAG@
        @$(CC) -I. -I$(srcdir) $(FLAGS) $(PATH_FLAGS) @PICFLAG@ -c $< -o $*.@PIC
SUFFIX@
-@BROKEN_CC@    -mv `echo $@ | sed -e 's%^.*/%%g' -e 's%\.po$$%.o%'` $@
-@POBAD_CC@     @mv $*.po.o $@
+@BROKEN_CC@    -mv `echo $@ | sed -e 's%^.*/%%g' -e 's%\.@PICSUFFIX@$$%.o%'` $@
+@POBAD_CC@     @mv $*.@PICSUFFIX@ $@

 smbd/build_options.o: smbd/build_options.c Makefile include/config.h include/bu
ild_env.h include/proto.h
        @echo Compiling $*.c
@@ -741,13 +741,13 @@
        @echo Generating $@
        @dir=smbd $(MAKEDIR) && $(AWK) -f $(srcdir)/script/mkbuildoptions.awk >
$(builddir)/smbd/build_options.c < $(srcdir)/include/config.h.in

-.c.po:
+.c.@PICSUFFIX@:
        @if (: >> $@ || : > $@) >/dev/null 2>&1; then rm -f $@; else \
          dir=`echo $@ | sed 's,/[^/]*$$,,;s,^$$,.,'` $(MAKEDIR); fi
        @echo Compiling $*.c with @PICFLAG@
        @$(CC) -I. -I$(srcdir) $(FLAGS) @PICFLAG@ -c $< -o $*.@PICSUFFIX@
-@BROKEN_CC@    -mv `echo $@ | sed -e 's%^.*/%%g' -e 's%\.po$$%.o%'` $@
-@POBAD_CC@     @mv $*.po.o $@
+@BROKEN_CC@    -mv `echo $@ | sed -e 's%^.*/%%g' -e 's%\.@PICSUFFIX@$$%.o%'` $@
+@POBAD_CC@     @mv $*.@PICSUFFIX@ $@

 bin/.dummy:
        @if (: >> $@ || : > $@) >/dev/null 2>&1; then :; else \
@@ -1019,112 +1019,112 @@
        @$(SHLD) $(LDSHFLAGS) -o $@ $(PAM_WINBIND_PICOBJ) \
                @SONAMEFLAG@`basename $@` -lpam

-bin/rhosts.@SHLIBEXT@: $(AUTH_RHOSTS_OBJ:.o=.po)
+bin/rhosts.@SHLIBEXT@: $(AUTH_RHOSTS_OBJ:.o=.@PICSUFFIX@)
        @echo "Building plugin $@"
-       @$(SHLD) $(LDSHFLAGS) -o $@ $(AUTH_RHOSTS_OBJ:.o=.po) @SONAMEFLAG@`basen
ame $@`
+       @$(SHLD) $(LDSHFLAGS) -o $@ $(AUTH_RHOSTS_OBJ:.o=.@PICSUFFIX@) @SONAMEFL
AG@`basename $@`

-bin/builtin.@SHLIBEXT@: $(AUTH_BUILTIN_OBJ:.o=.po)
+bin/builtin.@SHLIBEXT@: $(AUTH_BUILTIN_OBJ:.o=.@PICSUFFIX@)
        @echo "Building plugin $@"
-       @$(SHLD) $(LDSHFLAGS) -o $@ $(AUTH_BUILTIN_OBJ:.o=.po) @SONAMEFLAG@`base
name $@`
+       @$(SHLD) $(LDSHFLAGS) -o $@ $(AUTH_BUILTIN_OBJ:.o=.@PICSUFFIX@) @SONAMEF
LAG@`basename $@`

-bin/domain.@SHLIBEXT@: $(AUTH_DOMAIN_OBJ:.o=.po)
+bin/domain.@SHLIBEXT@: $(AUTH_DOMAIN_OBJ:.o=.@PICSUFFIX@)
        @echo "Building plugin $@"
-       @$(SHLD) $(LDSHFLAGS) -o $@ $(AUTH_DOMAIN_OBJ:.o=.po) @SONAMEFLAG@`basen
ame $@`
+       @$(SHLD) $(LDSHFLAGS) -o $@ $(AUTH_DOMAIN_OBJ:.o=.@PICSUFFIX@) @SONAMEFL
AG@`basename $@`

-bin/smbserver.@SHLIBEXT@: $(AUTH_SERVER_OBJ:.o=.po)
+bin/smbserver.@SHLIBEXT@: $(AUTH_SERVER_OBJ:.o=.@PICSUFFIX@)
        @echo "Building plugin $@"
-       @$(SHLD) $(LDSHFLAGS) -o $@ $(AUTH_SERVER_OBJ:.o=.po) @SONAMEFLAG@`basen
ame $@`
+       @$(SHLD) $(LDSHFLAGS) -o $@ $(AUTH_SERVER_OBJ:.o=.@PICSUFFIX@) @SONAMEFL
AG@`basename $@`

-bin/winbind.@SHLIBEXT@: $(AUTH_WINBIND_OBJ:.o=.po)
+bin/winbind.@SHLIBEXT@: $(AUTH_WINBIND_OBJ:.o=.@PICSUFFIX@)
        @echo "Building plugin $@"
-       @$(SHLD) $(LDSHFLAGS) -o $@ $(AUTH_WINBIND_OBJ:.o=.po) @SONAMEFLAG@`base
name $@`
+       @$(SHLD) $(LDSHFLAGS) -o $@ $(AUTH_WINBIND_OBJ:.o=.@PICSUFFIX@) @SONAMEF
LAG@`basename $@`

-bin/unix.@SHLIBEXT@: $(AUTH_UNIX_OBJ:.o=.po)
+bin/unix.@SHLIBEXT@: $(AUTH_UNIX_OBJ:.o=.@PICSUFFIX@)
        @echo "Building plugin $@"
-       @$(SHLD) $(LDSHFLAGS) -o $@ $(AUTH_UNIX_OBJ:.o=.po) @SONAMEFLAG@`basenam
e $@`
+       @$(SHLD) $(LDSHFLAGS) -o $@ $(AUTH_UNIX_OBJ:.o=.@PICSUFFIX@) @SONAMEFLAG
@`basename $@`

-bin/sam.@SHLIBEXT@: $(AUTH_SAM_OBJ:.o=.po)
+bin/sam.@SHLIBEXT@: $(AUTH_SAM_OBJ:.o=.@PICSUFFIX@)
        @echo "Building plugin $@"
-       @$(SHLD) $(LDSHFLAGS) -o $@ $(AUTH_SAM_OBJ:.o=.po) @SONAMEFLAG@`basename
 $@`
+       @$(SHLD) $(LDSHFLAGS) -o $@ $(AUTH_SAM_OBJ:.o=.@PICSUFFIX@) @SONAMEFLAG@
`basename $@`

-bin/mysql.@SHLIBEXT@: $(MYSQL_OBJ:.o=.po)
+bin/mysql.@SHLIBEXT@: $(MYSQL_OBJ:.o=.@PICSUFFIX@)
        @echo "Building plugin $@"
-       @$(SHLD) $(LDSHFLAGS) -o $@ $(MYSQL_OBJ:.o=.po) @MYSQL_LIBS@ \
+       @$(SHLD) $(LDSHFLAGS) -o $@ $(MYSQL_OBJ:.o=.@PICSUFFIX@) @MYSQL_LIBS@ \
                @SONAMEFLAG@`basename $@`

-bin/ldapsam.@SHLIBEXT@: passdb/pdb_ldap.po
+bin/ldapsam.@SHLIBEXT@: passdb/pdb_ldap.@PICSUFFIX@
        @echo "Building plugin $@"
-       @$(SHLD) $(LDSHFLAGS) $(LDAP_LIBS) -o $@ passdb/pdb_ldap.po \
+       @$(SHLD) $(LDSHFLAGS) $(LDAP_LIBS) -o $@ passdb/pdb_ldap.@PICSUFFIX@ \
                @SONAMEFLAG@`basename $@`

-bin/tdbsam.@SHLIBEXT@: passdb/pdb_tdb.po
+bin/tdbsam.@SHLIBEXT@: passdb/pdb_tdb.@PICSUFFIX@
        @echo "Building plugin $@"
-       @$(SHLD) $(LDSHFLAGS) -o $@ passdb/pdb_tdb.po \
+       @$(SHLD) $(LDSHFLAGS) -o $@ passdb/pdb_tdb.@PICSUFFIX@ \
                @SONAMEFLAG@`basename $@`

-bin/smbpasswd.@SHLIBEXT@: passdb/pdb_smbpasswd.po
+bin/smbpasswd.@SHLIBEXT@: passdb/pdb_smbpasswd.@PICSUFFIX@
        @echo "Building plugin $@"
-       @$(SHLD) $(LDSHFLAGS) -o $@ passdb/pdb_smbpasswd.po \
+       @$(SHLD) $(LDSHFLAGS) -o $@ passdb/pdb_smbpasswd.@PICSUFFIX@ \
                @SONAMEFLAG@`basename $@`

-bin/weird.@SHLIBEXT@: $(DEVEL_HELP_WEIRD_OBJ:.o=.po)
+bin/weird.@SHLIBEXT@: $(DEVEL_HELP_WEIRD_OBJ:.o=.@PICSUFFIX@)
        @echo "Building plugin $@"
-       @$(SHLD) $(LDSHFLAGS) -o $@ $(DEVEL_HELP_WEIRD_OBJ:.o=.po) \
+       @$(SHLD) $(LDSHFLAGS) -o $@ $(DEVEL_HELP_WEIRD_OBJ:.o=.@PICSUFFIX@) \
                @SONAMEFLAG@`basename $@`

-bin/CP850.@SHLIBEXT@: $(DEVEL_HELP_CP850_OBJ:.o=.po)
+bin/CP850.@SHLIBEXT@: $(DEVEL_HELP_CP850_OBJ:.o=.@PICSUFFIX@)
        @echo "Building plugin $@"
-       @$(SHLD) $(LDSHFLAGS) -o $@ $(DEVEL_HELP_CP850_OBJ:.o=.po) \
+       @$(SHLD) $(LDSHFLAGS) -o $@ $(DEVEL_HELP_CP850_OBJ:.o=.@PICSUFFIX@) \
                @SONAMEFLAG@`basename $@`

-bin/CP437.@SHLIBEXT@: $(DEVEL_HELP_CP437_OBJ:.o=.po)
+bin/CP437.@SHLIBEXT@: $(DEVEL_HELP_CP437_OBJ:.o=.@PICSUFFIX@)
        @echo "Building plugin $@"
-       @$(SHLD) $(LDSHFLAGS) -o $@ $(DEVEL_HELP_CP437_OBJ:.o=.po) \
+       @$(SHLD) $(LDSHFLAGS) -o $@ $(DEVEL_HELP_CP437_OBJ:.o=.@PICSUFFIX@) \
                @SONAMEFLAG@`basename $@`

-bin/xml.@SHLIBEXT@: $(XML_OBJ:.o=.po)
+bin/xml.@SHLIBEXT@: $(XML_OBJ:.o=.@PICSUFFIX@)
        @echo "Building plugin $@"
-       @$(SHLD) $(LDSHFLAGS) -o $@ $(XML_OBJ:.o=.po) @XML_LIBS@ \
+       @$(SHLD) $(LDSHFLAGS) -o $@ $(XML_OBJ:.o=.@PICSUFFIX@) @XML_LIBS@ \
                @SONAMEFLAG@`basename $@`

-bin/audit.@SHLIBEXT@: $(VFS_AUDIT_OBJ:.o=.po)
+bin/audit.@SHLIBEXT@: $(VFS_AUDIT_OBJ:.o=.@PICSUFFIX@)
        @echo "Building plugin $@"
-       @$(SHLD) $(LDSHFLAGS) -o $@ $(VFS_AUDIT_OBJ:.o=.po) \
+       @$(SHLD) $(LDSHFLAGS) -o $@ $(VFS_AUDIT_OBJ:.o=.@PICSUFFIX@) \
                @SONAMEFLAG@`basename $@`

-bin/extd_audit.@SHLIBEXT@: $(VFS_EXTD_AUDIT_OBJ:.o=.po)
+bin/extd_audit.@SHLIBEXT@: $(VFS_EXTD_AUDIT_OBJ:.o=.@PICSUFFIX@)
        @echo "Building plugin $@"
-       @$(SHLD) $(LDSHFLAGS) -o $@ $(VFS_EXTD_AUDIT_OBJ:.o=.po) \
+       @$(SHLD) $(LDSHFLAGS) -o $@ $(VFS_EXTD_AUDIT_OBJ:.o=.@PICSUFFIX@) \
                @SONAMEFLAG@`basename $@`

-bin/recycle.@SHLIBEXT@: $(VFS_RECYCLE_OBJ:.o=.po)
+bin/recycle.@SHLIBEXT@: $(VFS_RECYCLE_OBJ:.o=.@PICSUFFIX@)
        @echo "Building plugin $@"
-       @$(SHLD) $(LDSHFLAGS) -o $@ $(VFS_RECYCLE_OBJ:.o=.po) \
+       @$(SHLD) $(LDSHFLAGS) -o $@ $(VFS_RECYCLE_OBJ:.o=.@PICSUFFIX@) \
                @SONAMEFLAG@`basename $@`

-bin/netatalk.@SHLIBEXT@: $(VFS_NETATALK_OBJ:.o=.po)
+bin/netatalk.@SHLIBEXT@: $(VFS_NETATALK_OBJ:.o=.@PICSUFFIX@)
        @echo "Building plugin $@"
-       @$(SHLD) $(LDSHFLAGS) -o $@ $(VFS_NETATALK_OBJ:.o=.po) \
+       @$(SHLD) $(LDSHFLAGS) -o $@ $(VFS_NETATALK_OBJ:.o=.@PICSUFFIX@) \
                @SONAMEFLAG@`basename $@`

-bin/fake_perms.@SHLIBEXT@: $(VFS_FAKE_PERMS_OBJ:.o=.po)
+bin/fake_perms.@SHLIBEXT@: $(VFS_FAKE_PERMS_OBJ:.o=.@PICSUFFIX@)
        @echo "Building plugin $@"
-       @$(SHLD) $(LDSHFLAGS) -o $@ $(VFS_FAKE_PERMS_OBJ:.o=.po) \
+       @$(SHLD) $(LDSHFLAGS) -o $@ $(VFS_FAKE_PERMS_OBJ:.o=.@PICSUFFIX@) \
                @SONAMEFLAG@`basename $@`

-bin/default_quota.@SHLIBEXT@: $(VFS_DEFAULT_QUOTA_OBJ:.o=.po)
+bin/default_quota.@SHLIBEXT@: $(VFS_DEFAULT_QUOTA_OBJ:.o=.@PICSUFFIX@)
        @echo "Building plugin $@"
-       @$(SHLD) $(LDSHFLAGS) -o $@ $(VFS_DEFAULT_QUOTA_OBJ:.o=.po) \
+       @$(SHLD) $(LDSHFLAGS) -o $@ $(VFS_DEFAULT_QUOTA_OBJ:.o=.@PICSUFFIX@) \
                @SONAMEFLAG@`basename $@`

-bin/readonly.@SHLIBEXT@: $(VFS_READONLY_OBJ:.o=.po)
+bin/readonly.@SHLIBEXT@: $(VFS_READONLY_OBJ:.o=.@PICSUFFIX@)
        @echo "Building plugin $@"
-       @$(SHLD) $(LDSHFLAGS) -o $@ $(VFS_READONLY_OBJ:.o=.po) \
+       @$(SHLD) $(LDSHFLAGS) -o $@ $(VFS_READONLY_OBJ:.o=.@PICSUFFIX@) \
                @SONAMEFLAG@`basename $@`

-bin/cap.@SHLIBEXT@: $(VFS_CAP_OBJ:.o=.po)
+bin/cap.@SHLIBEXT@: $(VFS_CAP_OBJ:.o=.@PICSUFFIX@)
        @echo "Building plugin $@"
-       @$(SHLD) $(LDSHFLAGS) -o $@ $(VFS_CAP_OBJ:.o=.po) \
+       @$(SHLD) $(LDSHFLAGS) -o $@ $(VFS_CAP_OBJ:.o=.@PICSUFFIX@) \
                @SONAMEFLAG@`basename $@`

 bin/wbinfo@EXEEXT@: $(WBINFO_OBJ) @BUILD_POPT@ bin/.dummy
@@ -1146,7 +1146,7 @@

 bin/tdbbackup@EXEEXT@: $(TDBBACKUP_OBJ) bin/.dummy
        @echo Linking $@
-       @$(CC) $(FLAGS) -o $@ $(TDBBACKUP_OBJ)
+       @$(CC) $(FLAGS) -o $@ $(TDBBACKUP_OBJ) $(LIBS)

 bin/t_strcmp@EXEEXT@: bin/libbigballofmud.@SHLIBEXT@ torture/t_strcmp.o
        $(CC) $(FLAGS) -o $@ $(LIBS) torture/t_strcmp.o -L ./bin -lbigballofmud
@@ -1223,7 +1223,7 @@
        $(UBIQX_OBJ) $(LIBMSRPC_OBJ) $(PASSDB_OBJ) $(GROUPDB_OBJ) \
        $(SECRETS_OBJ) $(KRBCLIENT_OBJ) $(SMBLDAP_OBJ) lib/dummyroot.o

-PYTHON_PICOBJS = $(PYTHON_OBJS:.o=.po)
+PYTHON_PICOBJS = $(PYTHON_OBJS:.o=.@PICSUFFIX@)

 python_ext: $(PYTHON_PICOBJS)
        @if test -z "$(PYTHON)"; then \
@@ -1288,10 +1288,10 @@
        @$(SHELL) $(srcdir)/script/uninstallscripts.sh $(INSTALLPERMS) $(DESTDIR
)$(BINDIR) $(SCRIPTS)

 clean: delheaders python_clean
-       -rm -f core */*~ *~ */*.o */*.po */*.@SHLIBEXT@ \
+       -rm -f core */*~ *~ */*.o */*.@PICSUFFIX@ */*.@SHLIBEXT@ \
                $(TOPFILES) $(BIN_PROGS) $(SBIN_PROGS) $(MODULES) $(TORTURE_PROG
S) \
                $(LIBSMBCLIENT) $(EVERYTHING_PROGS) .headers.stamp

--- source/configure.in.orig        2003-09-24 19:16:13.000000000 +0200
+++ source/configure.in     2003-10-06 13:29:24.000000000 +0200
@@ -1189,6 +1189,22 @@
                        AC_DEFINE(STAT_ST_BLOCKSIZE,512)
                        ;;

+               *nsk*)  # TANDEM
+                       if test -f /usr/lib/librld.srl; then
+                               BLDSHARED="true"
+                               if test "${GCC}" = "yes"; then
+                                       PICFLAG="-fPIC"
+                               else
+                                       LDSHFLAGS="-Wshared"
+                                       PICFLAG="-Wcall_shared"
+                                       PICSUFFIX="po.o"
+                               fi
+                       else
+                               BLDSHARED="false"
+                               LDSHFLAGS=""
+                       fi
+                       ;;
+
                *)
                        AC_DEFINE(STAT_ST_BLOCKSIZE,512)
                        ;;
@@ -1198,7 +1214,7 @@
   AC_MSG_CHECKING([linker flags for shared libraries])
   AC_MSG_RESULT([$LDSHFLAGS])
   AC_MSG_CHECKING([compiler flags for position-independent code])
-  AC_MSG_RESULT([$PICFLAGS])
+  AC_MSG_RESULT([$PICFLAG])
 fi

 #######################################################
@@ -1208,17 +1224,10 @@
                [ac_cv_shlib_works],[
    ac_cv_shlib_works=no
    # try building a trivial shared library
-   if test "$PICSUFFIX" = "po"; then
-     $CC $CPPFLAGS $CFLAGS $PICFLAG -c -o shlib.po ${srcdir-.}/tests/shlib.c &&
-       $CC $CPPFLAGS $CFLAGS `eval echo $LDSHFLAGS` -o "shlib.$SHLIBEXT" shlib.
po &&
-       ac_cv_shlib_works=yes
-   else
-     $CC $CPPFLAGS $CFLAGS $PICFLAG -c -o shlib.$PICSUFFIX ${srcdir-.}/tests/sh
lib.c &&
-       mv shlib.$PICSUFFIX shlib.po &&
-       $CC $CPPFLAGS $CFLAGS `eval echo $LDSHFLAGS` -o "shlib.$SHLIBEXT" shlib.
po &&
-       ac_cv_shlib_works=yes
-   fi
-   rm -f "shlib.$SHLIBEXT" shlib.po
+   $CC $CPPFLAGS $CFLAGS $PICFLAG -c -o shlib.$PICSUFFIX ${srcdir-.}/tests/shli
b.c &&
+     $CC $CPPFLAGS $CFLAGS `eval echo $LDSHFLAGS` -o "shlib.$SHLIBEXT" shlib.$P
ICSUFFIX &&
+     ac_cv_shlib_works=yes
+   rm -f "shlib.$SHLIBEXT" shlib.$PICSUFFIX
 ])
 if test $ac_cv_shlib_works = no; then
    BLDSHARED=false
@@ -1941,7 +1950,13 @@
 fi

 AC_CACHE_CHECK([for root],samba_cv_HAVE_ROOT,[
-AC_TRY_RUN([main() { exit(getuid() != 0); }],
+AC_TRY_RUN([main() {
+#ifdef __TANDEM
+exit(getuid() != 65535);
+#else
+exit(getuid() != 0);
+#endif
+}],
            samba_cv_HAVE_ROOT=yes,samba_cv_HAVE_ROOT=no,samba_cv_HAVE_ROOT=cros
s)])
 if test x"$samba_cv_HAVE_ROOT" = x"yes"; then
     AC_DEFINE(HAVE_ROOT,1,[Whether current user is root])
Comment 1 Joachim Schmitz 2003-10-07 00:53:59 UTC
There one minor and only loosly related patch missing, I needed the following 
patch to config.guess:

--- source/config.guess.orig        2003-06-07 19:57:32.000000000 +0200
+++ source/config.guess     2003-09-29 13:47:39.000000000 +0200
@@ -1169,7 +1169,7 @@
     *:QNX:*:4*)
        echo i386-pc-qnx
        exit 0 ;;
-    NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*)
+    NSR-[DGKLNPTVWY]:NONSTOP_KERNEL:*:*)
        echo nsr-tandem-nsk${UNAME_RELEASE}
        exit 0 ;;
     *:NonStop-UX:*:*)

This one has been set to (and got accepted by) the autoconf maintainers
Comment 2 Joachim Schmitz 2003-10-07 07:22:47 UTC
oops, one additional line didn't make into the first patch.
LD needs to either get unset or set to /usr/bin/ld, otherwise our c89 doesn't 
find it anymore.
Here's the corrected patch for configure.in:

--- source/configure.in.orig   2003-09-24 19:16:13.000000000 +0200
+++ source/configure.in        2003-10-07 16:01:56.000000000 +0200
@@ -1189,6 +1189,23 @@
                        AC_DEFINE(STAT_ST_BLOCKSIZE,512)
                        ;;

+               *nsk*)  # TANDEM
+                       if test -f /usr/lib/librld.srl; then
+                               BLDSHARED="true"
+                               if test "${GCC}" = "yes"; then
+                                       PICFLAG="-fPIC"
+                               else
+                                       LDSHFLAGS="-Wshared"
+                                       unset LD
+                                       PICFLAG="-Wcall_shared"
+                                       PICSUFFIX="po.o"
+                               fi
+                       else
+                               BLDSHARED="false"
+                               LDSHFLAGS=""
+                       fi
+                       ;;
+
                *)
                        AC_DEFINE(STAT_ST_BLOCKSIZE,512)
                        ;;
@@ -1198,7 +1215,7 @@
   AC_MSG_CHECKING([linker flags for shared libraries])
   AC_MSG_RESULT([$LDSHFLAGS])
   AC_MSG_CHECKING([compiler flags for position-independent code])
-  AC_MSG_RESULT([$PICFLAGS])
+  AC_MSG_RESULT([$PICFLAG])
 fi

 #######################################################
@@ -1208,17 +1225,10 @@
                [ac_cv_shlib_works],[
    ac_cv_shlib_works=no
    # try building a trivial shared library
-   if test "$PICSUFFIX" = "po"; then
-     $CC $CPPFLAGS $CFLAGS $PICFLAG -c -o shlib.po ${srcdir-.}/tests/shlib.c &&
-       $CC $CPPFLAGS $CFLAGS `eval echo $LDSHFLAGS` -o "shlib.$SHLIBEXT" 
shlib.po &&
-       ac_cv_shlib_works=yes
-   else
-     $CC $CPPFLAGS $CFLAGS $PICFLAG -c -o shlib.$PICSUFFIX ${srcdir-
.}/tests/shlib.c &&
-       mv shlib.$PICSUFFIX shlib.po &&
-       $CC $CPPFLAGS $CFLAGS `eval echo $LDSHFLAGS` -o "shlib.$SHLIBEXT" 
shlib.po &&
-       ac_cv_shlib_works=yes
-   fi
-   rm -f "shlib.$SHLIBEXT" shlib.po
+   $CC $CPPFLAGS $CFLAGS $PICFLAG -c -o shlib.$PICSUFFIX ${srcdir-
.}/tests/shlib.c &&
+     $CC $CPPFLAGS $CFLAGS `eval echo $LDSHFLAGS` -o "shlib.$SHLIBEXT" 
shlib.$PICSUFFIX &&
+     ac_cv_shlib_works=yes
+   rm -f "shlib.$SHLIBEXT" shlib.$PICSUFFIX
 ])
 if test $ac_cv_shlib_works = no; then
    BLDSHARED=false
@@ -1941,7 +1951,13 @@
 fi

 AC_CACHE_CHECK([for root],samba_cv_HAVE_ROOT,[
-AC_TRY_RUN([main() { exit(getuid() != 0); }],
+AC_TRY_RUN([main() {
+#ifdef __TANDEM
+exit(getuid() != 65535);
+#else
+exit(getuid() != 0);
+#endif
+}],
            
samba_cv_HAVE_ROOT=yes,samba_cv_HAVE_ROOT=no,samba_cv_HAVE_ROOT=cross)])
 if test x"$samba_cv_HAVE_ROOT" = x"yes"; then
     AC_DEFINE(HAVE_ROOT,1,[Whether current user is root])
Comment 3 Joachim Schmitz 2003-10-08 00:17:57 UTC
Yet another two one line Fixes, for Makefile.in, additionally to the first one:
--- source/Makefile.in.orig 2003-09-24 19:16:13.000000000 +0200
+++ source/Makefile.in      2003-10-07 16:25:27.000000000 +0200
@@ -786,7 +786,7 @@

 bin/profiles@EXEEXT@: $(PROFILES_OBJ) @BUILD_POPT@ bin/.dummy
        @echo Linking $@
-       @$(CC) $(FLAGS) -o $@ $(PROFILES_OBJ) $(LDFLAGS) $(LIBS) @POPTLIBS@
+       @$(CC) $(FLAGS) -o $@ $(PROFILES_OBJ) $(LDFLAGS) @POPTLIBS@ $(LIBS)

 bin/editreg@EXEEXT@: $(EDITREG_OBJ) @BUILD_POPT@ bin/.dummy
        @echo Linking $@
@@ -923,7 +923,7 @@

 bin/libsmbclient.@SHLIBEXT@: $(LIBSMBCLIENT_PICOBJS)
        @echo Linking libsmbclient shared library $@
-       @$(SHLD) $(LDSHFLAGS) -o $@ $(LIBSMBCLIENT_PICOBJS) $(LDFLAGS) $(LIBS) \
+       @$(SHLD) $(LDSHFLAGS) -o $@ $(LIBSMBCLIENT_PICOBJS) $(LDFLAGS) \
                $(KRB5LIBS) $(LDAP_LIBS) \
                @SONAMEFLAG@`basename $@`.$(LIBSMBCLIENT_MAJOR)

Comment 4 Tim Potter 2003-10-13 19:04:29 UTC
Hi Jojo.  I'm going to go ahead and apply the PICSUFFIX and PICFLAG/PICFLAGS
patch right away.  Thanks!

You seem to have filed another bug for the root uid != 0 problem so we can leave
that there.

I will look at updating config.guess to the latest version.

I'd prefer to apply the patches for your platform all at once when you get it
working.  Perhaps you could file another bug with a more appropriate summary
like 'Support for platform XYZ' and work in there.

I don't quite understand what the problem is for the patch in comment 3.  Did
you have a link order problem on your platform?

Just one more thing: it's easier for me if you can submit patches as attachments
rather then quoting them inline.  There's much less chance of them being mangled
 and not being able to be applied cleanly.
Comment 5 Tim Potter 2003-10-13 20:22:47 UTC
OK I've applied the PICSUFFIX and PICFLAGS patches to 3.0 and HEAD so I might
mark this bug as closed.  Jojo, can you open new bugs for the remaining problems
as appropriate?   Thanks.
Comment 6 Gerald (Jerry) Carter 2005-08-24 10:16:14 UTC
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.