Программное обеспечение.

FLTK configure – MinGW

Александр » 01 апр 2017, 19:42

Не так давно довелось устанавливать библиотеку для работы с графикой т. к. потихоньку читаю учебник по C++ Бьёрна Страуструпа (Bjarne Strоustrup) «Programming Principles and Practice Using C++». Он там в качестве библиотеки для работы с двумерной графикой выбрал FLTK (Fast Light Toolkit).
Устанавливал, точнее, компилировал FLTK из исходных кодов на базе MinGW. Несколько месяцев прошло, пока руки до C++ не доходят, и вот тут наткнулся на текстовый файл с сохраненным выводом справки по команде configure и самого процесса работы команды configure для FLTK.
Сохранял его т. к. предполагал, что впоследствии может пригодиться (всякие пути, переменные глянуть), чтобы не потерять выкладываю пока сюда, может интересно кому-то будет.

Код: Выделить всё
mine@pc /c/sources/fltk-1.3.4-1
$ ./configure --help
`configure' configures this package to adapt to many kinds of systems.

Usage: ./configure [OPTION]... [VAR=VALUE]...

To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE.  See below for descriptions of some of the useful variables.

Defaults for the options are specified in brackets.

Configuration:
  -h, --help              display this help and exit
      --help=short        display options specific to this package
      --help=recursive    display the short help of all the included packages
  -V, --version           display version information and exit
  -q, --quiet, --silent   do not print `checking ...' messages
      --cache-file=FILE   cache test results in FILE [disabled]
  -C, --config-cache      alias for `--cache-file=config.cache'
  -n, --no-create         do not create output files
      --srcdir=DIR        find the sources in DIR [configure dir or `..']

Installation directories:
  --prefix=PREFIX         install architecture-independent files in PREFIX
                          [/usr/local]
  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
                          [PREFIX]

