$ ./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]
  --datadir=DIR          read-only architecture-independent data [PREFIX/share]
  --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]
  --infodir=DIR          info documentation [PREFIX/info]
  --mandir=DIR           man documentation [PREFIX/man]

Program names:
  --program-prefix=PREFIX            prepend PREFIX to installed program names
  --program-suffix=SUFFIX            append SUFFIX to installed program names
  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names

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

Optional Features:
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  --enable-libada         build libada directory
  --enable-libssp         build libssp directory
  --enable-stage1-languages[=all]   choose additional languages to build during
                          stage1.  Mostly useful for compiler development.
  --enable-objc-gc        enable use of Boehm's garbage collector with the
                          GNU Objective-C runtime
  --enable-bootstrap      enable bootstrapping [yes if native build]
  --enable-serial-[{host,target,build}-]configure
                          force sequential configuration of
                          sub-packages for the host, target or build
                          machine, or all sub-packages
  --enable-maintainer-mode enable make rules and dependencies not useful
                          (and sometimes confusing) to the casual installer
  --enable-stage1-checking[=all]   choose additional checking for stage1
                          of the compiler
  --enable-werror         enable -Werror in bootstrap stage2 and later

Optional Packages:
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  --with-build-libsubdir=DIR  Directory where to find libraries for build system
  --with-mpfr-dir=PATH    this option has been REMOVED
  --with-mpfr=PATH        specify prefix directory for installed MPFR package.
                          Equivalent to --with-mpfr-include=PATH/include
                          plus --with-mpfr-lib=PATH/lib
  --with-mpfr-include=PATH
                          specify directory for installed MPFR include files
  --with-mpfr-lib=PATH    specify directory for the installed MPFR library
  --with-gmp-dir=PATH     this option has been REMOVED
  --with-gmp=PATH         specify prefix directory for the installed GMP package.
                          Equivalent to --with-gmp-include=PATH/include
                          plus --with-gmp-lib=PATH/lib
  --with-gmp-include=PATH specify directory for installed GMP include files
  --with-gmp-lib=PATH     specify directory for the installed GMP library
  --with-build-sysroot=SYSROOT
                          use sysroot as the system root during the build
  --with-debug-prefix-map='A=B C=D ...'
                             map A to B, C to D ... in debug information
  --with-build-time-tools=PATH
                          use given path to find target tools during the build
  --with-datarootdir      use datarootdir as the data root directory.
  --with-docdir           install documentation in this directory.
  --with-pdfdir           install pdf in this directory.
  --with-htmldir          install html in this directory.

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>
  CPPFLAGS    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
  AR          AR for the host
  AS          AS for the host
  DLLTOOL     DLLTOOL for the host
  LD          LD for the host
  LIPO        LIPO for the host
  NM          NM for the host
  RANLIB      RANLIB for the host
  STRIP       STRIP for the host
  WINDRES     WINDRES for the host
  WINDMC      WINDMC for the host
  OBJCOPY     OBJCOPY for the host
  OBJDUMP     OBJDUMP for the host
  CC_FOR_TARGET
              CC for the target
  CXX_FOR_TARGET
              CXX for the target
  GCC_FOR_TARGET
              GCC for the target
  GCJ_FOR_TARGET
              GCJ for the target
  GFORTRAN_FOR_TARGET
              GFORTRAN for the target
  AR_FOR_TARGET
              AR for the target
  AS_FOR_TARGET
              AS for the target
  DLLTOOL_FOR_TARGET
              DLLTOOL for the target
  LD_FOR_TARGET
              LD for the target
  LIPO_FOR_TARGET
              LIPO for the target
  NM_FOR_TARGET
              NM for the target
  OBJDUMP_FOR_TARGET
              OBJDUMP for the target
  RANLIB_FOR_TARGET
              RANLIB for the target
  STRIP_FOR_TARGET
              STRIP for the target
  WINDRES_FOR_TARGET
              WINDRES for the target
  WINDMC_FOR_TARGET
              WINDMC for the target

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

