Ethereal-dev: RE: [Ethereal-dev] [CYGWIN]Build hints

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Biot Olivier <Olivier.Biot@xxxxxxxxxxx>
Date: Thu, 13 Nov 2003 21:25:29 +0100
| From: Guy Harris
| 
| On Nov 13, 2003, at 5:55 AM, Loïc Minier wrote:
| 
| >  - remove some conditionnal includes (ifdefs), here's a 
| diff -u patch
| >  that could can read and copy or apply to tethereal.c:
| > --- tethereal.c 2003-11-01 03:30:15.000000000 +0100
| > +++ ../ethereal-0.9.16/tethereal.c      2003-11-13 
| 11:18:46.670888000 
| > +0100
| > @@ -35,9 +35,7 @@
| >  #include <locale.h>
| >  #include <limits.h>
| >
| > -#ifdef HAVE_UNISTD_H
| >  #include <unistd.h>
| > -#endif
| 
| The configure script is apparently not working on Cygwin, as you 
| presumably have <unistd.h> (otherwise the #include wouldn't 
| work), but 
| it's not setting HAVE_UNISTD_H.

Weird... on my cygwin setup, config.h has a line saying "#define
HAVE_UNISTD_H 1"

| > -#ifdef NEED_GETOPT_H
| >  #include "getopt.h"
| > -#endif
| 
| Cygwin presumably comes with "getopt()", so you shouldn't need 
| Ethereal's own "getopt.h" (or Ethereal's own "getopt()").

This one does not give problems to me.

| > -#ifdef _WIN32
| >  #include "capture-wpcap.h"
| > -#endif
| 
| There needs to be some #define that means "this is Windows, not UNIX" 
| that's defined *EVEN ON CYGWIN*, or else we need to find some #define 
| that means "this is Windows" that's defined on Cygwin and do
| 
| 	#if defined(_WIN32) || defined(that other #define)
| 
| Presumably Cygwin doesn't define _WIN32; does it define WIN32?

I attached the GCC dumpspecs output for GCC under cygwin. I have no clue
here.

Anyway, my configuration is unable to build tethereal, for several reasons,
the most peculiar one being the lack of an "-I." in the compile line, and
the more tricky ones the compilation of tethereal[.exe] before the
dissectors and other dependent code have been compiled. I use the following
tools:
gcc: 3.3.1 (cygming special)
libtool: ltmain.sh (GNU libtool) 1.5 (1.1220.2.1 2003/04/14 22:48:00)
libtoolize: libtoolize (GNU libtool) 1.5
aclocal: aclocal (GNU automake) 1.7.6
automake: automake (GNU automake) 1.7.6
autoconf: autoconf (GNU Autoconf) 2.57
autoheader: autoheader (GNU Autoconf) 2.57
autom4te: autom4te (GNU Autoconf) 2.57
autoscan: autoscan (GNU Autoconf) 2.57
autoupdate: autoupdate (GNU Autoconf) 2.57
ifnames: ifnames (GNU Autoconf) 2.57
autoreconf: autoreconf (GNU Autoconf) 2.57

Regards,

Olivier

*asm:
--traditional-format 

*asm_debug:
%{g*:--gstabs}

*asm_final:


*asm_options:
%a %Y %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}

*invoke_as:
%{!S:-o %{|!pipe:%g.s} |
 as %(asm_options) %{!pipe:%g.s} %A }

*cpp:
%(cpp_cpu) %{posix:-D_POSIX_SOURCE}   %{mno-win32:%{mno-cygwin: %emno-cygwin and mno-win32 are not compatible}}   %{mno-cygwin:-D__MSVCRT__ -D__MINGW32__ %{!ansi:%{mthreads:-D_MT}}}  %{!mno-cygwin:-D__CYGWIN32__ -D__CYGWIN__ %{!ansi:-Dunix} -D__unix__ -D__unix }  %{mwin32|mno-cygwin:-DWIN32 -D_WIN32 -D__WIN32 -D__WIN32__ %{!ansi:-DWINNT}}  %{!nostdinc:%{!mno-win32|mno-cygwin:-idirafter ../include/w32api%s -idirafter ../../include/w32api%s}}

*cpp_options:
%(cpp_unique_options) %1 %{m*} %{std*} %{ansi} %{W*&pedantic*} %{w} %{f*} %{O*} %{undef}

*cpp_debug_options:
%{d*}

