1.https://github.com/schuhschuh/gflags/releases下载安装包

2.解压,打开相应文件夹

unzip gflags-1.7.zip
cd gflags-1.7/
mkdir build
cd build
cmake ..
ccmake ..
bash./configure
make
makeinstall

具体操作过程:

[root@A01-R04-I221-18 src]# cmake ..
CMake Error: The source directory "/home/xxs/xxs/gflags-1.7" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
[root@A01-R04-I221-18 src]# cd ..
[root@A01-R04-I221-18 gflags-1.7]# ls
AUTHORS    INSTALL      NEWS                aclocal.m4  config.guess  configure.ac  google-gflags.sln  m4        src
COPYING    Makefile.am  README              autogen.sh  config.sub    depcomp       install-sh         missing   vsprojects
ChangeLog  Makefile.in  README_windows.txt  build       configure     doc           ltmain.sh          packages
[root@A01-R04-I221-18 gflags-1.7]# ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for g++... g++
checking for C++ compiler default output file name... a.out
checking whether the C++ compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of g++... gcc3
checking for gcc... gcc
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 dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking host system type... (cached) x86_64-unknown-linux-gnu
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1966080
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
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 for dlfcn.h... yes
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether g++ accepts -g... (cached) yes
checking dependency style of g++... (cached) gcc3
checking how to run the C++ preprocessor... g++ -E
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for ld used by g++... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... no
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for ANSI C header files... (cached) yes
checking for stdint.h... (cached) yes
checking for sys/types.h... (cached) yes
checking for inttypes.h... (cached) yes
checking fnmatch.h usability... yes
checking fnmatch.h presence... yes
checking for fnmatch.h... yes
checking for sys/stat.h... (cached) yes
checking for unistd.h... (cached) yes
checking for uint16_t... yes
checking for u_int16_t... yes
checking for __int16... no
checking for strtoll... yes
checking for strtoq... yes
checking for __attribute__... yes
checking for the pthreads library -lpthreads... no
checking whether pthreads work without any flags... no
checking whether pthreads work with -Kthread... no
checking whether pthreads work with -kthread... no
checking for the pthreads library -llthread... no
checking whether pthreads work with -pthread... yes
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking if more special flags are required for pthreads... no
checking whether to check for GCC pthread/shared inconsistencies... yes
checking whether -pthread is sufficient with -shared... yes
checking whether what we have so far is sufficient with -nostdlib... no
checking whether -lpthread saves the day... yes
checking whether the compiler implements namespaces... yes
checking what namespace STL code is in... std
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/gflags/gflags.h
config.status: creating src/gflags/gflags_declare.h
config.status: creating src/gflags/gflags_completions.h
config.status: creating src/config.h
config.status: executing depfiles commands
config.status: executing libtool commands
[root@A01-R04-I221-18 gflags-1.7]# ls
AUTHORS    Makefile     README              build          config.sub    doc                ltmain.sh  src
COPYING    Makefile.am  README_windows.txt  config.guess   configure     google-gflags.sln  m4         vsprojects
ChangeLog  Makefile.in  aclocal.m4          config.log     configure.ac  install-sh         missing
INSTALL    NEWS         autogen.sh          config.status  depcomp       libtool            packages
[root@A01-R04-I221-18 gflags-1.7]# cd build
[root@A01-R04-I221-18 build]# cmake ..
CMake Error: The source directory "/home/xxs/xxs/gflags-1.7" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
[root@A01-R04-I221-18 build]# make
make: *** No targets specified and no makefile found.  Stop.
[root@A01-R04-I221-18 build]# cd ..
[root@A01-R04-I221-18 gflags-1.7]# make
/bin/sh ./libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I./src  -I./src  -pthread -DNDEBUG -g -O2 -MT libgflags_la-gflags.lo -MD -MP -MF .deps/libgflags_la-gflags.Tpo -c -o libgflags_la-gflags.lo `test -f 'src/gflags.cc' || echo './'`src/gflags.cc
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I./src -I./src -pthread -DNDEBUG -g -O2 -MT libgflags_la-gflags.lo -MD -MP -MF .deps/libgflags_la-gflags.Tpo -c src/gflags.cc  -fPIC -DPIC -o .libs/libgflags_la-gflags.o
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I./src -I./src -pthread -DNDEBUG -g -O2 -MT libgflags_la-gflags.lo -MD -MP -MF .deps/libgflags_la-gflags.Tpo -c src/gflags.cc -o libgflags_la-gflags.o >/dev/null 2>&1
mv -f .deps/libgflags_la-gflags.Tpo .deps/libgflags_la-gflags.Plo
/bin/sh ./libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I./src  -I./src  -pthread -DNDEBUG -g -O2 -MT libgflags_la-gflags_reporting.lo -MD -MP -MF .deps/libgflags_la-gflags_reporting.Tpo -c -o libgflags_la-gflags_reporting.lo `test -f 'src/gflags_reporting.cc' || echo './'`src/gflags_reporting.cc
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I./src -I./src -pthread -DNDEBUG -g -O2 -MT libgflags_la-gflags_reporting.lo -MD -MP -MF .deps/libgflags_la-gflags_reporting.Tpo -c src/gflags_reporting.cc  -fPIC -DPIC -o .libs/libgflags_la-gflags_reporting.o
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I./src -I./src -pthread -DNDEBUG -g -O2 -MT libgflags_la-gflags_reporting.lo -MD -MP -MF .deps/libgflags_la-gflags_reporting.Tpo -c src/gflags_reporting.cc -o libgflags_la-gflags_reporting.o >/dev/null 2>&1
mv -f .deps/libgflags_la-gflags_reporting.Tpo .deps/libgflags_la-gflags_reporting.Plo
/bin/sh ./libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I./src  -I./src  -pthread -DNDEBUG -g -O2 -MT libgflags_la-gflags_completions.lo -MD -MP -MF .deps/libgflags_la-gflags_completions.Tpo -c -o libgflags_la-gflags_completions.lo `test -f 'src/gflags_completions.cc' || echo './'`src/gflags_completions.cc
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I./src -I./src -pthread -DNDEBUG -g -O2 -MT libgflags_la-gflags_completions.lo -MD -MP -MF .deps/libgflags_la-gflags_completions.Tpo -c src/gflags_completions.cc  -fPIC -DPIC -o .libs/libgflags_la-gflags_completions.o
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I./src -I./src -pthread -DNDEBUG -g -O2 -MT libgflags_la-gflags_completions.lo -MD -MP -MF .deps/libgflags_la-gflags_completions.Tpo -c src/gflags_completions.cc -o libgflags_la-gflags_completions.o >/dev/null 2>&1
mv -f .deps/libgflags_la-gflags_completions.Tpo .deps/libgflags_la-gflags_completions.Plo
/bin/sh ./libtool --tag=CXX   --mode=link g++ -pthread -DNDEBUG -g -O2 -pthread -version-info 3:0:1  -o libgflags.la -rpath /usr/local/lib  libgflags_la-gflags.lo libgflags_la-gflags_reporting.lo libgflags_la-gflags_completions.lo -lpthread
libtool: link: g++ -shared -nostdlib /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/crti.o /usr/lib/gcc/x86_64-redhat-linux/4.8.5/crtbeginS.o  .libs/libgflags_la-gflags.o .libs/libgflags_la-gflags_reporting.o .libs/libgflags_la-gflags_completions.o   -lpthread -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5 -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../.. -lstdc++ -lm -lc -lgcc_s /usr/lib/gcc/x86_64-redhat-linux/4.8.5/crtendS.o /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/crtn.o  -pthread -pthread   -pthread -Wl,-soname -Wl,libgflags.so.2 -o .libs/libgflags.so.2.1.0
libtool: link: (cd ".libs" && rm -f "libgflags.so.2" && ln -s "libgflags.so.2.1.0" "libgflags.so.2")
libtool: link: (cd ".libs" && rm -f "libgflags.so" && ln -s "libgflags.so.2.1.0" "libgflags.so")
libtool: link: ar cru .libs/libgflags.a  libgflags_la-gflags.o libgflags_la-gflags_reporting.o libgflags_la-gflags_completions.o
libtool: link: ranlib .libs/libgflags.a
libtool: link: ( cd ".libs" && rm -f "libgflags.la" && ln -s "../libgflags.la" "libgflags.la" )
/bin/sh ./libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I./src  -I./src  -DNDEBUG -DNO_THREADS -g -O2 -MT libgflags_nothreads_la-gflags.lo -MD -MP -MF .deps/libgflags_nothreads_la-gflags.Tpo -c -o libgflags_nothreads_la-gflags.lo `test -f 'src/gflags.cc' || echo './'`src/gflags.cc
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I./src -I./src -DNDEBUG -DNO_THREADS -g -O2 -MT libgflags_nothreads_la-gflags.lo -MD -MP -MF .deps/libgflags_nothreads_la-gflags.Tpo -c src/gflags.cc  -fPIC -DPIC -o .libs/libgflags_nothreads_la-gflags.o
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I./src -I./src -DNDEBUG -DNO_THREADS -g -O2 -MT libgflags_nothreads_la-gflags.lo -MD -MP -MF .deps/libgflags_nothreads_la-gflags.Tpo -c src/gflags.cc -o libgflags_nothreads_la-gflags.o >/dev/null 2>&1
mv -f .deps/libgflags_nothreads_la-gflags.Tpo .deps/libgflags_nothreads_la-gflags.Plo
/bin/sh ./libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I./src  -I./src  -DNDEBUG -DNO_THREADS -g -O2 -MT libgflags_nothreads_la-gflags_reporting.lo -MD -MP -MF .deps/libgflags_nothreads_la-gflags_reporting.Tpo -c -o libgflags_nothreads_la-gflags_reporting.lo `test -f 'src/gflags_reporting.cc' || echo './'`src/gflags_reporting.cc
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I./src -I./src -DNDEBUG -DNO_THREADS -g -O2 -MT libgflags_nothreads_la-gflags_reporting.lo -MD -MP -MF .deps/libgflags_nothreads_la-gflags_reporting.Tpo -c src/gflags_reporting.cc  -fPIC -DPIC -o .libs/libgflags_nothreads_la-gflags_reporting.o
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I./src -I./src -DNDEBUG -DNO_THREADS -g -O2 -MT libgflags_nothreads_la-gflags_reporting.lo -MD -MP -MF .deps/libgflags_nothreads_la-gflags_reporting.Tpo -c src/gflags_reporting.cc -o libgflags_nothreads_la-gflags_reporting.o >/dev/null 2>&1
mv -f .deps/libgflags_nothreads_la-gflags_reporting.Tpo .deps/libgflags_nothreads_la-gflags_reporting.Plo
/bin/sh ./libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I./src  -I./src  -DNDEBUG -DNO_THREADS -g -O2 -MT libgflags_nothreads_la-gflags_completions.lo -MD -MP -MF .deps/libgflags_nothreads_la-gflags_completions.Tpo -c -o libgflags_nothreads_la-gflags_completions.lo `test -f 'src/gflags_completions.cc' || echo './'`src/gflags_completions.cc
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I./src -I./src -DNDEBUG -DNO_THREADS -g -O2 -MT libgflags_nothreads_la-gflags_completions.lo -MD -MP -MF .deps/libgflags_nothreads_la-gflags_completions.Tpo -c src/gflags_completions.cc  -fPIC -DPIC -o .libs/libgflags_nothreads_la-gflags_completions.o
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I./src -I./src -DNDEBUG -DNO_THREADS -g -O2 -MT libgflags_nothreads_la-gflags_completions.lo -MD -MP -MF .deps/libgflags_nothreads_la-gflags_completions.Tpo -c src/gflags_completions.cc -o libgflags_nothreads_la-gflags_completions.o >/dev/null 2>&1
mv -f .deps/libgflags_nothreads_la-gflags_completions.Tpo .deps/libgflags_nothreads_la-gflags_completions.Plo
/bin/sh ./libtool --tag=CXX   --mode=link g++ -DNDEBUG -DNO_THREADS -g -O2 -version-info 3:0:1  -o libgflags_nothreads.la -rpath /usr/local/lib  libgflags_nothreads_la-gflags.lo libgflags_nothreads_la-gflags_reporting.lo libgflags_nothreads_la-gflags_completions.lo
libtool: link: g++ -shared -nostdlib /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/crti.o /usr/lib/gcc/x86_64-redhat-linux/4.8.5/crtbeginS.o  .libs/libgflags_nothreads_la-gflags.o .libs/libgflags_nothreads_la-gflags_reporting.o .libs/libgflags_nothreads_la-gflags_completions.o   -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5 -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../.. -lstdc++ -lm -lc -lgcc_s /usr/lib/gcc/x86_64-redhat-linux/4.8.5/crtendS.o /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/crtn.o    -Wl,-soname -Wl,libgflags_nothreads.so.2 -o .libs/libgflags_nothreads.so.2.1.0
libtool: link: (cd ".libs" && rm -f "libgflags_nothreads.so.2" && ln -s "libgflags_nothreads.so.2.1.0" "libgflags_nothreads.so.2")
libtool: link: (cd ".libs" && rm -f "libgflags_nothreads.so" && ln -s "libgflags_nothreads.so.2.1.0" "libgflags_nothreads.so")
libtool: link: ar cru .libs/libgflags_nothreads.a  libgflags_nothreads_la-gflags.o libgflags_nothreads_la-gflags_reporting.o libgflags_nothreads_la-gflags_completions.o
libtool: link: ranlib .libs/libgflags_nothreads.a
libtool: link: ( cd ".libs" && rm -f "libgflags_nothreads.la" && ln -s "../libgflags_nothreads.la" "libgflags_nothreads.la" )
g++ -DHAVE_CONFIG_H -I. -I./src  -I./src  -pthread -g -O2 -MT gflags_unittest-gflags_unittest.o -MD -MP -MF .deps/gflags_unittest-gflags_unittest.Tpo -c -o gflags_unittest-gflags_unittest.o `test -f 'src/gflags_unittest.cc' || echo './'`src/gflags_unittest.cc
mv -f .deps/gflags_unittest-gflags_unittest.Tpo .deps/gflags_unittest-gflags_unittest.Po
/bin/sh ./libtool --tag=CXX   --mode=link g++ -pthread -g -O2 -pthread  -o gflags_unittest  gflags_unittest-gflags_unittest.o libgflags.la
libtool: link: g++ -pthread -g -O2 -pthread -o .libs/gflags_unittest gflags_unittest-gflags_unittest.o  ./.libs/libgflags.so -pthread
g++ -DHAVE_CONFIG_H -I. -I./src  -I./src  -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -g -O2 -MT gflags_unittest.o -MD -MP -MF .deps/gflags_unittest.Tpo -c -o gflags_unittest.o `test -f 'src/gflags_unittest.cc' || echo './'`src/gflags_unittest.cc
mv -f .deps/gflags_unittest.Tpo .deps/gflags_unittest.Po
/bin/sh ./libtool --tag=CXX   --mode=link g++ -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -g -O2 -no-undefined   -o gflags_nothreads_unittest  gflags_unittest.o libgflags_nothreads.la
libtool: link: g++ -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -g -O2 -o .libs/gflags_nothreads_unittest gflags_unittest.o  ./.libs/libgflags_nothreads.so
rm -f src/gflags_unittest-main.cc
cp -p ./src/gflags_unittest.cc src/gflags_unittest-main.cc
g++ -DHAVE_CONFIG_H -I. -I./src  -I./src  -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -g -O2 -MT gflags_unittest-main.o -MD -MP -MF .deps/gflags_unittest-main.Tpo -c -o gflags_unittest-main.o `test -f 'src/gflags_unittest-main.cc' || echo './'`src/gflags_unittest-main.cc
mv -f .deps/gflags_unittest-main.Tpo .deps/gflags_unittest-main.Po
/bin/sh ./libtool --tag=CXX   --mode=link g++ -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -g -O2 -no-undefined   -o gflags_unittest2  gflags_unittest-main.o libgflags_nothreads.la
libtool: link: g++ -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -g -O2 -o .libs/gflags_unittest2 gflags_unittest-main.o  ./.libs/libgflags_nothreads.so
rm -f src/gflags_unittest_main.cc
cp -p ./src/gflags_unittest.cc src/gflags_unittest_main.cc
g++ -DHAVE_CONFIG_H -I. -I./src  -I./src  -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -g -O2 -MT gflags_unittest_main.o -MD -MP -MF .deps/gflags_unittest_main.Tpo -c -o gflags_unittest_main.o `test -f 'src/gflags_unittest_main.cc' || echo './'`src/gflags_unittest_main.cc
mv -f .deps/gflags_unittest_main.Tpo .deps/gflags_unittest_main.Po
/bin/sh ./libtool --tag=CXX   --mode=link g++ -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -g -O2 -no-undefined   -o gflags_unittest3  gflags_unittest_main.o libgflags_nothreads.la
libtool: link: g++ -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -g -O2 -o .libs/gflags_unittest3 gflags_unittest_main.o  ./.libs/libgflags_nothreads.so
g++ -DHAVE_CONFIG_H -I. -I./src  -I./src  -pthread -g -O2 -MT gflags_strip_flags_test-gflags_strip_flags_test.o -MD -MP -MF .deps/gflags_strip_flags_test-gflags_strip_flags_test.Tpo -c -o gflags_strip_flags_test-gflags_strip_flags_test.o `test -f 'src/gflags_strip_flags_test.cc' || echo './'`src/gflags_strip_flags_test.cc
mv -f .deps/gflags_strip_flags_test-gflags_strip_flags_test.Tpo .deps/gflags_strip_flags_test-gflags_strip_flags_test.Po
/bin/sh ./libtool --tag=CXX   --mode=link g++ -pthread -g -O2 -pthread  -o gflags_strip_flags_test  gflags_strip_flags_test-gflags_strip_flags_test.o libgflags.la
libtool: link: g++ -pthread -g -O2 -pthread -o .libs/gflags_strip_flags_test gflags_strip_flags_test-gflags_strip_flags_test.o  ./.libs/libgflags.so -pthread
echo 'prefix=/usr/local' > "libgflags.pc".tmp
echo 'exec_prefix='`echo '/usr/local' | sed 's@^/usr/local@${prefix}@'` >> "libgflags.pc".tmp
echo 'libdir='`echo '/usr/local/lib' | sed 's@^/usr/local@${exec_prefix}@'` >> "libgflags.pc".tmp
echo 'includedir='`echo '/usr/local/include' | sed 's@^/usr/local@${prefix}@'` >> "libgflags.pc".tmp
echo '' >> "libgflags.pc".tmp
echo 'Name: gflags' >> "libgflags.pc".tmp
echo 'Version: 1.7' >> "libgflags.pc".tmp
grep '^Summary:' ./packages/rpm/rpm.spec | sed s/^Summary:/Description:/ | head -n1 >> "libgflags.pc".tmp
grep '^URL: ' ./packages/rpm/rpm.spec >> "libgflags.pc".tmp
echo 'Requires:' >> "libgflags.pc".tmp
echo 'Libs: -L${libdir} -lgflags' >> "libgflags.pc".tmp
echo 'Libs.private: -pthread -lpthread' >> "libgflags.pc".tmp
echo 'Cflags: -I${includedir}' >> "libgflags.pc".tmp
mv -f "libgflags.pc".tmp "libgflags.pc"
grep -v Libs.private libgflags.pc | sed s/-lgflags/-lgflags_nothreads/ > "libgflags_nothreads.pc"
[root@A01-R04-I221-18 gflags-1.7]# make install
make[1]: Entering directory `/home/xxs/xxs/gflags-1.7'
test -z "/usr/local/bin" || /usr/bin/mkdir -p "/usr/local/bin"/usr/bin/install -c 'src/gflags_completions.sh' '/usr/local/bin/gflags_completions.sh'
test -z "/usr/local/lib" || /usr/bin/mkdir -p "/usr/local/lib"/bin/sh ./libtool   --mode=install /usr/bin/install -c  'libgflags.la' '/usr/local/lib/libgflags.la'
libtool: install: /usr/bin/install -c .libs/libgflags.so.2.1.0 /usr/local/lib/libgflags.so.2.1.0
libtool: install: (cd /usr/local/lib && { ln -s -f libgflags.so.2.1.0 libgflags.so.2 || { rm -f libgflags.so.2 && ln -s libgflags.so.2.1.0 libgflags.so.2; }; })
libtool: install: (cd /usr/local/lib && { ln -s -f libgflags.so.2.1.0 libgflags.so || { rm -f libgflags.so && ln -s libgflags.so.2.1.0 libgflags.so; }; })
libtool: install: /usr/bin/install -c .libs/libgflags.lai /usr/local/lib/libgflags.la
libtool: install: /usr/bin/install -c .libs/libgflags.a /usr/local/lib/libgflags.a
libtool: install: chmod 644 /usr/local/lib/libgflags.a
libtool: install: ranlib /usr/local/lib/libgflags.a
libtool: finish: PATH="/home/xxs/anaconda2/bin:/usr/bin/python2:bin/export/servers/jdk1.6.0_25/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/sbin" ldconfig -n /usr/local/lib
----------------------------------------------------------------------
Libraries have been installed in:/usr/local/libIf you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:- add LIBDIR to the `LD_LIBRARY_PATH' environment variableduring execution- add LIBDIR to the `LD_RUN_PATH' environment variableduring linking- use the `-Wl,-rpath -Wl,LIBDIR' linker flag- have your system administrator add LIBDIR to `/etc/ld.so.conf'See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------/bin/sh ./libtool   --mode=install /usr/bin/install -c  'libgflags_nothreads.la' '/usr/local/lib/libgflags_nothreads.la'
libtool: install: /usr/bin/install -c .libs/libgflags_nothreads.so.2.1.0 /usr/local/lib/libgflags_nothreads.so.2.1.0
libtool: install: (cd /usr/local/lib && { ln -s -f libgflags_nothreads.so.2.1.0 libgflags_nothreads.so.2 || { rm -f libgflags_nothreads.so.2 && ln -s libgflags_nothreads.so.2.1.0 libgflags_nothreads.so.2; }; })
libtool: install: (cd /usr/local/lib && { ln -s -f libgflags_nothreads.so.2.1.0 libgflags_nothreads.so || { rm -f libgflags_nothreads.so && ln -s libgflags_nothreads.so.2.1.0 libgflags_nothreads.so; }; })
libtool: install: /usr/bin/install -c .libs/libgflags_nothreads.lai /usr/local/lib/libgflags_nothreads.la
libtool: install: /usr/bin/install -c .libs/libgflags_nothreads.a /usr/local/lib/libgflags_nothreads.a
libtool: install: chmod 644 /usr/local/lib/libgflags_nothreads.a
libtool: install: ranlib /usr/local/lib/libgflags_nothreads.a
libtool: finish: PATH="/home/xxs/anaconda2/bin:/usr/bin/python2:bin/export/servers/jdk1.6.0_25/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/sbin" ldconfig -n /usr/local/lib
----------------------------------------------------------------------
Libraries have been installed in:/usr/local/libIf you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:- add LIBDIR to the `LD_LIBRARY_PATH' environment variableduring execution- add LIBDIR to the `LD_RUN_PATH' environment variableduring linking- use the `-Wl,-rpath -Wl,LIBDIR' linker flag- have your system administrator add LIBDIR to `/etc/ld.so.conf'See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
test -z "/usr/local/share/doc/gflags-1.7" || /usr/bin/mkdir -p "/usr/local/share/doc/gflags-1.7"/usr/bin/install -c -m 644 'AUTHORS' '/usr/local/share/doc/gflags-1.7/AUTHORS'/usr/bin/install -c -m 644 'COPYING' '/usr/local/share/doc/gflags-1.7/COPYING'/usr/bin/install -c -m 644 'ChangeLog' '/usr/local/share/doc/gflags-1.7/ChangeLog'/usr/bin/install -c -m 644 'INSTALL' '/usr/local/share/doc/gflags-1.7/INSTALL'/usr/bin/install -c -m 644 'NEWS' '/usr/local/share/doc/gflags-1.7/NEWS'/usr/bin/install -c -m 644 'README' '/usr/local/share/doc/gflags-1.7/README'/usr/bin/install -c -m 644 'README_windows.txt' '/usr/local/share/doc/gflags-1.7/README_windows.txt'/usr/bin/install -c -m 644 'doc/designstyle.css' '/usr/local/share/doc/gflags-1.7/designstyle.css'/usr/bin/install -c -m 644 'doc/gflags.html' '/usr/local/share/doc/gflags-1.7/gflags.html'
test -z "/usr/local/include/gflags" || /usr/bin/mkdir -p "/usr/local/include/gflags"/usr/bin/install -c -m 644 'src/gflags/gflags.h' '/usr/local/include/gflags/gflags.h'/usr/bin/install -c -m 644 'src/gflags/gflags_declare.h' '/usr/local/include/gflags/gflags_declare.h'/usr/bin/install -c -m 644 'src/gflags/gflags_completions.h' '/usr/local/include/gflags/gflags_completions.h'
test -z "/usr/local/include/google" || /usr/bin/mkdir -p "/usr/local/include/google"/usr/bin/install -c -m 644 'src/google/gflags.h' '/usr/local/include/google/gflags.h'/usr/bin/install -c -m 644 'src/google/gflags_completions.h' '/usr/local/include/google/gflags_completions.h'
test -z "/usr/local/lib/pkgconfig" || /usr/bin/mkdir -p "/usr/local/lib/pkgconfig"/usr/bin/install -c -m 644 'libgflags.pc' '/usr/local/lib/pkgconfig/libgflags.pc'/usr/bin/install -c -m 644 'libgflags_nothreads.pc' '/usr/local/lib/pkgconfig/libgflags_nothreads.pc'
make[1]: Leaving directory `/home/xxs/xxs/gflags-1.7'
[root@A01-R04-I221-18 gflags-1.7]#