일단 컴파일 걸어 놓으러 -ㅁ-

아래는 insight 컴파일


크로스컴파일을 거는데 여전히 이상하게 작동을 하는 insight T.T

일단 실행시키면
$ ./gdb/insight

warning: A handler for the OS ABI "GNU/Linux" is not built into this configuration
of GDB.  Attempting to continue with the default sh settings.
라는 경고가 발생을 하고, sh4로 컴파일 된 녀석을 해보려고 하면


라는 경고를 출력한다. 당췌.. 어떻게 하란건지 모르겠네..

ABI는 Application Binary Interface의 약자라고 한다.
[출처 : http://www.redhat.com/docs/manuals/enterprise/RHEL-4-Manual/gdb/abi.html]

'프로그램 사용 > gdb & insight' 카테고리의 다른 글

gdb help  (0) 2009.06.26
간단한 gdb/gdbserver/insight 사용법  (0) 2009.06.26
GDB Insight FAQ - support target list  (0) 2009.06.26
insight - GDB GUI frontend  (0) 2009.06.26
gdb야 좀 대충 속아라~ 응?! 아 쫌!  (6) 2009.06.18
Posted by 구차니
FAQ를 찾다가 대략 좌절

2.3 How do I know what targets are supported by Insight?

There is no definitive list of targets supported by each version of GDB/Insight. The best place to look to find out if your target is supported is in the configure script and the source tree of the particular version of insight you are using.

-> 번역
GDB/Insight의 각 버전별 지원 타겟의 목록은 없습니다. 가장 좋은 방법은 configure 스크립트와 소스를 뒤져보는 수밖에 없습니다. (장난해!!!!)

[링크 : http://sources.redhat.com/insight/faq.php#q-2.2]

아무튼 이미 컴파일되어 있는 sh4-linux-gdb의 경우 실행하면 아래와 같이 나온다.
# sh4-linux-gdb
GNU gdb STMicroelectronics/Linux Base 6.4-12 [build Oct 15 2006]
Copyright 2005 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "--host=i686-pc-linux-gnu --target=sh4-linux".
(gdb)

근데.. 저렇게 타겟을 바꾸면... insight 자체가 타겟에 맞게 바뀔려나?
아니면 gdb 부분만 sh4-linux-gdb로 교체가 가능한걸려나?

'프로그램 사용 > gdb & insight' 카테고리의 다른 글

간단한 gdb/gdbserver/insight 사용법  (0) 2009.06.26
gdb/insight configure 도움말  (0) 2009.06.26
insight - GDB GUI frontend  (0) 2009.06.26
gdb야 좀 대충 속아라~ 응?! 아 쫌!  (6) 2009.06.18
gdb 한글 문서  (0) 2009.06.18
Posted by 구차니
insight는 GDB를 위한 GUI 프로그램이다.

About 메뉴

웬만한 창은 다 띄워본 화면

insight의 툴바. 순서대로
실행(Run) - 함수안으로(Step) - 함수다음(Next) - 함수나오기(Finish) - 계속실행(Continue)
앞에 5개만 알아도 사용하는데 지장없을 듯 하다.

사용법은 생각보다 단순해서, Visual Studio 에서 디버깅하는 느낌이 들 정도이다.
일단 자세한 사용법은 조금 더 사용해본 뒤 +_+!

[공식 : http://sources.redhat.com/insight/index.php]
[링크 : http://vasudevkamath.blogspot.com/2008/10/gdbs-gui-insight-tutorial.html]


insight를 설치하니, insight의 도움말을 띄우는데 gdb가 나온다.
아무튼 gdb로 실행하기 보다는 그냥 insight로 실행하면 된다.(gdb -w로 하면 된다는데 안된다)
Posted by 구차니
Linux API/network2009. 6. 25. 19:40
말그대로 라인을 얻어오는 함수이다.

SYNOPSIS
       #define _GNU_SOURCE
       #include <stdio.h>

       ssize_t getline(char **lineptr, size_t *n, FILE *stream);
       ssize_t getdelim(char **lineptr, size_t *n, int delim, FILE *stream);

DESCRIPTION
       getline()  reads an entire line from stream, storing the address of the buffer containing the text into *lineptr.
       The buffer is null-terminated and includes the newline character, if one was found.

       If *lineptr is NULL, then getline() will allocate a buffer for storing the line, which should  be  freed  by  the
       user  program.   Alternatively,  before calling getline(), *lineptr can contain a pointer to a malloc()-allocated
       buffer *n bytes in size. If the buffer is not large enough to hold the line, getline() resizes it with realloc(),
       updating  *lineptr  and *n as necessary. In either case, on a successful call, *lineptr and *n will be updated to
       reflect the buffer address and allocated size respectively.

       getdelim() works like getline(), except a line delimiter other than newline can be  specified  as  the  delimiter
       argument. As with getline(), a delimiter character is not added if one was not present in the input before end of
       file was reached.

함수형을 보면, 파일에서 한줄씩(그러니까 CR/LF 까지) 읽어 오는데,
주의해야 할 점은, getline() 함수 내부적으로 malloc()를 호출 한다는 것이다.
즉, 만약에 malloc()을 해주지 않으려면, NULL 값인 포인터를 넘겨주면
알아서 malloc() 하거나 realloc() 해주므로 많은 신경을 쓰지 않아도 된다.

단, 마지막 getline() 호출 후, 사용이 끝나면 반드시 free()를 해주어야 한다.

[링크 : http://linux.die.net/man/3/getline]
Posted by 구차니
아이디어!2009. 6. 25. 15:55
누가 이거 개발해서 특허내면 대박날 듯?!
근데 도대체 왜 냄새가 나는거지?
Posted by 구차니
적절한 제목이 안떠오르는데..
아무튼, 특정 이미지를 특정 사이즈의 사각형(Rectangle) 에 맞도록 출력해주는 일이 있는데
예를들면 탐색끼의 미리보기처럼, 100x100사이즈의 미리보기에 어떠한 크기의 이미지가 오더라도
벗어나지 않도록 적절한 크기의 이미지를 출력해주는 함수가 필요했다.

한달정도 깔끔한 알고리즘을 고심하다가 GG치고 다른 방법으로 구현했었는데
약간의 오작동을 보여서, 또 다시 고민을 하다가 어제 퇴근길 지하철에서 !! 했다.


#define min(a,b)    (((a) < (b)) ? (a) : (b))
#define max(a,b)    (((a) < (b)) ? (b) : (a))
#define FALSE               0 
#define TRUE                1 

#define CALC_MULTIPLIER	1000

typedef struct tagRECT {
	int		x1, y1, x2, y2;
} RECT;

RECT getRectsize(RECT dispRect, RECT imgRect)
{
	RECT ret;
	unsigned int Rx, Ry;
	unsigned char bhorAxis = FALSE;
	unsigned char bscale = FALSE;
	
	Rx = imgRect.x2 * CALC_MULTIPLIER / dispRect.x2;
	Ry = imgRect.y2 * CALC_MULTIPLIER / dispRect.y2;
	if(min(Rx,Ry) > CALC_MULTIPLIER)
	{
		if(Rx > Ry)
			bhorAxis = TRUE;
		else	bhorAxis = FALSE;
		bscale = TRUE;
	}
	else if(max(Rx,Ry) > CALC_MULTIPLIER)
	{
		if(Rx > Ry)
			bhorAxis = TRUE;
		else	bhorAxis = FALSE;
		bscale = TRUE;
	}

	if(bscale == TRUE)
	{
		if(bhorAxis == TRUE)
		{
			ret.x2 = dispRect.x2;
			ret.y2 = imgRect.y2 * dispRect.x2 / imgRect.x2;
			ret.x1 = dispRect.x1;
			ret.y1 = dispRect.y1 + (dispRect.y2 - ret.y2) / 2;
		}
		else
		{
			ret.y2 = dispRect.y2;
			ret.x2 = imgRect.x2 * dispRect.y2 / imgRect.y2;
			ret.x1 = dispRect.x1 + (dispRect.x2 - ret.x2) / 2;
			ret.y1 = dispRect.y1;
		}
	}
	else
	{
		ret.x2 = imgRect.x2;
		ret.y2 = imgRect.y2;
		ret.x1 = dispRect.x1 + (dispRect.x2 - imgRect.x2) / 2;
		ret.y1 = dispRect.x2 + (dispRect.y2 - imgRect.y2) / 2;
	}
	return ret;
}


간단한 구현원리는

1. 가로길이의 비율, 세로길이의 비율을 얻는다. (원본 크기 / 넣어야 할 크기)
   Rx, Ry - 가로 세율의 비율
   Ix, Iy - 원본 이미지의 가로세로 크기
   Dx, Dy - 표시할 사각형의 크기
   Rx = Ix / Dx
   Ry = Iy / Dy
2. 만약에 축소가 필요 하다면, 위의 비율은 1을 넘게 되고, 축소가 필요 없으면 1 이하가 나온다.
3. 비율값들이 모두 1을 넘으면 어느 방향이던지 간에 축소를 해주어야 함
4. 비율값들이 둘다 1이하면 그대로 출력하면 됨
5. 비율값이 하나만 1보다 크면, 작은쪽 값이 맞추어 축소함

'모종의 음모 > Bitmap 조작' 카테고리의 다른 글

완전 날로먹는 Bitmap 구조분석하기  (6) 2009.03.28
Posted by 구차니
개소리 왈왈2009. 6. 25. 10:01
웬지 캐공감.
난 역시 어쩔수 없는 공대생 이었던건가!!! OTL


공감 1. 복학하고 왔더니 후배가 더 삭아보이는 기현상이 -ㅁ-!
          선배인줄 알고 인사했더니 새내기!!! (그러니까 학번이 4학번 차이였는데 야들이 많이 힘들었냐? ㄱ-)

공감 2. 여자후배를 이용하여 밥 뜯어 먹기
          남자후배라고 해도 상관은 없지만, 이 치사한 것들이 한두넘 사줄려고 식당을 가다 보면
          저글링 한부대가 붙어버리는 기현상이 발생!
          그러고 보니.. 나름 여자동기를 악의 손아귀에서 보호하기 위한 노력이었나?

공감 3. 여신님 보호하기?
          후배중에 학과 CC였다가 헤어진 녀석이 있는데,
          헤어지고 나니 먼저 고백하자니 동기들 견제를 받고, 그래서 본의아니게 왕따가 되어버린 녀석
          선배로서 왕따로 지내는거 안쓰러워서 챙겨주었더니
          남자후배의 적으로 등극!!!
          어느샌가 이상한 소문도 퍼지기 시작하고 뒷조사는 안했지만 출처는 누구일지 뻔히 보이는 상황
          다음학기에는 열심히 학생회 할동도 하면서 동기들과 점점 멀어지더니
          다음학년에는 소리소문없이 사라짐 -ㅁ-

          ... 이 소심한 쉐키 그럼 먼저 고백이라도 해보던가!!! 왜 나만 나쁜넘 만드는겨!!


[링크 : http://bbs.cartoon.media.daum.net/gaia/do/debut/list?bbsId=c_short&sortKey=depth&searchKey=subject&searchValue=%EC%96%B4%EB%8A%90+%EA%B3%B5%EB%8C%80%EC%83%9D&x=0&y=0]

'개소리 왈왈' 카테고리의 다른 글

덥다..  (2) 2009.06.28
천백이 키보드 두둥!  (0) 2009.06.27
구글 애널리틱스 - 브라우저 점유율  (6) 2009.06.24
도를 아십니까?  (2) 2009.06.24
구차니 패닉  (10) 2009.06.20
Posted by 구차니
개소리 왈왈/자전거2009. 6. 25. 09:57
대충~ 속도계상에 표시된 거리는 42.195km(사소한건 패스)
그런데 편도 1시간 20분씩 왕복 2시간 40분 걸렸다.
...
어떻게 된게 자전거 타고 오는게 마라토너보다 느리냐 OTL





아무튼, 어제는 가락시장으로 나와서 한번 시도해보려던 길로 왔는데... 정말 오금이 저리고
손발이 오그라들정도로 가파른 경사로만 계속이어졌다...
속도계를 보면 8km ~ 10km 나오고 가끔은 속도계 속도 찍히지도 않을정도... OTL
이럴바에는 차라리 가락시장 사거리에서 삼성래미안 정도까지 조금 고생하고 평지로 가는게 낫지 않을까 싶다.

아무튼.. 집나가면 개고생이긴하다 OTL
Posted by 구차니
나도 6.25가 몇년도 발생했는지 모르니 남에게 머라고 할건덕지는 없지만.
많은건 몰라도 이것 하나만은 잊지말자.

국가가 약하면 타국의 침략을 받는다.
6.25는 북침이던 남침이던 그 사실을 떠나, 같은 민족끼리 처참하게 싸웠던 비극이며
다시는 일어나서는 안 될 사건이다.

정치적 이데올로기에 의해서 남침이 북침이 될수도 있고, 북침이 남침이 될수도 있기에
(물론 북쪽에서 공격을 먼저 해왔다고 배워왔지만, 전쟁에 있어서 누가 먼저 발포했냐가 중요한가?)
이러한 것 보다는, 전쟁이 남긴 교훈을 잊지 말아야겠다.



6.25 전쟁의 사후처리는 소련과/미국의 냉전으로 인해 38선이 그어지게 되었고,
실질적인 경제적 이익은 일본이 얻게되어, 6.25로 소비된 돈은 일본 경제의 밑걸음이 되었다.

우리나라 역시 베트남 전쟁의 반사이익을 얻어 발전하게 되었고,
우리나라가 그런 덕을 보고 발점하였다고 해서 정당화 될 수는 없는 것이다.
타인의 피로 일궈진 평화와 발전은, 언젠가 그대로 본인에게 돌아오게 될 것이다.



사족 : 6.25가 비극인것은, 수 많은 동포가 죽어간 것도 있지만
         약소국의 강대국에 의한 장난감으로 전락한 다는것도 큰 부분을 차지한다.
         역사에 만약은 없지만, 독립군이 제대로 투입되어 성공했고, 이승만이 정권을 잡지 않고 김구 선생님이
         초대 통일 대한민국의 대통령이 되었다면 지금처럼 소모적인 빨갱이, 좌파 우파 싸움도 많이 줄고
         친일파가 득세하여, 독립군의 후손들은 똥꼬가 찢어지도록 힘들게 살고 그 사실을 숨기게 되는 일이
         벌어지지 않게 되지 않았을까 하는 생각을 해본다.

         그렇기 때문에 더더욱 6.25를 잊어서는 안된다.
         그분과 그놈들로 부터 대한민국을 되찾기 위해서도 말이다.
Posted by 구차니
프로그램 사용2009. 6. 24. 18:28
증상 : 편집할 파일을 여는데 symbol window가 자동으로 열리지 않는 경우

아무생각없이 메뉴를 클릭한 상태에서 소스작업을 하다가 키를 연타로 누르는 바람에
창이 사라져서 어느창에서 변경되었는지 알수도 없고, 근 일주일간 해결책을 찾다가 포기한 상태에서
우연히 다시 찾게된 해결책이다. OTL

교훈 : 마우스는 안전한 곳에!


Step 1.
Option - Document Options 를 연다.

Step 2.
우측 하단의 Symbol Window의 체크를 켜준다.


Posted by 구차니