*cpp_unique_options:
%{C:%{!E:%eGNU C does not support -C without using -E}} %{CC:%{!E:%eGNU C does not support -CC without using -E}} %{!Q:-quiet} %{nostdinc*} %{C} %{CC} %{v} %{I*} %{P} %I %{MD:-MD %{!o:%b.d}%{o*:%.d%*}} %{MMD:-MMD %{!o:%b.d}%{o*:%.d%*}} %{M} %{MM} %{MF*} %{MG} %{MP} %{MQ*} %{MT*} %{!E:%{!M:%{!MM:%{MD|MMD:%{o*:-MQ %*}}}}} %{!no-gcc:-D__GNUC__=%v1 -D__GNUC_MINOR__=%v2 -D__GNUC_PATCHLEVEL__=%v3} %{!undef:%{!ansi:%{!std=*:%p}%{std=gnu*:%p}} %P} %{trigraphs} %{remap} %{g3:-dD} %{H} %C %{D*&U*&A*} %{i*} %Z %i %{E|M|MM:%W{o*}}

*trad_capable_cpp:
cc1 -E %{traditional|ftraditional|traditional-cpp:-traditional-cpp}

*cc1:
%(cc1_cpu) 

*cc1_options:
%{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}} %1 %{!Q:-quiet} -dumpbase %B %{d*} %{m*} %{a*} -auxbase%{c|S:%{o*:-strip %*}%{!o*: %b}}%{!c:%{!S: %b}} %{g*} %{O*} %{W*&pedantic*} %{w} %{std*} %{ansi} %{v:-version} %{pg:-p} %{p} %{f*} %{undef} %{Qn:-fno-ident} %{--help:--help} %{--target-help:--target-help} %{!fsyntax-only:%{S:%W{o*}%{!o*:-o %b.s}}} %{fsyntax-only:-o %j} %{-param*}

*cc1plus:


*link_gcc_c_sequence:
%G %L %G

*endfile:
crtend%O%s

*link:
  %{mwindows:--subsystem windows}   %{mconsole:--subsystem console}   %{shared: %{mdll: %eshared and mdll are not compatible}}   %{shared: --shared} %{mdll:--dll}   %{static:-Bstatic} %{!static:-Bdynamic}   %{shared|mdll: -e     %{mno-cygwin:_DllMainCRTStartup@12}     %{!mno-cygwin:__cygwin_dll_entry@12}}  %{!mno-cygwin:--dll-search-prefix=cyg}

*lib:
  %{pg:-lgmon}   %{!mno-cygwin:-lcygwin}   %{mno-cygwin:%{mthreads:-lmingwthrd} -lmingw32}   %{mwindows:-lgdi32 -lcomdlg32}   -luser32 -lkernel32 -ladvapi32 -lshell32

*libgcc:
%{mno-cygwin: %{mthreads:-lmingwthrd} -lmingw32} -lgcc	   %{mno-cygwin:-lmoldname -lmingwex -lmsvcrt}

*startfile:
  %{shared|mdll: %{mno-cygwin:dllcrt2%O%s}}  %{!shared: %{!mdll: %{!mno-cygwin:crt0%O%s} %{mno-cygwin:crt2%O%s}  %{pg:gcrt0%O%s}}} crtbegin%O%s

*switches_need_spaces:


*predefines:


*cross_compile:
0

*version:
3.3.1

*multilib:
. ;

*multilib_defaults:


*multilib_extra:


*multilib_matches:


*multilib_exclusions:


*multilib_options:


*linker:
collect2

*link_libgcc:
%D

*md_exec_prefix:


*md_startfile_prefix:


*md_startfile_prefix_1:


*startfile_prefix_spec:


*cc1_cpu:
%{!mcpu*: %{m386:-mcpu=i386 %n`-m386' is deprecated. Use `-march=i386' or `-mcpu=i386' instead.
} %{m486:-mcpu=i486 %n`-m486' is deprecated. Use `-march=i486' or `-mcpu=i486' instead.
} %{mpentium:-mcpu=pentium %n`-mpentium' is deprecated. Use `-march=pentium' or `-mcpu=pentium' instead.
} %{mpentiumpro:-mcpu=pentiumpro %n`-mpentiumpro' is deprecated. Use `-march=pentiumpro' or `-mcpu=pentiumpro' instead.
}} %{mintel-syntax:-masm=intel %n`-mintel-syntax' is deprecated. Use `-masm=intel' instead.
} %{mno-intel-syntax:-masm=att %n`-mno-intel-syntax' is deprecated. Use `-masm=att' instead.
}

*mingw_include_path:
i686-pc-cygwin

*link_command:
%{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S:    %(linker) %l %X %{o*} %{A} %{d} %{e*} %{m} %{N} %{n} %{r} %{s} %{t}    %{u*} %{x} %{z} %{Z} %{!A:%{!nostdlib:%{!nostartfiles:%S}}}    %{static:} %{L*} %(link_libgcc) %o %{!nostdlib:%{!nodefaultlibs:%(link_gcc_c_sequence)}}    %{!A:%{!nostdlib:%{!nostartfiles:%E}}} %{T*} }}}}}}