Redhat安装gflags相关推荐

  1. 解决redhat安装centos yum源的问题

    解决redhat安装centos yum源的问题 #yum install ceph #This system is not registered to Red Hat Subscription Ma ...

  2. Oracle 11g R2+RAC+ASM+redhat安装详解1

    Oracle RAC是Oracle Real Application Cluster的简写,官方中文文档一般翻译为"真正应用集群",它一般有两台或者两台以上同构计算机及共享存储设备 ...

  3. 安装linux提示没有系统盘,我有RedHat安装光盘,但没有安装软盘, 应怎么办?linux安装...

    我有RedHat安装光盘,但没有安装软盘, 应怎么办?linux安装 如果你的计算机能从光驱启动(许多早期的计算机做不到),你就不需要启动软盘了.检查一下计算机的BIOS,你可以在那里设置启动顺序(缺 ...

  4. linux安装 xen,Redhat 安装 Xen

    下面介绍一下简单的RedHat 安装 Xen步骤和遇到的问题. 一.配置好yum源 二.用yum install XX, 安装kernel-xen和xen-libs,一般在安装镜像里有相应的包,若没有 ...

  5. redhat安装pure-ftpd+mysql时出现libmysqlclient错误的解决办法

    redhat as 4 安装pure-ftpd,执行,/configure时使用了--with-mysql参数,出现如下错误: checking whether you already have a ...

  6. openshift介绍及centos7安装单节点openshift、Redhat安装openshift集群完全教程

    Centos7中openshift_3.11单节点安装及配置开机自启详解 本次openshift安装使用最简单便捷的单节点安装,适用于本地开发及测试 openshift简介 OpenShift是红帽公 ...

  7. Redhat安装tftp的方法

    1.     点击打开Virtual Machine Settings界面,设置CD/DVD选项,选择"Use ISO Image file :",浏览并且找到Redhat的第三张 ...

  8. Oracle安装部署之RedHat安装Oracle11g_R2

    硬件配置 内存 :≥1G 硬盘空间:≥10G 上传oracle11g安装包: putty上用wcw用户登录,通过ftp服务上传oracle安装文件到/home/wcw目录下解压 #unzip linu ...

  9. 【linux】RedHat 安装 gcc、g++

    环境介绍 系统版本:RedHat 7.6 cat /etc/redhat-release # Red Hat Enterprise Linux Server release 7.6 (Maipo) 安 ...

最新文章

  1. iexpress全力打造“免检”***
  2. concurrent.futures dataset
  3. 在路上---一个平凡人的2015年总结及2016年展望
  4. 人工智能的搭便车指南
  5. AndroidStudio 0.2.x 引入多模块Eclipse项目
  6. 从dist到es:发一个NPM库,我蜕了一层皮
  7. Java| Javadoc生成Java帮助文档
  8. 如何写出高性能SQL语句?-性能设计沉思录(6)
  9. macbook安装免费vmware fusion
  10. 第16课:郭盛华课程PHP文件打开,读取
  11. 计算机网络图标打不开怎么回事,双击打不开图标怎么办 双击打不开图标解决方法【详解】...
  12. java的GUI:个人所得税计算
  13. VINS-Mono 理论详细解读——紧耦合后端非线性优化 IMU+视觉的残差residual、Jacobian、协方差、基于舒尔补的边缘化
  14. 解决nginx启动时域名解析失败而导致服务启动失败的问题【proxy_pass后面的域名进行DNS解析,解析失败则无法启动nginx】
  15. 爬虫(二) parse、各类请求和伪装UA
  16. 【QT开发笔记-基础篇】| 第五章 绘图QPainter | 5.1 效果演示、技术点
  17. 计算机清单笔记本,2019吃鸡笔记本电脑配置清单,吃鸡高手给你分享
  18. 为什么HashTable不能存null键和null值,而HashMap却可以?
  19. spring框架中的单例Beans是线程安全的么?
  20. Android互动直播APP开发入门笔记,吐血整理

热门文章

  1. 马化腾:互联网时代没有谁比谁傻太多!微信支付是如何逆袭的?
  2. uni-app/Vue实现 购物车页面功能的业务逻辑
  3. c# 操作Lrc歌词文件 的类
  4. Excel2013:xlsx文件损坏无法打开的问题
  5. PVsyst v7.2.16 光伏系统设计辅助软件
  6. MacOS Monterey Beta升or不升?六大亮点、避坑指南,看这篇就够了!
  7. Jenkins构建新项目报 npm ERR! missing script: build:pre
  8. 19、IBC标识密码
  9. 雪花飘html动画,用纯CSS3的animation制作雪花飘落、星星闪烁、按钮缩放、图片倾斜...
  10. SAP 标准ALV实现单元格可编辑,插入可编辑的新行,敲下回车后更新数据