mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-12 21:05:36 +00:00
bug 301035 and bug 325518
Enable autoconf build on Windows with cygwin and free MSVC compiler + SDK 1) Don't set the -lsvrcore in SVRCORE_LIBS in configure - instead, do it the way we do the NSPR and NSS libs, in build.mk 2) For the component LINK macros, use name.lib instead of -lname on Windows 3) The new free MSVC compiler does not have lib.exe - add an autoconf test for the lib program and use link /lib if missing 4) If using MSVC (which expects DOS style absolute paths) and cygwin (which uses unix style abs. paths), use cygpath -m on all user supplied paths to make sure they are in the correct format for cl and link. It's better to do this during configure rather than depend on cygwin_wrapper which is much, much slower. 5) Don't link with the odbc libs (Why did we ever need these!?!??!?) 6) The free MSVC doesn't include afxwin.h, so use the other header files instead 7) Add libutil to the Windows build, including getting rid of the old Makefile and adding a new Makefile.in for the autoconf build (the Makefile.client remains) 8) getopt.c doesn't need lber.h I verified that these changes also build on Win2k with MSVC 6 SP 3. I also changed the copyright in the new Makefile.in as suggested by Mark Smith.
This commit is contained in:
parent
bfdaa76582
commit
82876b785e
@ -121,7 +121,11 @@ SOFTOKN_LIBNAME = softokn$(NSSVERS)
|
||||
endif
|
||||
SSL_LIBNAME = ssl$(NSSVERS)
|
||||
|
||||
ifeq ($(OS_ARCH), WINNT)
|
||||
DYNAMICNSS = $(addsuffix .$(LIB_SUFFIX),$(SSL_LIBNAME) $(NSS_LIBNAME))
|
||||
else
|
||||
DYNAMICNSS = $(addprefix -l,$(SSL_LIBNAME) $(NSS_LIBNAME) $(SOFTOKN_LIBNAME))
|
||||
endif
|
||||
NSSLINK = $(NSS_LIBS) $(DYNAMICNSS)
|
||||
|
||||
HYBRID_LIBNAME = freebl_hybrid_$(NSSVERS)
|
||||
@ -144,6 +148,11 @@ endif
|
||||
SVRCOREVERS =
|
||||
SVRCOREVERS_SUFFIX =
|
||||
SVRCORE_LIBNAME = svrcore$(SVRCOREVERS)
|
||||
ifeq ($(OS_ARCH), WINNT)
|
||||
SVRCORE_LINK = $(SVRCORE_LIBS) $(SVRCORE_LIBNAME).$(LIB_SUFFIX)
|
||||
else
|
||||
SVRCORE_LINK = $(SVRCORE_LIBS) -l$(SVRCORE_LIBNAME)
|
||||
endif
|
||||
|
||||
#
|
||||
# NSPR library
|
||||
@ -157,13 +166,14 @@ ifeq ($(OS_TARGET), WIN95)
|
||||
PLC_BASENAME=$(PLCBASE)
|
||||
PLDS_BASENAME=$(PLDSBASE)
|
||||
NSPR_BASENAME=$(NSPRBASE)
|
||||
DYNAMICNSPR = -l$(PLCBASE) -l$(PLDSBASE) -l$(NSPRBASE)
|
||||
else
|
||||
PLC_BASENAME=lib$(PLCBASE)
|
||||
PLDS_BASENAME=lib$(PLDSBASE)
|
||||
NSPR_BASENAME=lib$(NSPRBASE)
|
||||
DYNAMICNSPR = $(PLC_BASENAME).$(LIB_SUFFIX) $(PLDS_BASENAME).$(LIB_SUFFIX) $(NSPR_BASENAME).$(LIB_SUFFIX)
|
||||
endif
|
||||
|
||||
DYNAMICNSPR = -l$(PLCBASE) -l$(PLDSBASE) -l$(NSPRBASE)
|
||||
# use the NSPRLINK macro in other makefiles to define the linker command line
|
||||
NSPRLINK = $(NSPR_LIBS) $(DYNAMICNSPR)
|
||||
|
||||
@ -456,8 +466,19 @@ LINK_EXE = $(CYGWIN_WRAPPER) link $(DEBUG_LINK_OPT) -OUT:"$@" -MAP $(ALDF
|
||||
$(LCFLAGS) -NOLOGO $(DEBUG_FLAGS) -INCREMENTAL:NO \
|
||||
-NODEFAULTLIB:MSVCRTD -SUBSYSTEM:$(SUBSYSTEM) $(DEPLIBS) \
|
||||
$(filter %.$(OBJ_SUFFIX),$^) $(OBJS) $(EXTRA_LIBS) $(PLATFORMLIBS)
|
||||
|
||||
# AR is set when doing an autoconf build
|
||||
ifdef AR
|
||||
LINK_LIB = $(CYGWIN_WRAPPER) $(AR) $(OBJS)
|
||||
else
|
||||
LINK_LIB = $(CYGWIN_WRAPPER) lib -OUT:"$@" $(OBJS)
|
||||
LINK_DLL = $(CYGWIN_WRAPPER) link $(DEBUG_LINK_OPT) -nologo -MAP -DLL $(DEBUG_FLAGS) \
|
||||
endif
|
||||
|
||||
ifndef LD
|
||||
LD=link
|
||||
endif
|
||||
|
||||
LINK_DLL = $(CYGWIN_WRAPPER) $(LD) $(DEBUG_LINK_OPT) -nologo -MAP -DLL $(DEBUG_FLAGS) \
|
||||
$(ML_DEBUG) -SUBSYSTEM:$(SUBSYSTEM) $(LLFLAGS) $(DLL_LDFLAGS) \
|
||||
$(EXTRA_LIBS) -out:"$@" $(OBJS)
|
||||
endif # NS_USE_GCC
|
||||
|
@ -21,7 +21,7 @@ AC_DEFUN(AM_PATH_INTREE_SVRCORE,
|
||||
SVRCORE_CFLAGS="-I$abs_svrcoreincpath"
|
||||
fi
|
||||
if test -d "$abs_svrcorelibpath" ; then
|
||||
SVRCORE_LIBS="-L$abs_svrcorelibpath -lsvrcore"
|
||||
SVRCORE_LIBS="-L$abs_svrcorelibpath"
|
||||
fi
|
||||
if test -n "$SVRCORE_CFLAGS" -a -n "$SVRCORE_LIBS" ; then
|
||||
AC_MSG_CHECKING(using in-tree SVRCORE from $svrcoreincpath $svrcorelibpath)
|
||||
@ -76,7 +76,7 @@ AC_DEFUN(AM_PATH_GIVEN_SVRCORE,
|
||||
if test -d "$withval"
|
||||
then
|
||||
AC_MSG_RESULT([using $withval])
|
||||
SVRCORE_LIBS="-L$withval -lsvrcore"
|
||||
SVRCORE_LIBS="-L$withval"
|
||||
else
|
||||
echo
|
||||
AC_MSG_ERROR([$withval not found])
|
||||
|
99
directory/c-sdk/configure
vendored
99
directory/c-sdk/configure
vendored
@ -309,7 +309,7 @@ ac_includes_default="\
|
||||
# include <unistd.h>
|
||||
#endif"
|
||||
|
||||
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC dist_prefix dist_bindir dist_libdir NSPR_CONFIG PKG_CONFIG NSPR_CFLAGS NSPR_LIBS NSS_CONFIG NSS_CFLAGS NSS_LIBS SVRCORE_LIBS SVRCORE_CFLAGS WHOAMI CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT CFLAGS ac_ct_CC CPP RANLIB ac_ct_RANLIB AS AR LD STRIP WINDRES HOST_CC PERL EGREP SHELL_OVERRIDE MOZILLA_CLIENT HOST_CFLAGS GNU_CC CROSS_COMPILE MOZ_OPTIMIZE USE_CPLUS USE_IPV6 USE_N32 USE_64 OBJECT_MODE GC_LEAK_DETECTOR ENABLE_STRIP USE_PTHREADS USE_BTHREADS USE_USER_PTHREADS USE_NATIVE_THREADS USE_NSPR_THREADS USE_NSS CPU_ARCH OBJ_SUFFIX LIB_SUFFIX LIB_PREFIX DLL_SUFFIX ASM_SUFFIX PROG_SUFFIX MKSHLIB DSO_CFLAGS DSO_LDOPTS OS_TARGET OS_ARCH OS_RELEASE OS_TEST DEFINES AR_FLAGS ASFLAGS FILTER IMPLIB OS_LIBS RESOLVE_LINK_SYMBOLS NOSUCHFILE MOZ_OBJFORMAT ULTRASPARC_LIBRARY ULTRASPARC_FILTER_LIBRARY OBJDIR OBJDIR_NAME NSINSTALL OPTIMIZER RC DLLFLAGS EXEFLAGS OS_DLLFLAGS CYGWIN_WRAPPER WIN_TOP_SRC LIBOBJS LTLIBOBJS'
|
||||
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC dist_prefix dist_bindir dist_libdir NSPR_CONFIG PKG_CONFIG NSPR_CFLAGS NSPR_LIBS NSS_CONFIG NSS_CFLAGS NSS_LIBS SVRCORE_LIBS SVRCORE_CFLAGS WHOAMI CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT CFLAGS ac_ct_CC CPP RANLIB ac_ct_RANLIB AS AR LD STRIP WINDRES HOST_CC PERL EGREP HAVE_MSVC_LIB SHELL_OVERRIDE MOZILLA_CLIENT HOST_CFLAGS GNU_CC CROSS_COMPILE MOZ_OPTIMIZE USE_CPLUS USE_IPV6 USE_N32 USE_64 OBJECT_MODE GC_LEAK_DETECTOR ENABLE_STRIP USE_PTHREADS USE_BTHREADS USE_USER_PTHREADS USE_NATIVE_THREADS USE_NSPR_THREADS USE_NSS CPU_ARCH OBJ_SUFFIX LIB_SUFFIX LIB_PREFIX DLL_SUFFIX ASM_SUFFIX PROG_SUFFIX MKSHLIB DSO_CFLAGS DSO_LDOPTS OS_TARGET OS_ARCH OS_RELEASE OS_TEST DEFINES AR_FLAGS ASFLAGS FILTER IMPLIB OS_LIBS RESOLVE_LINK_SYMBOLS NOSUCHFILE MOZ_OBJFORMAT ULTRASPARC_LIBRARY ULTRASPARC_FILTER_LIBRARY OBJDIR OBJDIR_NAME NSINSTALL OPTIMIZER RC DLLFLAGS EXEFLAGS OS_DLLFLAGS CYGWIN_WRAPPER WIN_TOP_SRC LIBOBJS LTLIBOBJS'
|
||||
ac_subst_files=''
|
||||
|
||||
# Initialize some variables set by options.
|
||||
@ -2721,7 +2721,7 @@ if test "${with_svrcore_lib+set}" = set; then
|
||||
then
|
||||
echo "$as_me:$LINENO: result: using $withval" >&5
|
||||
echo "${ECHO_T}using $withval" >&6
|
||||
SVRCORE_LIBS="-L$withval -lsvrcore"
|
||||
SVRCORE_LIBS="-L$withval"
|
||||
else
|
||||
echo
|
||||
{ { echo "$as_me:$LINENO: error: $withval not found" >&5
|
||||
@ -2828,7 +2828,7 @@ echo "${ECHO_T}no" >&6
|
||||
SVRCORE_CFLAGS="-I$abs_svrcoreincpath"
|
||||
fi
|
||||
if test -d "$abs_svrcorelibpath" ; then
|
||||
SVRCORE_LIBS="-L$abs_svrcorelibpath -lsvrcore"
|
||||
SVRCORE_LIBS="-L$abs_svrcorelibpath"
|
||||
fi
|
||||
if test -n "$SVRCORE_CFLAGS" -a -n "$SVRCORE_LIBS" ; then
|
||||
echo "$as_me:$LINENO: checking using in-tree SVRCORE from $svrcoreincpath $svrcorelibpath" >&5
|
||||
@ -2923,6 +2923,48 @@ echo "${ECHO_T}no" >&6
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
case "$target" in
|
||||
*-cygwin*) USE_WINDOWS_PATHS=1 ;;
|
||||
esac
|
||||
|
||||
if test -n "$_WIN32_MSVC" -a -n "$USE_WINDOWS_PATHS" ; then
|
||||
if test -n "$NSPR_CFLAGS" ; then
|
||||
path=`echo $NSPR_CFLAGS | sed -e 's/^-I//'`
|
||||
path=`cygpath -m $path`
|
||||
NSPR_CFLAGS="/I$path"
|
||||
fi
|
||||
if test -n "$NSPR_LIBS" ; then
|
||||
path=`echo $NSPR_LIBS | sed -e 's/^-L//'`
|
||||
path=`cygpath -m $path`
|
||||
NSPR_LIBS="/LIBPATH:$path"
|
||||
fi
|
||||
|
||||
if test -n "$NSS_CFLAGS" ; then
|
||||
path=`echo $NSS_CFLAGS | sed -e 's/^-I//'`
|
||||
path=`cygpath -m $path`
|
||||
NSS_CFLAGS="/I$path"
|
||||
fi
|
||||
|
||||
if test -n "$NSS_LIBS" ; then
|
||||
path=`echo $NSS_LIBS | sed -e 's/^-L//'`
|
||||
path=`cygpath -m $path`
|
||||
NSS_LIBS="/LIBPATH:$path"
|
||||
fi
|
||||
|
||||
if test -n "$SVRCORE_CFLAGS" ; then
|
||||
path=`echo $SVRCORE_CFLAGS | sed -e 's/^-I//'`
|
||||
path=`cygpath -m $path`
|
||||
SVRCORE_CFLAGS="/I$path"
|
||||
fi
|
||||
|
||||
if test -n "$SVRCORE_LIBS" ; then
|
||||
path=`echo $SVRCORE_LIBS | sed -e 's/^-L//'`
|
||||
path=`cygpath -m $path`
|
||||
SVRCORE_LIBS="/LIBPATH:$path"
|
||||
fi
|
||||
fi
|
||||
|
||||
case "$target" in
|
||||
|
||||
*-aix*)
|
||||
@ -8082,7 +8124,47 @@ _ACEOF
|
||||
CC=cl
|
||||
CXX=cl
|
||||
LD=link
|
||||
AR='lib -NOLOGO -OUT:"$@"'
|
||||
# if the lib program is available, use it, otherwise use link /lib
|
||||
# Extract the first word of "lib", so it can be a program name with args.
|
||||
set dummy lib; ac_word=$2
|
||||
echo "$as_me:$LINENO: checking for $ac_word" >&5
|
||||
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
|
||||
if test "${ac_cv_prog_HAVE_MSVC_LIB+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
if test -n "$HAVE_MSVC_LIB"; then
|
||||
ac_cv_prog_HAVE_MSVC_LIB="$HAVE_MSVC_LIB" # Let the user override the test.
|
||||
else
|
||||
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||
for as_dir in $PATH
|
||||
do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
ac_cv_prog_HAVE_MSVC_LIB="1"
|
||||
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
||||
fi
|
||||
fi
|
||||
HAVE_MSVC_LIB=$ac_cv_prog_HAVE_MSVC_LIB
|
||||
if test -n "$HAVE_MSVC_LIB"; then
|
||||
echo "$as_me:$LINENO: result: $HAVE_MSVC_LIB" >&5
|
||||
echo "${ECHO_T}$HAVE_MSVC_LIB" >&6
|
||||
else
|
||||
echo "$as_me:$LINENO: result: no" >&5
|
||||
echo "${ECHO_T}no" >&6
|
||||
fi
|
||||
|
||||
if test "$HAVE_MSVC_LIB" = "1" ; then
|
||||
AR='lib -NOLOGO -OUT:"$@"'
|
||||
else
|
||||
AR='$(LD) /lib -NOLOGO -OUT:"$@"'
|
||||
fi
|
||||
AR_FLAGS=
|
||||
RANLIB='echo not_ranlib'
|
||||
STRIP='echo not_strip'
|
||||
@ -9982,6 +10064,7 @@ ldap/libraries/libldif/Makefile
|
||||
ldap/libraries/liblber/Makefile
|
||||
ldap/libraries/libiutil/Makefile
|
||||
ldap/libraries/libssldap/Makefile
|
||||
ldap/libraries/libutil/Makefile
|
||||
"
|
||||
|
||||
mkdir ldap > /dev/null 2>&1
|
||||
@ -10101,9 +10184,10 @@ for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
|
||||
# 1. Remove the extension, and $U if already installed.
|
||||
ac_i=`echo "$ac_i" |
|
||||
sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
|
||||
# 2. Add them.
|
||||
ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
|
||||
ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
|
||||
# 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
|
||||
# will be set to the directory where LIBOBJS objects are built.
|
||||
ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
|
||||
ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
|
||||
done
|
||||
LIBOBJS=$ac_libobjs
|
||||
|
||||
@ -10668,6 +10752,7 @@ s,@WINDRES@,$WINDRES,;t t
|
||||
s,@HOST_CC@,$HOST_CC,;t t
|
||||
s,@PERL@,$PERL,;t t
|
||||
s,@EGREP@,$EGREP,;t t
|
||||
s,@HAVE_MSVC_LIB@,$HAVE_MSVC_LIB,;t t
|
||||
s,@SHELL_OVERRIDE@,$SHELL_OVERRIDE,;t t
|
||||
s,@MOZILLA_CLIENT@,$MOZILLA_CLIENT,;t t
|
||||
s,@HOST_CFLAGS@,$HOST_CFLAGS,;t t
|
||||
|
@ -334,6 +334,57 @@ if test -z "$_SYSTEM_SVRCORE" ; then
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl ========================================================
|
||||
dnl If using cygwin (or another Windows shell that uses unix
|
||||
dnl style paths by default - mingw?) and using MSVC, we need
|
||||
dnl to convert the include and lib paths to the more MSVC
|
||||
dnl friendly format - it's easier and faster to do it here
|
||||
dnl than in cygwin-wrapper
|
||||
dnl ========================================================
|
||||
|
||||
dnl add other runtime environments that use unix style paths
|
||||
dnl *-cygwin*|*-mingw*|*-msvc*|*-mks*)
|
||||
case "$target" in
|
||||
*-cygwin*) USE_WINDOWS_PATHS=1 ;;
|
||||
esac
|
||||
|
||||
if test -n "$_WIN32_MSVC" -a -n "$USE_WINDOWS_PATHS" ; then
|
||||
if test -n "$NSPR_CFLAGS" ; then
|
||||
path=`echo $NSPR_CFLAGS | sed -e 's/^-I//'`
|
||||
path=`cygpath -m $path`
|
||||
NSPR_CFLAGS="/I$path"
|
||||
fi
|
||||
if test -n "$NSPR_LIBS" ; then
|
||||
path=`echo $NSPR_LIBS | sed -e 's/^-L//'`
|
||||
path=`cygpath -m $path`
|
||||
NSPR_LIBS="/LIBPATH:$path"
|
||||
fi
|
||||
|
||||
if test -n "$NSS_CFLAGS" ; then
|
||||
path=`echo $NSS_CFLAGS | sed -e 's/^-I//'`
|
||||
path=`cygpath -m $path`
|
||||
NSS_CFLAGS="/I$path"
|
||||
fi
|
||||
|
||||
if test -n "$NSS_LIBS" ; then
|
||||
path=`echo $NSS_LIBS | sed -e 's/^-L//'`
|
||||
path=`cygpath -m $path`
|
||||
NSS_LIBS="/LIBPATH:$path"
|
||||
fi
|
||||
|
||||
if test -n "$SVRCORE_CFLAGS" ; then
|
||||
path=`echo $SVRCORE_CFLAGS | sed -e 's/^-I//'`
|
||||
path=`cygpath -m $path`
|
||||
SVRCORE_CFLAGS="/I$path"
|
||||
fi
|
||||
|
||||
if test -n "$SVRCORE_LIBS" ; then
|
||||
path=`echo $SVRCORE_LIBS | sed -e 's/^-L//'`
|
||||
path=`cygpath -m $path`
|
||||
SVRCORE_LIBS="/LIBPATH:$path"
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl ========================================================
|
||||
dnl =
|
||||
dnl = Set the threading model
|
||||
@ -1283,7 +1334,13 @@ case "$target" in
|
||||
CC=cl
|
||||
CXX=cl
|
||||
LD=link
|
||||
AR='lib -NOLOGO -OUT:"$@"'
|
||||
# if the lib program is available, use it, otherwise use link /lib
|
||||
AC_CHECK_PROG(HAVE_MSVC_LIB, lib, 1)
|
||||
if test "$HAVE_MSVC_LIB" = "1" ; then
|
||||
AR='lib -NOLOGO -OUT:"$@"'
|
||||
else
|
||||
AR='$(LD) /lib -NOLOGO -OUT:"$@"'
|
||||
fi
|
||||
AR_FLAGS=
|
||||
RANLIB='echo not_ranlib'
|
||||
STRIP='echo not_strip'
|
||||
@ -2331,6 +2388,7 @@ ldap/libraries/libldif/Makefile
|
||||
ldap/libraries/liblber/Makefile
|
||||
ldap/libraries/libiutil/Makefile
|
||||
ldap/libraries/libssldap/Makefile
|
||||
ldap/libraries/libutil/Makefile
|
||||
"
|
||||
|
||||
dnl since configure won't handle 2 levels of directory
|
||||
|
@ -70,7 +70,6 @@ endif
|
||||
ifeq ($(LDAP_TOOL_ARGPIN),1)
|
||||
INCLUDES += $(SVRCORE_CFLAGS)
|
||||
DEFS+=-DLDAP_TOOL_ARGPIN -DLDAP_TOOL_PKCS11
|
||||
SVRCORE_LINK=$(SVRCORE_LIBS)
|
||||
endif
|
||||
|
||||
ifdef HAVE_LIBNLS
|
||||
@ -169,7 +168,7 @@ endif
|
||||
ifeq ($(OS_ARCH), WINNT)
|
||||
PLATFORMLIBS =wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib \
|
||||
comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib \
|
||||
rpcrt4.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib
|
||||
rpcrt4.lib uuid.lib winmm.lib
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH), OSF1)
|
||||
|
@ -38,7 +38,10 @@
|
||||
|
||||
#ifdef _WIN32
|
||||
#define VC_EXTRALEAN
|
||||
#include <afxwin.h>
|
||||
#include <stdarg.h>
|
||||
#include <windef.h>
|
||||
#include <winbase.h>
|
||||
#include <tchar.h>
|
||||
#include <winnls.h>
|
||||
static char *win_char_converter(const char *instr, int bFromUTF8);
|
||||
#else
|
||||
|
@ -48,9 +48,8 @@ ifdef USE_NSS
|
||||
DIRS += libssldap
|
||||
endif
|
||||
|
||||
# ifeq ($(OS_ARCH),WINNT)
|
||||
# DIRS += libutil
|
||||
# endif
|
||||
ifeq ($(OS_ARCH),WINNT)
|
||||
DIRS += libutil
|
||||
endif
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
|
@ -194,7 +194,7 @@ EXTRA_DLL_LIBS=-L$(dist_libdir) -l$(LBER_LIBNAME)
|
||||
else
|
||||
EXTRA_LIBS =wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib \
|
||||
comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib \
|
||||
rpcrt4.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib
|
||||
rpcrt4.lib uuid.lib winmm.lib
|
||||
EXTRA_LIBS += $(dist_libdir)/$(LDIF_LIBNAME).lib
|
||||
EXTRA_LIBS += $(dist_libdir)/$(LBER_LIBNAME).lib
|
||||
endif
|
||||
|
@ -119,7 +119,7 @@ EXTRA_DLL_LIBS = -L$(dist_libdir) -l$(LDAP_LIBNAME) -l$(PRLDAP_LIBNAME) \
|
||||
else
|
||||
EXTRA_LIBS =wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib \
|
||||
comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib \
|
||||
rpcrt4.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib
|
||||
rpcrt4.lib uuid.lib winmm.lib
|
||||
EXTRA_LIBS += $(dist_libdir)/$(LDAP_LIBNAME).lib
|
||||
EXTRA_LIBS += $(dist_libdir)/$(PRLDAP_LIBNAME).lib
|
||||
EXTRA_LIBS += $(NSSLINK)
|
||||
|
85
directory/c-sdk/ldap/libraries/libutil/Makefile → directory/c-sdk/ldap/libraries/libutil/Makefile.in
Executable file → Normal file
85
directory/c-sdk/ldap/libraries/libutil/Makefile → directory/c-sdk/ldap/libraries/libutil/Makefile.in
Executable file → Normal file
@ -1,4 +1,4 @@
|
||||
#
|
||||
#
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
@ -12,11 +12,11 @@
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is Mozilla Communicator client code.
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 1998-1999
|
||||
# Rich Megginson <richm@stanfordalumni.org>
|
||||
# Portions created by the Initial Developer are Copyright (C) 2006
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
@ -35,74 +35,51 @@
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
#
|
||||
# GNU Makefile for libutil
|
||||
#
|
||||
|
||||
LDAP_SRC = ../..
|
||||
MCOM_ROOT = ../../../..
|
||||
|
||||
NOSTDCLEAN=true # don't let nsconfig.mk define target clean
|
||||
NOSTDSTRIP=true # don't let nsconfig.mk define target strip
|
||||
NSPR20=true # probably should be defined somewhere else (not sure where)
|
||||
MOD_DEPTH = ../../..
|
||||
srcdir = @srcdir@
|
||||
topsrcdir = @top_srcdir@
|
||||
|
||||
OBJDEST = $(OBJDIR)/lib/libutil
|
||||
LIBDIR = $(LDAP_LIBDIR)
|
||||
include $(MOD_DEPTH)/config/autoconf.mk
|
||||
include $(topsrcdir)/build.mk
|
||||
|
||||
include $(MCOM_ROOT)/c-sdk/nsdefs.mk
|
||||
include $(MCOM_ROOT)/c-sdk/nsconfig.mk
|
||||
include $(LDAP_SRC)/nsldap.mk
|
||||
SRCS = getopt.c
|
||||
|
||||
#
|
||||
# crypt.c and crypt_util.c now come in the liblcache dll
|
||||
# ntdebug.c currently not used
|
||||
#
|
||||
#if ServerBuild XXXmcs? how to switch on this?
|
||||
#LIBUTIL_OBJS= getopt.o ntevent.o ntgetpassword.o \
|
||||
# ntreg.o ntstubs.o
|
||||
#ifeq ($(ARCH), WINNT)
|
||||
#LIBUTIL_OBJS += crypt.o crypt_util.o
|
||||
#endif
|
||||
#
|
||||
#else
|
||||
# SDK builds only need getopt!
|
||||
LIBUTIL_OBJS= getopt.o
|
||||
#endif
|
||||
REALOBJS = $(SRCS:.c=.$(OBJ_SUFFIX))
|
||||
|
||||
OBJS = $(addprefix $(OBJDEST)/, $(LIBUTIL_OBJS))
|
||||
UTILOBJDEST = $(OBJDIR_NAME)
|
||||
OBJS = $(addprefix $(UTILOBJDEST)/, $(REALOBJS))
|
||||
|
||||
LIBUTIL= $(addprefix $(LIBDIR)/, libutil.$(LIB_SUFFIX))
|
||||
DISTHDIR = $(DIST)/public/ldap
|
||||
HDIR = $(topsrcdir)/ldap/include
|
||||
|
||||
INCLUDES += -I$(LDAP_SRC)/servers/slapd -I$(OBJDIR)/include
|
||||
LIBUTIL = $(addprefix $(UTILOBJDEST)/, \
|
||||
$(LIB_PREFIX)$(UTIL_LIBNAME).$(LIB_SUFFIX))
|
||||
|
||||
SLAPDMESSAGES_H=$(MCOM_ROOT)/c-sdk/ldap/include/ntslapdmessages.h
|
||||
INSTALLDIR = $(DIST)/$(OBJDIR_NAME)
|
||||
|
||||
ifeq ($(LDAP_NO_LIBLCACHE),1)
|
||||
CFLAGS+=-DNO_LIBLCACHE
|
||||
endif
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
clientSDK: $(OBJDEST) $(LIBDIR) $(OBJS) $(LIBUTIL)
|
||||
DEFINES += $(DEFS)
|
||||
|
||||
all: $(OBJDEST) $(SLAPDMESSAGES_H) $(LIBDIR) $(OBJS) $(LIBUTIL)
|
||||
|
||||
export:: $(OBJDEST) $(LIBDIR) $(OBJS) $(LIBUTIL)
|
||||
|
||||
$(LIBDIR):
|
||||
$(MKDIR) $(LIBDIR)
|
||||
$(MKDIR) $(LIBDIR)
|
||||
|
||||
$(LIBUTIL): $(OBJS)
|
||||
$(LIBUTIL): $(OBJS) $(LIBDIR)
|
||||
@echo ======= making $(LIBUTIL)
|
||||
ifdef SO_FILES_TO_REMOVE
|
||||
-$(RM) $(SO_FILES_TO_REMOVE)
|
||||
endif
|
||||
$(LINK_LIB)
|
||||
|
||||
$(SLAPDMESSAGES_H):
|
||||
@echo target: $@
|
||||
cd $(MCOM_ROOT)/c-sdk/ldap/servers/slapd/ntmsgdll; $(MAKE) $(MFLAGS)
|
||||
|
||||
veryclean: clean
|
||||
|
||||
cleanSDK: clean
|
||||
|
||||
clean:
|
||||
$(RM) $(OBJS)
|
||||
$(RM) $(LIBUTIL)
|
||||
veryclean:: clean
|
||||
|
||||
$(OBJDEST):
|
||||
$(MKDIR) $(OBJDEST)
|
||||
|
||||
export:: $(LIBUTIL)
|
||||
$(INSTALL) -m 444 $(LIBUTIL) $(dist_libdir)
|
@ -63,7 +63,7 @@ static char sccsid[] = "@(#)getopt.c 4.12 (Berkeley) 6/1/90";
|
||||
#include <windows.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "lber.h"
|
||||
|
||||
#define index strchr
|
||||
#define rindex strrchr
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user