Am 14.05.2011 um 12:26 schrieb Peter Kümmel:

> On 13.05.2011 11:04, Stephan Witt wrote:
>> Am 13.05.2011 um 09:48 schrieb Kornel:
>> 
>>> Am Freitag, 13. Mai 2011 schrieb Stephan Witt:
>>>> Am 13.05.2011 um 00:06 schrieb kuem...@lyx.org:
>>>>> Author: kuemmel
>>>>> Date: Fri May 13 00:06:06 2011
>>>>> New Revision: 38733
>>>>> URL: http://www.lyx.org/trac/changeset/38733
>>>>> 
>>>>> Log:
>>>>> cmake on mac: also build with LYX_NLS=0
>>>>> 
>>>>> Modified:
>>>>>   lyx-devel/trunk/src/client/CMakeLists.txt
>>>>>   lyx-devel/trunk/src/tex2lyx/CMakeLists.txt
>>>> 
>>>> Peter, thanks for your effort. In principle it works (compiles) for me on
>>>> Mac now. When using -DLYX_EXTERNAL_LIBINTL=OFF I have to apply this patch
>>>> to avoid compiler warnings.
>>>> 
>>>> Index: development/cmake/intl/libgnuintl.h.cmake
>>>> ===================================================================
>>>> --- development/cmake/intl/libgnuintl.h.cmake      (Revision 38734)
>>>> +++ development/cmake/intl/libgnuintl.h.cmake      (Arbeitskopie)
>>>> @@ -19,6 +19,10 @@
>>>>  #ifndef _LIBINTL_H
>>>>  #define _LIBINTL_H        1
>>>> 
>>>> +#undef HAVE_POSIX_PRINTF
>>>> +#undef HAVE_ASPRINTF
>>>> +#undef HAVE_WPRINTF
>>> Where is it defined?
>> 
>> This is one of the messages...
>> 
>> CompileC 
>> /Users/stephan/cvs/lyx/lyx-build/cmake/lyx-devel/intl/lyx.build/Debug/intl.build/Objects-normal/i386/textdomain.o
>>  intl/textdomain.c normal i386 c com.apple.compilers.gcc.4_2
>> cd /Users/stephan/cvs/lyx/lyx-devel
>> setenv LANG en_US.US-ASCII
>> /Developer/usr/bin/gcc-4.2 -x c -arch i386 -fmessage-length=0 -pipe 
>> -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -DCMAKE_INTDIR="Debug" 
>> -DHAVE_CONFIG_H=1 -DMAKE_INTL_LIB -DIN_LIBINTL -DENABLE_RELOCATABLE=1 
>> -DIN_LIBRARY -DNO_XMALLOC 
>> -Dset_relocation_prefix=libintl_set_relocation_prefix 
>> -Drelocate=libintl_relocate -DDEPENDS_ON_LIBICONV=1 -isysroot 
>> /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5 -gdwarf-2 -Wmost 
>> -Wno-four-char-constants -Wno-unknown-pragmas 
>> -F/Users/stephan/cvs/lyx/lyx-build/cmake/lyx-devel/lib/Debug 
>> -I/Users/stephan/cvs/lyx/lyx-build/cmake/lyx-devel/lib/Debug/include 
>> -I/Users/stephan/cvs/lyx/lyx-build/cmake/lyx-devel 
>> -I/Users/stephan/cvs/lyx/lyx-devel/src 
>> -I/Users/stephan/cvs/lyx/lyx-build/SpellChecker.lib/include 
>> -I/Users/stephan/cvs/lyx/lyx-devel/po 
>> -I/Users/stephan/cvs/lyx/lyx-devel/intl 
>> -I/Users/stephan/cvs/lyx/lyx-build/cmake/lyx-devel/intl 
>> -I/Users/stephan/cvs/lyx/lyx-build/cmake/lyx-devel/intl/lyx.build/Debug/intl.build/DerivedSources/i38
> 6 
> -I/Users/stephan/cvs/lyx/lyx-build/cmake/lyx-devel/intl/lyx.build/Debug/intl.build/DerivedSources
>  -DLOCALEDIR="" -DLOCALE_ALIAS_PATH="" 
> -DLIBDIR="/Users/stephan/cvs/lyx/lyx-devel" -DINSTALLDIR="~/bin/LyX" -c 
> /Users/stephan/cvs/lyx/lyx-devel/intl/textdomain.c -o 
> /Users/stephan/cvs/lyx/lyx-build/cmake/lyx-devel/intl/lyx.build/Debug/intl.build/Objects-normal/i386/textdomain.o
>> 
>> In file included from /Users/stephan/cvs/lyx/lyx-devel/intl/gettextP.h:64,
>>                  from /Users/stephan/cvs/lyx/lyx-devel/intl/textdomain.c:26:
>> /Users/stephan/cvs/lyx/lyx-build/cmake/lyx-devel/intl/libgnuintl.h:28:1: 
>> warning: "HAVE_POSIX_PRINTF" redefined
>> In file included from 
>> /Users/stephan/cvs/lyx/lyx-build/cmake/lyx-devel/config.h:20,
>>                  from /Users/stephan/cvs/lyx/lyx-devel/intl/textdomain.c:20:
>> /Users/stephan/cvs/lyx/lyx-build/cmake/lyx-devel/configCompiler.h:54:1: 
>> warning: this is the location of the previous definition
>> In file included from /Users/stephan/cvs/lyx/lyx-devel/intl/gettextP.h:64,
>>                  from /Users/stephan/cvs/lyx/lyx-devel/intl/textdomain.c:26:
>> /Users/stephan/cvs/lyx/lyx-build/cmake/lyx-devel/intl/libgnuintl.h:29:1: 
>> warning: "HAVE_ASPRINTF" redefined
>> In file included from 
>> /Users/stephan/cvs/lyx/lyx-build/cmake/lyx-devel/config.h:20,
>>                  from /Users/stephan/cvs/lyx/lyx-devel/intl/textdomain.c:20:
>> /Users/stephan/cvs/lyx/lyx-build/cmake/lyx-devel/configCompiler.h:51:1: 
>> warning: this is the location of the previous definition
> 
> 
> Do you still have this warning with current trunk? I could not reproduce it.

Yes, exactly. I have them... with these setting:

-- Building Native Language Support (LYX_NLS is set), used libraries:
-- 
--   * intl
--      - header : 
/Users/stephan/cvs/lyx/lyx-build/cmake/lyx-devel/intl/libintl.h
--      - library: 
/Users/stephan/cvs/lyx/lyx-build/cmake/lyx-devel/lib/$(CONFIGURATION)/libintl.a
--   * iconv
--      - header : /usr/include/iconv.h
--      - library: /usr/lib/libiconv.dylib
--   * zlib
--      - header : /usr/include/zlib.h
--      - library: /usr/lib/libz.dylib

This is from confCompiler.h:
...
#define HAVE_STRERROR 1
/* #undef HAVE_STD_COUNT */
#define HAVE_ASPRINTF 1
/* #undef HAVE_WPRINTF */
#define HAVE_SNPRINTF 1
#define HAVE_POSIX_PRINTF 1
#define HAVE_FCNTL 1
#define HAVE_INTMAX_T 1
...

and this is libgnuintl.h:

#define HAVE_POSIX_PRINTF 0
#define HAVE_ASPRINTF 0
#define HAVE_WPRINTF 0

#include <locale.h>

Stephan

Reply via email to