By default, `make install' will install all the files in
`/usr/local/bin', `/usr/local/lib' etc.  You can specify
an installation prefix other than `/usr/local' using `--prefix',
for instance `--prefix=$HOME'.

For better control, use the options below.

Fine tuning of the installation directories:
  --bindir=DIR            user executables [EPREFIX/bin]
  --sbindir=DIR           system admin executables [EPREFIX/sbin]
  --libexecdir=DIR        program executables [EPREFIX/libexec]
  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
  --libdir=DIR            object code libraries [EPREFIX/lib]
  --includedir=DIR        C header files [PREFIX/include]
  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
  --infodir=DIR           info documentation [DATAROOTDIR/info]
  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
  --mandir=DIR            man documentation [DATAROOTDIR/man]
  --docdir=DIR            documentation root [DATAROOTDIR/doc/PACKAGE]
  --htmldir=DIR           html documentation [DOCDIR]
  --dvidir=DIR            dvi documentation [DOCDIR]
  --pdfdir=DIR            pdf documentation [DOCDIR]
  --psdir=DIR             ps documentation [DOCDIR]

X features:
  --x-includes=DIR    X include files are in DIR
  --x-libraries=DIR   X library files are in DIR

System types:
  --build=BUILD     configure for building on BUILD [guessed]
  --host=HOST       cross-compile to build programs to run on HOST [BUILD]

Optional Features:
  --disable-option-checking  ignore unrecognized --enable/--with options
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  --enable-cygwin         use the Cygwin libraries [default=no]
  --enable-x11            with Cygwin or Mac OS, use X11 [default=no]
  --enable-cairoext       use fltk code instrumentation for cairo extended use [default=no]
  --enable-cairo          use lib Cairo [default=no]
  --enable-debug          turn on debugging [default=no]
  --enable-cp936          turn on CP936 [default=no]
  --enable-gl             turn on OpenGL support [default=yes]
  --enable-shared         turn on shared libraries [default=no]
  --enable-threads        enable multi-threading support [default=yes]
  --disable-largefile     omit support for large files
  --enable-localjpeg      use local JPEG library [default=auto]
  --enable-localzlib      use local ZLIB library [default=auto]
  --enable-localpng       use local PNG library  [default=auto]
  --enable-xinerama       turn on Xinerama support [default=yes]
  --enable-xft            turn on Xft support [default=yes]
  --enable-xdbe           turn on Xdbe support [default=yes]
  --enable-xfixes         turn on Xfixes support [default=yes]
  --enable-xcursor        turn on Xcursor support [default=yes]
  --enable-xrender        turn on Xrender support [default=yes]

Optional Packages:
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  --with-abiversion       Build with FL_ABI_VERSION, e.g. 10304 for FLTK 1.3.4
  --with-optim="flags"    use custom optimization flags
  --with-archflags="flags"
                          use custom architecture flags
                          (possible Mac OS X values include -arch i386, -arch x86_64, -arch ppc)
  --with-links            make header links for common misspellings [default=no]
  --with-x                use the X Window System

Some influential environment variables:
  CC          C compiler command
  CFLAGS      C compiler flags
  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
              nonstandard directory <lib dir>
  LIBS        libraries to pass to the linker, e.g. -l<library>
  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
              you have headers in a nonstandard directory <include dir>
  CXX         C++ compiler command
  CXXFLAGS    C++ compiler flags
  CPP         C preprocessor
  XMKMF       Path to xmkmf, Makefile generator for X Window System

Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.

Report bugs to the package provider.


mine@pc /c/sources/fltk-1.3.4-1
$ ./configure --enable-threads --enable-localjpeg --enable-localzlib --enable-localpng
checking build system type... i686-pc-mingw32
checking host system type... i686-pc-mingw32
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for a BSD-compatible install... /bin/install -c
checking for nroff... no
checking for doxygen... no
checking for ranlib... ranlib
checking for ar... /mingw/bin/ar
checking for windres... /mingw/bin/windres
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking size of short... 2
checking size of int... 4
checking size of long... 4
checking whether byte ordering is bigendian... no
checking whether the compiler recognizes bool as a built-in type... yes
checking for dirent.h that defines DIR... yes
checking for library containing opendir... none required
checking sys/select.h usability... no
checking sys/select.h presence... no
checking for sys/select.h... no
checking sys/stdtypes.h usability... no
checking sys/stdtypes.h presence... no
checking for sys/stdtypes.h... no
checking whether we have the POSIX compatible scandir() prototype... no
checking for scandir... no
checking for vsnprintf... yes
checking for snprintf... yes
checking for strings.h... (cached) yes
checking for strcasecmp... yes
checking for strlcat... no
checking for strlcpy... no
checking locale.h usability... yes
checking locale.h presence... yes
checking for locale.h... yes
checking for localeconv... yes
checking for library containing pow... none required
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... unknown
checking for _LARGE_FILES value needed for large files... unknown
checking for long long int... yes
checking for library containing dlsym... none required
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking GL/gl.h usability... yes
checking GL/gl.h presence... yes
checking for GL/gl.h... yes
checking GL/glu.h usability... yes
checking GL/glu.h presence... yes
checking for GL/glu.h... yes
checking if GCC supports -fno-exceptions... yes
checking if GCC supports -fno-strict-aliasing... yes
checking if ld supports -no-undefined... yes
checking if ld supports -Bsymbolic-functions... yes
checking if toolchain supports sections... yes

Configuration Summary
-------------------------------------------------------------------------
    Directories: prefix=/usr/local
                 bindir=${exec_prefix}/bin
                 datadir=${datarootdir}
                 datarootdir=${prefix}/share
                 exec_prefix=${prefix}
                 includedir=${prefix}/include
                 libdir=${exec_prefix}/lib
                 mandir=${datarootdir}/man
                 MSys docpath=C:/MinGW/msys/1.0/local/share/doc/fltk
       Graphics: GDI
Image Libraries: JPEG=Builtin
                 PNG=Builtin
                 ZLIB=Builtin
    Large Files: YES
         OpenGL: YES
        Threads: YES
configure: creating ./config.status
config.status: creating makeinclude
config.status: creating fltk.list
config.status: creating fltk-config
config.status: creating fltk.spec
config.status: creating FL/Makefile
config.status: creating config.h
config.status: creating FL/abi-version.h
Александр
 
Сообщения: 397
Зарегистрирован: 20 мар 2014, 17:05

FLTK fltk-config script options and compile/linker options

Александр » 13 июл 2020, 11:56

I installed MSYS2 (Mingw-w64 and FLTK)
The fltk-config script included with FLTK can be used to get the options that are required by compiler:

Код: Выделить всё
Usage: fltk-config [OPTIONS]
Options:
        [--version]
        [--api-version]

Options telling what we are doing:
        [--use-gl]        use GL
        [--use-images]    use extra image formats (PNG, JPEG)
        [--use-glut]      use glut compatibility layer
        [--use-forms]     use forms compatibility layer
        [--use-cairo]     use cairo graphics lib

Options telling what information we request:
        [--cc]            return C compiler used to compile FLTK
        [--cxx]           return C++ compiler used to compile FLTK
        [--optim]         return compiler optimization used to compile FLTK
        [--cflags]        return flags to compile C using FLTK
        [--cxxflags]      return flags to compile C++ using FLTK
        [--ldflags]       return flags to link against FLTK
        [--ldstaticflags] return flags to link against static FLTK library
                                          even if there are DSOs installed
        [--libs]          return FLTK libraries full path for dependencies
        [--prefix]        return FLTK install time --prefix directory
        [--includedir]    return FLTK install time include directory

Options to compile and link an application:
        [-g]              compile the program with debugging information
        [-Dname[=value]]  compile the program with the given define
        [--compile program.cxx]
        [--post program]  prepare the program for desktop use

For hint


The output of --cxxflags, --ldflags, --ldstaticflags on my windows 10 machine:
Код: Выделить всё
1@pc MINGW64 ~
$ fltk-config --cxxflags
-I/mingw64/include -mwindows -DWIN32 -DUSE_OPENGL32 -march=x86-64 -mtune=generic -O2 -pipe -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64

1@pc MINGW64 ~
$ fltk-config --ldflags
-L/mingw64/lib -mwindows -pipe -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc -lfltk -lole32 -luuid -lcomctl32

1@pc MINGW64 ~
$ fltk-config --ldstaticflags
-mwindows -pipe -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc /mingw64/lib/libfltk.a -lole32 -luuid -lcomctl32
Александр
 
Сообщения: 397
Зарегистрирован: 20 мар 2014, 17:05


Вернуться в Софт